Merged revisions 2352-2573,2575-2625,2628-2648,2650-2859 via svnmerge from

file:///home/developper/svn/phpcompta/branches/rel500_javascript

................
  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
................
This commit is contained in:
Dany De Bontridder 2010-01-13 14:36:24 +00:00
parent fc2e883b83
commit 01e9cf80a2
390 changed files with 55443 additions and 29315 deletions

10245
Changelog

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

Binary file not shown.

View file

@ -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();
}
?>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

View file

@ -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&eacute;</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>

View file

@ -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

49
dev/add_require.py Executable file
View file

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

34
dev/change.py Executable file
View file

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

View file

@ -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

11
dev/compile_text.sh Normal file
View file

@ -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

View file

@ -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

10
dev/extract_text.sh Normal file
View file

@ -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

4
dev/plugin_client.txt Normal file
View file

@ -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"

View file

@ -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);

View file

@ -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);

View file

@ -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>';

100
dev/transform.py Executable file
View file

@ -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:
#

49
dev/usage_file.py Executable file
View file

@ -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 "

65
dev/usage_function.py Executable file
View file

@ -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])

42
dev/without_check.py Executable file
View file

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

BIN
doc/Diagram5.dia Normal file

Binary file not shown.

17911
doc/data.dia Normal file

File diff suppressed because it is too large Load diff

View file

@ -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

View file

@ -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

BIN
doc/document.dia Normal file

Binary file not shown.

BIN
doc/document2.dia Normal file

Binary file not shown.

Binary file not shown.

View file

@ -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>';

View file

@ -76,22 +76,23 @@ 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 &eacute;crire dans le r&eacute;pertoire de phpcompta, changez-en les droits </h2>';
exit();
}
echo '<form method="post">';
echo '<h1 class="info">Entrez les informations n&eacute;cessaires &agrave; phpcompta</h1>';
echo '<h1 class="info">Entrez les informations n&eacute;cessaires &agrave; 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
@ -205,30 +206,24 @@ if ( $flag_php==0 ) {
echo '<p class="error"> php mal configur&eacute;</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&eacute;eront l'utilisateur phpcompta avec le droit de cr&eacute;er des bases de donn&eacute;.</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&eacute;es en 8
vos bases de donn&eacute;es
</p>
<?php exit(); //'
}
@ -239,10 +234,10 @@ vos bases de donn&eacute;es en 8
// 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(); }
@ -253,10 +248,10 @@ $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,97 +284,86 @@ 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);
$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);
$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&eacute;licitation : Installation r&eacute;ussie</h2>";
echo '<hr>';
echo "<h1>Mise a jour du systeme</h1>";
echo "<h2 > Mise &agrave; 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 &agrave; jour mod&egrave;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>';
//----------------------------------------------------------------------
@ -387,13 +371,13 @@ echo '</ul>';
//----------------------------------------------------------------------
echo '<hr>';
echo "<h2>Mise &agrave; jour Repository</h2>";
$cn=DbConnect();
$cn=new Database();
if ( DEBUG == 'false') ob_start();
$MaxVersion=9;
$MaxVersion=10;
for ($i=4;$i<= $MaxVersion;$i++)
{
if ( get_version($cn) <= $i ) {
execute_script($cn,'sql/patch/ac-upgrade'.$i.'.sql');
if ( $cn->get_version() <= $i ) {
$cn->execute_script('sql/patch/ac-upgrade'.$i.'.sql');
}
}

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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();

View file

@ -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');
?>

View file

@ -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");

326
html/ajax_card.php Normal file
View file

@ -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;

204
html/ajax_extension.php Normal file
View file

@ -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;

149
html/ajax_get.php Normal file
View file

@ -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('&','&amp;',$html);
$html=str_replace('<','&lt;',$html);
$html=str_replace('>','&gt;',$html);
$html=str_replace("'",'&apos;',$html);
$html=str_replace('"','&quot;',$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;

View file

@ -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();
}

75
html/ajax_misc.php Normal file
View file

@ -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;
}

158
html/ajax_poste.php Normal file
View file

@ -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;

View file

@ -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']);

View file

@ -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&eacute;ration peut rompre la s&eacute;quence de la num&eacute;rotation des factures surtout celles g&eacute;n&eacute;r&eacute;es automatiquement, soyez tr&egrave;s prudent quand vous effacez. La pi&egrave;ce jointe sera elle aussi effac&eacute;e. Si vous utilisez la comptabilit&eacute; analytique les op&eacute;rations li&eacute;es seront effac&eacute;es.
<p><span class="error">Attention: l'effacement d'une op&eacute;ration peut rompre la s&eacute;quence de la num&eacute;rotation des factures surtout celles g&eacute;n&eacute;r&eacute;es automatiquement ainsi que celle des pièces justificatives, soyez tr&egrave;s prudent quand vous effacez. La pi&egrave;ce jointe sera elle aussi effac&eacute;e. Si vous utilisez la comptabilit&eacute; analytique les op&eacute;rations li&eacute;es seront effac&eacute;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&eacute;sol&eacute; mais il n a pas &eacute;t&eacute; possible d'annuler ".
"cette op&eacute;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&eacute;ration Annul&eacute;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&eacute;ration Annul&eacute;e</h2>';
?>
<script>
@ -389,26 +387,29 @@ echo '<div align="center"> Op&eacute;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 ) {

View file

@ -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);

View file

@ -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)
{

View file

@ -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();

View file

@ -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());

View file

@ -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');

View file

@ -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' ){

View file

@ -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);
//-----------------------------------------------------

View file

@ -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();

View file

@ -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);

View file

@ -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();

View file

@ -27,8 +27,7 @@
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);

View file

@ -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();

View file

@ -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']);

View file

@ -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 -->

View file

@ -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 -->

View file

@ -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&eacute;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');
}

View file

@ -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');
}

View file

@ -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">';

View file

@ -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 ){

89
html/extension.php Normal file
View file

@ -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');

View file

@ -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);

View file

@ -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>";
}
?>

View file

@ -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>";
}
?>

View file

@ -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 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;
$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");
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 )";
$sql="select * from vw_fiche_attr where fd_id in ( $list_fiche )";
} 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 ";
} 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 )";
}
}
// 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
// e_fic_search contains the pattern
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%'))" );
}
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;
// 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();
?>

View file

@ -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 ';
$filter_jrn=getDbValue($cn,"select $get_cred||','||$get_deb as fiche from jrn_def where jrn_def_id=$1",array($jrn));
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_card="and fd_id in ($filter_jrn)";
break;
default:
$filter_card="and frd_id in ($d)";
break;
case 'all':
$filter_card='';
break;
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;
?>

130
html/fid_card.php Normal file
View file

@ -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>";
}
?>

View file

@ -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);

View file

@ -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;

View file

@ -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;

View file

@ -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);

View file

@ -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"}';

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 385 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 962 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

BIN
html/image/down.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 633 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Some files were not shown because too many files have changed in this diff Show more