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
................
1501 lines
43 KiB
PHP
1501 lines
43 KiB
PHP
<?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("class_attribut.php");
|
|
require_once("class_ispan.php");
|
|
require_once("class_itva.php");
|
|
require_once("class_itext.php");
|
|
require_once("class_ihidden.php");
|
|
require_once('class_fiche_def.php');
|
|
require_once('class_iposte.php');
|
|
|
|
/*! \file
|
|
* \brief define Class fiche, this class are using
|
|
* class attribut
|
|
*/
|
|
/*!
|
|
* \brief define Class fiche and fiche def, those class are using
|
|
* class attribut. When adding or modifing new card in a IPOPUP
|
|
* the ipopup for the accounting item is ipop_account
|
|
*/
|
|
|
|
//-----------------------------------------------------
|
|
// class fiche
|
|
//-----------------------------------------------------
|
|
class fiche {
|
|
var $cn; /*! < $cn database connection */
|
|
var $id; /*! < $id fiche.f_id */
|
|
var $fiche_def; /*! < $fiche_def fd_id */
|
|
var $attribut; /*! < $attribut array of attribut object */
|
|
var $fiche_def_ref; /*!< $fiche_def_ref Type */
|
|
var $row; /*! < All the row from the ledgers */
|
|
var $quick_code; /*!< quick_code of the card */
|
|
function fiche($p_cn,$p_id=0) {
|
|
$this->cn=$p_cn;
|
|
$this->id=$p_id;
|
|
$this->quick_code='';
|
|
}
|
|
/*! get_by_qcode($p_qcode)
|
|
* \brief Retrieve a card thx his quick_code
|
|
* complete the object,, set the id member of the object or set it
|
|
* to 0 if no card is found
|
|
* \param $p_qcode quick_code (ad_id=23)
|
|
* \param $p_all retrieve all the attribut of the card, possible value
|
|
* are true, false retrieves only the f_id
|
|
* \return 0 success 1 error not found
|
|
*/
|
|
|
|
function get_by_qcode($p_qcode=null,$p_all=true)
|
|
{
|
|
if ( $p_qcode == null )
|
|
$p_qcode=$this->quick_code;
|
|
$p_qcode=trim($p_qcode);
|
|
$sql="select f_id from jnt_fic_att_value join attr_value
|
|
using (jft_id) where ad_id=23 and av_text=upper($1)";
|
|
$this->id=$this->cn->get_value($sql,array($p_qcode));
|
|
if ( $this->cn->count()==0) {
|
|
$this->id=0;
|
|
return 1;
|
|
}
|
|
|
|
echo_debug('class_fiche',__LINE__,'f_id = '.$this->id);
|
|
|
|
if ( $p_all )
|
|
$this->getAttribut();
|
|
return 0;
|
|
}
|
|
/*!
|
|
**************************************************
|
|
* \brief get all the attribute of a card, add missing ones
|
|
* and sort the array ($this-\>attribut) by ad_id
|
|
*/
|
|
function getAttribut() {
|
|
if ( $this->id == 0){
|
|
return;
|
|
}
|
|
$sql="select *
|
|
from jnt_fic_att_value
|
|
natural join fiche
|
|
natural join attr_value
|
|
join jnt_fic_attr on (jnt_fic_attr.fd_id=fiche.fd_id and jnt_fic_attr.ad_id=jnt_fic_att_value.ad_id)
|
|
join attr_def on (attr_def.ad_id=jnt_fic_att_value.ad_id) where f_id=".$this->id.
|
|
" order by jnt_order";
|
|
|
|
$Ret=$this->cn->exec_sql($sql);
|
|
if ( ($Max=Database::num_row($Ret)) == 0 )
|
|
return ;
|
|
for ($i=0;$i<$Max;$i++) {
|
|
$row=Database::fetch_array($Ret,$i);
|
|
$this->fiche_def=$row['fd_id'];
|
|
$t=new Attribut ($row['ad_id']);
|
|
$t->ad_text=$row['ad_text'];
|
|
$t->av_text=$row['av_text'];
|
|
$t->jnt_order=$row['jnt_order'];
|
|
$this->attribut[$i]=$t;
|
|
}
|
|
$e=new Fiche_def($this->cn,$this->fiche_def);
|
|
$e->GetAttribut();
|
|
|
|
if ( sizeof($this->attribut) != sizeof($e->attribut ) ) {
|
|
|
|
// !!! Missing attribute
|
|
foreach ($e->attribut as $f ) {
|
|
$flag=0;
|
|
foreach ($this->attribut as $g ) {
|
|
if ( $g->ad_id == $f->ad_id )
|
|
$flag=1;
|
|
}
|
|
if ( $flag == 0 ) {
|
|
// there's a missing one, we insert it
|
|
$t=new Attribut ($f->ad_id);
|
|
$t->av_text="";
|
|
$t->ad_text=$f->ad_text;
|
|
$t->jnt_order=$f->jnt_order;
|
|
$this->attribut[$Max]=$t;
|
|
$Max++;
|
|
} // if flag == 0
|
|
|
|
}// foreach
|
|
$this->attribut=SortAttributeById($this->attribut);
|
|
|
|
|
|
}//missing attribut
|
|
}
|
|
|
|
|
|
/*!
|
|
* \brief give the size of a card object
|
|
*
|
|
* \return size
|
|
*/
|
|
function size() {
|
|
if ( isset ($this->ad_id))
|
|
return sizeof($this->ad_id);
|
|
else
|
|
return 0;
|
|
}
|
|
|
|
|
|
/*!
|
|
**************************************************
|
|
* \brief Return array of card from the frd family
|
|
*
|
|
* \param $p_frd_id the fiche_def_ref.frd_id
|
|
* \param $p_search p_search is a filter on the name
|
|
* \param $p_sql extra sql condition
|
|
*
|
|
* \return array of fiche object
|
|
*/
|
|
function CountByDef($p_frd_id,$p_search="",$p_sql="") {
|
|
$sql="select *
|
|
from
|
|
fiche join fiche_Def using (fd_id)
|
|
where frd_id=".$p_frd_id;
|
|
if ( $p_search != "" )
|
|
{
|
|
$a=FormatString($p_search);
|
|
$sql="select * from vw_fiche_attr where frd_id=".$p_frd_id.
|
|
" and vw_name ~* '$p_search'";
|
|
}
|
|
|
|
$Ret=$this->cn->exec_sql($sql.$p_sql);
|
|
|
|
return Database::num_row($Ret) ;
|
|
}
|
|
/*!
|
|
**************************************************
|
|
* \brief Return array of card from the frd family
|
|
*
|
|
*
|
|
* \param $p_frd_id the fiche_def_ref.frd_id
|
|
* \param $p_offset
|
|
* \param $p_search is an optional filter
|
|
*
|
|
* \return array of fiche object
|
|
*/
|
|
function GetByDef($p_frd_id,$p_offset=-1,$p_search="") {
|
|
if ( $p_offset == -1 )
|
|
{
|
|
$sql="select *
|
|
from
|
|
fiche join fiche_Def using (fd_id)
|
|
where frd_id=".$p_frd_id." $p_search order by f_id";
|
|
}
|
|
else
|
|
{
|
|
$limit=($_SESSION['g_pagesize']!=-1)?"limit ".$_SESSION['g_pagesize']:"";
|
|
$sql="select *
|
|
from
|
|
fiche join fiche_Def using (fd_id)
|
|
where frd_id=".$p_frd_id." $p_search order by f_id "
|
|
.$limit." offset ".$p_offset;
|
|
|
|
}
|
|
|
|
$Ret=$this->cn->exec_sql($sql);
|
|
if ( ($Max=Database::num_row($Ret)) == 0 )
|
|
return ;
|
|
$all[0]=new fiche($this->cn);
|
|
|
|
for ($i=0;$i<$Max;$i++) {
|
|
$row=Database::fetch_array($Ret,$i);
|
|
$t=new fiche($this->cn,$row['f_id']);
|
|
$t->getAttribut();
|
|
$all[$i]=$t;
|
|
|
|
}
|
|
echo_debug(__FILE__,__LINE__,$all);
|
|
return $all;
|
|
}
|
|
function ShowTable() {
|
|
echo "<TR><TD> ".
|
|
$this->id."</TD>".
|
|
"<TR> <TD>".
|
|
$this->attribut_value."</TD>".
|
|
"<TR> <TD>".
|
|
$this->attribut_def."</TD></TR>";
|
|
}
|
|
/*!
|
|
**************************************************
|
|
* \brief return the string of the given attribute
|
|
* (attr_def.ad_id)
|
|
* \param $p_ad_id the AD_ID from attr_def.ad_id
|
|
* \see constant.php
|
|
* \return string
|
|
*/
|
|
function strAttribut($p_ad_id)
|
|
{
|
|
if ( sizeof ($this->attribut) == 0 )
|
|
{
|
|
|
|
if ($this->id==0) return '- ERROR -';
|
|
// object is not in memory we need to look into the database
|
|
$sql="select av_text from attr_value join jnt_fic_att_value using(jft_id)
|
|
where f_id=".FormatString($this->id)." and ad_id=".$p_ad_id;
|
|
$Res=$this->cn->exec_sql($sql);
|
|
$row=Database::fetch_all($Res);
|
|
// if not found return error
|
|
if ( $row == false )
|
|
return ' - ERROR -';
|
|
|
|
return $row[0]['av_text'];
|
|
}
|
|
|
|
foreach ($this->attribut as $e)
|
|
{
|
|
if ( $e->ad_id == $p_ad_id )
|
|
return $e->av_text;
|
|
}
|
|
return '- ERROR -';
|
|
}
|
|
/*!\brief make an array of attributes of the category of card (FICHE_DEF.FD_ID)
|
|
*The array can be used with the function insert, it will return a struct like this :
|
|
* in the first key (av_textX), X is the ATTR_DEF::AD_ID
|
|
\verbatim
|
|
Example
|
|
Array
|
|
(
|
|
[av_text1] => Nom
|
|
[av_text12] => Personne de contact
|
|
[av_text5] => Poste Comptable
|
|
[av_text13] => numéro de tva
|
|
[av_text14] => Adresse
|
|
[av_text15] => code postal
|
|
[av_text24] => Ville
|
|
[av_text16] => pays
|
|
[av_text17] => téléphone
|
|
[av_text18] => email
|
|
[av_text23] => Quick Code
|
|
)
|
|
|
|
\endverbatim
|
|
*\param $pfd_id FICHE_DEF::FD_ID
|
|
*\return an array of attribute
|
|
*\exception Exception if the cat of card doesn't exist, Exception.getCode()=1
|
|
*\see fiche::insert()
|
|
*/
|
|
function toArray($pfd_id) {
|
|
$sql="select 'av_text'||to_char(ad_id,'9999') as key,".
|
|
" ad_text ".
|
|
" from fiche_def join jnt_fic_attr using (fd_id)".
|
|
" join attr_def using (ad_id) ".
|
|
" where fd_id=$1 order by jnt_order";
|
|
$ret=$this->cn->get_array($sql,array($pfd_id));
|
|
if ( empty($ret)) throw new Exception(_('Cette categorie de card n\'existe pas').' '.$pfd_id,1);
|
|
$array=array();
|
|
foreach($ret as $idx=>$val) {
|
|
$a=str_replace(' ','',$val['key']);
|
|
$array[$a]=$val['ad_text'];
|
|
}
|
|
return $array;
|
|
|
|
}
|
|
/*!
|
|
* \brief insert a new record
|
|
* show a blank card to be filled
|
|
*
|
|
* \param $p_fiche_def is the fiche_def.fd_id
|
|
*
|
|
* \return HTML Code
|
|
*/
|
|
function blank($p_fiche_def)
|
|
{
|
|
// array = array of attribute object sorted on ad_id
|
|
$f=new fiche_def($this->cn,$p_fiche_def);
|
|
$f->Get();
|
|
$array=$f->getAttribut();
|
|
$r='<table>';
|
|
foreach ($array as $attr)
|
|
{
|
|
$msg="";
|
|
if ( $attr->ad_id == ATTR_DEF_ACCOUNT)
|
|
{
|
|
$w=new IPoste("av_text".$attr->ad_id);
|
|
$w->set_attribute('ipopup','ipop_account');
|
|
$w->set_attribute('account',"av_text".$attr->ad_id);
|
|
// account created automatically
|
|
$sql="select account_auto($p_fiche_def)";
|
|
echo_debug("class_fiche",__LINE__,$sql);
|
|
$ret_sql=$this->cn->exec_sql($sql);
|
|
$a=Database::fetch_array($ret_sql,0);
|
|
$label=new ISpan();
|
|
$label->name="av_text".$attr->ad_id."_label";
|
|
|
|
if ( $a['account_auto'] == 't' )
|
|
$msg.="<TD>".$label->input()."<br> <font color=\"red\">"._("Rappel: Poste créé automatiquement à partir de ").$f->class_base." </font></TD> ";
|
|
else
|
|
{
|
|
// if there is a class base in fiche_def_ref, this account will be the
|
|
// the default one
|
|
if ( strlen(trim($f->class_base)) != 0 )
|
|
{
|
|
$msg.="<TD>".$label->input()."<br> <font color=\"red\">"._("Rappel: Poste par défaut sera ").
|
|
$f->class_base.
|
|
" !</font></TD> ";
|
|
$w->value=$f->class_base;
|
|
}
|
|
|
|
}
|
|
$r.="<TR>".td("Poste Comptable","input_text").td($w->input())."$msg </TR>";
|
|
continue;
|
|
}
|
|
elseif ( $attr->ad_id == ATTR_DEF_TVA)
|
|
{
|
|
$r.=JS_SHOW_TVA;
|
|
$w=new ITva();
|
|
|
|
}
|
|
elseif ( $attr->ad_id == ATTR_DEF_COMPANY )
|
|
{
|
|
$r.=JS_LEDGER;
|
|
$w=new ICard();
|
|
// filter on frd_id
|
|
$sql=' select fd_id from fiche_def where frd_id in ('.FICHE_TYPE_CLIENT.','.FICHE_TYPE_FOURNISSEUR.','.FICHE_TYPE_ADM_TAX.')';
|
|
$filter=$this->cn->make_list($sql);
|
|
$w->extra=$filter;
|
|
$w->extra2=0;
|
|
$label=new ISpan();
|
|
$label->name="av_text".$attr->ad_id."_label";
|
|
$msg=$label->input();
|
|
|
|
}
|
|
else
|
|
{
|
|
$w=new IText();
|
|
}
|
|
$w->table=1;
|
|
$w->label=$attr->ad_text;
|
|
$w->name="av_text".$attr->ad_id;
|
|
|
|
$r.="<TR>".td($w->label,"input_text").$w->input()."$msg </TR>";
|
|
}
|
|
$r.= '</table>';
|
|
return $r;
|
|
}
|
|
|
|
|
|
/*!
|
|
* \brief Display object instance, getAttribute
|
|
* sort the attribute and add missing ones
|
|
* \param $p_readonly true= if can not modify, otherwise false
|
|
*
|
|
*
|
|
* \return string to display
|
|
*/
|
|
function Display($p_readonly)
|
|
{
|
|
$this->GetAttribut();
|
|
$attr=$this->attribut;
|
|
|
|
$ret="<table>";
|
|
if ( empty ($attr) ) {
|
|
return "Fiche non trouvée";
|
|
}
|
|
foreach ( $attr as $r)
|
|
{
|
|
$msg="";
|
|
$bulle="";
|
|
if ( $p_readonly)
|
|
{
|
|
$w=new IText();
|
|
$w->table=1;
|
|
$w->readOnly=true;
|
|
|
|
}
|
|
if ($p_readonly==false)
|
|
{
|
|
|
|
if ( $r->ad_id == ATTR_DEF_ACCOUNT)
|
|
{
|
|
$w=new IPoste("av_text".$r->ad_id);
|
|
$w->set_attribute('ipopup','ipop_account');
|
|
$w->set_attribute('account',"av_text".$r->ad_id);
|
|
// account created automatically
|
|
$w->table=1;
|
|
// account created automatically
|
|
$sql="select account_auto($this->fiche_def)";
|
|
echo_debug("class_fiche",__LINE__,$sql);
|
|
$ret_sql=$this->cn->exec_sql($sql);
|
|
$a=Database::fetch_array($ret_sql,0);
|
|
$bulle=HtmlInput::infobulle(10);
|
|
|
|
if ( $a['account_auto'] == 't' )
|
|
$bulle.=HtmlInput::warnbulle(11);
|
|
|
|
}
|
|
elseif ( $r->ad_id == ATTR_DEF_TVA)
|
|
{
|
|
$ret.=JS_SHOW_TVA;
|
|
$w=new ITva();
|
|
$w->table=1;
|
|
|
|
}
|
|
elseif ( $r->ad_id == ATTR_DEF_COMPANY )
|
|
{
|
|
$ret.=JS_LEDGER;
|
|
$w=new ISearch();
|
|
// filter on frd_id
|
|
$w->extra=FICHE_TYPE_CLIENT.','.FICHE_TYPE_FOURNISSEUR.','.FICHE_TYPE_ADM_TAX;
|
|
$w->extra2=0; // jrn = 0
|
|
$w->table=1;
|
|
|
|
$label=new ISpan();
|
|
$label->name="av_text".$r->ad_id."_label";
|
|
$msg=$label->input();
|
|
}
|
|
|
|
else
|
|
{
|
|
$w=new IText();
|
|
$w->table=1;
|
|
}
|
|
}
|
|
$w->value=$r->av_text;
|
|
$w->name="av_text".$r->ad_id;
|
|
$w->readonly=$p_readonly;
|
|
|
|
|
|
$ret.="<TR>".td($r->ad_text.$bulle).$w->input()."$msg </TR>";
|
|
}
|
|
$ret.="</table>";
|
|
return $ret;
|
|
}
|
|
/*!
|
|
* \brief Save a card, call insert or update
|
|
*
|
|
* \param p_fiche_def (default 0)
|
|
*/
|
|
function Save($p_fiche_def=0)
|
|
{
|
|
// new card or only a update ?
|
|
if ( $this->id == 0 )
|
|
$this->insert($p_fiche_def);
|
|
else
|
|
$this->update();
|
|
}
|
|
/*!
|
|
* \brief insert a new record
|
|
*
|
|
* \param p_fiche_def fiche_def.fd_id
|
|
* \param p_array is the array containing the data
|
|
*/
|
|
function insert($p_fiche_def,$p_array=null)
|
|
{
|
|
if ( $p_array == null)
|
|
$p_array=$_POST;
|
|
|
|
$fiche_id=$this->cn->get_next_seq('s_fiche');
|
|
$this->id=$fiche_id;
|
|
// first we create the card
|
|
$this->cn->start();
|
|
try
|
|
{
|
|
$sql=sprintf("insert into fiche(f_id,fd_id)".
|
|
" values (%d,%d)",
|
|
$fiche_id,$p_fiche_def);
|
|
$Ret=$this->cn->exec_sql($sql);
|
|
// parse the $p_array array
|
|
foreach ($p_array as $name=>$value )
|
|
{
|
|
echo_debug ("class_fiche",__LINE__,"Name = $name value $value") ;
|
|
/* avoid the button for searching an accounting item */
|
|
if ( $name=='av_text5_bt') continue;
|
|
list ($id) = sscanf ($name,"av_text%d");
|
|
if ( $id == null ) continue;
|
|
echo_debug("class_fiche",__LINE__,"add $id");
|
|
|
|
// Special traitement
|
|
// quickcode
|
|
if ( $id == ATTR_DEF_QUICKCODE)
|
|
{
|
|
echo_debug("Modify ATTR_DEF_QUICKCODE");
|
|
$sql=sprintf("select insert_quick_code(%d,'%s')",
|
|
$fiche_id,FormatString($value));
|
|
$this->cn->exec_sql($sql);
|
|
continue;
|
|
}
|
|
// stock
|
|
if ( $id == ATTR_DEF_STOCK ) {
|
|
$st=$this->cn->count_sql('select * from stock_goods where '.
|
|
" upper(sg_code)=upper('$value')");
|
|
if ( $st == 0 ) {
|
|
$user=new User($this->cn);
|
|
if ( $exercice == 0 ) throw new Exception ('Veuillez choisir une période dans vos préférences ',1);
|
|
|
|
$str_stock=sprintf('insert into stock_goods(f_id,sg_quantity,sg_comment,sg_code,sg_type,sg_exercice) '.
|
|
' values (%d,0,\'%s\',upper(\'%s\'),\'d\',\'%s\')',
|
|
$fiche_id,
|
|
'initial',
|
|
FormatString($value),
|
|
$exercice);
|
|
|
|
$this->cn->exec_sql($str_stock);
|
|
}
|
|
}
|
|
// name
|
|
if ( $id == ATTR_DEF_NAME )
|
|
{
|
|
echo_debug("Modify ATTR_DEF_NAME");
|
|
if ( strlen(trim($value)) == 0 )
|
|
$value="pas de nom";
|
|
|
|
}
|
|
// account
|
|
if ( $id == ATTR_DEF_ACCOUNT )
|
|
{
|
|
echo_debug("insert ATTR_DEF_ACCOUNT");
|
|
$v=FormatString($value);
|
|
try {
|
|
if (
|
|
isNumber($v) == 1
|
|
)
|
|
{
|
|
$sql=sprintf("select account_insert(%d,%f)",
|
|
$this->id,$v);
|
|
}
|
|
else
|
|
{
|
|
$sql=sprintf("select account_insert(%d,null)",
|
|
$this->id);
|
|
}
|
|
$this->cn->exec_sql($sql);
|
|
echo_debug(__FILE__,__LINE__,$sql);
|
|
} catch (Exception $e) {
|
|
throw new Exception ("Erreur : ce compte [$v] n'a pas de compte parent.".
|
|
"L'opération est annulée",
|
|
1);
|
|
}
|
|
continue;
|
|
}
|
|
// TVA
|
|
if ( $id == ATTR_DEF_TVA )
|
|
{
|
|
echo_debug("Modify ATTR_DEF_TVA");
|
|
// Verify if the rate exists, if not then do not update
|
|
if ( strlen(trim($value)) != 0 )
|
|
{
|
|
if ( $this->cn->count_sql("select * from tva_rate where tva_id=".$value) == 0)
|
|
{
|
|
echo_debug("class_fiche",__LINE__,"Tva invalide $value");
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
// The contact has a company attribut
|
|
if ( $id == ATTR_DEF_COMPANY )
|
|
{
|
|
$exist=$this->cn->count_sql("select f_id from fiche join fiche_def using (fd_id) ".
|
|
" join jnt_fic_att_value using (f_id) join attr_value using (jft_id) ".
|
|
" where frd_id in (8,9,14) and ad_id=".ATTR_DEF_QUICKCODE.
|
|
" and av_text='".FormatString($value)."'");
|
|
if ( $exist == 0 && FormatString($value) != null )
|
|
{
|
|
$value="";
|
|
}
|
|
}
|
|
// Normal traitement
|
|
$value2=FormatString($value);
|
|
|
|
$sql=sprintf("select attribut_insert(%d,%d,'%s')",
|
|
$fiche_id,$id,trim($value2));
|
|
$this->cn->exec_sql($sql);
|
|
}
|
|
} catch (Exception $e)
|
|
{
|
|
$this->cn->rollback();
|
|
throw ($e);
|
|
return;
|
|
}
|
|
$this->cn->commit();
|
|
return;
|
|
}
|
|
|
|
|
|
|
|
/*!\brief update a card
|
|
*/
|
|
function update($p_array=null)
|
|
{
|
|
if ( $p_array == null)
|
|
$p_array=$_POST;
|
|
|
|
try {
|
|
$this->cn->start();
|
|
// parse the $p_array array
|
|
foreach ($p_array as $name=>$value )
|
|
{
|
|
echo_debug ("class_fiche",__LINE__,"Name = $name value $value") ;
|
|
list ($id) = sscanf ($name,"av_text%d");
|
|
if ( $id == null ) continue;
|
|
echo_debug("class_fiche",__LINE__,"modify $id");
|
|
|
|
// retrieve jft_id to update table attr_value
|
|
$sql=" select jft_id from jnt_fic_att_value where ad_id=$id and f_id=$this->id";
|
|
$Ret=$this->cn->exec_sql($sql);
|
|
if ( Database::num_row($Ret) != 1 ) {
|
|
// we need to insert this new attribut
|
|
echo_debug ("class_fiche ".__LINE__." adding id !!! ");
|
|
$jft_id=$this->cn->get_next_seq('s_jnt_fic_att_value');
|
|
|
|
$sql2=sprintf("insert into jnt_fic_att_value(jft_id,ad_id,f_id) values (%s,%s,%s)",
|
|
$jft_id,$id,$this->id);
|
|
|
|
$ret2=$this->cn->exec_sql($sql2);
|
|
// insert a null value for this attribut
|
|
$sql3=sprintf("insert into attr_value(jft_id,av_text) values (%s,null)",
|
|
$jft_id);
|
|
$ret3=$this->cn->exec_sql($sql3);
|
|
} else
|
|
{
|
|
$tmp=Database::fetch_array($Ret,0);
|
|
$jft_id=$tmp['jft_id'];
|
|
}
|
|
// Special traitement
|
|
// quickcode
|
|
if ( $id == ATTR_DEF_QUICKCODE)
|
|
{
|
|
echo_debug("Modify ATTR_DEF_QUICKCODE");
|
|
$sql=sprintf("select update_quick_code(%d,'%s')",
|
|
$jft_id,FormatString($value));
|
|
$this->cn->exec_sql($sql);
|
|
continue;
|
|
}
|
|
// name
|
|
if ( $id == ATTR_DEF_NAME )
|
|
{
|
|
echo_debug("Modify ATTR_DEF_NAME");
|
|
if ( strlen(trim($value)) == 0 )
|
|
continue;
|
|
|
|
|
|
}
|
|
if ( $id == ATTR_DEF_STOCK ) {
|
|
$st=$this->cn->count_sql('select * from stock_goods where '.
|
|
" f_id=".$this->id);
|
|
if ( $st == 0 ) {
|
|
$user=new User($this->cn);
|
|
$exercice=$user->get_exercice();
|
|
if ( $exercice == 0 ) throw new Exception ('Annee invalide erreur');
|
|
|
|
$str_stock=sprintf('insert into stock_goods(f_id,sg_quantity,sg_comment,sg_code,sg_type,sg_exercice) '.
|
|
' values (%d,0,\'%s\',upper(\'%s\'),\'d\',\'%s\')',
|
|
$this->id,
|
|
'initial',
|
|
FormatString($value),
|
|
$exercice);
|
|
|
|
$this->cn->exec_sql($str_stock);
|
|
}else {
|
|
$str_stock=sprintf("update stock_goods set sg_code=upper('%s') where f_id=%d",
|
|
FormatString($value),
|
|
$this->id);
|
|
$this->cn->exec_sql($str_stock);
|
|
}
|
|
}
|
|
|
|
// account
|
|
if ( $id == ATTR_DEF_ACCOUNT )
|
|
{
|
|
echo_debug("Modify ATTR_DEF_ACCOUNT");
|
|
$v=FormatString($value);
|
|
echo_debug("Value = $v");
|
|
if ( isNumber($v) == 1 )
|
|
{
|
|
$sql=sprintf("select account_update(%d,%d)",
|
|
$this->id,$v);
|
|
try {
|
|
$this->cn->exec_sql($sql);
|
|
/* update also the jrnx */
|
|
$sql='update jrnx set j_poste=$1 where j_qcode in (select quick_code from vw_fiche_attr where f_id=$2)';
|
|
$this->cn->exec_sql(
|
|
$sql,
|
|
array($v,$this->id));
|
|
|
|
} catch (Exception $e) {
|
|
throw new Exception(__LINE__."Erreur : ce compte [$v] n'a pas de compte parent.".
|
|
"L'opération est annulée");
|
|
}
|
|
continue;
|
|
}
|
|
if ( strlen (trim($v)) == 0 )
|
|
{
|
|
|
|
$sql=sprintf("select account_update(%d,null)",
|
|
$this->id);
|
|
try {
|
|
$Ret=$this->cn->exec_sql($sql);
|
|
/* update also the jrnx */
|
|
|
|
$sql='update jrnx set j_poste=$1 where j_qcode in (select quick_code from vw_fiche_attr where f_id=$2)';
|
|
$this->cn->exec_sql(
|
|
$sql,
|
|
array($v,$this->id));
|
|
|
|
} catch (Exception $e) {
|
|
throw new Exception(__LINE__."Erreur : ce compte [$v] n'a pas de compte parent.".
|
|
"L'opération est annulée");
|
|
}
|
|
|
|
continue;
|
|
}
|
|
}
|
|
// TVA
|
|
if ( $id == ATTR_DEF_TVA )
|
|
{
|
|
echo_debug("Modify ATTR_DEF_TVA");
|
|
// Verify if the rate exists, if not then do not update
|
|
if ( strlen(trim($value)) != 0 )
|
|
{
|
|
if ( $this->cn->count_sql("select * from tva_rate where tva_id=".$value) == 0)
|
|
{
|
|
echo_debug("class_fiche",__LINE__,"Tva invalide $value");
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
if ( $id == ATTR_DEF_COMPANY )
|
|
{
|
|
$exist=$this->cn->count_sql("select f_id from fiche join fiche_def using (fd_id) ".
|
|
" join jnt_fic_att_value using (f_id) join attr_value using (jft_id) ".
|
|
" where frd_id in (8,9,14) and ad_id=".ATTR_DEF_QUICKCODE.
|
|
" and av_text='".FormatString($value)."'");
|
|
|
|
|
|
if ( $exist == 0 && FormatString($value) != null )
|
|
{
|
|
$value="Attention : pas de société ";
|
|
}
|
|
}
|
|
|
|
// Normal traitement
|
|
$value2=FormatString($value);
|
|
$sql=sprintf("update attr_value set av_text='%s' where jft_id=%d",
|
|
trim($value2),$jft_id);
|
|
$this->cn->exec_sql($sql);
|
|
}
|
|
} catch (Exception $e ) {
|
|
echo '<span class="error">'.
|
|
$e->getMessage().
|
|
'</span>';
|
|
$this->cn->rollback();
|
|
return;
|
|
}
|
|
$this->cn->commit();
|
|
return;
|
|
|
|
}
|
|
/*!\brief remove a card
|
|
*/
|
|
function remove()
|
|
{
|
|
if ( $this->id==0 ) return;
|
|
// verify if that card has not been used is a ledger
|
|
// if the card has its own account in PCMN
|
|
// Get the fiche_def.fd_id from fiche.f_id
|
|
$this->Get();
|
|
$fiche_def=new fiche_def($this->cn,$this->fiche_def);
|
|
$fiche_def->Get();
|
|
|
|
// if the card is used do not removed it
|
|
$qcode=$this->strAttribut(ATTR_DEF_QUICKCODE);
|
|
|
|
if ( $this->cn->count_sql("select * from jrnx where j_qcode='".Database::escape_string($qcode)."'") != 0)
|
|
{
|
|
alert('Impossible cette fiche est utilisée dans un journal');
|
|
return;
|
|
}
|
|
|
|
if ( $fiche_def->create_account=='t' ) {
|
|
// Retrieve the 'poste comptable'
|
|
$class=$this->strAttribut(ATTR_DEF_ACCOUNT);
|
|
$is_used_jrnx=0;
|
|
if ( trim(strlen($class)) != 0 && isNumber($class) == 1 )
|
|
$is_used_jrnx= $this->cn->count_sql("select * from jrnx where j_poste=$class");
|
|
// if class is not NULL and if we use it before, we can't remove it
|
|
if (FormatString($class) != null && $is_used_jrnx != 0 )
|
|
{
|
|
alert('Impossible ce poste est utilisée dans un journal');
|
|
return;
|
|
}
|
|
else
|
|
// Remove in PCMN
|
|
if ( trim(strlen($class)) != 0 && isNumber($class) == 1 && $is_used_jrnx == 0)
|
|
{
|
|
$this->cn->exec_sql("delete from tmp_pcmn where pcm_val=$class");
|
|
}
|
|
|
|
}
|
|
$this->delete();
|
|
}
|
|
|
|
|
|
/*!\brief return the name of a card
|
|
*
|
|
*/
|
|
function getName()
|
|
{
|
|
$sql="select av_text from jnt_fic_att_value join attr_value
|
|
using (jft_id) where ad_id=1 and f_id=".$this->id;
|
|
$Res=$this->cn->exec_sql($sql);
|
|
$r=Database::fetch_all($Res);
|
|
if ( sizeof($r) == 0 )
|
|
return 1;
|
|
return $r[0]['av_text'];
|
|
}
|
|
|
|
/*!\brief return the quick_code of a card
|
|
* \return null if not quick_code is found
|
|
*/
|
|
function get_quick_code()
|
|
{
|
|
$sql="select av_text from jnt_fic_att_value join attr_value
|
|
using (jft_id) where ad_id=23 and f_id=".$this->id;
|
|
$Res=$this->cn->exec_sql($sql);
|
|
$r=Database::fetch_all($Res);
|
|
if ( sizeof($r) == 0 )
|
|
return null;
|
|
return $r[0]['av_text'];
|
|
}
|
|
|
|
/*!\brief Synonum of fiche::getAttribut
|
|
*/
|
|
function Get()
|
|
{
|
|
echo_debug('class_client',__LINE__,'Get');
|
|
fiche::getAttribut();
|
|
}
|
|
/*!\brief get all the card thanks the fiche_def_ref
|
|
* \param $p_offset (default =-1)
|
|
* \param $p_search sql condition
|
|
* \return array of fiche object
|
|
*/
|
|
function GetAll($p_offset=-1,$p_search="")
|
|
{
|
|
return fiche::GetByDef($this->fiche_def_ref,$p_offset,$p_search);
|
|
}
|
|
/*!\brief retrieve the frd_id of the fiche it is the type of the
|
|
* card (bank, purchase...)
|
|
* (fiche_def_ref primary key)
|
|
*/
|
|
function get_fiche_def_ref_id()
|
|
{
|
|
$result=$this->cn->get_array("select frd_id from fiche join fiche_Def using (fd_id) where f_id=".$this->id);
|
|
if ( $result == null )
|
|
return null;
|
|
|
|
return $result[0]['frd_id'];
|
|
}
|
|
/**
|
|
*@brief fetch and return and array
|
|
*@see get_row get_row_date
|
|
*/
|
|
private function get_row_result($res) {
|
|
$array=array();
|
|
$tot_cred=0.0;
|
|
$tot_deb=0.0;
|
|
$Max=Database::num_row($res);
|
|
if ( $Max == 0 ) return null;
|
|
for ($i=0;$i<$Max;$i++) {
|
|
$array[]=Database::fetch_array($res,$i);
|
|
if ($array[$i]['j_debit']=='t') {
|
|
$tot_deb+=$array[$i]['deb_montant'] ;
|
|
} else {
|
|
$tot_cred+=$array[$i]['cred_montant'] ;
|
|
}
|
|
}
|
|
$this->row=$array;
|
|
return array($array,$tot_deb,$tot_cred);
|
|
}
|
|
/*!
|
|
* \brief Get data for poste
|
|
*
|
|
* \param $p_from periode from
|
|
* \param $p_to end periode
|
|
* \return double array (j_date,deb_montant,cred_montant,description,jrn_name,j_debit,jr_internal)
|
|
* (tot_deb,tot_credit
|
|
*
|
|
*/
|
|
function get_row_date($p_from,$p_to)
|
|
{
|
|
if ( $this->id == 0 )
|
|
{
|
|
echo_error("class_fiche",__LINE__,"id is 0");
|
|
return;
|
|
}
|
|
$qcode=$this->strAttribut(ATTR_DEF_QUICKCODE);
|
|
|
|
$Res=$this->cn->exec_sql("select j_date,to_char(j_date,'DD.MM.YYYY') as j_date_fmt,j_qcode,".
|
|
"case when j_debit='t' then j_montant else 0 end as deb_montant,".
|
|
"case when j_debit='f' then j_montant else 0 end as cred_montant,".
|
|
" jr_comment as description,jrn_def_name as jrn_name,".
|
|
"j_debit, jr_internal,jr_id ".
|
|
" from jrnx left join jrn_def on jrn_def_id=j_jrn_def ".
|
|
" left join jrn on jr_grpt_id=j_grpt".
|
|
" where j_qcode=$1 and ".
|
|
" ( to_date($2,'DD.MM.YYYY') <= j_date and ".
|
|
" to_date($3,'DD.MM.YYYY') >= j_date )".
|
|
" order by j_date",array($qcode,$p_from,$p_to));
|
|
|
|
return $this->get_row_result($Res);
|
|
}
|
|
|
|
/*!
|
|
* \brief Get data for poste
|
|
*
|
|
* \param $p_from periode from
|
|
* \param $p_to end periode
|
|
* \return double array (j_date,deb_montant,cred_montant,description,jrn_name,j_debit,jr_internal)
|
|
* (tot_deb,tot_credit
|
|
*
|
|
*/
|
|
function get_row($p_from,$p_to)
|
|
{
|
|
if ( $this->id == 0 )
|
|
{
|
|
echo_error("class_fiche",__LINE__,"id is 0");
|
|
return;
|
|
}
|
|
$qcode=$this->strAttribut(ATTR_DEF_QUICKCODE);
|
|
$periode=sql_filter_per($this->cn,$p_from,$p_to,'p_id','jr_tech_per');
|
|
|
|
$Res=$this->cn->exec_sql("select j_date,to_char(j_date,'DD.MM.YYYY') as j_date_fmt,j_qcode,".
|
|
"case when j_debit='t' then j_montant else 0 end as deb_montant,".
|
|
"case when j_debit='f' then j_montant else 0 end as cred_montant,".
|
|
" jr_comment as description,jrn_def_name as jrn_name,".
|
|
"j_debit, jr_internal,jr_id ".
|
|
" from jrnx left join jrn_def on jrn_def_id=j_jrn_def ".
|
|
" left join jrn on jr_grpt_id=j_grpt".
|
|
" where j_qcode='".$qcode."' and ".$periode.
|
|
" order by j_date::date");
|
|
return $this->get_row_result($Res);
|
|
|
|
}
|
|
/*!
|
|
* \brief HtmlTable, display a HTML of a card for the asked period
|
|
* \return none
|
|
*/
|
|
function HtmlTableDetail($p_array=null)
|
|
{
|
|
if ( $p_array == null)
|
|
$p_array=$_REQUEST;
|
|
|
|
$name=$this->getName();
|
|
|
|
list($array,$tot_deb,$tot_cred)=$this->get_row_date( $p_array['from_periode'],
|
|
$p_array['to_periode']
|
|
);
|
|
|
|
if ( count($this->row ) == 0 )
|
|
return;
|
|
|
|
$rep="";
|
|
|
|
echo '<h2 class="info">'.$this->id." ".$name.'</h2>';
|
|
echo "<TABLE class=\"result\" width=\"100%\">";
|
|
echo "<TR>".
|
|
"<TH> Code interne </TH>".
|
|
"<TH> Date</TH>".
|
|
"<TH> Description </TH>".
|
|
"<TH> Montant </TH>".
|
|
"<TH> Débit/Crédit </TH>".
|
|
"</TR>";
|
|
|
|
foreach ( $this->row as $op ) {
|
|
echo "<TR style=\"text-align:center;background-color:lightgrey\">".
|
|
"<td >".$op['jr_internal']."</td>".
|
|
"<td >".$op['j_date']."</td>".
|
|
"<td >".h($op['description'])."</td>".
|
|
"<td >"."</td>".
|
|
"<td >"."</td>".
|
|
"</TR>";
|
|
$ac=new Acc_Operation($this->cn);
|
|
$ac->jr_id=$op['jr_id'];
|
|
echo $ac->display_jrnx_detail(1);
|
|
|
|
}
|
|
$solde_type=($tot_deb>$tot_cred)?"solde débiteur":"solde créditeur";
|
|
$diff=round(abs($tot_deb-$tot_cred),2);
|
|
echo "<TR>".
|
|
"<TD>$solde_type".
|
|
"<TD>$diff</TD>".
|
|
"<TD></TD>".
|
|
"<TD>$tot_deb</TD>".
|
|
"<TD>$tot_cred</TD>".
|
|
"</TR>";
|
|
|
|
echo "</table>";
|
|
|
|
return;
|
|
}
|
|
/*!
|
|
* \brief HtmlTable, display a HTML of a card for the asked period
|
|
* \param $p_array default = null keys = from_periode, to_periode
|
|
*/
|
|
function HtmlTable($p_array=null)
|
|
{
|
|
if ( $p_array == null)
|
|
$p_array=$_REQUEST;
|
|
|
|
$name=h($this->getName());
|
|
|
|
list($array,$tot_deb,$tot_cred)=$this->get_row_date( $p_array['from_periode'],
|
|
$p_array['to_periode']
|
|
);
|
|
|
|
if ( count($this->row ) == 0 )
|
|
return;
|
|
|
|
$rep="";
|
|
|
|
echo '<h2 class="info">'.$this->id." ".$name.'</h2>';
|
|
echo "<TABLE class=\"result\" width=\"100%\">";
|
|
echo "<TR>".
|
|
"<TH> Code interne </TH>".
|
|
"<TH> Date</TH>".
|
|
"<TH> Description </TH>".
|
|
"<TH> Débit </TH>".
|
|
"<TH> Crédit </TH>".
|
|
"</TR>";
|
|
|
|
foreach ( $this->row as $op ) {
|
|
echo "<TR>".
|
|
"<TD>".$op['jr_internal']."</TD>".
|
|
"<TD>".$op['j_date_fmt']."</TD>".
|
|
"<TD>".h($op['description'])."</TD>".
|
|
"<TD>".$op['deb_montant']."</TD>".
|
|
"<TD>".$op['cred_montant']."</TD>".
|
|
"</TR>";
|
|
|
|
}
|
|
$solde_type=($tot_deb>$tot_cred)?"solde débiteur":"solde créditeur";
|
|
$diff=round(abs($tot_deb-$tot_cred),2);
|
|
echo "<TR>".
|
|
"<TD>$solde_type</TD>".
|
|
"<TD>$diff</TD>".
|
|
"<TD></TD>".
|
|
"<TD>$tot_deb</TD>".
|
|
"<TD>$tot_cred</TD>".
|
|
"</TR>";
|
|
|
|
echo "</table>";
|
|
|
|
return;
|
|
}
|
|
/*!
|
|
* \brief Display HTML Table Header (button)
|
|
*
|
|
* \return none
|
|
*/
|
|
function HtmlTableHeader($p_array=null)
|
|
{
|
|
if ( $p_array == null)
|
|
$p_array=$_REQUEST;
|
|
|
|
$hid=new IHidden();
|
|
echo '<div class="noprint">';
|
|
echo "<table >";
|
|
echo '<TR>';
|
|
|
|
echo '<TD><form method="GET" ACTION="">'.
|
|
HtmlInput::submit('bt_other',"Autre poste").
|
|
dossier::hidden().
|
|
$hid->input("type","poste").$hid->input('p_action','impress')."</form></TD>";
|
|
|
|
echo '<TD><form method="POST" ACTION="quick_code_pdf.php">'.
|
|
HtmlInput::submit('bt_pdf',"Export PDF").
|
|
dossier::hidden().
|
|
$hid->input("type","poste").
|
|
$hid->input('p_action','impress').
|
|
$hid->input("f_id",$this->id).
|
|
dossier::hidden().
|
|
$hid->input("from_periode",$p_array['from_periode']).
|
|
$hid->input("to_periode",$p_array['to_periode']);
|
|
if (isset($p_array['oper_detail']))
|
|
echo $hid->input('oper_detail','on');
|
|
|
|
echo "</form></TD>";
|
|
|
|
echo '<TD><form method="POST" ACTION="quick_code_csv.php">'.
|
|
HtmlInput::submit('bt_csv',"Export CSV").
|
|
dossier::hidden().
|
|
$hid->input("type","poste").
|
|
$hid->input('p_action','impress').
|
|
$hid->input("f_id",$this->id).
|
|
$hid->input("from_periode",$p_array['from_periode']).
|
|
$hid->input("to_periode",$p_array['to_periode']);
|
|
if (isset($p_array['oper_detail']))
|
|
echo $hid->input('oper_detail','on');
|
|
|
|
echo "</form></TD>";
|
|
echo "</table>";
|
|
echo '</div>';
|
|
|
|
}
|
|
/*!
|
|
* \brief give the balance of an card
|
|
* \return
|
|
* balance of the card
|
|
*
|
|
*/
|
|
function get_solde_detail($p_cond="") {
|
|
if ( $this->id == 0 ) exit('fiche->id est nul');
|
|
$qcode=$this->strAttribut(ATTR_DEF_QUICKCODE);
|
|
|
|
if ( $p_cond != "") $p_cond=" and ".$p_cond;
|
|
$Res=$this->cn->exec_sql("select sum(deb) as sum_deb, sum(cred) as sum_cred from
|
|
( select j_poste,
|
|
case when j_debit='t' then j_montant else 0 end as deb,
|
|
case when j_debit='f' then j_montant else 0 end as cred
|
|
from jrnx
|
|
where
|
|
j_qcode = ('$qcode'::text)
|
|
$p_cond
|
|
) as m ");
|
|
$Max=Database::num_row($Res);
|
|
if ($Max==0) return 0;
|
|
$r=Database::fetch_array($Res,0);
|
|
|
|
return array('debit'=>$r['sum_deb'],
|
|
'credit'=>$r['sum_cred'],
|
|
'solde'=>abs($r['sum_deb']-$r['sum_cred']));
|
|
}
|
|
/*!\brief check if an attribute is empty
|
|
*\param $p_attr the id of the attribut to check (ad_id)
|
|
*\return return true is the attribute is empty or missing
|
|
*/
|
|
function empty_attribute($p_attr) {
|
|
$sql="select av_text
|
|
from jnt_fic_att_value
|
|
natural join fiche
|
|
natural join attr_value
|
|
left join attr_def using (ad_id) where f_id=".$this->id.
|
|
" and ad_id = ".$p_attr.
|
|
" order by ad_id";
|
|
$res=$this->cn->exec_sql($sql);
|
|
if ( Database::num_row($res) == 0 ) return true;
|
|
$text=Database::fetch_result($res,0,0);
|
|
return (strlen(trim($text)) > 0)?false:true;
|
|
|
|
|
|
}
|
|
/*! Summary
|
|
* \brief show the default screen
|
|
*
|
|
* \param p_search (filter)
|
|
* \param p_action show the action column
|
|
*
|
|
* \return: string to display
|
|
*/
|
|
function Summary($p_search="",$p_action="")
|
|
{
|
|
$str_dossier=dossier::get();
|
|
$p_search=FormatString($p_search);
|
|
$script=$_SERVER['PHP_SELF'];
|
|
// Creation of the nav bar
|
|
// Get the max numberRow
|
|
$all_tiers=$this->CountByDef($this->fiche_def_ref,$p_search);
|
|
// Get offset and page variable
|
|
$offset=( isset ($_REQUEST['offset'] )) ?$_REQUEST['offset']:0;
|
|
$page=(isset($_REQUEST['page']))?$_REQUEST['page']:1;
|
|
$bar=jrn_navigation_bar($offset,$all_tiers,$_SESSION['g_pagesize'],$page);
|
|
// set a filter ?
|
|
$search="";
|
|
|
|
$user=new User($this->cn);
|
|
$exercice=$user->get_exercice();
|
|
$tPeriode=new Periode($this->cn);
|
|
list($max,$min)=$tPeriode->get_limit($exercice);
|
|
|
|
|
|
if ( trim($p_search) != "" )
|
|
{
|
|
$search=" and f_id in
|
|
(select f_id from jnt_fic_att_value
|
|
join fiche using (f_id)
|
|
join attr_value using (jft_id)
|
|
where
|
|
ad_id=1 and av_text ~* '$p_search')";
|
|
}
|
|
// Get The result Array
|
|
$step_tiers=$this->GetAll($offset,$search);
|
|
if ( $all_tiers == 0 ) return "";
|
|
$r=$bar;
|
|
$r.='<table width="95%">
|
|
<TR style="background-color:lightgrey;">
|
|
<TH>Quick Code</TH>
|
|
<th>Nom</th>
|
|
<th>Adresse</th>
|
|
<th>Total débit</th>
|
|
<th>Total crédit</th>
|
|
<th>Solde</th>';
|
|
$r.='</TR>';
|
|
echo_debug(__FILE__,__LINE__,$step_tiers);
|
|
if ( sizeof ($step_tiers ) == 0 )
|
|
return $r;
|
|
foreach ($step_tiers as $tiers ) {
|
|
$r.="<TR>";
|
|
$e=sprintf('<A HREF="%s?p_action=%s&sb=detail&f_id=%d&%s&sc=sv" title="Détail"> ',
|
|
$script,$p_action,$tiers->id,$str_dossier);
|
|
|
|
$r.="<TD> $e".$tiers->strAttribut(ATTR_DEF_QUICKCODE)."</A></TD>";
|
|
$r.="<TD>".h($tiers->strAttribut(ATTR_DEF_NAME))."</TD>";
|
|
$r.="<TD>".h($tiers->strAttribut(ATTR_DEF_ADRESS).
|
|
" ".$tiers->strAttribut(ATTR_DEF_CP).
|
|
" ".$tiers->strAttribut(ATTR_DEF_PAYS)).
|
|
"</TD>";
|
|
|
|
|
|
/* Filter on the default year */
|
|
$User=new User($this->cn);
|
|
$filter_year=" j_tech_per in (select p_id from parm_periode ".
|
|
"where p_exercice='".$User->get_exercice()."')";
|
|
$a=$tiers->get_solde_detail($filter_year);
|
|
|
|
$r.=sprintf('<TD align="right"> %15.2f€</TD>',$a['debit']);
|
|
$r.=sprintf('<TD align="right"> %15.2f€</TD>',$a['credit']);
|
|
$r.=sprintf('<TD align="right"> %15.2f€</TD>',$a['solde']);
|
|
|
|
|
|
$r.="</TR>";
|
|
|
|
}
|
|
$r.="</TABLE>";
|
|
$r.=$bar;
|
|
return $r;
|
|
}
|
|
/*!
|
|
* \brief get the fd_id of the card : fd_id, it set the attribute fd_id
|
|
*/
|
|
function get_categorie()
|
|
{
|
|
if ( $this->id == 0 ) exit('class_fiche : f_id = 0 ');
|
|
$sql='select fd_id from fiche where f_id='.$this->id;
|
|
$R=$this->cn->get_value($sql);
|
|
if ( $R == "" )
|
|
$this->fd_id=0;
|
|
else
|
|
$this->fd_id=$R;
|
|
}
|
|
/*!
|
|
***************************************************
|
|
* \brief Check if a fiche is used by a jrn
|
|
* return 1 if the fiche is in the range otherwise 0, the quick_code
|
|
* or the id must be set
|
|
*
|
|
*
|
|
* \param $p_jrn journal_id
|
|
* \param $p_type : deb or cred default empty
|
|
*
|
|
* \return 1 if the fiche is in the range otherwise < 1
|
|
* -1 the card doesn't exist
|
|
* -2 the ledger has no card to check
|
|
*
|
|
*/
|
|
function belong_ledger($p_jrn,$p_type="")
|
|
{
|
|
// check if we have a quick_code or a f_id
|
|
if (($this->quick_code==null || $this->quick_code == "" )
|
|
&& $this->id == 0 ) {
|
|
echo 'erreur ni quick_code ni f_id ne sont donnes';
|
|
exit();
|
|
}
|
|
|
|
//retrieve the quick_code
|
|
if ( $this->quick_code=="")
|
|
$this->quick_code=$this->get_quick_code();
|
|
|
|
|
|
if ( $this->quick_code==null)
|
|
return -1;
|
|
|
|
if ( $this->id == 0 )
|
|
if ( $this->get_by_qcode(null,false) == 1)
|
|
return -1;
|
|
|
|
$get="";
|
|
if ( $p_type == 'deb' ) {
|
|
$get='jrn_def_fiche_deb';
|
|
}
|
|
if ( $p_type == 'cred' ) {
|
|
$get='jrn_def_fiche_cred';
|
|
}
|
|
if ( $get != "" ) {
|
|
$Res=$this->cn->exec_sql("select $get as fiche from jrn_def where jrn_def_id=$p_jrn");
|
|
} else {
|
|
// Get all the fiche type (deb and cred)
|
|
$Res=$this->cn->exec_sql(" select jrn_def_fiche_cred as fiche
|
|
from jrn_def where jrn_def_id=$p_jrn
|
|
union
|
|
select jrn_def_fiche_deb
|
|
from jrn_def where jrn_def_id=$p_jrn"
|
|
);
|
|
}
|
|
$Max=Database::num_row($Res);
|
|
if ( $Max==0) {
|
|
return -2;
|
|
}
|
|
/* convert the array to a string */
|
|
$list=Database::fetch_all($Res);
|
|
$str_list="";
|
|
$comma='';
|
|
foreach ($list as $row) {
|
|
if ( $row['fiche'] != '' ) {
|
|
$str_list.=$comma.$row['fiche'];
|
|
$comma=',';
|
|
}
|
|
}
|
|
// Normally Max must be == 1
|
|
|
|
if ( $str_list=="") {
|
|
return -3;
|
|
}
|
|
|
|
$sql="select *
|
|
from fiche
|
|
where
|
|
fd_id in (".$str_list.") and f_id= ".$this->id;
|
|
|
|
$Res=$this->cn->exec_sql($sql);
|
|
$Max=Database::num_row($Res);
|
|
if ($Max==0 )
|
|
return 0;
|
|
else
|
|
return 1;
|
|
}
|
|
/*!\brief get all the card from a categorie
|
|
*\param $p_cn database connx
|
|
*\param $pFd_id is the category id
|
|
*\return an array of card, but only the fiche->id is set
|
|
*/
|
|
static function get_fiche_def($p_cn,$pFd_id) {
|
|
$sql='select f_id from fiche where fd_id=$1';
|
|
$array=$p_cn->get_array($sql,array($pFd_id));
|
|
if ( empty ($array) ) return null;
|
|
foreach ($array as $ret ) {
|
|
$r[]=new fiche($p_cn,$ret['f_id']);
|
|
}
|
|
return $r;
|
|
}
|
|
/*!\brief check if a card is used
|
|
*\return return true is a card is used otherwise false
|
|
*/
|
|
function is_used() {
|
|
/* retrieve first the quickcode */
|
|
$qcode=$this->strAttribut(ATTR_DEF_QUICKCODE);
|
|
$sql='select count(*) as c from jrnx where j_qcode=$1';
|
|
$count=$this->cn->get_value($sql,array($qcode));
|
|
if ( $count == 0 ) return false;
|
|
return true;
|
|
}
|
|
/*\brief remove a card without verification */
|
|
function delete() {
|
|
// Remove from attr_value
|
|
$Res=$this->cn->exec_sql("delete from attr_value
|
|
where jft_id in (select jft_id
|
|
from jnt_fic_att_value
|
|
natural join fiche where f_id=".$this->id.")");
|
|
// Remove from jnt_fic_att_value
|
|
$Res=$this->cn->exec_sql("delete from jnt_fic_att_value where f_id=".$this->id);
|
|
|
|
// Remove from fiche
|
|
$Res=$this->cn->exec_sql("delete from fiche where f_id=".$this->id);
|
|
|
|
}
|
|
/*!\brief create the sql statement for retrieving all
|
|
* the card
|
|
*\return string with sql statement
|
|
*\param $array contains the condition
|
|
\verbatim
|
|
[jrn] => 2
|
|
[typecard] => cred / deb / filter or list
|
|
[query] => string
|
|
\endverbatim
|
|
*\note the typecard cred, deb or filter must be used with jrn, the value of list means a list of fd_id
|
|
*\see ajax_card.php cards.js
|
|
*/
|
|
function build_sql($array) {
|
|
if ( ! empty($array) ) extract($array);
|
|
$and='';
|
|
$filter_fd_id='true';
|
|
$filter_query='';
|
|
if ( isset($typecard)) {
|
|
switch($typecard) {
|
|
case 'cred':
|
|
if ( ! isset($jrn)) throw ('Erreur pas de valeur pour jrn');
|
|
$filter_jrn=$this->cn->make_list("select jrn_def_fiche_cred from jrn_Def where jrn_def_id=$1",array($jrn));
|
|
$filter_fd_id=" fd_id in (".$filter_jrn.")";
|
|
$and=" and ";
|
|
break;
|
|
case 'deb':
|
|
if ( ! isset($jrn)) throw ('Erreur pas de valeur pour jrn');
|
|
$filter_jrn=$this->cn->make_list("select jrn_def_fiche_deb from jrn_Def where jrn_def_id=$1",array($jrn));
|
|
$filter_fd_id=" fd_id in (".$filter_jrn.")";
|
|
$and=" and ";
|
|
break;
|
|
case 'filter':
|
|
if ( ! isset($jrn)) throw ('Erreur pas de valeur pour jrn');
|
|
$filter_jrn=$this->cn->make_list("select jrn_def_fiche_deb from jrn_Def where jrn_def_id=$1",array($jrn));
|
|
$fp1=" fd_id in (".$filter_jrn.")";
|
|
$filter_jrn=$this->cn->make_list("select jrn_def_fiche_cred from jrn_Def where jrn_def_id=$1",array($jrn));
|
|
$fp2=" fd_id in (".$filter_jrn.")";
|
|
|
|
$filter_fd_id='('.$fp1.' or '.$fp2.')';
|
|
$and=" and ";
|
|
break;
|
|
case 'all':
|
|
$filter_fd_id=' true';
|
|
break;
|
|
default:
|
|
$filter_fd_id=' fd_id in ('.$typecard.')';
|
|
}
|
|
}
|
|
|
|
$and=" and ";
|
|
if (isset($query)){
|
|
$query=FormatString($query);
|
|
$filter_query=$and."(vw_name ilike '%$query%' or quick_code ilike ('%$query%') or vw_description ilike '%$query%')";
|
|
}
|
|
$sql="select * from vw_fiche_attr where ".$filter_fd_id.$filter_query;
|
|
return $sql;
|
|
|
|
}
|
|
static function test_me() {
|
|
$cn=new Database(dossier::id());
|
|
$a=new Fiche($cn);
|
|
$select_cat=new ISelect('fd_id');
|
|
$select_cat->value=$cn->make_array('select fd_id,fd_label from fiche_def where frd_id='.
|
|
FICHE_TYPE_CLIENT);
|
|
echo '<FORM METHOD="GET"> ';
|
|
echo dossier::hidden();
|
|
echo HtmlInput::hidden('test_select',$_GET['test_select']);
|
|
echo 'Choix de la catégorie';
|
|
echo $select_cat->input();
|
|
echo HtmlInput::submit('go_card','Afficher');
|
|
echo '</form>';
|
|
if ( isset ($_GET['go_card'])) {
|
|
$empty=$a->toArray($_GET['fd_id']);
|
|
print_r($empty);
|
|
}
|
|
}
|
|
}
|
|
?>
|