2
0
forked from Wavyzz/dolibarr

Compare commits

..

1853 Commits

Author SHA1 Message Date
Laurent Destailleur
4cf862f033 Prepare package 6.0 2017-06-10 01:19:20 +02:00
Laurent Destailleur
660faac0f3 Prepare package 6.0 2017-06-10 01:17:48 +02:00
Laurent Destailleur
2a6c21bd03 Fix permissions on script file 2017-06-10 01:13:26 +02:00
Laurent Destailleur
9e33baf0d6 Prepare package for 6.0beta 2017-06-10 01:09:11 +02:00
Laurent Destailleur
87c8659e72 Fix responsive 2017-06-10 00:45:18 +02:00
Laurent Destailleur
6ec038d005 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-06-10 00:22:23 +02:00
Laurent Destailleur
9a30e8edc6 Update changelog 2017-06-10 00:22:12 +02:00
Laurent Destailleur
605dbd61f2 Fix phpunit 2017-06-10 00:21:04 +02:00
Laurent Destailleur
c2b171dd73 Merge pull request #6967 from atm-ph/fix_wrong_attribute_name
Fix wrong attribute name for loop
2017-06-10 00:13:09 +02:00
Laurent Destailleur
def6403828 Merge pull request #6966 from atm-ph/fix_develop_can_not_update_extra
Fix can not update extrafields values
2017-06-10 00:11:20 +02:00
Laurent Destailleur
58a407d9f1 Fix style and align when no permission on widget 2017-06-10 00:05:47 +02:00
Laurent Destailleur
884c6c674d Fix css 2017-06-09 20:08:23 +02:00
Laurent Destailleur
0458b7d38f Fix css subscription form 2017-06-09 17:29:34 +02:00
Laurent Destailleur
3347316d3c Fix delete of member 2017-06-09 17:02:05 +02:00
phf
c1f3a168cd Fix wrong attribute name for loop 2017-06-09 16:57:20 +02:00
phf
0f80ee757f Fix can not update extrafields values 2017-06-09 16:37:05 +02:00
Laurent Destailleur
def784a5fe Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-06-09 13:12:00 +02:00
Laurent Destailleur
55120d5e6d Merge 2017-06-09 13:08:56 +02:00
Laurent Destailleur
24eebfeb61 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-06-09 12:57:14 +02:00
Laurent Destailleur
1af74b4c42 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	dev/skeletons/skeleton_list.php
	htdocs/admin/perms.php
	htdocs/core/class/commonobject.class.php
	htdocs/core/class/hookmanager.class.php
	htdocs/core/lib/files.lib.php
	htdocs/product/class/product.class.php
	htdocs/product/class/service.class.php
	htdocs/product/index.php
	htdocs/product/list.php
	htdocs/public/members/new.php
	htdocs/theme/eldy/style.css.php
	htdocs/theme/md/style.css.php
2017-06-09 12:50:56 +02:00
Laurent Destailleur
985a9ed8d3 FIX Redirect to payment page from member subscription page failed if a
unique security key was defined.
2017-06-09 12:12:12 +02:00
Laurent Destailleur
1935de03c7 Fix bad consistency of labels 2017-06-09 12:01:55 +02:00
Laurent Destailleur
41586b76c0 Fix missing css 2017-06-09 11:40:35 +02:00
Laurent Destailleur
62933e9a26 Fix sql syntax error in some cases 2017-06-09 11:22:42 +02:00
Laurent Destailleur
02781b41ca Fix several problem with hook printFieldListWhere 2017-06-09 11:02:34 +02:00
Laurent Destailleur
b92980c6ff Fix statistics on products 2017-06-09 10:38:06 +02:00
Laurent Destailleur
bec6ad9fb3 Fix bad position of hook 2017-06-09 10:22:07 +02:00
Laurent Destailleur
929946ad47 Fix several problem with hook printFieldListWhere 2017-06-09 10:12:01 +02:00
Laurent Destailleur
d6ba16d357 Fix missing printFieldListWhere hook 2017-06-09 09:45:22 +02:00
Laurent Destailleur
d326f161ef Fix permission on page to print barcode 2017-06-09 01:06:52 +02:00
Laurent Destailleur
a63050bf46 FIX Warnings
Conflicts:
	htdocs/core/lib/files.lib.php
	htdocs/core/lib/images.lib.php
2017-06-09 00:38:30 +02:00
Laurent Destailleur
811b0d9af4 Fix missing thumbs images for products 2017-06-09 00:27:44 +02:00
Laurent Destailleur
75624376a5 FIX Warnings 2017-06-09 00:27:19 +02:00
Laurent Destailleur
b441c62e1d Fix syntax error 2017-06-08 14:55:12 +02:00
Laurent Destailleur
b1f93ccb0c Fix security 2017-06-08 14:33:46 +02:00
Laurent Destailleur
e027528545 Clean module builder 2017-06-08 14:24:12 +02:00
Laurent Destailleur
543630e487 Fix missing count of nb of columns into lists 2017-06-08 14:14:06 +02:00
Laurent Destailleur
3e51d2f537 Fix backto link after creating a third party 2017-06-08 11:51:31 +02:00
Laurent Destailleur
a1144e1f66 Fix missing init of hookmanager 2017-06-08 11:18:41 +02:00
Laurent Destailleur
9c4a2594b1 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-06-08 11:07:25 +02:00
Laurent Destailleur
57f3d0910e Merge pull request #6738 from grandoc/new_branch_20_04
Update code using new css class
2017-06-08 11:00:49 +02:00
Laurent Destailleur
ee8bc24348 Merge pull request #6920 from inoveaconseil/patch-3
Print the value of fields
2017-06-08 10:59:51 +02:00
Laurent Destailleur
20fb12bc7d Merge pull request #6959 from aspangaro/6.0-fec2
NEW : Accountancy - Activate multi-journal everywhere & Add journal_label information to database (FEC)
2017-06-08 10:56:53 +02:00
Laurent Destailleur
832e288814 FIX #6955 2017-06-08 10:47:22 +02:00
Laurent Destailleur
50769f2f41 Merge pull request #6954 from hregis/develop_transverse
New: big refactorization of multicompany transverse mode
2017-06-08 10:25:43 +02:00
Laurent Destailleur
7587a3d592 Merge branch 'develop' into develop_transverse 2017-06-08 10:25:04 +02:00
Laurent Destailleur
cfe9d02bc3 Merge pull request #6952 from atm-ph/fix_search_extrafield_on_list
Fix can't use search on all extrafields on list
2017-06-08 10:18:55 +02:00
Laurent Destailleur
97f9d8a87e Merge pull request #6957 from aspangaro/6.0-vat2
Fix : Missing ref of getNomUrl in AccountLine (Bank)
2017-06-08 10:16:32 +02:00
Laurent Destailleur
8e4fe53968 Merge pull request #6937 from hregis/develop_mc
New: getEntity function use 1 $shared value by default
2017-06-08 10:14:30 +02:00
Alexandre SPANGARO
3827903afb Merge remote-tracking branch 'uptream/develop' into 6.0-vat2
# Conflicts:
#	htdocs/compta/salaries/card.php
2017-06-08 06:44:48 +02:00
Alexandre SPANGARO
5e3a2e06d4 NEW : Accountancy - Activate multi-journal & Add journal_label to database (FEC) 2017-06-08 06:35:09 +02:00
Regis Houssin
b183c6e7ac Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_transverse
2017-06-07 20:23:24 +02:00
Regis Houssin
2b36135641 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_mc
2017-06-07 20:14:03 +02:00
Laurent Destailleur
1820649175 Maxi debug of v6 2017-06-07 19:28:31 +02:00
Laurent Destailleur
a0295821ba Fix errors in extra computed field 2017-06-07 11:38:42 +02:00
Laurent Destailleur
3427413255 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-06-07 11:13:25 +02:00
Laurent Destailleur
0805c693ae Fix restore of last_search_value ko 2017-06-07 10:55:39 +02:00
Alexandre SPANGARO
a96049d0e6 Spaces!!! 2017-06-07 06:06:53 +02:00
Alexandre SPANGARO
c041fe2165 Fix : Missing ref of getNomUrl in AccountLine (Bank) 2017-06-07 06:03:52 +02:00
Regis Houssin
bfd6116e5b Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_mc 2017-06-06 15:03:36 +02:00
Regis Houssin
bb37c2f980 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_transverse
2017-06-06 13:54:33 +02:00
phf
707a9e40c0 Fix can't use search on all extrafields on list 2017-06-06 12:01:49 +02:00
Laurent Destailleur
07caf6aeba Merge pull request #6951 from atm-florian/5.0
FIX #6926
2017-06-06 11:12:54 +02:00
Laurent Destailleur
6a82d9e656 Merge pull request #6950 from defrance/patch-13
Additionnal filter on getProjectsAuthorizedForUser
2017-06-06 11:10:05 +02:00
Laurent Destailleur
4bda7fcafc Merge pull request #6949 from aspangaro/6.0-vat2
NEW : VAT payment v6 look and feel
2017-06-06 11:08:50 +02:00
Laurent Destailleur
0486a18972 Fix: use dolGetFirstLastname 2017-06-06 11:07:35 +02:00
Laurent Destailleur
7b0e0858ca Merge pull request #6948 from aspangaro/6.0-salary
Fix : Book entry of salary payment in general ledger
2017-06-06 11:02:01 +02:00
Regis Houssin
03df365eea Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_transverse 2017-06-06 11:01:42 +02:00
Laurent Destailleur
63920930bf Merge branch 'develop' into 6.0-salary 2017-06-06 11:01:28 +02:00
Laurent Destailleur
eb45333685 Merge pull request #6946 from grandoc/develop
FIX : bug #6943
2017-06-06 10:55:18 +02:00
Laurent Destailleur
4b6bd2b6eb Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-06-06 10:54:17 +02:00
Regis Houssin
7ed0643b52 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_transverse 2017-06-06 10:54:16 +02:00
Laurent Destailleur
02b5d9e6f7 FIX #6945 2017-06-06 10:53:53 +02:00
Laurent Destailleur
2f59525967 Merge pull request #6942 from hregis/develop_bug
Fix: avoid warning "Undefined property: stdClass::$AGENDA_DEFAULT_FILTER_TYPE"
2017-06-06 10:47:20 +02:00
Laurent Destailleur
c50006c91b Merge pull request #6936 from aspangaro/6.0-multijournal
Accountancy - Activate multijournal on bank_journal
2017-06-06 10:38:05 +02:00
Regis Houssin
79a0b959d1 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_transverse 2017-06-06 10:36:37 +02:00
Laurent Destailleur
2510ec7015 Fix php error 2017-06-06 10:29:34 +02:00
Laurent Destailleur
36a72de080 Merge pull request #6924 from atm-maxime/3.9
Fix : SEPA XML address should also have dolEscapeXML
2017-06-06 10:26:46 +02:00
Regis Houssin
b66da3d148 New: big refactorization of multicompany transverse mode 2017-06-06 10:23:33 +02:00
florian HENRY
ca5fd6ac4c FIX #6926 2017-06-06 09:15:11 +02:00
BENKE Charlene
6e83e899e2 Additionnal filter on getProjectsAuthorizedForUser
with great list of projects, have more filter is a good thing
2017-06-06 08:29:41 +02:00
Laurent Destailleur
22efbabfa6 NEW Add hook doUpgrade2 2017-06-06 01:34:25 +02:00
Alexandre SPANGARO
e547aa8aee NEW : VAT payment v6 look and feel 2017-06-05 15:41:33 +02:00
Alexandre SPANGARO
2281850abf Fix label and name 2017-06-05 14:56:14 +02:00
Alexandre SPANGARO
806d25ae41 Activate multi-journal on expensereport journal 2017-06-05 06:44:53 +02:00
philippe grand
a0b4f8b004 FIX : bug #6943 2017-06-04 12:09:54 +02:00
Maxime Kohlhaas
6787d717f9 Update bonprelevement.class.php 2017-06-03 18:23:19 +02:00
Regis Houssin
74710827b2 Fix: avoid warning "Undefined property:
stdClass::$AGENDA_DEFAULT_FILTER_TYPE"
2017-06-03 14:15:34 +02:00
Regis Houssin
a25facef7c Fix: use 0 instead false 2017-06-03 11:49:59 +02:00
Regis Houssin
0eadef9a7a Fix: merge correction 2017-06-03 11:46:18 +02:00
Regis Houssin
2df33d1df3 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_mc
2017-06-03 11:45:15 +02:00
Alexandre SPANGARO
ef9275d031 Merge remote-tracking branch 'uptream/develop' into 6.0-multijournal
# Conflicts:
#	htdocs/core/menus/standard/eldy.lib.php
2017-06-03 07:48:50 +02:00
Alexandre SPANGARO
90c1a38486 Accountancy - Activate multijournal on bank_journal 2017-06-03 07:23:14 +02:00
Laurent Destailleur
344263f53c Fix travis 2017-06-03 02:22:21 +02:00
Laurent Destailleur
504ea85334 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-06-03 01:55:27 +02:00
Laurent Destailleur
7f18dfee0d Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	dev/skeletons/build_class_from_table.php
	dev/skeletons/skeleton_card.php
	htdocs/compta/facture/class/facture.class.php
	htdocs/core/lib/functions.lib.php
	htdocs/filefunc.inc.php
	htdocs/projet/card.php
2017-06-03 01:55:05 +02:00
Laurent Destailleur
3555bd2bd7 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0
Conflicts:
	htdocs/compta/facture/class/facture.class.php
	htdocs/compta/prelevement/class/bonprelevement.class.php
	htdocs/filefunc.inc.php
2017-06-03 01:29:59 +02:00
Laurent Destailleur
d9794f942d Prepare 5.0.4 2017-06-03 01:17:33 +02:00
Laurent Destailleur
37a261587e Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-06-03 01:17:03 +02:00
Laurent Destailleur
75a01cbe7e Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-06-03 01:13:06 +02:00
Laurent Destailleur
6f5103a772 Merge pull request #6935 from atm-ph/fix_develop_missing_entity_column
Fix missing column entity
2017-06-03 01:12:04 +02:00
Laurent Destailleur
af01e544d5 Merge branch 'develop' into fix_develop_missing_entity_column 2017-06-03 01:11:49 +02:00
Laurent Destailleur
4e397107e1 Merge pull request #6934 from atm-florian/dev_loancalc
NEW : Add calculation function for Loan schedule
2017-06-03 01:10:39 +02:00
Laurent Destailleur
832e9ed15a Merge pull request #6932 from atm-ph/fix_develop_get_extra_chkbxlst
Fix get extrafields value from getOptionalsFromPost give an error wit…
2017-06-03 01:04:18 +02:00
Laurent Destailleur
f0ff2b3085 Merge pull request #6931 from atm-arnaud/FIX_contratligne_update
FIX contratligne update
2017-06-03 01:02:56 +02:00
Laurent Destailleur
98586f3b2d Merge pull request #6930 from atm-ph/fix_5.0_wrong_agenda_view_link
Fix week view link has wrong link
2017-06-03 01:02:40 +02:00
Laurent Destailleur
1f451bf240 Merge pull request #6927 from atm-gauthier/4.0_fix_situation_percent_on_updateline_facture
FIX : situation_progress param default value must be 100 and not 0
2017-06-03 00:59:32 +02:00
Laurent Destailleur
7e4bce67ba Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-06-03 00:59:10 +02:00
Laurent Destailleur
af584bc9c0 FIX #6880 #6925 2017-06-03 00:58:51 +02:00
Laurent Destailleur
58f315e8d1 Merge pull request #6922 from inoveaconseil/patch-5
Fix bug to display value
2017-06-03 00:41:36 +02:00
Laurent Destailleur
04349d2e12 Merge pull request #6921 from inoveaconseil/patch-4
Fix bug of prepare_head of card
2017-06-03 00:41:08 +02:00
Laurent Destailleur
b789246e8d Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-06-02 23:57:50 +02:00
Laurent Destailleur
e1b19b831a NEW An external module can hook and add mass actions 2017-06-02 23:57:37 +02:00
Laurent Destailleur
111087dfdc Work on module template 2017-06-02 23:56:27 +02:00
Laurent Destailleur
66420d0e80 Restore lost file and better generation of modules 2017-06-02 23:02:48 +02:00
atm-ph
70a188c042 Fix missing column entity on llx_accounting_journal after init demo with the bash 2017-06-02 21:45:02 +02:00
Laurent Destailleur
5e29817910 Init of the onlinesign 2017-06-02 20:17:08 +02:00
Laurent Destailleur
9e629bdb02 Work on modulebuilder 2017-06-02 20:01:25 +02:00
Laurent Destailleur
bfa50b8d1d Fix some security issues 2017-06-02 19:36:03 +02:00
Laurent Destailleur
1761df2bc2 NEW Add page statistics for project tasks 2017-06-02 19:28:22 +02:00
florian HENRY
b0f2db7aaa NEW : Add calculation function for Loan schedule 2017-06-02 17:48:29 +02:00
Laurent Destailleur
447db1b324 Fix orphelins for categories tables 2017-06-02 13:46:30 +02:00
Laurent Destailleur
c59d216cf5 NEW Can read time spent of others (hierarchy only or all if granted) 2017-06-02 13:24:45 +02:00
phf
64cd1e0923 Fix get extrafields value from getOptionalsFromPost give an error with chkbxlst type on propaldet for exemple 2017-06-02 12:31:03 +02:00
arnaud
df883a601b FIX contratligne update 2017-06-02 12:28:50 +02:00
Laurent Destailleur
bebf2b33ea CSS enhancement for mobile 2017-06-02 09:25:35 +02:00
Laurent Destailleur
5c58ed8ca7 Add a better error message when payment link is not valid. 2017-06-02 09:13:04 +02:00
Laurent Destailleur
976c8e0752 Fix security to test access on a task 2017-06-01 19:53:54 +02:00
Laurent Destailleur
b4f1df03de Update doc 2017-06-01 19:18:57 +02:00
Laurent Destailleur
dd2d9f533a Clean duplicated vars 2017-06-01 18:18:57 +02:00
Laurent Destailleur
76e1438fe6 FIX REST api to get project when user has permission to read all. 2017-06-01 17:29:47 +02:00
phf
31aa8bdf05 Fix week view link has wrong link 2017-06-01 16:26:32 +02:00
Laurent Destailleur
9b4c929d79 NEW Add phpunit to check the engine is defined into sql create files. 2017-06-01 16:09:09 +02:00
gauthier
fb252706f9 FIX : situation_progress param default value must be 100 and not 0 2017-06-01 15:42:19 +02:00
Laurent Destailleur
f4cdb6b254 Fix month on 2 chars. Some setup return on 1 char only. More phpunit
assert.
2017-06-01 15:33:23 +02:00
Laurent Destailleur
7ad92c3a4d Fix new generic substitution system 2017-06-01 13:32:20 +02:00
Laurent Destailleur
733d1caac6 Correct usage of parameter 'none' in GETPOST 2017-06-01 12:37:16 +02:00
Laurent Destailleur
bb5a49eca4 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-06-01 12:26:59 +02:00
Laurent Destailleur
07a6bb5664 More files to delete in migration 2017-06-01 12:26:17 +02:00
Laurent Destailleur
77df19009d Removed duplicated code 2017-06-01 12:11:45 +02:00
Maxime Kohlhaas
0e175ba373 Fix : SEPA XML address should also have dolEscapeXML 2017-06-01 11:48:14 +02:00
Inovea Conseil
40dd6fc61c Fix bug to display value
Fix bug to display the values in the future card.php
2017-06-01 11:22:08 +02:00
Inovea Conseil
fa3cd267f4 Fix bug of prepare_head of card
Delete the call of commande_prepare_head function because do not use in skeleton
2017-06-01 10:51:30 +02:00
Inovea Conseil
ab99c178e1 Print the value of fields
Add a loop for printing the value of fields
2017-06-01 09:04:20 +02:00
Alexandre SPANGARO
9d83746935 Fix : Book entry in general ledger for salaries 2017-06-01 04:44:05 +02:00
Laurent Destailleur
417f71a8be Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-06-01 02:01:34 +02:00
Laurent Destailleur
c70beaa56b Complete work for mutualizing generic substitution system. 2017-06-01 01:57:22 +02:00
Alexandre SPANGARO
dc9d9b47b4 Fix : Missing language key 2017-05-31 21:35:26 +02:00
Laurent Destailleur
40334dbe14 Merge pull request #6905 from atm-quentin/NEW_project_mask_with_user_extrafield
NEW_extrafield_in_project_mask
2017-05-31 19:46:22 +02:00
Laurent Destailleur
a49174313f Replace {extra_ with {user_extra_ 2017-05-31 19:45:54 +02:00
Laurent Destailleur
98ddb38c00 Merge pull request #6916 from aspangaro/6.0-vat2
FIX : Vat payment - Sql error / Add information in tooltip / Correct book entry in general ledger
2017-05-31 19:30:07 +02:00
Laurent Destailleur
6837312041 Merge branch 'develop' into 6.0-vat2 2017-05-31 19:28:41 +02:00
Laurent Destailleur
6c7179d281 Test of commit with autoremove trail space 2017-05-31 19:20:33 +02:00
Laurent Destailleur
d5f83d6bbe NEW #6915 Simplest change. 2017-05-31 19:15:39 +02:00
Laurent Destailleur
d55cc58b8b Merge pull request #6914 from atm-maxime/3.9
Fix special char and size limit in SEPA XML
2017-05-31 19:08:05 +02:00
Laurent Destailleur
d70c14a411 Update bonprelevement.class.php 2017-05-31 19:07:39 +02:00
Laurent Destailleur
d7d8e51ab1 Merge pull request #6912 from atm-gauthier/5.0_fix_originid_on_supplierproposal
FIX : origin & originid on supplierproposal
2017-05-31 19:01:29 +02:00
Laurent Destailleur
f829ccc11b Merge pull request #6908 from aspangaro/6.0-d3
Fix : Correct donation when we write operation in general ledger
2017-05-31 18:58:50 +02:00
Laurent Destailleur
7c29e286f8 Prepare 4.0.7 2017-05-31 13:31:17 +02:00
Laurent Destailleur
82ddf293b6 Prepare 5.0.3 2017-05-31 13:29:31 +02:00
Laurent Destailleur
7139a2dd9d Update debian package 2017-05-31 13:09:25 +02:00
Laurent Destailleur
c9a09adf79 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/langs/en_US/main.lang
2017-05-31 12:50:29 +02:00
Laurent Destailleur
e41541ab79 Enhance detection of changelog not updated 2017-05-31 12:47:21 +02:00
Laurent Destailleur
b2779e2c08 Typo 2017-05-31 12:05:53 +02:00
Laurent Destailleur
10ac53077e Code comment 2017-05-31 11:51:38 +02:00
Laurent Destailleur
145cb628cd FIX dol_string_nohtmltag make 2 passes to clean html into html
attributes.
2017-05-31 11:11:25 +02:00
Laurent Destailleur
292571688b Fix error message not reported 2017-05-31 10:49:06 +02:00
Alexandre SPANGARO
21183f91a3 FIX : Vat payment - Sql error / Add information in tooltip / Correct writting in general ledger 2017-05-31 05:27:39 +02:00
Laurent Destailleur
c39ca4cff8 NEW Introduce function dol_compress_dir 2017-05-31 00:20:35 +02:00
Laurent Destailleur
48a6e9e038 Removed not used files 2017-05-30 22:31:57 +02:00
Laurent Destailleur
5d115bcf69 Fix deadlock feature, can't process a leave request when validator has
left company.
2017-05-30 20:58:32 +02:00
Regis Houssin
aa780ea33b Fix: missing dot 2017-05-30 19:15:37 +02:00
Regis Houssin
5c5663c5ae New: getEntity function use true $shared value by default 2017-05-30 18:50:54 +02:00
Maxime Kohlhaas
510b1aedcf Fix xml SEPA $ListOfFactures not used and was listing all invoices in each XML line 2017-05-30 16:13:49 +02:00
Maxime Kohlhaas
200f4010d8 Fix special char and size limit in SEPA XML 2017-05-30 16:00:39 +02:00
gauthier
6b7c4cbbe1 FIX : default param 2017-05-30 16:00:21 +02:00
gauthier
c66695bd56 FIX : origin & originid on supplierproposal 2017-05-30 15:35:51 +02:00
Laurent Destailleur
10975112ee Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-05-30 09:46:33 +02:00
Alexandre SPANGARO
a0de94ae09 Fix : Correct donation when we write operation in general ledger 2017-05-30 06:28:19 +02:00
Laurent Destailleur
fa6bc03765 Fix typo 2017-05-30 01:34:20 +02:00
Laurent Destailleur
d9cdad6a77 Merge pull request #6904 from OPEN-DSI/core_holiday_add_triggers
NEW Core Holiday: Add triggers for create, update and delete functions of the class Holiday
2017-05-30 01:26:20 +02:00
Laurent Destailleur
11f58c7bda Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-05-30 00:44:42 +02:00
Laurent Destailleur
bd891ea56a Deploy to server works even when cloudflare is active. 2017-05-30 00:26:02 +02:00
Laurent Destailleur
ef83a0c15e Merge 2017-05-29 21:29:17 +02:00
Laurent Destailleur
8edce66c08 Update ChangeLog for 4.0.6 2017-05-29 21:27:35 +02:00
Laurent Destailleur
eea6461369 Update ChangeLog for 4.0.6 2017-05-29 21:27:22 +02:00
Laurent Destailleur
a057cfec91 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-05-29 21:17:54 +02:00
Laurent Destailleur
f21ec76bc0 Exclude dir 2017-05-29 21:16:37 +02:00
Laurent Destailleur
df729d8889 Fix travis 2017-05-29 19:28:43 +02:00
Laurent Destailleur
d56cd44ebc Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-05-29 19:11:41 +02:00
Quentin Vial-Gouteyron
f563746310 NEW_extrafield_in_project_mask 2017-05-29 15:38:40 +02:00
Laurent Destailleur
ad656e6d35 Look and feel v6 2017-05-29 15:34:00 +02:00
Laurent Destailleur
59ab9a4421 FIX #6850 2017-05-29 15:25:37 +02:00
Laurent Destailleur
400b3320aa NEW Introduction option MAIN_HTTP_CONTENT_SECURITY_POLICY 2017-05-29 15:20:50 +02:00
Laurent Destailleur
c71488e58b Removed deprecated code 2017-05-29 15:09:13 +02:00
Laurent Destailleur
ae6c58fb57 FIX #6808 2017-05-29 14:16:09 +02:00
David
d8c5ec2aef FIX: REST API not possible to add agendaevents 2017-05-29 13:47:42 +02:00
Regis Houssin
96b8339d21 Fix: [Restler] Delete the cache file otherwise it does not update 2017-05-29 13:46:03 +02:00
Laurent Destailleur
d2813eabbc FIX #6877
Conflicts:
	htdocs/install/mysql/migration/5.0.0-6.0.0.sql
2017-05-29 13:41:59 +02:00
Laurent Destailleur
19b8918caf FIX #6881 2017-05-29 13:40:08 +02:00
Laurent Destailleur
4824942369 FIX #6877 2017-05-29 13:39:07 +02:00
Laurent Destailleur
85e0ded573 FIX #6881 2017-05-29 13:35:51 +02:00
Laurent Destailleur
c26e072694 Code comment 2017-05-29 13:29:27 +02:00
Laurent Destailleur
7066ec7dab NEW Can clone expense report on another user 2017-05-29 13:22:52 +02:00
Laurent Destailleur
6f723490c2 Fix syntax error 2017-05-29 12:58:23 +02:00
Laurent Destailleur
3bd3387664 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-05-29 12:56:11 +02:00
Laurent Destailleur
b74a0dd5fd Look and feel v6 2017-05-29 12:06:26 +02:00
Laurent Destailleur
3bf38d663f Merge pull request #6890 from defrance/patch-11
menu descriptor must be only present in main
2017-05-29 12:00:49 +02:00
KHELIFA
3402718425 Core Holiday: Add triggers for create, update and delete a holiday
Fix the user parameter in the call of the create, update and delete functions of the class Holiday
2017-05-29 11:58:16 +02:00
Laurent Destailleur
478349174c Merge pull request #6902 from aspangaro/6.0-salary
NEW : Move employee in dol_banner in salaries
2017-05-29 11:47:10 +02:00
Laurent Destailleur
d7cecef0f2 Merge pull request #6901 from aspangaro/6.0-d2
Fix : Correct bank transfert when we write operation on general ledger
2017-05-29 11:45:18 +02:00
Laurent Destailleur
cce05a4070 Merge branch 'develop' into 6.0-d2 2017-05-29 11:45:13 +02:00
Laurent Destailleur
ab5545d02d Merge pull request #6898 from defrance/patch-12
$resaction need in 5.0.x too
2017-05-29 11:41:22 +02:00
Laurent Destailleur
395d361d66 Look and feel v6 2017-05-29 11:38:23 +02:00
Laurent Destailleur
30bc8b9a32 Fix typo 2017-05-29 11:00:36 +02:00
BENKE Charlie
18799c3a7f Changes Done
question
need to change $actionclassinstance->results in $actionclassinstance->resactionss ???
2017-05-29 11:00:08 +02:00
Laurent Destailleur
85c3880479 Look and feel v6 2017-05-29 10:58:41 +02:00
Laurent Destailleur
0c5bf21f3a Merge pull request #6900 from aspangaro/6.0-d1
Review expense report - Look and feel v6
2017-05-29 10:56:57 +02:00
Laurent Destailleur
f363845cbe Merge pull request #6899 from hregis/develop_bug_restapi
Fix: [Restler] Delete the cache file otherwise it does not update
2017-05-29 10:50:43 +02:00
Laurent Destailleur
3f5cf0ee18 Merge pull request #6897 from hregis/develop_bug4
Fix: for view special values
2017-05-29 10:46:03 +02:00
Laurent Destailleur
452579150d Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop

Conflicts:
	htdocs/core/class/html.form.class.php
2017-05-29 10:43:26 +02:00
Laurent Destailleur
e667d72547 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	dev/skeletons/build_class_from_table.php
	htdocs/compta/facture.php
	htdocs/core/class/html.form.class.php
2017-05-29 10:41:51 +02:00
BENKE Charlie
4c382f94e1 Changes done 2017-05-29 10:39:02 +02:00
Laurent Destailleur
05a537dfb6 Merge pull request #6895 from grandoc/new_branch_25_05
New branch 25 05
2017-05-29 10:33:28 +02:00
Laurent Destailleur
38b97c5a3c Merge pull request #6894 from grandoc/develop
fix : bad link
2017-05-29 10:33:05 +02:00
Laurent Destailleur
e4a2e42caf Merge branch 'develop' into develop 2017-05-29 10:33:00 +02:00
Laurent Destailleur
ea13e18f9e Merge pull request #6892 from hregis/develop_bug3
Fix: Wrong path for external module API REST
2017-05-29 10:30:09 +02:00
Laurent Destailleur
16456cf19f Merge pull request #6891 from hregis/develop_api
NEW add REST api "memberstypes"
2017-05-29 10:29:04 +02:00
Laurent Destailleur
d0e1b30670 Merge pull request #6889 from aspangaro/6.0-multijournal
Accountancy Clean code
2017-05-29 10:25:10 +02:00
Laurent Destailleur
b22817c237 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0
Conflicts:
	htdocs/compta/facture/fiche-rec.php
2017-05-29 10:25:07 +02:00
Laurent Destailleur
425192ef84 Merge branch 'develop' into 6.0-multijournal 2017-05-29 10:23:46 +02:00
Laurent Destailleur
f265e7d86a Merge pull request #6888 from hregis/develop_bug2
Fix: wrong min value
2017-05-29 10:18:59 +02:00
Laurent Destailleur
dc246fa44c Merge pull request #6887 from hregis/develop_new
New: add REST api "dictionaryevents" for use with "agendaevents"
2017-05-29 10:16:35 +02:00
Laurent Destailleur
1da648402d Merge pull request #6886 from hregis/develop_bug
Fix: use encrypt for llx_const data
2017-05-29 10:16:07 +02:00
Laurent Destailleur
4a330af4bf Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-05-29 10:15:30 +02:00
Laurent Destailleur
aa0a369f06 Fix typo 2017-05-29 10:15:10 +02:00
Laurent Destailleur
d526fcc091 Merge pull request #6884 from hregis/5.0_bug
Fix: wrong SPECIMEN value
2017-05-29 10:14:52 +02:00
Laurent Destailleur
5ff85a6586 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-05-29 10:13:55 +02:00
Laurent Destailleur
de1db57a9d Merge pull request #6883 from dvasseur/develop
FIX: REST API not possible to add agendaevents
2017-05-29 10:12:33 +02:00
Laurent Destailleur
b7b2184fb6 Merge pull request #6879 from atm-arnaud/FIX_pagination_resources
FIX pagination on resources
2017-05-29 10:12:11 +02:00
Laurent Destailleur
d19a8929df Merge pull request #6875 from atm-ph/fix_develop_ref_column_inventory
Fix missing column ref on migration for inventory
2017-05-29 10:11:26 +02:00
Laurent Destailleur
4474fc8014 Merge pull request #6872 from aspangaro/6.0-pcard
Use getNomUrl for accounting account in product card
2017-05-29 10:05:06 +02:00
Laurent Destailleur
70636cc59f FIX SQL injection on user/index.php parameter search_statut. 2017-05-29 09:59:21 +02:00
Alexandre SPANGARO
0d3c5bcfa8 Update documents & info page - better look & feel v6 2017-05-29 06:35:53 +02:00
Alexandre SPANGARO
dad1abd55b NEW : Move employee in dol_banner in salaries 2017-05-29 06:22:21 +02:00
Laurent Destailleur
84a3cbb97a Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-05-29 02:48:17 +02:00
Laurent Destailleur
d0f01085d8 Add more information on stripe payment 2017-05-29 02:44:14 +02:00
Laurent Destailleur
d03d179fa3 FIX Fullname when member is a moral entity with no name. 2017-05-28 23:43:24 +02:00
Alexandre SPANGARO
b0f2e95c7b Debug 2017-05-28 22:11:57 +02:00
Alexandre SPANGARO
095545e8d9 Fix : Correct bank transfert when we write operation on general ledger 2017-05-28 21:56:18 +02:00
Laurent Destailleur
c4f09b8894 Work on modulebuilder 2017-05-28 14:43:17 +02:00
Alexandre SPANGARO
48477e00fd Review payment part on expense report card 2017-05-28 06:49:17 +02:00
Laurent Destailleur
c651f1da45 Work on modulebuilder tool 2017-05-27 19:05:36 +02:00
Alexandre SPANGARO
570f9aaa9e Review old payment page for expense report 2017-05-27 08:18:53 +02:00
Alexandre SPANGARO
783cec0d6d Move to getNomUrl for expense report in bank entries 2017-05-27 07:21:59 +02:00
Alexandre SPANGARO
1711107420 FIX : colspan in bank entries 2017-05-27 07:11:17 +02:00
Regis Houssin
db9e068500 Fix: [Restler] Delete the cache file otherwise it does not update 2017-05-26 17:38:57 +02:00
Regis Houssin
ee2019ae37 Fix: limit to 100 by default to avoid freeze 2017-05-26 16:52:27 +02:00
Regis Houssin
f8fead4b90 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_new 2017-05-26 16:51:45 +02:00
BENKE Charlie
e4f7f2a0b2 $resaction need in 5.0.x too 2017-05-26 12:39:49 +02:00
Regis Houssin
95b2b1bd17 Fix: for view special values 2017-05-26 10:28:10 +02:00
Laurent Destailleur
7a1480d362 Look and feel v6 2017-05-26 00:02:41 +02:00
philippe grand
1f3a8b507e missing translation 2017-05-25 22:02:57 +02:00
Laurent Destailleur
ca08f814c1 Remove deprecated files 2017-05-25 19:38:42 +02:00
philippe grand
9dfc8a9dc8 fix : bad link 2017-05-25 19:13:13 +02:00
Regis Houssin
74e9b9bf0a Fix: Wrong path for external module API REST 2017-05-25 13:50:41 +02:00
Regis Houssin
954670731d Fix: changelog 2017-05-25 09:05:19 +02:00
Regis Houssin
18886849eb New: add REST api "memberstypes" 2017-05-25 08:54:30 +02:00
BENKE Charlie
b0bac770e5 menu descriptor must be only present in main
If we add the same menu descriptor 
the additionnal menu are added on the second, not the main
I propose to suppress it OR change "customers_bills" as "customers_bills_list" who allow to add some menu as sub-menu
2017-05-25 08:07:11 +02:00
Alexandre SPANGARO
db6d7d9e21 Spaces 2017-05-25 07:15:36 +02:00
Alexandre SPANGARO
e89c4e9f41 Merge remote-tracking branch 'uptream/develop' into 6.0-pcard 2017-05-25 07:15:03 +02:00
Alexandre SPANGARO
e4f5d45c45 Remove old code (selectjournal_accountancy_bookkepping) 2017-05-25 07:10:09 +02:00
Alexandre SPANGARO
1f079fac9d Move html.formventilation.class.php to html.formaccounting.class.php 2017-05-25 06:57:28 +02:00
Regis Houssin
fea60e2675 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_bug2 2017-05-25 06:34:31 +02:00
Alexandre SPANGARO
a086b82f84 Removed old code (Function select_pcgtype/subtype) 2017-05-25 05:40:41 +02:00
Alexandre SPANGARO
ba7e754174 Remove old code (journal) 2017-05-25 05:32:13 +02:00
Laurent Destailleur
e5fe629a0e NEW Extrafields support formulas to be computed using PHP expressions 2017-05-24 22:48:44 +02:00
Laurent Destailleur
3782bc4458 Look and feel v6 2017-05-24 19:47:02 +02:00
Regis Houssin
659436f1ed Fix: wrong min value 2017-05-24 19:33:44 +02:00
Regis Houssin
339d9dbfdf New: add REST api "dictionaryevents" for to use with "agendaevents" 2017-05-24 18:44:03 +02:00
Regis Houssin
55121c5e05 Fix: use encrypt for llx_const data 2017-05-24 16:35:02 +02:00
Laurent Destailleur
160eb194ea Clean REST response for user and third parties 2017-05-24 15:24:35 +02:00
Laurent Destailleur
f011197e00 Update swagger to 2.0.24 2017-05-24 15:12:45 +02:00
Laurent Destailleur
aef9ef2d75 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-05-24 13:46:03 +02:00
Laurent Destailleur
6eeb82ec70 FIX dialog window with md theme must not be hidden by left menu part. 2017-05-24 13:45:26 +02:00
Laurent Destailleur
6d4c5e4b4a Code comment 2017-05-24 11:37:44 +02:00
Regis Houssin
a3d8da0a73 Fix: wrong SPECIMEN value 2017-05-24 11:30:11 +02:00
David
3898cfe02f FIX: REST API not possible to add agendaevents 2017-05-23 18:27:41 +02:00
Laurent Destailleur
c98f0ba457 Fix typo 2017-05-23 15:57:18 +02:00
Laurent Destailleur
67b3e3da99 FIX #6784 2017-05-23 15:51:39 +02:00
Laurent Destailleur
cea98ce5cb Look and feel v6 2017-05-23 15:30:56 +02:00
Laurent Destailleur
80ce8da7a3 Fix migration errors and responsive design 2017-05-23 15:13:52 +02:00
Laurent Destailleur
3e37185b74 FIX download attached file on resource 2017-05-23 13:44:18 +02:00
Laurent Destailleur
5ebe711665 Look and feel v6 2017-05-23 13:38:48 +02:00
Laurent Destailleur
71bd69a804 Better link to show part to edit 2017-05-23 13:25:37 +02:00
arnaud
8781a19e0e FIX pagination on resources 2017-05-23 12:22:53 +02:00
Laurent Destailleur
2da50f1eca Look and feel v6 2017-05-23 01:32:19 +02:00
Laurent Destailleur
0cd030d856 NEW Introduce mass actions on contacts 2017-05-23 00:13:07 +02:00
Laurent Destailleur
2b9f654b8c Fix translation 2017-05-22 15:31:05 +02:00
Laurent Destailleur
1a8884bbbe NEW Can filter on year and product tags on the product statistic page 2017-05-22 15:20:52 +02:00
Laurent Destailleur
82560b9126 Look and feel v6 2017-05-22 10:58:20 +02:00
Laurent Destailleur
f5e29d6c86 Fix phpcs warning 2017-05-22 10:45:02 +02:00
Laurent Destailleur
8301e24261 PHP7 compatibility 2017-05-22 10:40:24 +02:00
Laurent Destailleur
f72ac3cf45 Fix php7 compatibility 2017-05-22 10:07:29 +02:00
phf
9bc60b8aa5 Fix missing column ref on migration for inventory 2017-05-22 09:26:10 +02:00
Alexandre SPANGARO
7520a55498 Merge remote-tracking branch 'uptream/develop' into 6.0-pcard 2017-05-22 06:32:59 +02:00
Laurent Destailleur
dd5976066a Fix travis 2017-05-22 02:04:43 +02:00
Laurent Destailleur
a3eef35ce6 Fix travis error 2017-05-22 01:19:16 +02:00
Laurent Destailleur
ecce1c2037 Remove conf 2017-05-21 23:58:19 +02:00
Laurent Destailleur
ef9cf6ef52 Add test on phpunit 2017-05-21 23:54:37 +02:00
Laurent Destailleur
090a7028d7 Fix constant usage 2017-05-21 23:41:04 +02:00
Laurent Destailleur
246fa9748b Debug travis error 2017-05-21 23:06:45 +02:00
Laurent Destailleur
6052d2d8ed Try to output log after error 2017-05-21 21:37:33 +02:00
Laurent Destailleur
e85f31f456 Fix phpunit 2017-05-21 21:33:24 +02:00
Laurent Destailleur
4a085a8cc0 Fix phpunit 2017-05-21 21:21:44 +02:00
Laurent Destailleur
3e381aa5a2 Fix phpunit 2017-05-21 21:04:20 +02:00
Laurent Destailleur
ff35229be5 Fix phpunit 2017-05-21 20:46:11 +02:00
Laurent Destailleur
6e31de731b Fix phpunit 2017-05-21 20:24:56 +02:00
Laurent Destailleur
965e23b711 Test to fix a regression 2017-05-21 19:45:47 +02:00
Laurent Destailleur
5cb38ece19 Fix travis errors 2017-05-21 19:37:15 +02:00
Laurent Destailleur
6aa6ef1f9f Fix travis error 2017-05-21 18:30:43 +02:00
Alexandre SPANGARO
d834cbf7ba Use getNomUrl for accounting account in product card 2017-05-21 15:24:16 +02:00
Laurent Destailleur
52b5a8ece7 More powerfull dol_move function. 2017-05-21 14:06:43 +02:00
Laurent Destailleur
5992175b68 Standardize code between customer and supplier invoice list. 2017-05-21 03:23:44 +02:00
Laurent Destailleur
b3dc73e611 Look and feel v6 2017-05-21 02:43:51 +02:00
Laurent Destailleur
86cbf7e35f Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-05-20 21:38:14 +02:00
Laurent Destailleur
2a9c6d9387 Complete ignore file 2017-05-20 21:11:31 +02:00
Laurent Destailleur
2dd2ab1003 Look and feel v6 2017-05-20 20:59:54 +02:00
Laurent Destailleur
a53fb25cfa Look and feel v6 2017-05-20 18:46:15 +02:00
Laurent Destailleur
7e25cc0475 FIX Phpunit on file submit with REST API 2017-05-20 17:09:15 +02:00
Laurent Destailleur
0e6ab01a79 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-05-20 16:29:47 +02:00
Laurent Destailleur
eb5bab36ca Use dolibarr security checks before uploading a file. 2017-05-20 16:15:25 +02:00
Laurent Destailleur
80cbc28385 NEW Add REST API to push a file. 2017-05-20 15:52:36 +02:00
Laurent Destailleur
2021758403 Merge pull request #6834 from atm-ph/fix_fk_project_on_create_order_from_propal
Fix fk project on create order from propal
2017-05-20 12:13:42 +02:00
Laurent Destailleur
864dc0d989 Remove var_dump 2017-05-20 11:59:32 +02:00
Laurent Destailleur
e340a53f7c Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-05-20 11:58:50 +02:00
Laurent Destailleur
54f9990467 Merge pull request #6836 from atm-ph/fix_deposit_calculation
Fix wrong calculation
2017-05-20 11:57:05 +02:00
Laurent Destailleur
876257c312 Merge pull request #6869 from aspangaro/6.0-fec
Update table accounting_bookeeping to prepare FEC format
2017-05-20 11:41:35 +02:00
Laurent Destailleur
66f6224321 Merge pull request #6868 from inoveaconseil/patch-2
Fix bug in insert method
2017-05-20 11:40:03 +02:00
Laurent Destailleur
1fe17a6918 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-05-20 11:34:21 +02:00
Laurent Destailleur
ef3dc8cd61 Merge pull request #6160 from aternatik/api_files
NEW API can receive documents
2017-05-20 11:34:00 +02:00
Laurent Destailleur
9355f28d6c Merge branch 'develop' into api_files 2017-05-20 11:33:46 +02:00
Laurent Destailleur
601f3ea75e Fix dol_check_secure_access_document in write mode, add phpunit tests 2017-05-20 11:31:03 +02:00
Laurent Destailleur
df05980c3a Prepare table of notification per object (exemple agenda events) 2017-05-20 10:42:45 +02:00
Alexandre SPANGARO
1da0959a3a Merge remote-tracking branch 'uptream/develop' into 6.0-grh 2017-05-20 08:03:29 +02:00
Alexandre SPANGARO
4ff9607011 Update table accounting_bookeeping to prepare FEC format and harmonization 2017-05-20 07:56:33 +02:00
Inovea Conseil
035cae656f Fix bug in insert method
Missing the last comma in the insert method
2017-05-19 22:14:34 +02:00
Laurent Destailleur
06b37d0e82 Work on dol_check_secure_access_document to support write question 2017-05-19 20:17:33 +02:00
Laurent Destailleur
ba5fb700ba Missing translation 2017-05-19 18:35:52 +02:00
Laurent Destailleur
e4ec5aa9a9 Merge pull request #6818 from atm-alexis/NEW_poc_list_product_with_listview
NEW poc list product with listview
2017-05-19 18:21:49 +02:00
Laurent Destailleur
807c77f754 Fix inconsistent options 2017-05-19 18:03:49 +02:00
Laurent Destailleur
bb2a9f9d0e Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-05-19 17:24:31 +02:00
Laurent Destailleur
c30dcf78cb Show info when link has been deleted 2017-05-19 17:24:15 +02:00
Laurent Destailleur
d1c4439a0f Merge pull request #6858 from OPEN-DSI/module_agenda_linked_object_option
NEW Module Agenda: Add option - Show linked object into agenda view
2017-05-19 17:23:54 +02:00
Laurent Destailleur
330b9e7038 Merge pull request #6866 from absnc/project_element_shipping
NEW Enable shipments in Project overview tab
2017-05-19 17:10:51 +02:00
Laurent Destailleur
b35b40e2bf Align position of right 2017-05-19 17:08:42 +02:00
Laurent Destailleur
f65b29c135 FIX #6867 - Rewrite code to solve regression (not mixing array/string
type and solve php warnings). Also restore $langs as a global var.
2017-05-19 16:57:38 +02:00
Laurent Destailleur
2a0a0f12f3 Merge pull request #6867 from OPEN-DSI/core_dict_actioncomm_modify_color_position
NEW Core dictionaries: Adds the ability to change the color and position …
2017-05-19 16:33:05 +02:00
Laurent Destailleur
470165615f Fix look and feel v6 2017-05-19 16:32:23 +02:00
Laurent Destailleur
30cedd154e Fix default value must apply only if restore_lastsearch_values is on 2017-05-19 15:42:11 +02:00
Laurent Destailleur
4e7353f8a0 Clean code 2017-05-19 13:39:00 +02:00
Laurent Destailleur
aec4cef5de Clean some code for type of event deprecated since 3.3 2017-05-19 12:58:38 +02:00
KHELIFA
2382a0a4ee Core dictionaries: Adds the ability to change the color and position of the dictionary 'Types of agenda events' 2017-05-19 10:46:29 +02:00
absys
a2764bc4c2 Fix indent. 2017-05-19 18:14:42 +11:00
absnc
7b784a1dcb Enable shipments for project overview tab 2017-05-19 17:50:10 +11:00
Laurent Destailleur
ff2a268831 NEW Architecture to manage search criteria persistance (using
save_lastsearch_values=1 on exit links and restore_lastsearch_values=1
in entry links)
2017-05-19 00:52:13 +02:00
Laurent Destailleur
a28f8c84e4 Fix travis error 2017-05-18 22:23:59 +02:00
Laurent Destailleur
e43e37a14f Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-05-18 22:12:12 +02:00
Laurent Destailleur
88fc7dbc3e Fix remove warning 2017-05-18 19:24:44 +02:00
Laurent Destailleur
353b7a4792 Merge pull request #6862 from camlafit/webservices-patches
Webservices patches :
2017-05-18 19:15:22 +02:00
Laurent Destailleur
c18c401960 Merge pull request #6864 from atm-florian/5.0_fix6863
FIX #6863
2017-05-18 19:12:37 +02:00
Laurent Destailleur
ef575166c0 FIX #6651 2017-05-18 19:10:05 +02:00
Laurent Destailleur
932d3aab9d Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-05-18 18:00:29 +02:00
Laurent Destailleur
59517a1fa0 Merge pull request #6855 from olsesacl/#6813
FIX: #6813 No numbering model for supplier proposal module
2017-05-18 17:58:10 +02:00
Laurent Destailleur
51fa6cfb19 Merge pull request #6854 from atm-florian/5.0
fix event thirdparty agenda do not show good owner
2017-05-18 17:57:24 +02:00
Laurent Destailleur
0b0dbd9649 Code comment 2017-05-18 17:57:20 +02:00
Laurent Destailleur
2f72edca6c Merge pull request #6853 from grandoc/new_branch_16_05
Update code using new css class
2017-05-18 17:51:58 +02:00
Laurent Destailleur
d4fd222251 Merge pull request #6851 from atm-arnaud/FIX_hook_doactions_invoice_model
FIX doactions hook missing in invoice model page
2017-05-18 17:51:09 +02:00
Laurent Destailleur
f75e43dcda Merge pull request #6849 from grandoc/new_branch_15_05
Update code using new css class
2017-05-18 17:50:01 +02:00
Laurent Destailleur
6fd0eef89d Merge pull request #6848 from atm-ph/fix_double_id_on_invoice
Fix html id 'tablelines' exist twice
2017-05-18 17:49:04 +02:00
Laurent Destailleur
92d7b907be Merge pull request #6844 from defrance/patch-10
problems with additionnal template type
2017-05-18 17:48:30 +02:00
Laurent Destailleur
7dbe3b1da9 Merge pull request #6843 from aspangaro/6.0-multijournal
Fix : Sql error on salaries index for accountancy multijournal + debug
2017-05-18 17:45:21 +02:00
florian HENRY
82cac745e3 FIX 6863 2017-05-18 14:18:59 +02:00
Laurent Destailleur
5a79d11389 Avoid warning 2017-05-18 13:14:56 +02:00
Laurent Destailleur
dff7d00d2b Look and feel v6 2017-05-18 13:13:18 +02:00
Laurent Destailleur
eaa4b650f8 Code comment 2017-05-18 13:01:48 +02:00
Laurent Destailleur
4a46480ef5 Fix preview of PDF contract 2017-05-18 12:40:20 +02:00
Laurent Destailleur
a36a9fab2f Look and feel v6 2017-05-18 12:12:36 +02:00
Laurent Destailleur
0b52c43e05 Fix bad selection of progress when not known 2017-05-18 11:35:12 +02:00
Laurent Destailleur
1a1b27d68c Fix input of duration 2017-05-18 11:13:18 +02:00
cam.lafit
240371b59d UPDATE : add warehouse information on order creation
* If stock management is enabled we must done information about warehouse source
If any warehouse is provided, client must send 0.
2017-05-18 10:47:08 +02:00
cam.lafit
ec25869ec6 FIX : UpdateInvoice create object
* To update data, function must work on invoice object
2017-05-18 10:47:07 +02:00
Laurent Destailleur
fbb3406c5d Fix missing filters 2017-05-18 10:46:55 +02:00
cam.lafit
682f6f838e Change argument list CreateInvoiceFromOrder
* invoice data are not mandatory
Only order information are required
2017-05-18 10:36:37 +02:00
cam.lafit
545e41b858 Fix : CreateInvoiceFromOrder result
* We should be return same informations as other CreateInvoice function
* Also invoice data can't be converted correctly by NuSoap, we can have some PHP error with invoice object
2017-05-18 10:34:17 +02:00
cam.lafit
94ca528860 FIX : CreateInvoiceFromOrder prototype
* SOAP declaration must follow function argument list
2017-05-18 10:33:12 +02:00
cam.lafit
368fb314fe FIX : missing object on createInvoiceFromOrder
* To create an invoice from order, we must have an order first
Load class as requirment
2017-05-18 10:22:15 +02:00
cam.lafit
2bf1f848d6 Provide payment SOAP webservices
* Backport from https://github.com/nikkow/dolibarr-payment-webservice
2017-05-18 10:18:45 +02:00
Laurent Destailleur
ff5d682d49 Fix css 2017-05-18 03:12:29 +02:00
Laurent Destailleur
58f789659d Remove one picto loading 2017-05-18 02:53:49 +02:00
Laurent Destailleur
f3838ee8f2 Fix limit into message 2017-05-17 18:52:01 +02:00
KHELIFA
169859b708 Module Agenda: Add option - Show linked object into agenda view 2017-05-17 17:00:45 +02:00
Laurent Destailleur
c224e2b4f6 Remove table that does not exists 2017-05-17 16:05:26 +02:00
Laurent Destailleur
1d6b4cb28a Look and feel v6 2017-05-17 15:25:09 +02:00
Laurent Destailleur
a8afa547f0 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/compta/facture.php
2017-05-17 15:20:17 +02:00
Laurent Destailleur
56989ae5af Add missing fields making not possible to enter reference price of
products into another currency
2017-05-17 15:10:45 +02:00
Laurent Destailleur
e2a7b0943f Clean dead code 2017-05-17 14:52:27 +02:00
Laurent Destailleur
1f1d92d858 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-05-17 14:45:37 +02:00
Laurent Destailleur
d86b42b024 Missing title, bad css 2017-05-17 14:45:08 +02:00
Sergio Sanchis Climent
1a98886aa3 FIX: #6813 2017-05-17 00:42:29 +02:00
Laurent Destailleur
7931c548c7 Better translation 2017-05-16 23:58:42 +02:00
Laurent Destailleur
b29f325fcf Work on search criteria persistence 2017-05-16 23:38:23 +02:00
Laurent Destailleur
b0f0285137 Standardize code 2017-05-16 21:29:18 +02:00
florian HENRY
3890c67210 fix event thirdparty agenda do not show good owner 2017-05-16 19:08:59 +02:00
Laurent Destailleur
d110292a1b Uniformize code 2017-05-16 17:49:38 +02:00
Laurent Destailleur
9870cafea3 Better translation 2017-05-16 16:40:03 +02:00
Laurent Destailleur
194ed505f4 Look and feel v6 2017-05-16 14:05:46 +02:00
Laurent Destailleur
68e333879f Fix var not sanitized 2017-05-16 13:27:32 +02:00
philippe grand
99cc67d123 Update code using new css class 2017-05-16 12:43:16 +02:00
Laurent Destailleur
cc16bb0bef Debug default value feature. 2017-05-16 12:22:55 +02:00
arnaud
c9738aa7ea FIX doactions hook missing in invoice model page 2017-05-16 11:34:00 +02:00
Laurent Destailleur
cc95e046e5 NEW Can sort customer balance summary on date 2017-05-16 03:34:49 +02:00
Laurent Destailleur
ab444ce730 Prepare for module collab/pad 2017-05-16 03:02:00 +02:00
Laurent Destailleur
ce84990414 NEW On invoices generated by template, we save if of source template. 2017-05-16 02:46:19 +02:00
philippe grand
bdb2f85103 Update code using new css class 2017-05-15 16:25:51 +02:00
phf
3da7b9543d Fix double quote 2017-05-15 15:10:15 +02:00
phf
f10b77f190 Fix html id 'tablelines' exist twice 2017-05-15 15:05:42 +02:00
Laurent Destailleur
789fbb6dc3 Enhance tooltips 2017-05-15 12:57:08 +02:00
Laurent Destailleur
f2aa0ea488 Look and feel v6 2017-05-15 10:39:14 +02:00
Laurent Destailleur
b3245fb455 NEW Include an hourglass icon when we click on online payment button 2017-05-15 10:27:21 +02:00
phf
d120a391f9 Fix use $numlines instead $i 2017-05-15 10:26:40 +02:00
phf
4d9016c49f Fix create propal form from propal with project id, fk_project is not used to init select project 2017-05-15 10:12:58 +02:00
Alexandre SPANGARO
becd023032 Fix : tooltip on supplier invoice payment 2017-05-15 05:11:00 +02:00
Laurent Destailleur
b29d0385e6 NEW Can send an email to a user from its card. 2017-05-15 00:15:56 +02:00
Alexandre SPANGARO
4dc7d5cd8d Fix : tooltip on bank in customer invoice card 2017-05-14 21:20:35 +02:00
Alexandre SPANGARO
93554b7e30 Typo searchpicto 2017-05-14 21:06:33 +02:00
Alexandre SPANGARO
cedf5fb0ed Merge remote-tracking branch 'uptream/develop' into 6.0-multijournal 2017-05-14 20:29:46 +02:00
Laurent Destailleur
caae7e4171 NEW It's easier to switch between sandbox and live for paypal 2017-05-14 17:05:13 +02:00
Laurent Destailleur
998254d9c6 Finish rewrite and debug of module Stripe. 2017-05-14 16:17:23 +02:00
BENKE Charlie
8e68aa86ac problems with additionnal template type
If i active my new xml templater, and keep odt, the odt folder is added on folder to scan on my xml path
ex : 
odt folder defined : c:\toto
xml folder defined : c:\tata

folder scanned with odt :  c:\toto
folder scanned with odt :  c:\toto,c:\tata
2017-05-14 15:17:40 +02:00
Laurent Destailleur
9b550ae178 Fix migration of accountancy_journal from char to num. 2017-05-14 12:54:26 +02:00
Alexandre SPANGARO
143c019905 Fix : Sql error on salaries index for accountancy multijournal + debug 2017-05-14 08:07:34 +02:00
Laurent Destailleur
9e4e72baee Enhance module stripe 2017-05-14 05:26:19 +02:00
Laurent Destailleur
169e63d49a Fix set of background for left menu 2017-05-13 22:23:03 +02:00
Laurent Destailleur
0ed4b607b2 Standardize code for payment 2017-05-13 22:17:39 +02:00
Laurent Destailleur
8dcec30d89 Start debug of module stripe 2017-05-13 21:17:08 +02:00
Laurent Destailleur
955c9f4217 Standardize the way online payments are working.
Removed the trigger file of PAYPAL module that stored data that was not
used by Dolibarr. The trigger event still exists, but if an external
module need action on it, it must provides itself its trigger file.
2017-05-13 21:10:56 +02:00
Laurent Destailleur
1d0e9b0a59 Merge pull request #6828 from atm-alexis/FIX_situation_invoice_allpercent
FIX situation invoice broken
2017-05-13 20:14:48 +02:00
Laurent Destailleur
3c87399fac Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-05-13 19:56:31 +02:00
Laurent Destailleur
57ba598b15 Merge pull request #6771 from aspangaro/6.0-stripe
New : Module Stripe
2017-05-13 19:55:29 +02:00
Laurent Destailleur
5729bdb2c9 Fix phpunit 2017-05-13 19:51:31 +02:00
Laurent Destailleur
592bd6857b Merge pull request #6842 from grandoc/new_branch_13_05
Update code using new css class
2017-05-13 19:48:47 +02:00
Laurent Destailleur
b568877f22 Merge pull request #6829 from grandoc/new_branch_10_05
Update code using new css class
2017-05-13 19:47:27 +02:00
Laurent Destailleur
4221bdcc97 Merge pull request #6841 from grandoc/new_branch_12_05
Update code using new css class
2017-05-13 19:46:08 +02:00
Laurent Destailleur
dec602a27b Merge pull request #6838 from atm-ph/fix_invoice_credit_note_standalone
Fix feature INVOICE_CREDIT_NOTE_STANDALONE doesn't work
2017-05-13 19:45:42 +02:00
Laurent Destailleur
4343f93c00 Remove a lot of useless code 2017-05-13 19:36:28 +02:00
Laurent Destailleur
e0abba5cf2 Merge pull request #6831 from Gecka-Apps/5.0-fixes
Fix: when sending a mail the default template used should be the first positioned template
2017-05-13 19:35:58 +02:00
Laurent Destailleur
553f5b990c Fix scrutinizer errors 2017-05-13 18:50:55 +02:00
Laurent Destailleur
70b73c73f7 Fix coding style 2017-05-13 18:34:57 +02:00
philippe grand
1e825e9f1e Update code using new css class 2017-05-13 17:25:35 +02:00
Laurent Destailleur
71833f5987 Standardize code 2017-05-13 17:04:46 +02:00
Laurent Destailleur
b5b97816c8 FIX #6803 2017-05-13 14:06:14 +02:00
Laurent Destailleur
54088f38fb Code standardization on online payment code 2017-05-13 14:03:09 +02:00
Laurent Destailleur
6f9e67b1fb Remove no more used constant 2017-05-13 13:08:25 +02:00
Laurent Destailleur
f7e042d7b8 Look and feel v6 2017-05-13 13:02:55 +02:00
Laurent Destailleur
f8403d5020 Fix phpunit test 2017-05-12 20:01:45 +02:00
Laurent Destailleur
f6dcb2860a More complete help message 2017-05-12 19:14:54 +02:00
Laurent Destailleur
8fc285c8b3 Fix bad date usage 2017-05-12 18:32:13 +02:00
Laurent Destailleur
1a016524e0 Fix log 2017-05-12 17:44:51 +02:00
Laurent Destailleur
fa290c34fa Fix against SQL injection. Add phpunit to detect missing escapement. 2017-05-12 16:55:11 +02:00
philippe grand
a534f79668 Update code using new css class 2017-05-12 16:02:01 +02:00
Laurent Destailleur
0d11fce834 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-05-12 15:45:30 +02:00
Laurent Destailleur
88e7d54915 Add phpunit to detect SQL not escaped string. 2017-05-12 15:45:00 +02:00
Laurent Destailleur
b81de35703 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0
Conflicts:
	htdocs/adherents/class/adherent.class.php
	htdocs/comm/propal/class/propal.class.php
	htdocs/compta/facture/class/facture.class.php
	htdocs/compta/sociales/class/chargesociales.class.php
	htdocs/contrat/class/contrat.class.php
2017-05-12 15:44:09 +02:00
Laurent Destailleur
419c15ee8e Fix escaping class 2017-05-12 15:28:10 +02:00
Laurent Destailleur
5581e5da72 FIX New vat code not correctly implemented if "1 price per customer". 2017-05-12 13:12:17 +02:00
Laurent Destailleur
245ef7a188 Add screenshot 2017-05-12 13:05:03 +02:00
Laurent Destailleur
80b0d91154 More complete demo 2017-05-12 12:12:04 +02:00
Laurent Destailleur
74af1223de Fix company id for US 2017-05-12 11:26:24 +02:00
Laurent Destailleur
bccfa3dbed Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-05-11 14:39:47 +02:00
Laurent Destailleur
849fe880cd Update resources 2017-05-11 14:39:13 +02:00
Laurent Destailleur
b09300ab61 NEW Can edit background color for odd and even lines in tables 2017-05-11 13:02:29 +02:00
phf
b092b6861a Fix feature INVOICE_CREDIT_NOTE_STANDALONE doesn't work 2017-05-11 12:48:47 +02:00
Laurent Destailleur
d3917b6065 FIX Bad return code of dolCpyDir 2017-05-11 12:25:53 +02:00
Laurent Destailleur
eb4cfc11cb Fix syntax error 2017-05-11 11:58:16 +02:00
Laurent Destailleur
0e4a209dd8 Fix normalize color settings 2017-05-11 11:50:21 +02:00
phf
17f37cc9e1 Fix wrong calculation 2017-05-11 11:41:00 +02:00
Philippe Grand
26df028efe Update bilan.php 2017-05-11 09:17:43 +02:00
Philippe Grand
be6be3e533 Update bilan.php 2017-05-11 09:16:44 +02:00
Philippe Grand
449869c37b Update bilan.php 2017-05-11 09:15:35 +02:00
Philippe Grand
f231864b3f Update bilan.php 2017-05-11 09:13:51 +02:00
alexis Algoud
c2f76522eb fix form inside table 2017-05-11 09:04:14 +02:00
Laurent Dinclaux
8ae05a9651 Fix: when sending a mail the default template used should be the first positionned template 2017-05-11 13:38:17 +11:00
Laurent Destailleur
cd72c50356 Merge pull request #6799 from Dolibarr/scrutinizer-patch-2
Scrutinizer Auto-Fixes
2017-05-11 00:04:12 +02:00
Laurent Destailleur
30cf3f2bda Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/compta/bank/class/account.class.php
	htdocs/core/class/html.formfile.class.php
	htdocs/core/lib/functions.lib.php
	htdocs/filefunc.inc.php
	htdocs/install/mysql/tables/llx_bank_account.sql
2017-05-11 00:03:06 +02:00
Laurent Destailleur
922fa088b4 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0
Conflicts:
	htdocs/commande/class/commande.class.php
	htdocs/core/boxes/box_services_expired.php
2017-05-10 23:47:33 +02:00
Laurent Destailleur
ef5fd503cd Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-05-10 23:43:08 +02:00
Laurent Destailleur
b2e9d4cc21 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-05-10 23:42:49 +02:00
Laurent Destailleur
2da0a129d1 Multiple file upload on by default on desktop. 2017-05-10 23:41:43 +02:00
Laurent Destailleur
d7b142beb7 Merge pull request #6830 from jfefe/patch-12
Fix #6504: CVE-2017-7886
2017-05-10 23:41:19 +02:00
Laurent Destailleur
d19d733f95 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-05-10 23:28:24 +02:00
Laurent Destailleur
0734b99d3a Fix sql syntax 2017-05-10 23:27:48 +02:00
Laurent Destailleur
94353deb75 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-05-10 23:25:11 +02:00
Laurent Destailleur
164f3954ee Merge pull request #6824 from ATM-Marc/NEW_multiple_fileupload
NEW permit multiple file upload in linked documents tab
2017-05-10 23:24:41 +02:00
Laurent Destailleur
2b64cf0ebe Update html.formfile.class.php 2017-05-10 23:24:33 +02:00
Laurent Destailleur
ab019cac8d Merge pull request #6821 from LordVan/patch-3
Add more fields to projectcontacts substitution
2017-05-10 23:20:49 +02:00
Laurent Destailleur
d855f4b202 Merge pull request #6820 from atm-alexis/NEW_get_amout_base_on_thm_ficheinter
NEW get amount base on user thm ficheinter
2017-05-10 23:13:32 +02:00
Laurent Destailleur
2ad4dbdae2 Merge pull request #6817 from Gecka-Apps/5.0-cronfix
Fix recurring invoices generation when using the cron url
2017-05-10 23:11:38 +02:00
Laurent Destailleur
61a4382bd8 Merge pull request #6814 from fmarcet/3.9
FIX: Correction with author and validator user on orders
2017-05-10 23:11:21 +02:00
Laurent Destailleur
cf361e1ed2 Fix html syntax 2017-05-10 23:10:09 +02:00
Laurent Destailleur
7ab151dc0d Merge pull request #6809 from Gecka-Apps/5.0
New-Caledonia uses the same bank accounts patterns than France
2017-05-10 23:02:29 +02:00
Laurent Destailleur
2199c525bc Merge pull request #6805 from grandoc/new_branch_06_05
Update code using new css class
2017-05-10 22:51:31 +02:00
Laurent Destailleur
1c7d9b9d9a Merge pull request #6804 from aspangaro/6.0-multijournal
New : Accountancy - Add a list to select the bank journal in bank card
2017-05-10 22:46:30 +02:00
Benoit
23af50ad2a Add fk_facture_fourn element to fetch lines objects 2017-05-10 22:45:41 +02:00
Laurent Destailleur
7ff35f57b4 Merge pull request #6802 from benlo06/FIX_CLASS_FOURN
Fix add forget column to Object FactureFournisseur
2017-05-10 22:44:46 +02:00
Benoit
ec4e416a6c Fix bug xhen insert new bankline 2017-05-10 22:44:08 +02:00
Laurent Destailleur
33e93e9294 Merge pull request #6801 from benlo06/BUG_ACCOUT_CATEGORIES
Fix add new line for bank records
2017-05-10 22:43:18 +02:00
jfefe
d410a320d7 WIP #6504: CVE-2017-7886
'defaultlang' attribute was not filtered before database request which cause an SQL injection.
2017-05-10 20:32:54 +02:00
Laurent Destailleur
5a96ae54b9 FIX Link to files on bank account tab broken with multicompany
FIX Link to preview on thirdparty broken with multicompany
2017-05-10 19:08:07 +02:00
Laurent Destailleur
823e5b48e3 Code comment 2017-05-10 18:56:18 +02:00
Laurent Destailleur
52de60c49b Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-05-10 18:17:58 +02:00
BENKE Charlie
d570df5089 inverted value between FRST & RECUR 2017-05-10 18:17:28 +02:00
Laurent Destailleur
002bebd837 Fix missing extraparams make sql syntax error 2017-05-10 18:15:01 +02:00
Laurent Destailleur
e48ba06730 Fix generation of sepa mandate with multicompany 2017-05-10 18:13:38 +02:00
Laurent Destailleur
fe8d34c73b Add field extraparams on llx_bank_account 2017-05-10 17:50:10 +02:00
philippe grand
b7b16dc632 Update code using new css class 2017-05-10 16:41:19 +02:00
alexis Algoud
bba8f972a1 FIX situation invoice broken
due to the all percent application form inside addline form
2017-05-10 16:10:14 +02:00
Thomas Raschbacher
70de54e97d fix project extrafields for ODT
for some raeson the code was checking for already existing extra fields before even fetching it. removed the if condition, now it works fine.
2017-05-10 15:21:53 +02:00
Marc de Lima Lucio
984531411d NEW: permit multiple file upload in linked documents 2017-05-10 15:01:27 +02:00
Laurent Destailleur
8781f6bcf2 Add vat code on predefined invoice 2017-05-10 14:53:20 +02:00
Laurent Destailleur
199b4dfeb5 Merge pull request #6816 from Gecka-Apps/5.0-fixes
Add local taxes support to predefined invoices
2017-05-10 14:52:23 +02:00
Laurent Destailleur
ec03d1705b Fix travis 2017-05-10 13:56:05 +02:00
Laurent Destailleur
0156e99894 Code comment 2017-05-10 13:46:02 +02:00
Laurent Destailleur
5a31d2c95a Fix css 2017-05-10 13:39:00 +02:00
Laurent Destailleur
5e54567558 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	dev/skeletons/skeleton_list.php
2017-05-10 13:30:35 +02:00
Laurent Destailleur
578eb98b33 Better user interface 2017-05-10 13:13:33 +02:00
Laurent Destailleur
9b4b096e86 Debug variant module 2017-05-10 12:35:05 +02:00
Laurent Destailleur
fe053c8603 Better escaping of error message. 2017-05-10 12:03:40 +02:00
Laurent Destailleur
8e25155fc9 Better escaping of error message. 2017-05-10 12:02:41 +02:00
Laurent Destailleur
3e0fcf5ec2 Fix label "total for this page" on last page. 2017-05-10 11:57:59 +02:00
Laurent Destailleur
383dfc0c96 FIX Pagination of invoices 2017-05-10 11:51:59 +02:00
Laurent Destailleur
c4722e3694 FIX XSS 2017-05-10 11:48:45 +02:00
Laurent Destailleur
5c33c1773f FIX XSS 2017-05-10 11:47:34 +02:00
Laurent Destailleur
09f6fe5a52 Fix lib_notification 2017-05-10 10:06:44 +02:00
Laurent Destailleur
0ea69e2e94 Add empty index.html page 2017-05-10 09:58:58 +02:00
Thomas Raschbacher
267e66abfa Add more fields to projectcontacts substitution
civility added + extrafields for external contacts + isInternal to decide in template wether to list internal or not
2017-05-10 08:48:28 +02:00
Laurent Destailleur
ecf3b6ab33 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-05-10 00:51:27 +02:00
Laurent Destailleur
e5c898e0d6 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	ChangeLog
	build/makepack-dolibarr.pl
	htdocs/fichinter/list.php
	htdocs/product/list.php
	htdocs/projet/tasks/list.php
2017-05-10 00:48:27 +02:00
Laurent Destailleur
2fc64b8e11 Fix XSS 2017-05-10 00:44:54 +02:00
alexis portable
b157398da4 fiche inter fix user author fetch 2017-05-09 22:54:33 +02:00
alexis portable
ae57395562 NEW get amount base on thm for ficheinter 2017-05-09 22:37:17 +02:00
Laurent Destailleur
b8b91db007 Use function top_httphead to include headers in pages. 2017-05-09 21:46:57 +02:00
Laurent Destailleur
39b4549813 Make option MAIN_SECURITY_CSRF_WITH_TOKEN more visible 2017-05-09 19:43:50 +02:00
Laurent Destailleur
6d01bd712d FIX Better sanitizing of search all parameter. 2017-05-09 19:36:10 +02:00
Laurent Destailleur
667e3c2876 Add another security sanitizing option 2017-05-09 19:26:28 +02:00
Laurent Destailleur
0b97ee42cf NEW Can use a credit note into a "down payment/deposit". 2017-05-09 18:15:50 +02:00
Laurent Destailleur
1748f1d451 Better tooltip for computed field 2017-05-09 17:00:07 +02:00
Laurent Dinclaux
fb561bae1b Fix recurring invoices generation when using the cron url 2017-05-10 00:58:48 +11:00
Laurent Dinclaux
c88656edb4 Fix PHPDOC comments 2017-05-09 23:59:37 +11:00
alexis portable
8272408b6e fix travis case statement 2017-05-09 14:43:54 +02:00
alexis portable
651ea92657 NEW fix listview class and add a demo for product list 2017-05-09 14:26:47 +02:00
Laurent Dinclaux
6cac627117 Add support for localtaxes to predefined invoices 2017-05-09 23:19:16 +11:00
Ferran Marcet
dbcb60433b FIX: Correction with author and validator user on orders 2017-05-09 13:31:20 +02:00
Laurent Dinclaux
2b7dcfa56d Add missing vat_src_code field to predefined invoices table 2017-05-09 21:07:32 +11:00
Laurent Destailleur
081d0e7ec2 Debug module RH. Edition of user bank account is ok. 2017-05-09 11:09:21 +02:00
Laurent Destailleur
cf04e5a6e0 Fix duplicate id 2017-05-09 10:45:49 +02:00
Laurent Destailleur
63259295c6 Look and feel v6 2017-05-09 10:41:03 +02:00
Laurent Destailleur
9fe28c9b2c NEW Can disable all overwrote translations in one click. 2017-05-09 10:08:04 +02:00
Laurent Destailleur
05d6c2cd75 Fix no more use of constant 2017-05-09 01:36:20 +02:00
Laurent Destailleur
c26d24e97d Work on module builder 2017-05-09 00:00:09 +02:00
Laurent Destailleur
1371af5f66 Work on modulebuilder template 2017-05-08 21:04:23 +02:00
Laurent Destailleur
dd71fdc82f Work on modulebuilder template 2017-05-08 21:00:23 +02:00
Laurent Destailleur
d7d212bbe1 Fix bad link to list 2017-05-08 12:31:37 +02:00
Laurent Destailleur
fd6518182b Fix can force tls version 2017-05-08 12:08:43 +02:00
Alexandre SPANGARO
b05d2c50e8 Add mode live 2017-05-08 06:52:30 +02:00
Alexandre SPANGARO
16a41242d3 Merge remote-tracking branch 'uptream/develop' into 6.0-stripe 2017-05-08 06:39:14 +02:00
Alexandre SPANGARO
a3602ff6b4 Add journal list in new movement card 2017-05-08 06:20:17 +02:00
Alexandre SPANGARO
dd97bbdc82 Merge remote-tracking branch 'uptream/develop' into 6.0-multijournal 2017-05-07 15:10:30 +02:00
Laurent Dinclaux
8c75fc0e52 New-Caledonia uses the same bank accounts patterns than France 2017-05-07 14:11:47 +11:00
Laurent Destailleur
46ff62fc87 Work on inventory module debug 2017-05-06 22:28:07 +02:00
Laurent Destailleur
f4447f9c87 Fix bookmark jump 2017-05-06 21:39:00 +02:00
Laurent Destailleur
910a925167 NEW Add last activation author and ip of modules 2017-05-06 20:43:14 +02:00
Laurent Destailleur
d948447600 Add button to disable all personalized default values in one click. 2017-05-06 17:08:38 +02:00
Laurent Destailleur
ab8dcbd366 Use virtual name 2017-05-06 16:36:05 +02:00
Laurent Destailleur
880e2d0f72 Fix packaging 5.0.2 2017-05-06 15:05:24 +02:00
Laurent Destailleur
c4475ca946 Add a protection to avoid to take modules into custom dir. 2017-05-06 14:56:16 +02:00
Laurent Destailleur
a9bb2eb24c Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-05-06 13:07:02 +02:00
Laurent Destailleur
a7e9dc1ce4 Prepare 5.0.2 2017-05-06 13:06:33 +02:00
Laurent Destailleur
44bdf91715 Add badge with nb of imported calendard on user tab 2017-05-06 12:43:45 +02:00
Philippe Grand
fe50dabf42 Merge branch 'develop' into new_branch_20_04 2017-05-06 11:05:33 +02:00
philippe grand
55feea5d98 Update code using new css class 2017-05-06 10:54:28 +02:00
Alexandre SPANGARO
7c4b47f20d Update works 2017-05-06 08:33:12 +02:00
Alexandre SPANGARO
8113e6c2f2 Update Accounting journal getNomUrl 2017-05-06 08:11:07 +02:00
Alexandre SPANGARO
68aaef2f66 Add list to select journal in bank 2017-05-06 08:06:01 +02:00
Alexandre SPANGARO
a4defb8102 Add html form for accountancy journals list 2017-05-06 07:02:34 +02:00
Laurent Destailleur
e8c60642e6 Translation fix 2017-05-06 03:21:47 +02:00
Laurent Destailleur
9b90e7aa09 Minor fix 2017-05-06 02:24:52 +02:00
Laurent Destailleur
56140ae572 Work on default focus 2017-05-06 01:09:22 +02:00
Laurent Destailleur
cea835744c Look and feel v6 2017-05-05 23:06:46 +02:00
Laurent Destailleur
5e6b2897ad Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-05-05 22:57:52 +02:00
Benoit
0fbf27895a Add fk_facture_fourn element to fetch lines objects 2017-05-05 22:33:34 +02:00
Benoit
e28dff19ee Fix bug xhen insert new bankline 2017-05-05 22:21:46 +02:00
Laurent Destailleur
d53654e64f Look and feel v6 2017-05-05 20:45:06 +02:00
Scrutinizer Auto-Fixer
d93552c8c5 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2017-05-05 17:13:29 +00:00
Laurent Destailleur
fb58dfa898 Merge pull request #6752 from grandoc/new_branch_24_04
Update code using new css class
2017-05-05 19:08:38 +02:00
Laurent Destailleur
2e5c32eb62 Merge pull request #6748 from atm-florian/5.0
FIX : #6747
2017-05-05 19:06:14 +02:00
Laurent Destailleur
d7e10085b8 Clean code. Using 2 different key for a param is not more allowed. 2017-05-05 18:42:11 +02:00
Laurent Destailleur
806157ae40 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-05-05 17:52:22 +02:00
Laurent Destailleur
57e540af53 For better compatibility with module for 6.0 2017-05-05 17:46:40 +02:00
Laurent Destailleur
15d20497c8 FIX #6795 #6796 2017-05-05 17:46:22 +02:00
Laurent Destailleur
a8292ce990 Code comment 2017-05-05 17:27:16 +02:00
Laurent Destailleur
4b42a5fd86 Merge pull request #6775 from marcosgdf/bug-6677
FIX #6677 Expired contracts dashboard box does not show the name of the thirdparty
2017-05-05 17:05:06 +02:00
Laurent Destailleur
dc9cbed866 Look and feel v6 2017-05-05 17:04:35 +02:00
Laurent Destailleur
fc5f4007a1 Debug accountancy module. Page for bank journalization is still KO. 2017-05-05 16:54:05 +02:00
Laurent Destailleur
885a636351 Debug new journal list page 2017-05-05 16:35:05 +02:00
Laurent Destailleur
11b1a2adac Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/accountancy/journal/bankjournal.php
	htdocs/accountancy/journal/expensereportsjournal.php
	htdocs/accountancy/journal/purchasesjournal.php
	htdocs/accountancy/journal/sellsjournal.php
	htdocs/comm/propal/class/api_proposals.class.php
	htdocs/comm/propal/class/propal.class.php
	htdocs/compta/bank/index.php
	htdocs/compta/facture.php
	htdocs/core/class/html.form.class.php
	htdocs/includes/odtphp/Segment.php
	htdocs/langs/en_US/admin.lang
	htdocs/societe/soc.php
2017-05-05 14:49:25 +02:00
Laurent Destailleur
b7f7683e5a Merge pull request #6774 from aspangaro/6.0-multijournal
Finish to move accountancy journals list to page like dictionnary
2017-05-05 14:21:55 +02:00
Laurent Destailleur
91c505c9c9 Update llx_accounting.sql 2017-05-05 14:20:59 +02:00
Laurent Destailleur
dfa81bc806 Merge pull request #6792 from aspangaro/6.0-agiris
New : Accountancy - Add export model towards Agiris
2017-05-05 14:15:51 +02:00
Laurent Destailleur
eb2124bfc8 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-05-05 14:14:53 +02:00
Laurent Destailleur
2120b9af85 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0
Conflicts:
	htdocs/core/class/commonobject.class.php
	htdocs/core/modules/commande/doc/pdf_einstein.modules.php
	htdocs/fourn/class/fournisseur.commande.class.php
	htdocs/theme/eldy/style.css.php
2017-05-05 14:14:21 +02:00
Laurent Destailleur
e830ea6714 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-05-05 14:02:10 +02:00
Laurent Destailleur
8a37eeea74 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-05-05 14:02:02 +02:00
Laurent Destailleur
919d5b2ef3 Fix missing translation 2017-05-05 14:01:32 +02:00
Laurent Destailleur
a1ac3b470b Change menu for setup of predefined emails 2017-05-05 14:01:20 +02:00
Laurent Destailleur
d60e98a797 No payment information on a supplier proposal by default. 2017-05-05 13:50:14 +02:00
Laurent Destailleur
0bffac6dc4 Use constant vor status. 2017-05-05 13:43:43 +02:00
Laurent Destailleur
90542d119a FIX trigger name and status set of setStatus for commercial proposal 2017-05-05 13:25:30 +02:00
Laurent Destailleur
884b261df5 Code comment 2017-05-05 12:51:47 +02:00
Laurent Destailleur
38a4845c0e Merge pull request #6798 from Dolibarr/revert-6773-FIX_useless_close_button
Revert "FIX : close supplier makes no sense. we just need to know if it is ac…"
2017-05-05 12:42:28 +02:00
Laurent Destailleur
de356a3185 Revert "FIX : close supplier makes no sense. we just need to know if it is ac…" 2017-05-05 12:41:31 +02:00
Laurent Destailleur
e6ad3ea7d4 Merge pull request #6773 from atm-gauthier/FIX_useless_close_button
FIX : close supplier makes no sense. we just need to know if it is ac…
2017-05-05 12:34:52 +02:00
Laurent Destailleur
65e03ca3ba Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-05-05 12:34:22 +02:00
Laurent Destailleur
68b63927e0 Maxi miscellaneous debug 2017-05-05 12:33:49 +02:00
Laurent Destailleur
043a26eeb5 Merge pull request #6794 from Atryamie/credit_note_for_fourn_not_working
FIX : Credit Note for fourn doesn't work
2017-05-05 10:04:44 +02:00
Laurent Destailleur
0a1ec514d2 Merge pull request #6772 from aspangaro/6.0-1
Add option on accounting account getNomUrl
2017-05-05 10:02:27 +02:00
Laurent Destailleur
8f5fa1d810 Merge pull request #6769 from atm-ph/fix_propal_without_fetch_lines
Fix Propal class doesn't have fetch_lines method yet
2017-05-05 10:01:42 +02:00
Laurent Destailleur
5f507dd6ed Merge pull request #6777 from aspangaro/6.0-accountancy_bank
Use getnomUrl on bank accountancy number
2017-05-05 10:00:32 +02:00
Laurent Destailleur
938d33941d Merge pull request #6780 from marcosgdf/php7-warnings
Corrected PHP7 warnings for several pages
2017-05-05 09:59:25 +02:00
Laurent Destailleur
9785e9b298 Update commonobject.class.php 2017-05-05 09:57:51 +02:00
Guillaume T. (Arck Consulting)
9f9bceb208 Merge branch 'credit_note_for_fourn_not_working' of https://github.com/Atryamie/dolibarr into credit_note_for_fourn_not_working 2017-05-05 09:50:15 +02:00
Guillaume T. (Arck Consulting)
ef0d395a1a [FIX] Credit Note for fourn doesn't work, missing filed in create method & attribut 2017-05-05 09:49:44 +02:00
Laurent Destailleur
4b8cda2070 Merge pull request #6791 from Gecka-Apps/5.0
Fix major issues with local taxes
2017-05-05 09:30:52 +02:00
Laurent Destailleur
bd8e4cf6aa Merge pull request #6762 from atm-alexis/develop
NEW Add option USE_PDFTK_FOR_PDF_CONCAT to use pdftk to concat mass pdf
2017-05-05 09:24:21 +02:00
Laurent Destailleur
db8c4a5ac4 Merge pull request #6760 from fappels/4.0_fix_download_delivery_doc
Fix download delivery and donation document
2017-05-05 09:21:19 +02:00
Laurent Destailleur
382fcb53fa Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-05-05 09:16:30 +02:00
Laurent Destailleur
fecf5efa5b Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-05-05 09:16:29 +02:00
Laurent Destailleur
f069ef9844 FIX #6767 2017-05-05 09:16:11 +02:00
Laurent Destailleur
f32d19fb73 FIX #6767 serious critical error no login possible 2017-05-05 09:15:14 +02:00
Laurent Dinclaux
a1e9246794 Resolved merge conflict [2] 2017-05-05 10:34:38 +11:00
Laurent Dinclaux
24a2fb57ea Resolved merge conflict 2017-05-05 10:22:46 +11:00
Philippe Grand
b5b79bc36b Merge branch 'develop' into new_branch_24_04 2017-05-04 21:42:43 +02:00
Philippe Grand
ffe4e48304 Update agenda_other.php 2017-05-04 21:37:27 +02:00
Laurent Destailleur
0c9f268f99 Merge pull request #6759 from ATM-Marc/FIX_supplier_order_rang
FIX supplier order line creation with rang = 0
2017-05-04 21:06:58 +02:00
Laurent Destailleur
089b882033 Merge pull request #6755 from atm-quentin/fix_ajax_autocomplete_clone
FIX ajax autocomplete on clone
2017-05-04 21:05:40 +02:00
Laurent Destailleur
aa8aa5672b Merge pull request #6753 from grandoc/new_branch_25_04
Update code using new css class
2017-05-04 21:03:11 +02:00
Laurent Destailleur
82c8cee1ff Merge pull request #6751 from AlainRnet/patch-5
FIX #6614 without html.formprojet.class.php called, not possible create invoice…
2017-05-04 20:58:50 +02:00
Laurent Destailleur
626c0d6d5e Add more substitution keys for PDFs. 2017-05-04 20:40:13 +02:00
Laurent Destailleur
768df56c07 Uniformize name of standard PDF template 2017-05-04 20:16:55 +02:00
Laurent Destailleur
39d9a0f979 Support of pdf preview on supplier orders 2017-05-04 19:11:19 +02:00
Laurent Destailleur
bf616cbe05 Fix bad var 2017-05-04 19:05:02 +02:00
Laurent Destailleur
2de335e2dc Action must be a verb 2017-05-04 18:49:58 +02:00
Laurent Destailleur
ce05c74e47 NEW SUPPLIER_ORDER_EDIT_BUYINGPRICE_DURING_RECEIPT 2017-05-04 17:48:52 +02:00
Laurent Destailleur
ea58fb0b50 Fix triggered error 2017-05-04 15:52:12 +02:00
florian HENRY
b8d63ae6c0 Better fix 2017-05-04 14:04:30 +02:00
florian HENRY
9958fcaa6f Merge branch '5.0' of https://github.com/Dolibarr/dolibarr.git into 5.0 2017-05-04 14:02:28 +02:00
Laurent Destailleur
944cd40ef4 Merge pull request #6749 from atm-florian/5.0_fix6614
FIX #6614
2017-05-04 13:59:24 +02:00
Laurent Destailleur
01188e4bc0 Merge pull request #6785 from atm-alexis/FIX_inventory
Fix inventory
2017-05-04 13:51:00 +02:00
Laurent Destailleur
c196e79bf4 Merge branch 'develop' into FIX_inventory 2017-05-04 13:50:53 +02:00
Philippe Grand
4c2f3aeeac Update compta.php 2017-05-04 13:46:25 +02:00
Philippe Grand
a19268c0a3 Merge branch 'develop' into new_branch_20_04 2017-05-04 13:43:37 +02:00
Laurent Destailleur
0c76db7973 FIX #6698 #6742 2017-05-04 13:41:37 +02:00
Laurent Destailleur
7d5b5cf86a Better behavior for tooltip on click 2017-05-04 13:09:42 +02:00
Laurent Destailleur
88917afa08 Merge pull request #6740 from Hugome/fix-length_accounta
FIX: length_accounta return variable name
2017-05-04 12:45:45 +02:00
Laurent Destailleur
c7d736376f Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-05-04 12:41:49 +02:00
Laurent Destailleur
1a6c118a5d Fix travis warning 2017-05-04 12:41:29 +02:00
Laurent Destailleur
e096974b2c Merge pull request #6735 from defrance/patch-6
NEW Add option SITUATION_DISPLAY_DIFF_ON_PDF to display progress or difference for situation invoices
2017-05-04 12:40:05 +02:00
Laurent Destailleur
7ec46b3bd6 Finished work to have substitution keys code mutualized. 2017-05-04 12:35:45 +02:00
Laurent Destailleur
f543461e9b Complete the substitution array with substitution array with all
possible keys
2017-05-04 11:21:28 +02:00
Laurent Destailleur
8318ebc109 Fix missing field into addline of proposals 2017-05-04 10:45:20 +02:00
David
270c3db32e fix params order for tha addline() function
please check to last param "$request_data->fk_remise_except", I couldn't find a corresponding parameter name in the addline() function
2017-05-04 10:16:36 +02:00
Laurent Destailleur
81d696300c Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-05-04 10:01:33 +02:00
Laurent Destailleur
8009370f04 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0
Conflicts:
	htdocs/contact/document.php
	htdocs/core/tpl/objectline_create.tpl.php
	htdocs/install/mysql/migration/repair.sql
2017-05-04 10:01:11 +02:00
Laurent Destailleur
1096177cce Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-05-04 09:57:57 +02:00
Laurent Destailleur
ee039c69a8 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-05-04 09:57:45 +02:00
Laurent Destailleur
322cca8032 Merge pull request #6731 from dvasseur/develop
FIX: fix params order for the addline() function
2017-05-04 09:55:33 +02:00
Laurent Destailleur
6fb8876e5a Merge pull request #6730 from fappels/5.0_fix_en_US_admin_tag
Fix typo in en_US admin tag
2017-05-04 09:54:21 +02:00
Laurent Destailleur
3871da0324 Merge pull request #6729 from atm-florian/dev_importexport_ressources
NEW : Add module resources import/export
2017-05-04 09:43:00 +02:00
Laurent Destailleur
4adfe6de70 Merge pull request #6725 from atm-gauthier/FIX_restrictedarea_document_contact
FIX : forgotten parameter for right multicompany use
2017-05-04 09:37:24 +02:00
Laurent Destailleur
f70ee73747 Merge pull request #6716 from rassakali/patch-1
NEW Add hook into subscriptions
2017-05-04 09:36:01 +02:00
Guillaume T. (Arck Consulting)
694efca32a [FIX] Credit Note for fourn doesn't work, missing filed in create method & attribut 2017-05-04 09:32:06 +02:00
Laurent Dinclaux
85bf4b742b Fix typo 2017-05-04 17:21:59 +11:00
Alexandre SPANGARO
76f2cc3f1e False operation 2017-05-04 06:52:07 +02:00
Alexandre SPANGARO
29bede28f0 New : Accountancy - Add export model towards Agiris 2017-05-04 06:49:29 +02:00
Laurent Dinclaux
909b489d1f More fixes regarding localtaxes not being diplayed in generated PDF and vat_src_code not being propagating properly when generating posts from type to type. 2017-05-04 10:05:55 +11:00
Laurent Dinclaux
421843e693 Fix missing localtaxes lines in "commande" PDF 2017-05-03 23:35:57 +11:00
Laurent Dinclaux
b93df2d6b5 Fixes localtax propagation to new invoice 2017-05-03 23:13:21 +11:00
Laurent Dinclaux
f63f28c7fe Fix vat_src_code propagation between post types 2017-05-03 21:37:30 +11:00
Laurent Dinclaux
98b2e83bfb Fix localtaxes type not retrieved in proposals. Fixes Dolibarr/dolibarr/#6786 2017-05-03 21:36:56 +11:00
alexis portable
da4d179d36 fix travis 2017-05-02 23:20:23 +02:00
alexis portable
d1a443f0f0 fix camelcase for travis 2017-05-02 23:11:05 +02:00
alexis portable
428e16341c Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into FIX_inventory 2017-05-02 22:46:33 +02:00
Laurent Destailleur
3917bdfc79 Fix vat_src_code propagation. 2017-05-02 22:37:43 +02:00
Laurent Destailleur
a115d4877b Fix for new property array fields 2017-05-02 22:37:23 +02:00
Laurent Destailleur
b8f5e93ab0 Debug inventory data model 2017-05-02 21:40:18 +02:00
Laurent Destailleur
0bc46facd7 Add missing vat_src_code on recurring invoices 2017-05-02 21:24:18 +02:00
Laurent Destailleur
c673d283e0 Fix script to send emailings 2017-05-02 18:21:50 +02:00
alexis Algoud
12e91f1c1b fix rights inventory only for MAIN_LEVEL_FEATURES = 2 2017-05-02 15:25:30 +02:00
alexis Algoud
6138d197e4 FIX major issues for inventory
- Move all needed declaration from coreobject to commonobject for
updateCommon, fetchCommon, deleteCommon, createCommon
- Just leave method for child object into coreobject, check later if is
useless
- debug inventory card, PHP 7.0 compatibility
- activate rights for inventory into stock module
- add inventory options into stock admin module
2017-05-02 15:19:55 +02:00
Laurent Destailleur
ad095d7fb2 NEW Can set margins of PDFs 2017-05-02 14:26:51 +02:00
Marcos García de La Fuente
7ae405a254 Corrected PHP7 warnings for several PDF document models 2017-05-02 14:08:20 +02:00
Marcos García de La Fuente
6e7fddee7d Corrected PHP7 warnings for function pdf_einstein::write_file 2017-05-02 14:07:04 +02:00
Marcos García de La Fuente
166f2d262d Corrected PHP7 warnings for function CommonObject::getTotalWeightVolume 2017-05-02 14:00:27 +02:00
Laurent Destailleur
31d99bbfe6 Complete event tracked automatically 2017-05-02 12:17:25 +02:00
Laurent Destailleur
9641a240ea Complete vat dictionnary 2017-05-02 11:27:35 +02:00
florian HENRY
4dc409fc8b Merge branch '5.0' of https://github.com/Dolibarr/dolibarr.git into 5.0 2017-05-02 10:13:51 +02:00
Alexandre SPANGARO
fa4bb4e80a Remove accounting.lib.php 2017-05-01 21:12:52 +02:00
Alexandre SPANGARO
e1e2481e37 Remove picto 2017-05-01 21:09:09 +02:00
Alexandre SPANGARO
102deccba7 Use getnomUrl on bank accountancy number 2017-05-01 21:06:31 +02:00
Alexandre SPANGARO
94b69844f2 Add option no url 2017-05-01 20:39:46 +02:00
Alexandre SPANGARO
e58d2f428b Merge remote-tracking branch 'uptream/develop' into 6.0-1 2017-05-01 20:31:08 +02:00
Laurent Destailleur
8730add15f Better message for api key return 2017-05-01 16:38:15 +02:00
Laurent Destailleur
6e1f825190 Look and feel v6 2017-05-01 13:01:05 +02:00
Laurent Destailleur
5af5c23a98 Look and feel v6 2017-05-01 12:46:40 +02:00
Marcos García de La Fuente
d658a833c9 FIX #6677 Expired contracts dashboard box does not show the name of the thirdparty
Close #6677
2017-05-01 12:05:52 +02:00
Alexandre SPANGARO
cbd0598611 Merge remote-tracking branch 'uptream/develop' into 6.0-multijournal 2017-05-01 08:16:55 +02:00
Alexandre SPANGARO
6afd0d642a Finish to move accountancy journals list to page like dictionnary 2017-05-01 08:16:09 +02:00
Laurent Destailleur
1dd462d947 Fix disable notification on smartphone 2017-04-30 23:39:35 +02:00
Alexandre SPANGARO
e11254a9bf Add option on accounting account getNomUrl 2017-04-30 15:04:51 +02:00
Laurent Destailleur
1e3384a842 Fix travis 2017-04-30 14:16:58 +02:00
Laurent Destailleur
072eb740c7 Fix php compatibility 2017-04-30 13:57:13 +02:00
Laurent Destailleur
58e2b49b1c Clean code 2017-04-30 13:49:06 +02:00
Laurent Destailleur
7c2b3b8df0 NEW When down payment is entered, discount to reuse into final invoice
is automatically created. This save one click into invoice workflow.
2017-04-30 12:55:11 +02:00
Alexandre SPANGARO
fed1b152d9 Correct multi-journals 2017-04-30 07:41:47 +02:00
Laurent Destailleur
a9eeb823bd Fix browser notif 2017-04-30 05:01:53 +02:00
Laurent Destailleur
60951cf307 Less data example 2017-04-30 04:09:50 +02:00
Laurent Destailleur
865c8140d1 Clean code 2017-04-30 03:23:06 +02:00
Laurent Destailleur
b57bf6460b Start debug inventory 2017-04-30 02:34:00 +02:00
Laurent Destailleur
4993a43025 Move new feature inventory into module stock. 2017-04-30 02:25:05 +02:00
Laurent Destailleur
92b5f8d85e Move new feature inventory into module stock. 2017-04-29 21:53:01 +02:00
Laurent Destailleur
f5bdfc426f Merge pull request #6584 from atm-ph/NEW_inventory_coreobject_listview
New inventory coreobject listview
2017-04-29 21:31:46 +02:00
Laurent Destailleur
fd72977505 Merge pull request #6690 from atm-gauthier/FIX_dateSelector
FIX : global $dateSelector isn't the good one, then date selector on …
2017-04-29 21:20:54 +02:00
Laurent Destailleur
bb47c69283 Merge pull request #6685 from mikee2/develop
Add macro replacement to ODT invoice lines
2017-04-29 21:20:19 +02:00
Laurent Destailleur
a8c775dcbd Fix compatibility with the removal of "constant". 2017-04-29 18:48:30 +02:00
Laurent Destailleur
50d65e3a9f Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/install/mysql/migration/repair.sql
2017-04-29 17:40:47 +02:00
Laurent Destailleur
ff0f40ab37 Look and feel v6 2017-04-29 16:07:34 +02:00
Laurent Destailleur
cc8e66d079 FIX Journal code of bank must be visible of accountaing module on. 2017-04-29 15:30:40 +02:00
Laurent Destailleur
04c05efafe FIX Several bugs in accounting module. 2017-04-29 15:16:36 +02:00
Laurent Destailleur
afc5ab0242 Fix label 2017-04-29 15:10:24 +02:00
Laurent Destailleur
c9bfb6e945 FIX Several bugs in accounting module. 2017-04-29 15:07:50 +02:00
Laurent Destailleur
04b1535b12 FIX Found duplicate line when it is not. 2017-04-29 14:59:40 +02:00
Laurent Destailleur
983c72c918 Look and feel v6 2017-04-29 14:55:23 +02:00
Laurent Destailleur
8ec44615cd FIX serious bugs in accounting (error management, transactions, bad
values set)
2017-04-29 14:54:21 +02:00
Laurent Destailleur
faddcb28ac FIX serious bugs in accounting (error management, transactions, bad
values set)
2017-04-29 14:53:29 +02:00
Alexandre SPANGARO
ce62736e6b Correct link and renamed checkout by newpayment 2017-04-29 07:57:36 +02:00
Alexandre SPANGARO
d73374cc5b Uniformize link to stripe.lib 2017-04-29 07:34:30 +02:00
Alexandre SPANGARO
586ea54bfc Merge remote-tracking branch 'uptream/develop' into 6.0-stripe 2017-04-29 07:05:02 +02:00
Alexandre SPANGARO
47089a4d55 Modle Stripe : Work in progress 2017-04-29 07:04:34 +02:00
Laurent Destailleur
05fe0d7fcd Fix doxygen 2017-04-29 01:01:12 +02:00
Laurent Destailleur
2e6d865c7d NEW Can define default values for create forms.
NEW Can define default filters for list pages.
NEW Can define default sort order for list pages.
2017-04-29 00:44:25 +02:00
BENKE Charlie
058b43f342 display the good value on pdf 2017-04-28 16:50:30 +02:00
phf
8219ff84c8 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into NEW_inventory_coreobject_listview 2017-04-28 14:45:04 +02:00
phf
88515c306f Fix Propal class doesn't have fetch_lines method yet 2017-04-28 14:33:06 +02:00
Laurent Destailleur
676ff84a4e Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-04-28 14:05:42 +02:00
Laurent Destailleur
defce63a24 Work on management of default values 2017-04-28 14:05:28 +02:00
Laurent Destailleur
c722286bcb Fix regressions 2017-04-28 13:37:36 +02:00
Laurent Destailleur
0ba6433a61 Work on module website 2017-04-28 13:10:08 +02:00
fappels
18981ab0c9 Fix download donation document 2017-04-28 11:39:33 +02:00
Laurent Destailleur
853c8a8e07 Fix typo 2017-04-27 18:05:53 +02:00
Laurent Destailleur
b87eb07b08 Look and feel v6 2017-04-27 17:51:11 +02:00
Laurent Destailleur
cfde27820e Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/admin/translation.php
	htdocs/comm/card.php
	htdocs/core/menus/standard/eldy.lib.php
2017-04-27 17:20:40 +02:00
Laurent Destailleur
5e856e6923 More complete tooltip help to describe available substitution vars 2017-04-27 17:16:19 +02:00
alexis Algoud
4c5e78a2ce NEW use pdktk to concat mass pdf
because tcpdf generate avoid to split large file into multiple smaller
file (all have same size) encounter issue with mailer provider virtual
delivery service
2017-04-27 16:37:44 +02:00
Laurent Destailleur
2f23b36ca1 Fix typo in var name picto 2017-04-27 14:20:06 +02:00
Laurent Destailleur
1758b83604 Clean explanation for accounting module setup. 2017-04-27 13:50:13 +02:00
Laurent Destailleur
9c2ce0202d Translation 2017-04-27 13:19:36 +02:00
Laurent Destailleur
1a98c4a3ff Fix error management in adding translation key 2017-04-27 12:48:13 +02:00
Laurent Destailleur
e97fae0c43 Fix typo 2017-04-27 12:10:08 +02:00
florian HENRY
23e2cbb7f9 Merge branch '5.0' of https://github.com/Dolibarr/dolibarr.git into 5.0 2017-04-27 09:02:06 +02:00
Laurent Destailleur
d390acc888 FIX A non admin user can not download files attached to user. 2017-04-27 02:03:59 +02:00
Laurent Destailleur
95788c9699 FIX A non admin user can not download files attached to user. 2017-04-27 00:53:13 +02:00
Laurent Destailleur
508109d5b1 Translation 2017-04-27 00:21:00 +02:00
fappels
c69a1205c0 Fix download delivery document 2017-04-26 19:06:41 +02:00
Marc de Lima Lucio
56e749df9f FIX: supplier order line were always created with rang = 0 2017-04-26 16:12:27 +02:00
Laurent Destailleur
1c20bbb287 NEW Add index and constraints keys on supplier proposal detail table 2017-04-26 12:11:33 +02:00
Laurent Destailleur
aa4b967e17 FIX image of rss when link is relative
Fix regression after disabling constant init.
2017-04-26 11:46:12 +02:00
Quentin Vial-Gouteyron
4ab5674ffb FIX ajax autocomplete on clone 2017-04-25 15:10:46 +02:00
Laurent Destailleur
84e774ff32 Better translation 2017-04-25 12:57:20 +02:00
philippe grand
e2dbcb2b5a Update code using new css class 2017-04-25 11:59:18 +02:00
Laurent Destailleur
113d4d1665 FIX spaces not allowed into vat code 2017-04-25 10:29:13 +02:00
philippe grand
0c7cfdb037 Update code using new css class 2017-04-24 16:36:58 +02:00
AlainRnet
d9cdaeb851 without html.formprojet.class.php called, not possible create invoice template
cf. https://github.com/Dolibarr/dolibarr/issues/6614
without this class AND module Projects disabled, it's not possible to create an invoice template. So I pulled out the call of the class from the condition.
2017-04-24 15:43:36 +02:00
florian HENRY
8f97177dae FIX 6614 2017-04-24 14:44:44 +02:00
Laurent Destailleur
a2287fd183 Add example of sql request to fix llx_product_price 2017-04-24 13:46:41 +02:00
Laurent Destailleur
587f5a76e6 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2017-04-24 12:59:51 +02:00
Laurent Destailleur
cd099bf3b1 Fix bad update of prices 2017-04-24 12:42:54 +02:00
florian HENRY
86338d1781 FIX : #6747 2017-04-24 09:03:25 +02:00
Laurent Destailleur
10e2b128d1 Fix warning during install 2017-04-24 05:20:45 +02:00
Laurent Destailleur
65fec95458 Fix debian package 2017-04-24 04:17:59 +02:00
Laurent Destailleur
af56c85057 Fix perms on file 2017-04-24 03:11:19 +02:00
Laurent Destailleur
ec59f08e41 FIX extrafield css for boolean type 2017-04-24 00:46:27 +02:00
Laurent Destailleur
0080821dc5 Fix no invoice if not a customer 2017-04-23 16:05:54 +02:00
Laurent Destailleur
215ef30abe Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-04-23 03:33:24 +02:00
Laurent Destailleur
fbdfbed02c Add code to prepare a generic payment solution 2017-04-23 03:01:09 +02:00
Alexandre SPANGARO
3b626b75c4 Update works 2017-04-22 06:58:44 +02:00
Alexandre SPANGARO
c3fe1c963a Merge remote-tracking branch 'uptream/develop' into 6.0-stripe 2017-04-22 06:33:31 +02:00
hugome
54256773c5 FIX: length_accounta return variable name 2017-04-21 10:27:48 +02:00
BENKE Charlie
1792ff2d3b oups inverted value 2017-04-21 09:41:08 +02:00
philippe grand
635894cf10 Update code using new css class 2017-04-20 14:51:36 +02:00
BENKE Charlie
b7f1e74f6f New SITUATION_DISPLAY_DIFF_ON_PDF feature
allow to display or 
the progress situation percent value
the diférential situation percent value
2017-04-20 10:27:44 +02:00
florian HENRY
78a886c206 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into dev_importexport_ressources 2017-04-20 09:01:49 +02:00
Juanjo Menent
a19627956b Merge pull request #6724 from aspangaro/6.0-codecomptable
New : Add search of accountancy code in main thirdparty search
2017-04-19 16:17:27 +02:00
Juanjo Menent
4e2f4fd48b Merge pull request #6699 from grandoc/new_branch_12_04
Update code using new css class
2017-04-19 16:10:02 +02:00
Juanjo Menent
2e4e3737e8 Merge pull request #6691 from grandoc/testing
Update code using new css class
2017-04-19 16:08:44 +02:00
Juanjo Menent
236afacfed Merge pull request #6704 from grandoc/new_branch_13_04
Update code using new css class
2017-04-19 16:02:13 +02:00
florian HENRY
213e0d2870 fix travis 2017-04-19 14:49:12 +02:00
florian HENRY
10541e0c53 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into dev_importexport_ressources 2017-04-19 14:48:06 +02:00
Philippe Grand
88f771a7f1 Merge branch 'develop' into new_branch_12_04 2017-04-19 11:49:26 +02:00
Philippe Grand
a88d6425d7 Merge branch 'develop' into new_branch_13_04 2017-04-19 11:38:28 +02:00
Philippe Grand
c18e7e8816 Merge branch 'develop' into testing 2017-04-19 11:27:36 +02:00
Philippe Grand
529ae1fa92 Update propal.class.php 2017-04-19 10:01:43 +02:00
Laurent Destailleur
cfc31e91e8 FIX overwrapping of weight/volume on rouget template 2017-04-18 18:13:43 +02:00
Laurent Destailleur
50210d0dd6 NEW Add tooltip help on shipment weight and volume calculation 2017-04-18 17:04:56 +02:00
Laurent Destailleur
d89a89f8ea Fix error message 2017-04-18 17:03:34 +02:00
David
8bb7f858d9 fix params order for tha addline() function
please check to last param "$request_data->fk_remise_except", I couldn't find a corresponding parameter name in the addline() function
2017-04-18 16:47:06 +02:00
fappels
433b9e6fe1 Fix typo in en_US admin tag 2017-04-18 16:22:39 +02:00
florian HENRY
4efb1ba23a update credentials 2017-04-18 15:27:18 +02:00
florian HENRY
a52db08cd6 NEW : Add module resources import/export 2017-04-18 15:25:04 +02:00
Alexandre SPANGARO
04e119d7a6 New : Add search of accountancy code in main thirdparty search 2017-04-18 07:03:57 +02:00
Alexandre SPANGARO
d0e27f67e7 Add plugins Stripe 2017-04-18 05:44:08 +02:00
Laurent Destailleur
3da0aea168 Prepare code to use different SMTP servers. 2017-04-18 01:39:06 +02:00
Laurent Destailleur
9456f7091e Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-04-18 01:36:33 +02:00
Laurent Destailleur
82f9555c6b Translation 2017-04-18 01:35:58 +02:00
Laurent Destailleur
0994622bf8 NEW Can use translations into all substitutions (watermark, freetext...) 2017-04-17 23:54:09 +02:00
Alexandre SPANGARO
fed6d71d8a Merge remote-tracking branch 'uptream/develop' into 6.0-stripe 2017-04-17 06:51:02 +02:00
Laurent Destailleur
e97e202deb NEW Can import users 2017-04-17 04:22:53 +02:00
Juanjo Menent
1fd359d52d Merge pull request #6723 from rassakali/patch-3
Update /adherents/subscription/card.php
2017-04-16 14:14:12 +02:00
Juanjo Menent
9bbfeed1bc Merge pull request #6722 from Christian-Seiler/3.9
Fix #5911 Added missing Slashes
2017-04-16 12:23:52 +02:00
rassakali
e1ea6e2b53 Update card.php 2017-04-16 12:04:36 +02:00
Christian Seiler
e23a44bcdf Added missing Slashes
fixed line where two slashes were missing, that caused an error when creating barcodes.
2017-04-16 11:09:18 +02:00
Juanjo Menent
3a8608db19 Merge pull request #6697 from atm-maxime/fix_supp_prop_subprice
Fix Subprice was null in supplier proposal and line was not transfered to…
2017-04-16 11:08:41 +02:00
Juanjo Menent
c8b0921c51 Merge pull request #6702 from joseplluis/patch-7
NEW Show local taxes in supplier facture list
2017-04-16 11:05:19 +02:00
Juanjo Menent
3308775c06 Merge pull request #6701 from joseplluis/patch-6
NEW Show local taxes in facture list
2017-04-16 11:03:59 +02:00
Juanjo Menent
f000ca23c3 Merge pull request #6721 from simnandez/5.0
FIX #6718 Bug: Discount amount is not locally formatted in CommonObject View
2017-04-16 10:45:55 +02:00
Juanjo Menent
f059ab0042 Merge pull request #6711 from atm-maxime/fix_stockmvt_origin
Fix : no origin on stock mvmt when order set back to draft
2017-04-16 10:31:45 +02:00
Juanjo Menent
2413c728a8 Merge pull request #6710 from atm-maxime/fix_bank_on_supp_pay
Fix : display bank on supplier payment as on customer payment
2017-04-16 10:29:25 +02:00
Juanjo Menent
2fb96c8817 Merge pull request #6708 from atm-florian/5.0_fixmissingaccountancy_mainmenu
fix :missing mainmenu and leftmenu into accoutancy menu descriptor
2017-04-16 10:22:03 +02:00
Juanjo Menent
00390bc8e4 Merge pull request #6705 from atm-florian/5.0
fix setEventMessages error insteads of errors
2017-04-16 10:19:19 +02:00
Juanjo Menent
006ad4cef8 FIX #6718 Bug: Discount amount is not locally formatted in CommonObject View 2017-04-15 20:04:45 +02:00
Laurent Destailleur
4c056d68d8 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/admin/dict.php
	htdocs/commande/list.php
	htdocs/core/class/html.form.class.php
	htdocs/langs/en_US/bills.lang
	htdocs/societe/list.php
2017-04-15 17:02:05 +02:00
Laurent Destailleur
ac884ec463 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0
Conflicts:
	htdocs/install/repair.php
2017-04-15 16:28:08 +02:00
Laurent Destailleur
d2173c1fa4 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-04-15 16:24:42 +02:00
Laurent Destailleur
7fe66581f1 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-04-15 16:24:30 +02:00
Laurent Destailleur
72ff353e9f Fix repair of product_stock 2017-04-15 16:22:15 +02:00
Laurent Destailleur
2e759d5156 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2017-04-15 16:19:02 +02:00
Laurent Destailleur
086fa4385f Fix clean of product_batch 2017-04-15 16:17:22 +02:00
rassakali
f68c408dbc Update subscription.php
Fix issue #6694
2017-04-15 08:35:23 +02:00
Laurent Destailleur
4490477cfb Fix scrutinizer warning 2017-04-15 03:14:31 +02:00
Laurent Destailleur
7354cb148a Fix scrutinizer 2017-04-15 03:13:17 +02:00
Laurent Destailleur
d99de641e8 Fic on vat npr 2017-04-15 03:06:25 +02:00
Laurent Destailleur
1e4dd5d095 Fix bug reported by scrutinizer 2017-04-15 03:05:04 +02:00
Laurent Destailleur
b0442aa56a Better explanation on label that are translated. 2017-04-14 19:48:01 +02:00
Laurent Destailleur
cbc6684ea7 Fix error management 2017-04-14 18:59:01 +02:00
Laurent Destailleur
e2c31b5f23 Fix regression 2017-04-14 18:43:34 +02:00
Laurent Destailleur
436f60a784 FIX Cache to load currencies was not working when loading all currencies 2017-04-14 18:08:02 +02:00
Laurent Destailleur
8c07f514c8 Add php unit tests on expense reports 2017-04-14 16:51:30 +02:00
Laurent Destailleur
db73eeba5c NEW Can filter on code in dictionnaries 2017-04-14 16:31:16 +02:00
Laurent Destailleur
12ca11e2fa Fix regression 2017-04-14 15:42:58 +02:00
Maxime Kohlhaas
402924f6d7 Fix : no origin on stock mvmt when order set back to draft 2017-04-14 15:12:32 +02:00
Maxime Kohlhaas
6c5b329dd1 Fix : display bank on supplier payment as on customer payment 2017-04-14 14:51:39 +02:00
Laurent Destailleur
c7160ad2b9 Avoid warning 2017-04-14 14:19:21 +02:00
Laurent Destailleur
62394abb8b Introduce skeleton for a collab module. Volunteer wanted. 2017-04-14 14:11:52 +02:00
Laurent Destailleur
aef3592698 Fix travis 2017-04-14 13:56:26 +02:00
Laurent Destailleur
5931bc4068 NEW Feature to crop/resize images available on user and expense reports 2017-04-14 13:53:39 +02:00
Laurent Destailleur
846204bdb4 Replace usage of $bc[$var] with class="oddeven" 2017-04-14 13:02:29 +02:00
Laurent Destailleur
c52f4644e1 Look and feel v6 2017-04-14 13:00:39 +02:00
Laurent Destailleur
aabfc2f0db Perf. Do not load personal conf of user by default. 2017-04-14 12:52:32 +02:00
Laurent Destailleur
4818b1ba44 Load default values into $user->default_values 2017-04-14 12:39:11 +02:00
Laurent Destailleur
e6e9b65594 NEW Reduce memory usage by removing deprecated constant loading. 2017-04-14 12:38:52 +02:00
florian HENRY
2496286374 fix :missing mainmenu and leftmenu into accoutancy menu descriptor 2017-04-14 12:27:53 +02:00
mikee2
e6b20840a3 Update Segment.php 2017-04-14 11:49:30 +02:00
Laurent Destailleur
4e021c123b Fix travis error 2017-04-14 11:28:19 +02:00
Laurent Destailleur
39ebaec064 Replace usage of $bc[$var] with class="oddeven" 2017-04-14 11:22:48 +02:00
Laurent Destailleur
a73d72f243 Add tables for default values 2017-04-14 10:14:23 +02:00
florian HENRY
8b0c123aca Merge branch '5.0' of https://github.com/Dolibarr/dolibarr.git into 5.0 2017-04-14 09:01:40 +02:00
florian HENRY
196156a21e fix setEventMessages error insteads of errors 2017-04-13 16:35:29 +02:00
philippe grand
1d546462dd Update code using new css class 2017-04-13 15:59:51 +02:00
Laurent Destailleur
6c069e9a1a Fix label of long status 2017-04-13 15:15:44 +02:00
Laurent Destailleur
db23a5222b Fix translation 2017-04-13 15:12:19 +02:00
Laurent Destailleur
5e4697b62d Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-04-13 15:03:46 +02:00
Laurent Destailleur
1cffa8c9fc Fix for debian 8 2017-04-13 15:03:12 +02:00
Laurent Destailleur
3e9ccc186a NEW Small PDF template for products 2017-04-13 10:26:12 +02:00
Josep Lluís
e67ae3665e NEW Show local taxes in supplier facture list
Show localtax1 and localtax2 in supplier facture list, only if they are enabled in company config
2017-04-13 09:12:01 +02:00
Josep Lluís
deb309ab7e NEW Show local taxes in facture list
Show localtax1 and localtax2 in facture list, only if they are enabled in company config
2017-04-13 08:30:48 +02:00
philippe grand
edaa3ae672 Update code using new css class 2017-04-12 17:44:01 +02:00
Laurent Destailleur
6f4ce8dc2f Merge remote-tracking branch 'origin/3.9' into 4.0 2017-04-12 14:22:47 +02:00
Laurent Destailleur
a6b05bb4da Merge branch '5.0' of github.com:Dolibarr/dolibarr into 5.0 2017-04-12 14:08:58 +02:00
Laurent Destailleur
d74baea1d3 Fix error management on direct print 2017-04-12 13:01:41 +02:00
Laurent Destailleur
77dfb05647 Work on v6 look and feel 2017-04-12 12:35:13 +02:00
Laurent Destailleur
d78f3923ee Support of preview for pdf with several pages 2017-04-12 12:13:38 +02:00
Laurent Destailleur
26a9999fbf Support of preview for pdf with several pages 2017-04-12 11:38:55 +02:00
Maxime Kohlhaas
396ea54894 Subprice was null in supplier proposal and line was not transfered to supplier order 2017-04-12 11:09:49 +02:00
philippe grand
b0f2d2310b Update code using new css class 2017-04-12 10:28:05 +02:00
Laurent Destailleur
4eaa1d4f46 Add nb of generation into list of template invoices 2017-04-11 20:07:35 +02:00
Laurent Destailleur
8e33c8090d FIX No filter on company when showing the link to elements. 2017-04-11 19:07:03 +02:00
Laurent Destailleur
423ffefbf3 NEW Add hidden option THIRDPARTY_INCLUDE_PARENT_IN_LINKTO 2017-04-11 18:18:36 +02:00
gauthier
551d79f1e2 FIX : close supplier makes no sense. we just need to know if it is accepted or not 2017-04-11 17:36:21 +02:00
philippe grand
c3387cb4e6 ref column was missing for specimen and some update 2017-04-11 14:54:34 +02:00
philippe grand
06c91cdaf2 ref column was missing for specimen and some update 2017-04-11 14:47:11 +02:00
philippe grand
4d31759ff9 Update code using new css class 2017-04-11 14:35:10 +02:00
gauthier
8a373b25ba FIX : global $dateSelector isn't the good one, then date selector on objectline_create tpl was hidden 2017-04-11 12:41:19 +02:00
Laurent Destailleur
2446cb5431 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0
Conflicts:
	htdocs/compta/facture.php
	htdocs/compta/facture/fiche-rec.php
	htdocs/contact/list.php
	htdocs/fourn/class/fournisseur.commande.class.php
	htdocs/fourn/facture/card.php
	htdocs/societe/list.php
	htdocs/user/document.php
2017-04-11 11:43:54 +02:00
BENKE Charlie
2af3f010bf expedition->dir_output is used by livraison
not livraison->dir_output who not exist
2017-04-11 11:33:14 +02:00
gauthier
30d58f77db FIX : forgotten parameter for right multicompany use 2017-04-11 11:33:05 +02:00
Laurent Destailleur
e68ad408af Merge pull request #6687 from defrance/patch-5
expedition->dir_output is used by livraison
2017-04-11 11:32:16 +02:00
Laurent Destailleur
0417eb3862 Merge pull request #6686 from guillaume-uH57J9/develop
NEW Improve public member subscription form with member type
2017-04-11 11:31:25 +02:00
Laurent Destailleur
17da4f64a7 Merge pull request #6683 from marcosgdf/bug-6679
FIX #6679 User with restricted supplier invoice permissions can edit project, payment conditions, payment mode
2017-04-11 11:21:14 +02:00
Laurent Destailleur
4d72165288 Merge pull request #6681 from marcosgdf/bug-6680
FIX #6680 User with restricted supplier invoice permissions sees "reopen" button even if he has no permission to do it
2017-04-11 11:20:52 +02:00
Laurent Destailleur
a7ccb175e5 Merge pull request #6676 from marcosgdf/bug-6675
FIX #6675 Restricted user with no agenda permissions can see a button to create appointment in thirdparty contact list
2017-04-11 11:17:45 +02:00
Laurent Destailleur
5ae1b5457b Merge pull request #6674 from marcosgdf/bug-6673
FIX #6673 Missing "nature" table header in thirdparty list
2017-04-11 11:17:21 +02:00
Laurent Destailleur
fc735eaa4f Merge pull request #6672 from marcosgdf/bug-6671
FIX #6671 Cannot remove thirdparty type with "#" in its name
2017-04-11 11:16:58 +02:00
Laurent Destailleur
eb4236011b Merge pull request #6670 from marcosgdf/bug-6669
FIX #6669 User with no permission to edit customer invoices can see a edit button in project entry
2017-04-11 11:15:16 +02:00
Laurent Destailleur
50dbe39cda Merge pull request #6668 from marcosgdf/bug-6613
FIX #6613 Default subject for Supplier proposal emails is filled with a non-existing key
2017-04-11 11:14:47 +02:00
Laurent Destailleur
cd90dcb1e1 Merge pull request #6667 from marcosgdf/bug-6623
FIX #6623 User card shows "Return to list" link even if the user has no rights to list users
2017-04-11 11:14:25 +02:00
Laurent Destailleur
e08b92d913 Merge pull request #6665 from defrance/patch-4
Add invoice_rec_prepare_head for reccuring invoice
2017-04-11 11:13:12 +02:00
Laurent Destailleur
550687e084 Merge pull request #6666 from simnandez/develop
Fix: Travis error
2017-04-11 11:12:29 +02:00
Laurent Destailleur
b2b1dcc574 Merge pull request #6663 from vvnt/patch-2
FIX: situation invoice miscalculation (#6653)
2017-04-11 11:11:29 +02:00
Laurent Destailleur
81020cea77 Merge pull request #6660 from atm-florian/dev_contractselect
NEW select2 for contract selector
2017-04-11 11:08:59 +02:00
Laurent Destailleur
d4de81ed6d Merge pull request #6659 from altatof/fix_incoterm
FIX: dont get empty "Incoterms : - " string if no incoterm
2017-04-11 11:08:17 +02:00
Laurent Destailleur
9447b2a38b Merge pull request #6658 from dolibarr95/patch-10
Fix typo
2017-04-11 11:07:24 +02:00
Laurent Destailleur
5cbad450f3 git push origin developMerge branch 'grandoc-develop' into develop 2017-04-11 11:06:38 +02:00
Laurent Destailleur
3907c30ee3 Merge branch 'develop' of https://github.com/grandoc/dolibarr into
grandoc-develop

Conflicts:
	dev/skeletons/skeleton_list.php
2017-04-11 11:06:26 +02:00
Laurent Destailleur
e357aed3e1 Merge pull request #6655 from altatof/fix_reffourn
FIX: dont lose supplier ref if no supplier price in database
2017-04-11 11:01:43 +02:00
Laurent Destailleur
abf87a6946 Merge branch '4.0' into fix_reffourn 2017-04-11 11:00:35 +02:00
Laurent Destailleur
f5f062936e Merge pull request #6654 from atm-florian/5.0
fix: missing attribute update
2017-04-11 10:59:31 +02:00
Laurent Destailleur
a6b7c812f2 Merge pull request #6684 from marcosgdf/recurring
Corrected translation errors and little bug showing a non-available button to a restricted user
2017-04-11 10:59:06 +02:00
Laurent Destailleur
6aa56ce0fa NEW Add a tracking id into mass emailing
Prepare code to use a dedicated SMTP server according to context.
2017-04-11 10:57:17 +02:00
Laurent Destailleur
0de77fa460 Fix look and feel v6 2017-04-11 09:55:45 +02:00
Laurent Destailleur
3749a7a1d1 New look 2017-04-11 02:51:44 +02:00
Laurent Destailleur
759315aef5 NEW Mass action delete available on project and tasks 2017-04-11 02:48:16 +02:00
Laurent Destailleur
37939e7cbd NEW Add key __USERID__ and __ENTITYID__ as key for dynamic filters. 2017-04-11 02:17:47 +02:00
Laurent Destailleur
d15792bdf4 Minor fix 2017-04-11 00:59:47 +02:00
Laurent Destailleur
9b45776941 Fix responsive 2017-04-10 17:25:53 +02:00
BENKE Charlie
20202871eb expedition->dir_output is used by livraison
not livraison->dir_output who not exist
2017-04-10 15:54:02 +02:00
Laurent Destailleur
06f9c1989b Work on default values 2017-04-10 13:14:31 +02:00
Laurent Destailleur
f1ae0eb7c6 Default value 2017-04-10 12:51:52 +02:00
Guillaume
f427c8441a add translation strings for ForceMemberType 2017-04-09 22:49:48 +02:00
guillaume-uH57J9
e335b757fd Add UI to configure MEMBER_NEWFORM_FORCETYPE
Use tertiary operator ($var?: -1) instead of (!empty($var) ? $var : -1)
2017-04-09 22:37:17 +02:00
guillaume-uH57J9
199067e4b8 members/new.php : non-public by default
in the form, disable public by default, to be consistent with class Adherent's default value
2017-04-09 22:00:19 +02:00
mikee2
c82ee862af Merge pull request #1 from mikee2/mikee2-odtphp-patch-1
Update Segment.php
2017-04-09 21:59:20 +02:00
mikee2
f460d2e705 Update Segment.php 2017-04-09 21:39:15 +02:00
Marcos García de La Fuente
996b5e9f87 Corrected translation errors and little bug showing a non-available button to a restricted user 2017-04-09 18:17:46 +02:00
Marcos García de La Fuente
12df7b6ab9 FIX #6679 User with restricted supplier invoice permissions can edit project, payment conditions, payment mode
Close #6679
2017-04-09 18:09:08 +02:00
Marcos García de La Fuente
59fa5c2fe6 FIX #6680 User with restricted supplier invoice permissions sees "reopen" button even if he has no permission to do it
Close #6680
2017-04-09 17:38:59 +02:00
Marcos García de La Fuente
2057613ad9 FIX #6675 Restricted user with no agenda permissions can see a button to create appointment in thirdparty contact list
Close #6675
2017-04-09 15:18:02 +02:00
Marcos García de La Fuente
2d83efc7e3 FIX #6673 Missing "nature" table header in thirdparty list
Close #6673
2017-04-09 15:03:02 +02:00
Laurent Destailleur
b054ca8267 NEW Introduce mass action on product list ('delete' for the moment) 2017-04-09 15:02:55 +02:00
Marcos García de La Fuente
da0af36086 FIX #6671 Cannot remove thirdparty type with "#" in its name
Close #6671
2017-04-09 14:51:15 +02:00
Laurent Destailleur
0a47245ba5 NEW Add mass actions (pdf merge and delete) for interventions 2017-04-09 14:31:56 +02:00
Marcos García de La Fuente
411d276ed2 FIX #6669 User with no permission to edit customer invoices can see a edit button in project entry
Close #6669
2017-04-09 14:29:40 +02:00
Marcos García de La Fuente
a8da077613 FIX #6613 Default subject for Supplier proposal emails is filled with a non-existing key
Close #6613
2017-04-09 14:13:04 +02:00
Marcos García de La Fuente
74f0ae5bbb FIX #6623 User card shows "Return to list" link even if the user has no rights to list users
Close #6623
2017-04-09 14:09:33 +02:00
Laurent Destailleur
ddd101757e FIX Bulk pdf merge on supplier proposals 2017-04-09 13:26:26 +02:00
Laurent Destailleur
52c86cb3f5 NEW Bulk actions available on supplier orders 2017-04-09 13:12:25 +02:00
Juanjo Menent
e4ed626912 Fix: Travis error 2017-04-09 12:50:09 +02:00
BENKE Charlie
a0a9c8fa0c Update invoice.lib.php 2017-04-09 11:33:56 +02:00
BENKE Charlie
54780ff205 Update fiche-rec.php 2017-04-09 11:33:09 +02:00
BENKE Charlie
feebd4252a add invoice_rec_prepare_head for reccuring invoice 2017-04-09 11:29:54 +02:00
vvnt
ff75077b34 Fix: bug #6653 situation invoice miscalculation
Bug (#6653)

In price.lib.php (htdocs\core\lib\price.lib.php), the function calcul_price_total() is defined (line 76). The 7th parameter is **$remise_percent_global**.

However, this function is called on facture.class.php (htdocs\compta\facture\class\facture.class.php) and the 7th parameter used is **$line->product_type**. Consequently, invoice situation is correct when user sells a product (product_type = 0) and is wrong when user sells a service (product_type = 1).
Effectively, in the latter case, the total situation invoice will be wrong by 1%.

In order to correct this, we can add 0 as the 7th parameter and move **$line->product_type** to the 10th parameter.
2017-04-08 20:15:14 +02:00
Laurent Destailleur
bb7c164752 Work on page to set/edit default values 2017-04-08 14:18:10 +02:00
Laurent Destailleur
76af83ce06 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-04-08 14:06:25 +02:00
Laurent Destailleur
56a4b7a1fd Work on v6 look and feel 2017-04-08 14:03:38 +02:00
Laurent Destailleur
7f7ba6279a Fix translation 2017-04-08 14:02:07 +02:00
Laurent Destailleur
31f580ad93 FIX Enter a direct bank transaction 2017-04-08 01:25:52 +02:00
Laurent Destailleur
669a04e304 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-04-07 18:39:10 +02:00
Laurent Destailleur
a0e75d0af0 Work on look and feel v6 2017-04-07 18:38:55 +02:00
Laurent Destailleur
1ab3086fca Work on website module 2017-04-07 16:44:43 +02:00
Laurent Destailleur
be439f6252 Work on look and feel v6 2017-04-07 16:16:44 +02:00
florian HENRY
e76a00845d better test 2017-04-07 14:55:59 +02:00
florian HENRY
a1c1aa054f new : select2 for contract selector 2017-04-07 14:55:14 +02:00
philippe grand
3715fcdd5f Update code using new css class 2017-04-07 14:25:33 +02:00
altatof
d892a89f45 FIX: dont get empty "Incoterms : - " string if no incoterm 2017-04-07 14:15:51 +02:00
dolibarr95
8154521a22 Fix typo
Fix typo error in trigger name.
2017-04-07 14:15:36 +02:00
Laurent Destailleur
60a54041c2 NEW Enable bulk actions delete on supplier invoices 2017-04-07 14:09:19 +02:00
philippe grand
d3719a01a2 Update code using new css class 2017-04-07 13:56:41 +02:00
Laurent Destailleur
aa47575b13 Serious debug of variant module. No more fu.. js errors on smarpthone. 2017-04-07 12:31:08 +02:00
altatof
919633b2be escape supplier ref 2017-04-07 12:10:01 +02:00
altatof
a6ec22d7fe FIX: dont lose supplier ref if no supplier price in database 2017-04-07 12:06:15 +02:00
Laurent Destailleur
5ab8704aee Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-04-07 11:03:44 +02:00
Laurent Destailleur
ea44e14b60 Start debug the variant module 2017-04-07 11:01:12 +02:00
florian HENRY
7668702806 fix: missing attribute update 2017-04-07 08:56:10 +02:00
Laurent Destailleur
248150dd41 Merge pull request #6639 from WideeFr/patch-1
FIX Avoid (DEPOSIT) (1) & (2) descriptions
2017-04-06 23:33:03 +02:00
Laurent Destailleur
12375be14a Merge pull request #6593 from dolibarr95/patch-5
NEW : Create a trigger for company rib update
2017-04-06 23:29:06 +02:00
Laurent Destailleur
216bce608d Work on v6 look and feel 2017-04-06 23:28:06 +02:00
Laurent Destailleur
915a74a85f Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-04-06 22:32:05 +02:00
Laurent Destailleur
a99a4be9e0 Work on 6.0 look and feel 2017-04-06 22:31:45 +02:00
Laurent Destailleur
07bbf1a32b Merge pull request #6648 from delcroip/patch-9
NEW : show files in the bank statement + download
2017-04-06 22:31:19 +02:00
Laurent Destailleur
87368908f6 Merge pull request #6646 from laudeco/feature/expense_report_paid
NEW mark expense report as paid if payement set the remaining sold to 0
2017-04-06 22:01:28 +02:00
Laurent Destailleur
a61543dedc Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-04-06 21:59:41 +02:00
Laurent Destailleur
f598bf8bef Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/filefunc.inc.php
2017-04-06 21:59:11 +02:00
Laurent Destailleur
8363bee234 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0
Conflicts:
	htdocs/filefunc.inc.php
2017-04-06 21:56:48 +02:00
Laurent Destailleur
fe4f71296f FIX #6636 Complete fix 2017-04-06 21:55:23 +02:00
Laurent Destailleur
e2ea5945dd Work on look and feel v6 2017-04-06 21:48:28 +02:00
Laurent Destailleur
5d099d24ee Merge pull request #6636 from defrance/patch-3
FIX : Categories Bank vs categories transactions
2017-04-06 21:48:14 +02:00
Laurent Destailleur
8cb28b7bfa Merge pull request #6638 from delcroip/patch-7
FIX: Supplier is not the project customer
2017-04-06 21:24:01 +02:00
Laurent Destailleur
44302f1aea Merge pull request #6650 from atm-arnaud/FIX_total_line_on_list_facture
Fix total line on list facture
2017-04-06 21:11:32 +02:00
arnaud
6b2d8a3c34 FIX limit+1 dosn't show Total line 2017-04-06 11:14:15 +02:00
Laurent Destailleur
18fc5bec9b Better log 2017-04-06 10:56:37 +02:00
delcroix Patrick
337eac30c1 Update releve.php 2017-04-05 21:14:41 +02:00
delcroix Patrick
ca72e5e19f NEW : download button 2017-04-05 20:53:41 +02:00
delcroix Patrick
dae0828543 NEW : show files in the bank statement + download 2017-04-05 20:50:18 +02:00
De Coninck Laurent
ae2e40e5e7 mark expense report as paid if payement set the remaining sold to 0 2017-04-05 19:06:21 +02:00
Laurent Destailleur
dc14268ac6 FIX complete hourly rate when not defined into table of time spent 2017-04-05 15:24:41 +02:00
Laurent Destailleur
e2b96abd0b Fix translation 2017-04-05 13:34:52 +02:00
phf
22503da8b4 Fix search_type on inventory list 2017-04-05 12:25:00 +02:00
FAVRE Pierre-Henry
ac7b95df31 Merge pull request #1 from atm-alexis/patch-1
little fix
2017-04-05 12:23:09 +02:00
Alexis ALGOUD
736800dd66 little fix
for param into list pagination
2017-04-05 12:16:10 +02:00
Laurent Destailleur
1dc2cae3a5 NEW Show company into combo list of projects 2017-04-05 11:51:55 +02:00
Laurent Destailleur
a6c60e4a9a FIX shared bank account with multicompany not visible in invoice setup 2017-04-05 11:14:02 +02:00
Laurent Destailleur
7c868888a5 FIX Add option MAIN_MAIL_USE_MULTI_PART to include text content into
HTML email and add option MAIN_MAIL_ADD_INLINE_IMAGES_IF_IN_MEDIAS to
restore the inline images feature.
2017-04-05 01:02:03 +02:00
Laurent Destailleur
13333ffd73 Add multipart text version into html emails. 2017-04-05 00:39:32 +02:00
arnaud
ef7a334414 Merge branch '3.9' of github.com:Dolibarr/dolibarr into 3.9_dolibarr 2017-04-04 14:56:33 +02:00
Laurent Destailleur
4f292d1247 Prepare 5.0.2 2017-04-04 13:01:53 +02:00
Laurent Destailleur
01d69e4b58 NEW Better reponsive design 2017-04-04 12:55:54 +02:00
Laurent Destailleur
c4d4856997 FIX sql errors on user card 2017-04-04 12:23:44 +02:00
Widee
89716a86a5 Avoid (DEPOSIT) (1) & (2) descriptions
When splitting a rebate into two parts, the word "DEPOSIT" is no longer translated on the invoices.
2017-04-04 12:22:51 +02:00
Laurent Destailleur
9df4bac202 NEW Bookmarks are into a combo list. 2017-04-04 11:56:19 +02:00
delcroix Patrick
422bdd1ef6 FIX: Supplier is not the project customer 2017-04-04 09:06:29 +02:00
Laurent Destailleur
761ece3125 Remove $maxfilenamelength replace with auto overflow. 2017-04-03 16:59:22 +02:00
BENKE Charlie
5b5380659e ERROR Categories Bank vs categories transactions
PB since 4.0, present in 5.0 and develop version
There is a confusion between the categorization function of bank accounts and the categorization function of the records. The categorization of the entries has been removed or it is not replaced by the categorization of the bank accounts.
I propose for the moment to restore the old category of writings but to envisage the creation of a new type of category "bank records" (or if it is not necessary with the new account) to leave so
2017-04-03 15:58:48 +02:00
Laurent Destailleur
17bd393965 Fix typo 2017-04-03 12:48:09 +02:00
Laurent Destailleur
e8767122b0 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	ChangeLog
	htdocs/societe/list.php
2017-04-03 11:05:19 +02:00
Laurent Destailleur
d99b0461c7 Extrafields multilanguage support. 2017-04-03 10:56:28 +02:00
Laurent Destailleur
9678c2128e Add field langs into extrafields definition table 2017-04-03 10:29:20 +02:00
Laurent Destailleur
00d485b2c5 Start 4.0.6 2017-04-02 22:09:06 +02:00
Laurent Destailleur
4902df7e3f Work on look and feel v6 2017-04-02 19:28:38 +02:00
Laurent Destailleur
4d7b059eb3 Release 4.0.5 2017-04-02 18:50:34 +02:00
Laurent Destailleur
ed89852807 Work on look and feel v6 2017-04-01 13:49:17 +02:00
Laurent Destailleur
17a1874e36 FIX Counter of notification of a thirdparty 2017-04-01 13:43:05 +02:00
Laurent Destailleur
d975e7f442 Work on 6.0 look and feel 2017-04-01 12:46:47 +02:00
Laurent Destailleur
e221c48997 Css 2017-04-01 00:59:21 +02:00
Laurent Destailleur
65be3107c3 Fix phpunit 2017-04-01 00:51:16 +02:00
Laurent Destailleur
00a1fc7996 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-04-01 00:49:29 +02:00
Laurent Destailleur
7254b54a04 Work on 6.0 look and feel 2017-04-01 00:49:06 +02:00
Laurent Destailleur
d49d264bec Merge pull request #6608 from LordVan/patch-2
NEW Add phone numbers of project contacts as ODT vars
2017-04-01 00:30:28 +02:00
Laurent Destailleur
2164d93f36 Merge pull request #6622 from marcosgdf/bug-6505
FIX #6621 Documents tab shows greyed out upload form even if the option to show actions not available is disabled
2017-03-31 19:22:49 +02:00
Laurent Destailleur
67cf3a1e67 Merge pull request #6625 from gschratzer/Patch310317_rewritemail
FIX: Issue #6549 don't rewrite email and password
2017-03-31 18:44:02 +02:00
Laurent Destailleur
7b0c6ea940 Merge pull request #6620 from marcosgdf/bug-6619
FIX #6619 Template invoices list do not respect restricted thirdparty user rights
2017-03-31 18:41:46 +02:00
Laurent Destailleur
93687997c9 Work on 6.0 look and feel 2017-03-31 18:40:53 +02:00
Laurent Destailleur
0bf6356d9c Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-03-31 18:33:29 +02:00
Laurent Destailleur
7056edf509 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-03-31 18:32:36 +02:00
Laurent Destailleur
88017f5707 Merge pull request #6369 from atm-florian/dev_replace_extrefield_checkboxByMultiSelect
NEW : change render extrafields checkbox list for multiselectarray
2017-03-31 18:12:58 +02:00
Laurent Destailleur
b6a8507f57 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-03-31 18:11:18 +02:00
Laurent Destailleur
2903518fb1 Fix bad links 2017-03-31 18:11:01 +02:00
Laurent Destailleur
6d81f29835 Merge pull request #6578 from inoveaconseil/patch-1
Update pdf.php
2017-03-31 18:07:03 +02:00
Laurent Destailleur
9d193924bd Fix bad constants 2017-03-31 18:05:20 +02:00
Laurent Destailleur
ee86b7bcef Avoid javascript warning when in stable mode. 2017-03-31 17:51:10 +02:00
Laurent Destailleur
43e59772e4 Merge pull request #6606 from fappels/develop_add_jqmigrate
Develop add jQuery-migrate
2017-03-31 17:48:01 +02:00
Laurent Destailleur
cab944a1a1 Merge pull request #6602 from aspangaro/6.0-multijournal
New : [FP17] Accounting multi-journals
2017-03-31 17:45:10 +02:00
Laurent Destailleur
536afb44c7 Merge pull request #6599 from defrance/patch-2
NEW : SOCIETE_ADD_REF_IN_LIST more display case GetNomUrl
2017-03-31 17:44:31 +02:00
Laurent Destailleur
7bcd4d74ef Merge pull request #6617 from dolibarr95/patch-9
Display mobile icon
2017-03-31 17:43:01 +02:00
Laurent Destailleur
01a74a8d23 Work on 6.0 look and feel 2017-03-31 17:41:20 +02:00
Guido Schratzer
d01ba54cb5 FIX: Issue #6549 don't rewrite email and password 2017-03-31 17:13:09 +02:00
Laurent Destailleur
979bcd3a9b NEW Can add a background image on login page 2017-03-31 11:40:31 +02:00
Laurent Destailleur
da1427ef54 Work on 6.0 look and feel 2017-03-30 16:10:08 +02:00
Laurent Destailleur
18e1e5b780 NEW Add "depends on" and "required by "into module informations 2017-03-30 15:54:48 +02:00
Laurent Destailleur
8e70c4a0b7 Work on 6.0 new look and feel 2017-03-30 15:39:50 +02:00
Marcos García de La Fuente
cd5b074a48 FIX #6621 Documents tab shows greyed out upload form even if the option to show actions not available is disabled 2017-03-30 15:21:20 +02:00
Marcos García de La Fuente
2448b9ee55 FIX #6619 Template invoices list do not respect restricted thirdparty user rights 2017-03-30 14:52:26 +02:00
dolibarr95
6bd112db5e Unify the trigger name
Should be COMPANY_RIB_MODIFY instead of COMPANY_RIB_UPDATE
2017-03-30 14:49:40 +02:00
Laurent Destailleur
aca1c1944d Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/install/mysql/data/llx_c_action_trigger.sql
2017-03-30 12:02:27 +02:00
Laurent Destailleur
78cc976e9f Work on module builder 2017-03-30 10:40:15 +02:00
dolibarr95
1489847a74 Display mobile icon
Display a specific icon when mobile
2017-03-30 09:49:34 +02:00
Laurent Destailleur
4df8dcf980 Work on module modBlockedLog and modModuleBuilder 2017-03-29 21:50:15 +02:00
Thomas Raschbacher
a76ddc8b3f Add phone phone numbers to project contacts
Add phone number(s) for project contacts to be used in odt
2017-03-29 15:33:32 +02:00
fappels
527fa27fb7 Add jquery-migrate to handle jquery 3.0 removes 2017-03-29 11:18:03 +02:00
Laurent Destailleur
e3d3d32b4a Translation 2017-03-29 11:11:37 +02:00
Laurent Destailleur
54b03a3552 Work on 6.0 new look and feel 2017-03-29 11:03:13 +02:00
Laurent Destailleur
4fa5448aab FIX Detection of color brightness 2017-03-29 10:34:33 +02:00
Alexandre SPANGARO
06c2f04927 Finish work on multijournal admin part
Need harmonization on rights
2017-03-29 06:32:26 +02:00
Laurent Destailleur
e416ea275e Work on 6.0 look and feel 2017-03-28 21:04:38 +02:00
Laurent Destailleur
e8e7732820 Merge branch 'develop' of github.com:Dolibarr/dolibarr into develop 2017-03-28 17:41:41 +02:00
phf
fe1b1ede0f Fix remove filter on date 2017-03-28 17:35:51 +02:00
phf
c3e8a5be62 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into NEW_inventory_coreobject_listview 2017-03-28 17:20:50 +02:00
phf
466b6518b2 Update add the custom value "limit" for the list 2017-03-28 17:18:55 +02:00
Laurent Destailleur
31bde1ae74 Code for 6.0 new look and feel 2017-03-28 17:12:15 +02:00
phf
5decbde79b Fix search by date does not work 2017-03-28 17:06:22 +02:00
phf
df170769c9 Update function module inventory 2017-03-28 16:05:18 +02:00
dolibarr95
80715ec61b Return -1 instead of 0 if error 2017-03-28 14:50:01 +02:00
phf
70743e1f68 Update list header to be print with Dolibarr functions 2017-03-28 13:48:33 +02:00
Laurent Destailleur
a663c248f0 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-03-28 13:31:44 +02:00
Laurent Destailleur
2f439fed85 Code for 6 2017-03-28 13:31:28 +02:00
Laurent Destailleur
997bc35d5f FIX #6586 2017-03-28 13:22:11 +02:00
Laurent Destailleur
6bf61c677f FIX #6586 Introduce processing status 2017-03-28 13:20:31 +02:00
Laurent Destailleur
41063e7cf2 Fix: trigger for delete must be before delete of element 2017-03-28 12:55:20 +02:00
Laurent Destailleur
75a86cd8e5 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-03-28 12:48:23 +02:00
Laurent Destailleur
b5b0eba470 Several enhancement for 6.0 2017-03-28 12:47:48 +02:00
Laurent Destailleur
d788dc3aee Merge pull request #6596 from dolibarr95/patch-6
NEW : Create a trigger for company rib delete
2017-03-28 12:46:55 +02:00
Laurent Destailleur
3740137e31 Add tooltip on label of each open item. 2017-03-28 10:44:52 +02:00
phf
4354820689 Fix call function get_date instead getDate 2017-03-28 09:39:26 +02:00
Alexandre SPANGARO
fc2b9a858b New : [FP17] Add multijournals in accountancy admin 2017-03-28 06:35:03 +02:00
Laurent Destailleur
219bcb0d54 Work on 6.0 features. 2017-03-27 22:44:50 +02:00
Alexandre SPANGARO
aa924bf010 Merge remote-tracking branch 'uptream/develop' into 6.0-multijournal
# Conflicts:
#	htdocs/install/mysql/migration/5.0.0-6.0.0.sql
2017-03-27 22:35:06 +02:00
BENKE Charlie
6ee1c79f6f SOCIETE_ADD_REF_IN_LIST more display case GetNomUrl
0 = only socname (usual)
1 = socname and code_customer and supplier (like before)
2 = only code customer
3 = only code supplier
2017-03-27 18:26:24 +02:00
dolibarr95
17e5279907 Create a trigger for company rib delete 2017-03-27 14:00:05 +02:00
dolibarr95
262d1d5f8c Create a trigger for company rib create 2017-03-27 09:19:46 +02:00
Laurent Destailleur
0838953ef7 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-03-27 00:49:24 +02:00
Laurent Destailleur
f843f8a93d Start to move search bar before table titles 2017-03-27 00:48:50 +02:00
atm-ph
ed27b44f62 Add TODO to print header table as Dolibarr 2017-03-26 14:58:59 +02:00
atm-ph
ae2ab3276d Refactoring and class/method documentation 2017-03-26 14:37:25 +02:00
Laurent Destailleur
9f0328ab7f Hidden for the moment because option specific to one theme only. 2017-03-26 13:11:01 +02:00
Laurent Destailleur
95fbe0147d Merge pull request #6585 from defrance/patch-99
display input border by setting
2017-03-26 13:06:48 +02:00
Laurent Destailleur
e38ad37ce3 FIX #6517 #6525 Autocompletion of thirdparty after n chars not
implemented
2017-03-26 05:02:06 +02:00
Laurent Destailleur
6e133e5bf6 Fix security escapment 2017-03-26 01:57:09 +01:00
Laurent Destailleur
ca3a39b71e Merge pull request #6588 from defrance/patch-100
Bad parasite caracters
2017-03-26 01:51:04 +01:00
BENKE Charlie
8d6819c664 Update list.php 2017-03-26 01:50:12 +01:00
BENKE Charlie
afefb47598 Update list.php 2017-03-26 01:50:00 +01:00
BENKE Charlie
f4a7217f20 display total line for all total line 2017-03-26 01:49:48 +01:00
BENKE Charlie
68656dd29c FIX : supplier default condition not retrived on create 2017-03-26 01:49:13 +01:00
Laurent Destailleur
ce58ba5c2f Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-03-26 01:47:19 +01:00
Laurent Destailleur
ba59c27754 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-03-26 01:46:08 +01:00
Laurent Destailleur
9a85e5ef00 Enhance the file checker 2017-03-26 01:45:09 +01:00
BENKE Charlie
dfb24a13d9 Bad parasite caracters
TD not good
2017-03-25 23:48:30 +01:00
atm-ph
09f645fc9f Fix travis 2017-03-25 23:21:49 +01:00
Laurent Destailleur
5b97736bb0 Merge pull request #6576 from defrance/patch-97
FIX : supplier default condition not retrived on create
2017-03-25 21:22:44 +01:00
Laurent Destailleur
edf28b59d6 Merge pull request #6571 from defrance/patch-94
display total line for all total line
2017-03-25 21:18:16 +01:00
Laurent Destailleur
8c2b70c4a7 Fix filechecker 2017-03-25 20:51:02 +01:00
BENKE Charlie
acfdc96121 Border input display is allowed by setting 2017-03-25 19:34:04 +01:00
atm-ph
76b95aeec0 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into NEW_inventory_coreobject_listview 2017-03-25 19:15:25 +01:00
atm-ph
21e30e43d9 Update entries menus 2017-03-25 19:10:16 +01:00
atm-ph
4197254209 Fix remove button on list to create a new inventory 2017-03-25 19:09:58 +01:00
BENKE Charlie
aa5ff36a04 display input border by setting 2017-03-25 19:04:27 +01:00
atm-ph
2fc74b4962 Refactoring class 2017-03-25 18:53:14 +01:00
Laurent Destailleur
4012aeff90 Fix translation 2017-03-25 18:35:17 +01:00
atm-ph
cb576e6c99 Refactoring class 2017-03-25 18:26:10 +01:00
atm-ph
fce8e08b51 Refactoring and fix 2017-03-25 18:13:39 +01:00
atm-ph
e3afa06cf3 Fix inventory sql 2017-03-25 18:01:43 +01:00
atm-ph
ae33e40dc8 Refactoring and add method comments 2017-03-25 17:32:42 +01:00
Laurent Destailleur
3c9d336148 Fix error message 2017-03-25 17:05:27 +01:00
Inovea Conseil
447607ecd9 Update pdf.php
Missing translate #6577
2017-03-25 12:46:32 +01:00
BENKE Charlie
1cc8671433 FIX : supplier default condition not retrived on create 2017-03-25 12:06:02 +01:00
Laurent Destailleur
7dd2a3b130 Merge pull request #6574 from defrance/patch-95
add next_prev_filter for pagination on product
2017-03-25 11:55:14 +01:00
BENKE Charlie
ec3402a04b Update note.php 2017-03-25 10:52:03 +01:00
BENKE Charlie
656875acb5 Update info.php 2017-03-25 10:49:57 +01:00
BENKE Charlie
a1db02cc08 Update fournisseurs.php 2017-03-25 10:48:50 +01:00
atm-ph
269645dfc7 Add method documentations 2017-03-25 10:48:06 +01:00
BENKE Charlie
cf68039c36 Update document.php 2017-03-25 10:47:42 +01:00
BENKE Charlie
2e6ab393df add next_prev_filter for pagination 2017-03-25 10:45:01 +01:00
Laurent Destailleur
106d19a8af FIX #6468 + Fix missing translation 2017-03-25 03:53:11 +01:00
Laurent Destailleur
2f4a4f493e Missin translation 2017-03-25 01:47:52 +01:00
Laurent Destailleur
df59a595de Fix link to files 2017-03-25 01:29:19 +01:00
Laurent Destailleur
aa9d991923 Fix css 2017-03-25 01:03:02 +01:00
atm-ph
de832d90a9 Refactoring 2017-03-25 00:50:53 +01:00
Laurent Destailleur
292bcae592 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-03-25 00:05:04 +01:00
Laurent Destailleur
720a820ee4 border-bottom not required. 2017-03-25 00:04:21 +01:00
BENKE Charlie
db76a05d0c Update list.php 2017-03-24 23:53:32 +01:00
Laurent Destailleur
6b33a755ba Add more log on tableDnD 2017-03-24 23:52:06 +01:00
BENKE Charlie
3aff053828 Update list.php 2017-03-24 23:40:34 +01:00
BENKE Charlie
94a1fc19fa display total line for all total line 2017-03-24 23:39:25 +01:00
Laurent Destailleur
278bbf184c Merge pull request #6546 from aspangaro/6.0-new_bank_direct_input
New : Add Various payment submodule linked to the accountancy to replace free input in bank
2017-03-24 22:52:39 +01:00
Laurent Destailleur
df17de9d48 Merge pull request #6543 from laudeco/feature/expenseNoteFusionPdf
add 'fusion pdf' in mass action of expense report
2017-03-24 22:50:54 +01:00
Laurent Destailleur
6f3231745e Merge pull request #6564 from tiaris/devcamp
bug 6563 installation issue with
2017-03-24 22:47:50 +01:00
Laurent Destailleur
71378028f4 Merge pull request #6562 from defrance/patch-92
error on install
2017-03-24 22:44:11 +01:00
Laurent Destailleur
f05dfdbc81 Merge pull request #6569 from defrance/patch-93
Display totalLine if one of total field are present
2017-03-24 22:43:43 +01:00
BENKE Charlie
2b1c29316f Display totalLine if one of total field are present 2017-03-24 22:13:58 +01:00
Laurent Destailleur
d1a988a0be Fix document_preview is possible on files with + chars inside. 2017-03-24 17:32:38 +01:00
atm-ph
edc2d39702 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into NEW_inventory_coreobject_listview 2017-03-24 17:06:40 +01:00
jean
cdb1de7596 bug 6563 installation issue with
doctemplates/usergroups/template_usergroups.odt
2017-03-24 16:48:44 +01:00
fappels
f8ae4325a0 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-03-24 15:34:44 +01:00
BENKE Charlie
80f78e66bb error on install 2017-03-24 15:30:46 +01:00
Laurent Destailleur
38660418b4 Include preview of pdf into dol_banner 2017-03-23 22:27:44 +01:00
Laurent Destailleur
664380d304 Css enhancement 2017-03-23 21:24:57 +01:00
Laurent Destailleur
22b4d0c276 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-03-23 21:23:28 +01:00
Laurent Destailleur
cb0eb26faa Fix phpunit 2017-03-23 20:37:04 +01:00
Laurent Destailleur
f241bfefd0 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-03-23 20:20:59 +01:00
Laurent Destailleur
eb145faffd Replace parameter mixte with textselect 2017-03-23 19:57:45 +01:00
Laurent Destailleur
d1c29bf698 Merge pull request #6552 from defrance/patch-91
NEW : introducing "mixte" mode for select_duration
2017-03-23 19:54:33 +01:00
Laurent Destailleur
3cc312d485 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/langs/en_US/main.lang
2017-03-23 19:48:34 +01:00
Laurent Destailleur
4bc2864a6f Better board for open items 2017-03-23 19:26:28 +01:00
Laurent Destailleur
53a04703d6 Uniformize code 2017-03-23 16:10:38 +01:00
Laurent Destailleur
22247271f6 CSS enhancement 2017-03-23 13:19:00 +01:00
Laurent Destailleur
e72f0076ed Remove border-bottom useless 2017-03-23 13:06:38 +01:00
Laurent Destailleur
3adb43c6e5 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/compta/facture.php
	htdocs/core/boxes/box_produits.php
	htdocs/core/boxes/box_produits_alerte_stock.php
	htdocs/langs/en_US/bills.lang
	htdocs/product/class/product.class.php
	htdocs/theme/eldy/style.css.php
	htdocs/theme/md/style.css.php
2017-03-23 12:52:19 +01:00
Laurent Destailleur
fec3a89aa5 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-03-23 11:38:46 +01:00
Laurent Destailleur
996cb9d3f1 NEW Add function ajax_autoselect 2017-03-23 11:16:30 +01:00
Laurent Destailleur
0a35d17207 CSS enhancement 2017-03-23 10:59:13 +01:00
Laurent Destailleur
9b42177bd5 Fix half day for leave request. 2017-03-23 10:52:09 +01:00
Laurent Destailleur
917ef1e01e Uniformize code 2017-03-22 20:34:01 +01:00
Laurent Destailleur
8199ac9f89 FIX Can't download delivery receipts (function
dol_check_secure_access_document)
2017-03-22 19:49:58 +01:00
BENKE Charlie
7999cb9a46 introducing "mixte" mode for select_duration
If 'select' then input hour and input min is a combo,
if 'text' input hour is in text and input min is a text, 
if 'mixte' input hour is in text and input min is a combo
2017-03-21 23:48:06 +01:00
Laurent Destailleur
acdfd6ab9e css enhancement 2017-03-21 18:23:58 +01:00
Laurent Destailleur
0775f7bae0 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-03-21 18:00:29 +01:00
Laurent Destailleur
9a13dc92ab bottom-border useless 2017-03-21 18:00:11 +01:00
Laurent Destailleur
559232a4d7 bottom-border useless 2017-03-21 17:57:58 +01:00
Laurent Destailleur
b0a75da2ac Fix css 2017-03-21 17:50:52 +01:00
Laurent Destailleur
e7a45a7f6a NEW Use html5 type "number" on select field for year and duration. 2017-03-21 17:50:43 +01:00
Laurent Destailleur
a0fe79a113 Fix duplicate include. 2017-03-21 16:46:12 +01:00
Laurent Destailleur
b5e646daa0 NEW Show by default README.md file found into root dir of ext module. 2017-03-21 16:43:09 +01:00
Laurent Destailleur
a5c11dc840 NEW Add function dolMd2Html 2017-03-21 16:03:13 +01:00
Laurent Destailleur
68257283e4 Enhance select list 2017-03-21 13:39:42 +01:00
Laurent Destailleur
95da2f5d54 NEW Add font-awesome css. 2017-03-21 13:38:21 +01:00
Laurent Destailleur
aa71710a74 FIX list of projects 2017-03-21 13:38:00 +01:00
Laurent Destailleur
0e997c973f FIX Picto of project on dol_banner and box 2017-03-21 13:13:00 +01:00
Laurent Destailleur
5b4bb56012 No more need of $bc[$var] 2017-03-21 12:13:02 +01:00
Laurent Destailleur
9abe0940e7 Fix bad use of showLinkedObjectBlock 2017-03-21 11:42:02 +01:00
Laurent Destailleur
5231fbf1e3 Option to hide version 2017-03-21 11:37:03 +01:00
Laurent Destailleur
75da1bac69 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-03-21 10:55:05 +01:00
Laurent Destailleur
d9abe553cf Useless bottom-border 2017-03-21 10:54:47 +01:00
Alexandre SPANGARO
2bc7f10cd6 Fix 2017-03-21 06:45:13 +01:00
Laurent Destailleur
1b0b4c9609 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-03-20 23:53:47 +01:00
Laurent Destailleur
b9a9997688 Page societe/soc.php and compta/facture.php was renamed into card.php
to match page naming conventions.
2017-03-20 21:29:22 +01:00
Laurent Destailleur
47e325cc66 NEW Can set the default value of any field on any create page with
option MAIN_DEFAULT_FOR_path-to-file_fieldname
2017-03-20 20:35:24 +01:00
Laurent Destailleur
db35db127c Do not allow to migrate n+2 before n+1 2017-03-20 19:21:26 +01:00
Alexandre SPANGARO
6d5578a876 Reactivated constant BANK_DISABLE_DIRECT_INPUT 2017-03-19 20:47:30 +01:00
Laurent Destailleur
e85206dee5 FIX multicurrency management on supplier order/invoice 2017-03-19 15:37:07 +01:00
Alexandre SPANGARO
b09398a68e Update works 2017-03-19 15:23:35 +01:00
Laurent Destailleur
75d73b188c Fix bad vat rate used into sql request 2017-03-19 14:51:25 +01:00
Laurent Destailleur
b169f93abc Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-03-19 14:27:12 +01:00
Laurent Destailleur
4831fb4dcb Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/adherents/class/adherent.class.php
	htdocs/filefunc.inc.php
2017-03-19 11:26:49 +01:00
Alexandre SPANGARO
36f279837f Update work 2017-03-19 08:17:32 +01:00
Alexandre SPANGARO
e07f934185 Class is missing 2017-03-19 07:26:37 +01:00
Alexandre SPANGARO
504e1e1ec8 Step 3: Work on card 2017-03-19 07:26:15 +01:00
Alexandre SPANGARO
0e910616b6 Update table 2017-03-19 07:25:19 +01:00
Laurent Destailleur
49624c7b68 Useless bottom-border 2017-03-18 19:57:33 +01:00
Laurent Destailleur
b9d6122c53 Add comments 2017-03-18 19:56:53 +01:00
De Coninck Laurent
a05ebb6c65 add 'fusion pdf' in mass action of expense report
Add a mass action 'fusion pdf (build doc)' in expense report list
2017-03-18 11:51:45 +01:00
Alexandre SPANGARO
8328c04624 2nd step : Add table 2017-03-18 08:12:29 +01:00
Alexandre SPANGARO
16b12b33fc First step : remove BANK_DISABLE_DIRECT_INPUT 2017-03-18 07:24:55 +01:00
Laurent Destailleur
42898cd4cc Merge pull request #6530 from defrance/patch-90
Add fin_validite, date_cloture in fetch
2017-03-18 03:53:34 +01:00
Laurent Destailleur
7662ddc2fc Merge pull request #6529 from dolibarr95/patch-4
NEW : Create a trigger for company create RIB
2017-03-18 03:18:31 +01:00
Laurent Destailleur
35b79818b7 Uniformize css rules 2017-03-16 20:33:51 +01:00
Laurent Destailleur
dba6d99686 Minor look enhancement 2017-03-16 17:02:30 +01:00
BENKE Charlie
4e1799b2be Add fin_validite, date_cloture in fetch 2017-03-15 21:31:44 +01:00
Laurent Destailleur
4c0ff38020 Fix closing boxes 2017-03-15 11:58:13 +01:00
Laurent Destailleur
e6d8b3c4db Css enhancement 2017-03-15 11:41:15 +01:00
Laurent Destailleur
888675016d NEW Can use dol_fiche_end without showing bottom border. 2017-03-15 11:13:30 +01:00
dolibarr95
0721e6af42 add condition
add condition check for $notrigger
2017-03-15 10:37:08 +01:00
dolibarr95
688073dc18 Create a trigger for company create RIB
Since there no 'trigger' executed when we create a RIB for a company (COMPANY_CREATE, COMPANY_MODIFY, COMPANY_DELETE not executed), I purpose a new one COMPANY_RIB_CREATE. If this PR is qualified i will purpose COMPANY_RIB_MODIFY and COMPANY_RIB_DELETE too.

tks
2017-03-15 10:31:45 +01:00
Laurent Destailleur
76db6c9f18 Fix css and colspan 2017-03-14 21:02:26 +01:00
Laurent Destailleur
7f8c4d7d0f Fix CSS 2017-03-14 14:33:25 +01:00
Laurent Destailleur
ccbcd2b339 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-03-14 14:07:21 +01:00
Laurent Destailleur
6c392fad9f Fix CSS 2017-03-14 14:06:55 +01:00
Laurent Destailleur
ec7d48931e Merge duplicate menus/page on projects 2017-03-14 13:49:04 +01:00
Laurent Destailleur
78c3a1a3a1 Merge pull request #6012 from atm-florian/dev_NEW_copyeventfiles
NEW : option to copy attachment files of emails into the event document area
2017-03-14 11:04:05 +01:00
Laurent Destailleur
fc5d96b84b Add comments 2017-03-14 10:51:28 +01:00
Laurent Destailleur
75a7122667 Merge pull request #6523 from camlafit/patch-1
Run soffice in background
2017-03-14 10:47:03 +01:00
Laurent Destailleur
ebe552ead5 Merge pull request #6521 from atm-arnaud/NEW_odt_others_objects
NEW odt generation possible for contract, product, user and user groups
2017-03-14 10:44:24 +01:00
Laurent Destailleur
d951114c18 Merge branch 'develop' into NEW_odt_others_objects 2017-03-14 10:44:05 +01:00
Laurent Destailleur
70db9400ad Merge pull request #6511 from aspangaro/6.0-charges
NEW : Add project to social contributions
2017-03-14 10:31:00 +01:00
cam.lafit
67189fa683 Provide a home directory to java/soffice
By default www-data run as system user on /root directory, to prevent some error about right user we :
* move first to /tmp directory
* set /tmp as home www-data user

If needed admin sys can update *$home_java* to a valide www-data directory
2017-03-14 10:17:20 +01:00
Laurent Destailleur
5c8ead4b62 Merge pull request #6520 from joseplluis/patch-5
FIX html tag
2017-03-14 10:16:15 +01:00
camlafit
e0449cf17f Execute in background process
It's better to split command call in two part. Set command to execute with binary path and execute after in background
2017-03-14 09:56:30 +01:00
arnaud
3ab7bac511 FIX fresh install const 2017-03-14 09:37:51 +01:00
arnaud
192a825de8 NEW ODT docs for USER USERGROUP CONTRACT and PRODUCT class 2017-03-14 09:25:29 +01:00
Josep Lluís
14ed67499e FIX html tag
Fix incorrect html tag not closed
2017-03-14 00:26:47 +01:00
Laurent Destailleur
ca80c58853 Fix PHP error 2017-03-13 02:14:42 +01:00
Laurent Destailleur
b8b32ae2e3 FIX colspan 2017-03-13 02:10:22 +01:00
Laurent Destailleur
520bdac510 Translation 2017-03-13 01:35:04 +01:00
Laurent Destailleur
e8a1f0ba46 Uniformize code 2017-03-12 17:10:32 +01:00
Alexandre SPANGARO
c6c07bf9f4 New : Add project to social contributions 2017-03-12 14:32:49 +01:00
Laurent Destailleur
7103d7921e Uniformize look 2017-03-11 13:42:16 +01:00
Laurent Destailleur
696100b9e7 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-03-11 12:45:57 +01:00
Laurent Destailleur
d1fe6a408c Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-03-11 12:41:47 +01:00
Laurent Destailleur
4ca634b41c Better look and feel 2017-03-11 12:04:28 +01:00
Laurent Destailleur
c7713a8839 CSS 2017-03-11 03:01:45 +01:00
Laurent Destailleur
4bf0e31299 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/core/class/html.form.class.php
	htdocs/langs/en_US/loan.lang
	htdocs/theme/eldy/style.css.php
	htdocs/theme/md/style.css.php
2017-03-11 02:40:42 +01:00
Laurent Destailleur
47dd53abbe NEW The substitution keys available for emailing edition is now into a
popup
2017-03-11 02:36:22 +01:00
Laurent Destailleur
2054ce0aab FIX Avoid flash on screen 2017-03-11 00:50:55 +01:00
Laurent Destailleur
21189048e7 FIX choice of category was lost if an error occurs during creation 2017-03-11 00:50:31 +01:00
Laurent Destailleur
106d74184c CSS change.
More information on project list of thirdparty.
2017-03-11 00:43:06 +01:00
Laurent Destailleur
5033c6ea99 Add hidden constant as this is not common 2017-03-11 00:35:39 +01:00
Laurent Destailleur
618c27d63c Optimize space 2017-03-10 16:26:43 +01:00
Laurent Destailleur
57c2971175 Fix dol_banner for agenda 2017-03-10 16:19:18 +01:00
Laurent Destailleur
c72e7c1057 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/core/lib/files.lib.php
2017-03-10 14:54:35 +01:00
Laurent Destailleur
fd3837e1d5 Merge pull request #6492 from aspangaro/6.0-donation
NEW Add donations statistics in home statistics
2017-03-10 12:31:46 +01:00
arnaud
a796a321cc Merge branch '3.9_dalibo' of github.com:ATM-Consulting/dolibarr into NEW_odt_others_objects
Conflicts:
	htdocs/core/class/html.formfile.class.php
	htdocs/product/admin/product.php
	htdocs/product/card.php
2017-03-10 12:16:55 +01:00
Laurent Destailleur
e5fc1583c7 Fix No external access without using getUrlContent function. 2017-03-10 12:05:42 +01:00
Laurent Destailleur
6484fb2a38 Merge pull request #6494 from atm-florian/dev_easter_eggs_commit_strip
new : hidden easter egg to display commitstrip strip on login page
2017-03-10 11:55:39 +01:00
Laurent Destailleur
4b63834868 Merge pull request #6488 from atm-quentin/develop
NEW filter checkbox to add draft order  in replenish
2017-03-10 11:54:44 +01:00
arnaud
1d31603ad2 Merge branch '3.9' of github.com:Dolibarr/dolibarr into 3.9_dalibo 2017-03-10 11:46:59 +01:00
Laurent Destailleur
3dce431da2 Merge pull request #6498 from LordVan/patch-1
fix typo in Issue tracker URL
2017-03-10 11:32:17 +01:00
Laurent Destailleur
46eedeafe8 Fix message shown to many times 2017-03-10 11:30:46 +01:00
Laurent Destailleur
80702e4c0a Fix Better HTML5 compliant 2017-03-10 11:22:27 +01:00
Laurent Destailleur
b3d27521cb Fix Must use tdoverflowmax100 instead of tdoverflow 2017-03-10 10:55:35 +01:00
Laurent Destailleur
e44234a47f NEW add property to show warnings when activating modules 2017-03-09 15:16:45 +01:00
Laurent Destailleur
c962daabac NEW add property to show warnings when activating modules 2017-03-09 15:16:16 +01:00
Laurent Destailleur
d241adc201 NEW Use autocompletion on the "Add widget list". 2017-03-09 13:22:43 +01:00
Thomas Raschbacher
b520c0ab6b fix typo in Issue tracker URL 2017-03-09 08:12:45 +01:00
arnaud
4a7e3fb387 NEW odt usergroup 2017-03-08 11:34:21 +01:00
florian HENRY
76e55fcdb1 NEW :hidden Easter egg to display commitstrip strip on login page 2017-03-08 09:06:38 +01:00
Laurent Destailleur
184d52525a PHP code to manage pair/impair is replaced by native CSS. 2017-03-07 22:45:22 +01:00
Alexandre SPANGARO
fd0a46c5cf New : add donations statistics in home statistics 2017-03-07 22:31:34 +01:00
Alexandre SPANGARO
6ce8aa7d6f Merge remote-tracking branch 'uptream/develop' into 6.0-stripe 2017-03-07 22:08:23 +01:00
Laurent Destailleur
8ac1aab45a Uniformize look and feels 2017-03-07 18:34:57 +01:00
Quentin Vial-Gouteyron
bf8d510541 Merge branch 'develop' of github.com:Dolibarr/dolibarr into develop 2017-03-06 15:52:59 +01:00
Quentin Vial-Gouteyron
b378279440 New_filter_to_add_draft_order_to_validated_one 2017-03-06 15:50:17 +01:00
florian HENRY
fc63008485 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into dev_replace_extrefield_checkboxByMultiSelect 2017-03-06 15:35:29 +01:00
florian HENRY
46c329848b Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into dev_NEW_copyeventfiles 2017-03-06 11:40:57 +01:00
Laurent Destailleur
4e4045d18a Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-03-05 22:12:08 +01:00
Laurent Destailleur
5f79b2d0c6 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/accountancy/admin/account.php
	htdocs/accountancy/admin/categories.php
	htdocs/expensereport/class/expensereport.class.php
	htdocs/install/mysql/migration/4.0.0-5.0.0.sql
2017-03-05 22:11:35 +01:00
Laurent Destailleur
f410ffb0b5 Merge pull request #6483 from defrance/patch-88
FIX input stock value not display
2017-03-05 21:50:33 +01:00
Laurent Destailleur
52a4863ed8 Merge pull request #6480 from dolibarr95/patch-2
Add label tag
2017-03-05 21:40:31 +01:00
Laurent Destailleur
2a1060c0fc Merge pull request #6475 from defrance/patch-87
Situation total row left a col if bank enabled
2017-03-05 21:39:02 +01:00
Laurent Destailleur
c2298c2e6b Clean CSS 2017-03-04 17:49:44 +01:00
Laurent Destailleur
5d18aad15f Add the vat_code on all table of prices 2017-03-04 14:18:04 +01:00
Laurent Destailleur
00758e515a Better css 2017-03-04 12:18:34 +01:00
Laurent Destailleur
c3d4df2b72 Rewrite working board to prepare new features 2017-03-03 16:55:22 +01:00
Laurent Destailleur
0b69d0143b Try jSignature 2017-03-03 15:26:51 +01:00
Laurent Destailleur
28ad50e059 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/core/tpl/objectline_create.tpl.php
	htdocs/langs/de_DE/bills.lang
	htdocs/langs/fr_FR/bills.lang
	htdocs/langs/fr_FR/main.lang
	htdocs/langs/fr_FR/suppliers.lang
2017-03-03 14:31:35 +01:00
Laurent Destailleur
0a0797e797 Rename menu entry 2017-03-03 13:36:38 +01:00
Laurent Destailleur
afc0cb93b3 First implementation of CSS3 flex. 2017-03-03 13:30:02 +01:00
Laurent Destailleur
8cd0956b30 Code comment 2017-03-03 13:28:18 +01:00
Laurent Destailleur
07c828d38f Introduce method loadLangs to save code lines 2017-03-03 13:27:51 +01:00
arnaud
cff9fa0e6b FIX user odt 2017-03-03 12:01:58 +01:00
BENKE Charlie
29cb5dd545 FIX input stock value not display
the good array is "value" (like in the card tabs who give the right value)
2017-03-03 11:48:04 +01:00
arnaud
abeba95de9 New USER odt 2017-03-02 15:13:42 +01:00
florian HENRY
227daee2de Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
dev_NEW_copyeventfiles

Conflicts:
	htdocs/core/actions_sendmails.inc.php
2017-03-02 14:29:22 +01:00
dolibarr95
d3a80795ce Add label tag
Add a label html tag for the input radio extrafield tag.
2017-03-02 11:40:43 +01:00
Laurent Destailleur
02d9a41e77 Use placeholder for % 2017-03-02 01:25:11 +01:00
BENKE Charlie
83622c62be Update pdf_crabe.modules.php 2017-03-01 21:54:30 +01:00
Laurent Destailleur
d202003e29 Fix translation 2017-03-01 18:12:06 +01:00
BENKE Charlie
a371b27564 better management of situation progress in pdf 2017-03-01 16:48:09 +01:00
BENKE Charlie
706dd838c9 Situation total row left a col if bank enabled 2017-03-01 11:21:49 +01:00
Laurent Destailleur
0f11a42fe4 Fight against useless colspan 2017-02-28 19:03:39 +01:00
Laurent Destailleur
c2c69620eb Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-02-28 13:45:51 +01:00
Laurent Destailleur
5c2ed0f19f Fix field title lost 2017-02-28 12:57:34 +01:00
Laurent Destailleur
58229907d4 Removed not used class "Service". Reduce nb of request on dashboard. 2017-02-28 12:35:55 +01:00
Laurent Destailleur
940b56ee3e Fix lang loading 2017-02-28 12:24:07 +01:00
Laurent Destailleur
372cb40cf9 The trigger USER_SETINGROUP and USER_REMOVEFROMGROUP has been replaced
with trigger USER_MODIFY
2017-02-28 12:10:45 +01:00
Laurent Destailleur
9648f20a2e Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-02-28 12:08:41 +01:00
Laurent Destailleur
40b412728f Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-02-28 11:49:10 +01:00
Laurent Destailleur
d936898308 Update doc 2017-02-28 11:40:14 +01:00
Laurent Destailleur
9928f943a7 Remove hook that is duplicate code with trigger. 2017-02-28 11:40:04 +01:00
Laurent Destailleur
0f22beb774 Upgrade to ckeditor 4.6.2. 2017-02-28 10:49:58 +01:00
Alexandre SPANGARO
05e50e1027 Merge remote-tracking branch 'uptream/develop' into 6.0-stripe 2017-02-28 05:52:43 +01:00
Laurent Destailleur
821324868a Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-02-27 12:15:31 +01:00
Laurent Destailleur
d9ba06e224 Fix bad table 2017-02-27 11:42:11 +01:00
Laurent Destailleur
3b85a41991 Fix PHPCS 2017-02-27 02:14:37 +01:00
Laurent Destailleur
d12caab69a The hook getNodeList has been replaced by a normalized 'addreplace' hook
getDirList.
2017-02-27 02:04:47 +01:00
Laurent Destailleur
74e8fb9c19 NEW Can set number of dump to keep with job "local database backup" 2017-02-27 02:04:25 +01:00
Laurent Destailleur
43f3e46aac Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-02-27 01:23:48 +01:00
Laurent Destailleur
04044df36a Fix merge 2017-02-27 01:23:21 +01:00
Laurent Destailleur
4f24613de0 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/expensereport/class/expensereport.class.php
2017-02-27 01:19:03 +01:00
Laurent Destailleur
170ad1a265 Depreciate a class not really used 2017-02-27 00:56:44 +01:00
Laurent Destailleur
b7d715f03f Merge pull request #6469 from IonAgorria/mail_extrafields
NEW: Add object extrafields to mail form
2017-02-27 00:29:09 +01:00
Laurent Destailleur
3aaf9dae11 Fix parameter to cal cron method 2017-02-27 00:12:48 +01:00
Ion
320da17c78 Add object extrafields to mail form 2017-02-26 03:42:42 +01:00
Laurent Destailleur
bf591f5f91 Work on module website 2017-02-24 21:13:40 +01:00
Laurent Destailleur
63bee0c2d0 Doxygen 2017-02-24 16:23:43 +01:00
Laurent Destailleur
29578a38bd Keep previous behaviour if new option not set 2017-02-24 16:19:00 +01:00
Laurent Destailleur
7ee6dc7fa6 Merge pull request #6388 from atm-ph/new_deposit_with_multi_tva_management
New deposit with multi tva management
2017-02-24 16:16:33 +01:00
Laurent Destailleur
7559437d8b Merge pull request #6464 from defrance/patch-85
add selectform choice for private mailing
2017-02-24 15:29:37 +01:00
Laurent Destailleur
bc41b6dfe2 Merge pull request #6459 from defrance/patch-84
Add selectform for frst recur option (better usage)
2017-02-24 15:28:16 +01:00
Laurent Destailleur
d0ee8c0e2d Merge pull request #6458 from defrance/patch-83
inverted value between FRST & RECUR
2017-02-24 15:27:32 +01:00
Laurent Destailleur
1ef899dacc Prepare database to follow supplier discounts 2017-02-24 15:22:32 +01:00
Laurent Destailleur
4804cc47bd Clean and uniformize code 2017-02-24 15:16:53 +01:00
Laurent Destailleur
47ea9b57e8 Fix Remove debug var_dump 2017-02-24 14:41:12 +01:00
Laurent Destailleur
559478048c Move resources for theme at a batter place 2017-02-24 14:38:20 +01:00
Laurent Destailleur
f75af2af37 Close #6146 - Let's experiment fontawesome. 2017-02-24 14:37:18 +01:00
Laurent Destailleur
baa1f3ed2b Clean doc about changes in external libraries 2017-02-24 14:35:20 +01:00
BENKE Charlie
a2611e31fe add selectform choice for private mailing
better usability than enter 0 ou 1 value
2017-02-24 11:12:14 +01:00
Laurent Destailleur
fb88eaf2a4 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/filefunc.inc.php
2017-02-23 02:55:50 +01:00
Laurent Destailleur
7673aff3ba Fix js errors 2017-02-23 02:51:26 +01:00
Laurent Destailleur
0ada82baa0 Remove useless line that show "root" in EDM module. 2017-02-23 01:00:44 +01:00
Laurent Destailleur
49d0deea39 NEW Upgrade jquery to 3.3.1 and jquery-ui to 1.12 2017-02-23 00:46:19 +01:00
Laurent Destailleur
fbecb1b2d8 Work on removal of jmobile 2017-02-23 00:45:27 +01:00
Laurent Destailleur
d7e1a6e4f0 Fix no timer for browser notification if on login page 2017-02-22 21:18:34 +01:00
Laurent Destailleur
1e45e64a9a Files sent from ECM module are also indexed in database. 2017-02-22 20:35:42 +01:00
Laurent Destailleur
b66ba6c57c Fix warning 2017-02-22 19:48:15 +01:00
Laurent Destailleur
64721d73b6 Remove not so usefull plugin jquery layout (prepare js upgrades) 2017-02-22 19:36:57 +01:00
Laurent Destailleur
bab4f5c185 Removed useless library FPDFI. 2017-02-22 18:00:34 +01:00
Laurent Destailleur
92d9eb3c5d Several fix for a better management of #6424 2017-02-22 17:46:54 +01:00
BENKE Charlie
55070ab907 Add selectform for frst recur option (better usage) 2017-02-22 16:51:30 +01:00
BENKE Charlie
299551f851 inverted value between FRST & RECUR 2017-02-22 15:59:10 +01:00
Laurent Destailleur
24c2675705 Merge pull request #6424 from atm-florian/dev_can_send_to_multiple_email
NEW : Can send email to multiple destinaries from mail form
2017-02-22 14:39:35 +01:00
Laurent Destailleur
485bbe3336 Merge pull request #6441 from atm-arnaud/NEW_pdf_supplier_payment
NEW pdf supplier payment
2017-02-22 14:21:00 +01:00
Laurent Destailleur
a0fb53d5b1 Merge branch 'develop' into NEW_pdf_supplier_payment 2017-02-22 14:20:47 +01:00
Laurent Destailleur
3f3b82ed64 Merge pull request #6454 from atm-florian/dev_fix_unittrad
fix unit trad
2017-02-22 14:16:28 +01:00
Alexandre SPANGARO
942b58efaf New : Integration of Stripe 2017-02-22 06:33:52 +01:00
Laurent Destailleur
86c399db70 Clean admin menu entries 2017-02-22 02:32:35 +01:00
Laurent Destailleur
d5bb208957 Clean admin menu entries 2017-02-22 02:19:50 +01:00
Laurent Destailleur
1681445427 Remove useless line 2017-02-22 00:08:25 +01:00
florian HENRY
c8de648924 fix unit trad 2017-02-21 19:07:57 +01:00
Laurent Destailleur
19e60f03b9 Add MAIN_SEARCH_FORM_ON_HOME_AREAS to disable useless search forms 2017-02-21 14:17:44 +01:00
Laurent Destailleur
7ab600781d NEW Move login information on home page into a widget 2017-02-21 11:57:52 +01:00
Laurent Destailleur
992f292a05 Translation 2017-02-21 10:59:49 +01:00
Laurent Destailleur
eef3824f8c Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/accountancy/admin/categories.php
	htdocs/admin/dict.php
	htdocs/langs/de_DE/bills.lang
	htdocs/langs/en_US/main.lang
	htdocs/langs/fr_FR/bills.lang
2017-02-21 10:34:52 +01:00
Alexandre SPANGARO
1401e9267b [FP17] Modify menu for multijournal 2017-02-21 07:09:58 +01:00
Alexis ALGOUD
4a97864d23 change for tms 2017-02-20 15:54:02 +01:00
Alexis ALGOUD
07d6bbf835 change for tms 2017-02-20 15:53:43 +01:00
arnaud
842859c394 FIX travis bis 2017-02-20 10:16:28 +01:00
arnaud
26b8112d4e FIX travis check 2017-02-20 09:22:57 +01:00
Laurent Destailleur
2dbae7b808 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-02-17 17:14:00 +01:00
Laurent Destailleur
fd111cb1c6 NEW tooltip can be on hover or on click with textwithpicto function. 2017-02-17 17:11:14 +01:00
arnaud
951ea51285 FIX translate model admin 2017-02-17 16:44:57 +01:00
arnaud
4ec664029d Merge branch 'develop' of github.com:Dolibarr/dolibarr into NEW_pdf_supplier_payment 2017-02-17 16:40:14 +01:00
arnaud
fc0abe659a NEW PDF with numbertoword 2017-02-17 16:39:36 +01:00
Laurent Destailleur
49afc83a7f Merge pull request #6437 from defrance/patch-80
"Preview" not translated
2017-02-17 13:28:29 +01:00
Laurent Destailleur
1f156c1716 Merge pull request #6436 from defrance/patch-79
on list, preview tooltip is not displayed correctly
2017-02-17 13:27:31 +01:00
florian HENRY
f7e1927b43 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into dev_replace_extrefield_checkboxByMultiSelect 2017-02-17 13:25:19 +01:00
florian HENRY
4521a5d7e0 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into dev_NEW_copyeventfiles 2017-02-17 13:24:48 +01:00
florian HENRY
4836fa8f76 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into dev_can_send_to_multiple_email 2017-02-17 13:24:06 +01:00
Laurent Destailleur
87cbbadeed Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-02-17 13:11:51 +01:00
Laurent Destailleur
8d03f86f45 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-02-17 13:10:46 +01:00
Laurent Destailleur
10ccb91515 Merge pull request #6432 from defrance/patch-75
Accounting code not display on tooltip
2017-02-17 12:51:19 +01:00
BENKE Charlie
e4ede5aef3 "Preview" not translated 2017-02-17 12:32:06 +01:00
BENKE Charlie
b94312162e on list, preview tooltip is not displayed correctly
it's a problem of alignment, the tooltip is cut by the left part on list (ex : comm/propal/list.php)
think we can do better
2017-02-17 12:05:24 +01:00
BENKE Charlie
90770a1f23 Accounting code not display on tooltip 2017-02-17 10:47:29 +01:00
Laurent Destailleur
0e5cd3c257 Merge pull request #6422 from defrance/patch-74
contact email not display on tooltip
2017-02-17 10:34:10 +01:00
Laurent Destailleur
24d2e22ceb Merge pull request #6417 from a-schild/develop
Use correct numeric format for amounts in accountancy balance
2017-02-17 10:20:41 +01:00
Laurent Destailleur
0bc73cfb3f Merge pull request #6421 from defrance/patch-73
$usemargins not used on global
2017-02-17 10:19:10 +01:00
Laurent Destailleur
498473715e Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-02-17 01:48:43 +01:00
Laurent Destailleur
ec962f13fa CSS enhancement 2017-02-17 00:59:00 +01:00
Laurent Destailleur
afa5ef2913 NEW Introduce fields that can be computed during export in export
profiles.
2017-02-17 00:19:28 +01:00
Laurent Destailleur
c3d78bf1b4 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/admin/tools/update.php
2017-02-16 22:09:37 +01:00
Laurent Destailleur
a1ba4aa941 NEW: No external check of version without explicit click in about page. 2017-02-16 02:27:07 +01:00
Alexandre SPANGARO
c06aedc54d [FP17] : Add data in llx_accountancy_journal 2017-02-15 20:55:52 +01:00
Laurent Destailleur
3803330701 NEW Add option PROJECT_THIRDPARTY_REQUIRED 2017-02-15 18:09:45 +01:00
florian HENRY
a98e5b7290 fix syntax 2017-02-15 11:46:36 +01:00
florian HENRY
5ec01b3175 NEW : Can send email to multiple destinaries from mailform 2017-02-15 11:41:09 +01:00
florian HENRY
a26081d352 Merge branch 'develop' of local repository into dev_replace_extrefield_checkboxByMultiSelect 2017-02-15 09:10:49 +01:00
florian HENRY
e61da5d833 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into dev_NEW_copyeventfiles 2017-02-15 09:10:13 +01:00
BENKE Charlie
692dd0b5db contact email not display on tooltip
field not initialised
2017-02-15 01:22:20 +01:00
BENKE Charlie
a12a094172 $usemargins not used on global
because it's defined on the tpl file (line 42)
2017-02-15 01:11:25 +01:00
Laurent Destailleur
eb70d6eea1 Debug of feature for browser notifications 2017-02-14 18:20:01 +01:00
arnaud
977c18513d FIX pdf supplier payment work 2017-02-14 12:00:56 +01:00
Laurent Destailleur
5de0d81dff Can force option according to country 2017-02-13 10:59:33 +01:00
a-schild
89c80a45c2 Use correct numeric format for all soldes 2017-02-13 09:34:35 +01:00
a-schild
4a19c14034 Use correct numeric format for all soldes 2017-02-13 09:33:01 +01:00
a-schild
7ba87d39fb Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop
# Conflicts:
#	htdocs/fourn/facture/impayees.php
#	htdocs/fourn/facture/paiement.php
#	htdocs/langs/de_DE/bills.lang
#	htdocs/langs/en_US/bills.lang
2017-02-13 09:21:57 +01:00
Laurent Destailleur
868f2e5473 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/admin/tools/update.php
	htdocs/core/lib/functions.lib.php
2017-02-13 01:36:02 +01:00
Laurent Destailleur
cda301f6b7 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-02-12 20:51:52 +01:00
Laurent Destailleur
d4fd9bd71e Merge pull request #6414 from laudeco/fix/dictionnary_without_rowid
[FIX] Dictionaries without rowid
2017-02-12 20:46:43 +01:00
Laurent Destailleur
1dca3471db Merge pull request #6409 from IonAgorria/supplierorder-oldline
FIX: Fill oldline in supplier order updateline
2017-02-12 20:45:20 +01:00
Laurent Destailleur
b11f71386d Merge pull request #6412 from laudeco/feature/fix_card_page_generator
fix the card page generator
2017-02-12 20:43:30 +01:00
Laurent Destailleur
658330b971 Merge pull request #6408 from gnovaro/patch-6
Code style
2017-02-12 20:41:55 +01:00
Laurent Destailleur
38ab06984f Merge pull request #6407 from gnovaro/patch-5
Code style
2017-02-12 20:41:15 +01:00
Laurent Destailleur
953f737134 Merge pull request #6406 from gnovaro/patch-4
Code style
2017-02-12 20:40:44 +01:00
Laurent Destailleur
a8c5ba2983 Fix php7 error 2017-02-12 20:40:20 +01:00
Laurent Destailleur
2801c6e009 Merge pull request #6405 from gnovaro/patch-3
Move php values to js call
2017-02-12 20:36:04 +01:00
Laurent Destailleur
5233b8c87f Fix support for option MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES 2017-02-12 18:38:24 +01:00
Laurent Destailleur
05c9f57fd4 Move edition of emails templates out of dictionaries so we would be able
to have templates per user (not reserved to admin).
2017-02-12 18:13:49 +01:00
Laurent Destailleur
f34e0b1bdb NEW Can deploy an external module from the module setup area. 2017-02-11 15:41:01 +01:00
Laurent Destailleur
3fa19f84e3 FIX the dolCopyDir fails if target dir does not exists. 2017-02-11 15:40:25 +01:00
Laurent Destailleur
4723eac227 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-02-11 13:56:39 +01:00
Laurent Destailleur
f5569ee890 Add tasktime_task_duration_sec tag in odt substitution 2017-02-11 13:50:30 +01:00
Laurent Destailleur
d72e5a3646 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-02-10 17:34:23 +01:00
arnaud
4230b075c2 INIT pdf supplier payment 2017-02-10 17:28:00 +01:00
Laurent Destailleur
97eebe164c Better translation 2017-02-10 17:09:56 +01:00
Laurent Destailleur
44ab6ad9b7 NEW Can control constants values into file integrity checker 2017-02-10 17:05:45 +01:00
De Coninck Laurent
4fb4bc6f6c [FIX] Dictionnaries without rowid
It's possible to create a dictionnary without the key rowid.
But in that case it's impossible to enable/disable the value because the dictionnary fonctionality uses always rowid even another primary key is defined.

By this fix, the id property uses is the primary key defined on the dictionnary creation.
2017-02-10 10:29:08 +01:00
Laurent Destailleur
2184eabe2f Fix english 2017-02-09 22:02:37 +01:00
phf
579d350599 Fix keep the standard behaviour 2017-02-09 17:41:06 +01:00
Laurent Destailleur
7dddba3e39 Add octicons 2017-02-09 14:42:15 +01:00
De Coninck Laurent
fa527ff4eb fix the card page generator 2017-02-09 13:10:32 +01:00
Laurent Destailleur
488d68113d Add total in the file integrity checker 2017-02-09 12:56:39 +01:00
Laurent Destailleur
6f3f0a826f Fix pad files 2017-02-09 11:24:01 +01:00
Laurent Destailleur
56d7fe1bf6 Pad files with https 2017-02-09 10:23:44 +01:00
Laurent Destailleur
767e842c68 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-02-09 01:08:17 +01:00
Laurent Destailleur
fbe0b13706 Add parameter to set the url to use for the file integrity checker 2017-02-09 01:07:54 +01:00
Gustavo Novaro
febe95cd2e $db attributte now be protected 2017-02-08 20:27:14 -03:00
Gustavo Novaro
f8a6d60fe5 $db attibute now be protected. 2017-02-08 20:24:20 -03:00
Ion
2418754d71 Fill oldline in supplier order updateline 2017-02-08 23:27:58 +01:00
Gustavo Novaro
a8c5661cb7 Code style
Set public and private
2017-02-08 17:36:04 -03:00
Gustavo Novaro
e053308c6f Code style
var to public
2017-02-08 17:24:11 -03:00
Gustavo Novaro
5a7c20e897 Code style
var to public
2017-02-08 17:13:54 -03:00
Gustavo Novaro
8d00297509 Move php values to js call
Not inside js declaration
2017-02-08 16:11:31 -03:00
Laurent Destailleur
5d94c8ddac Merge pull request #6403 from laudeco/feature/expense_report_wrong_placement
[FIX] - Expense report on multiple page
2017-02-08 19:34:16 +01:00
Laurent Destailleur
8ba544fba5 Merge pull request #6402 from laudeco/bugfix/er_fix_access_to_note
[FIX] Expense report, fix access to notes from list
2017-02-08 19:25:27 +01:00
Laurent Destailleur
ad361d6d45 Merge pull request #6394 from aspangaro/6.0-fiscalyear
[FP17] Accountancy - Prepare fiscal year
2017-02-08 19:25:02 +01:00
Laurent Destailleur
4d16540207 Merge pull request #6393 from aspangaro/6.0-export
NEW : [FP17] Accountancy - Add export of charts of accounts
2017-02-08 19:22:26 +01:00
Laurent Destailleur
88e2ee8492 Merge pull request #6401 from IonAgorria/syslog-delay
NEW: Show delay in syslog
2017-02-08 19:21:10 +01:00
De Coninck Laurent
439bda053d fix correct url for expense report note in expense report list 2017-02-08 19:18:16 +01:00
De Coninck Laurent
a042c30b28 fix nex line 2017-02-08 19:00:48 +01:00
Ion
22b85b3aba Show delay in syslog 2017-02-08 17:30:51 +01:00
Laurent Destailleur
596c092ec8 Merge pull request #6219 from atm-florian/dev_changelistchild
NEW : Allow extrafields list select to be dependands on other standard list and not only other extrafields list
2017-02-08 16:49:18 +01:00
Laurent Destailleur
f4e64685e8 Merge pull request #6397 from apachler/develop
added additional payment terms often needed in Austria
2017-02-08 16:47:40 +01:00
Laurent Destailleur
072fa9987b Update 4.0.0-5.0.0.sql 2017-02-08 16:47:27 +01:00
Laurent Destailleur
6fef6ac2fb Optimize code and performance of module variant 2017-02-08 14:07:54 +01:00
Andreas Pachler
c45b40075d fixed typos 2017-02-08 12:55:03 +01:00
Laurent Destailleur
d5b10a18b7 Debug module variant 2017-02-08 12:52:31 +01:00
Andreas Pachler
ae3ace7e94 added additional payment terms often needed in Austria 2017-02-08 12:46:42 +01:00
Laurent Destailleur
e1a6e6e4ab Rename "attributes" into "variants" to avoid confusion with extrafields 2017-02-08 12:37:38 +01:00
Laurent Destailleur
b24f244f67 Merge pull request #5533 from marcosgdf/prod-attr
Feature Request: NEW Added product attributes feature
2017-02-08 11:20:33 +01:00
Laurent Destailleur
b611c5ca53 Merge pull request #6054 from atm-gauthier/develop_NEW_reduc_on_excess_received
NEW Develop new reduc on excess received
2017-02-08 11:16:10 +01:00
Laurent Destailleur
b250485efd Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-02-08 11:00:19 +01:00
Laurent Destailleur
31c3398b7f Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/admin/modules.php
2017-02-08 10:59:05 +01:00
Laurent Destailleur
775cd8ca7d Merge pull request #6391 from ParisLiakos/develop
Wrong trigger when setting supplier invoice back to draft
2017-02-08 10:55:42 +01:00
Laurent Destailleur
c4b95e6509 Merge pull request #6395 from atm-florian/develop
Fix travis for php 7
2017-02-08 09:58:54 +01:00
De Coninck Laurent
49e6192e62 fix the type width column and the nextY 2017-02-08 09:23:15 +01:00
florian HENRY
7fcf598c78 Fix travis 2017-02-08 08:52:58 +01:00
Alexandre SPANGARO
4126dcff03 [FP17] Accountancy - Prepare fiscal year for a better complete accountancy. For the moment, remove function to update status and delete a fiscal year. Need controls and a specific function to block lines in the book keeping if the fiscal year is closed. 2017-02-08 06:51:42 +01:00
Alexandre SPANGARO
e4fc52497e New : [FP17] Accountancy - Add export of charts of accounts 2017-02-08 06:18:56 +01:00
Paris Liakos
9a141f8556 Wrong trigger when setting supplier invoice back to draft 2017-02-07 20:55:40 +02:00
phf
6b20bad847 add fixme 2017-02-07 11:14:27 +01:00
phf
0f421dc2b4 New global conf MAIN_DEPOSIT_MULTI_TVA to manage multi tva on deposit 2017-02-07 11:09:18 +01:00
Laurent Destailleur
e58743ea5b Fix regression: Textarea to enter data was crushed. 2017-02-07 01:13:04 +01:00
Laurent Destailleur
aa573b6dba git push origin developMerge branch 'atm-geoffrey-new_link_weather_board' into develop 2017-02-06 20:52:09 +01:00
Laurent Destailleur
ce067f9130 Merge branch 'new_link_weather_board' of
https://github.com/atm-geoffrey/dolibarr into
atm-geoffrey-new_link_weather_board

Conflicts:
	htdocs/comm/propal/class/propal.class.php
	htdocs/index.php
2017-02-06 20:51:46 +01:00
Laurent Destailleur
fcbc12ce31 Merge pull request #6344 from atm-ph/new_link_movement_stock_to_project
New link movement stock to project
2017-02-06 20:45:04 +01:00
Laurent Destailleur
aa1c14e508 Remove change of PMP when we should not 2017-02-06 20:43:44 +01:00
Laurent Destailleur
b3e6b95714 Merge pull request #6377 from marcosgdf/fr-2763
NEW #2763 Go to document block after clicking in Generate document button
2017-02-06 20:38:36 +01:00
Laurent Destailleur
8f52a34e71 Report of supplier payment is name "supplier_payments" 2017-02-06 20:37:42 +01:00
Laurent Destailleur
a4bbcd866b Merge pull request #6372 from atm-arnaud/NEW_supplier_paiements_report
NEW Add supplier paiements report
2017-02-06 20:29:42 +01:00
Laurent Destailleur
d230883638 Merge pull request #6367 from gnovaro/patch-2
Code style
2017-02-06 20:25:16 +01:00
Laurent Destailleur
74992ee53f Merge pull request #6375 from marcosgdf/admin-view
Little improvements to admin pages where a FREE_TEXT or a watermark constant was set
2017-02-06 20:11:22 +01:00
Laurent Destailleur
9220a638b5 NEW Filechecker can include custom dir and report added files. 2017-02-06 15:29:07 +01:00
Laurent Destailleur
a673afe601 NEW Description of feature of a module into a dedicated popup 2017-02-04 14:16:17 +01:00
Laurent Destailleur
f9c510f4fb More complete translation 2017-02-04 11:34:29 +01:00
Laurent Destailleur
6450154553 Removed useless table-tr-td 2017-02-04 11:32:26 +01:00
Laurent Destailleur
f75bd1ac44 Doxygen for javascript functions file. 2017-02-04 11:02:10 +01:00
Marcos García de La Fuente
62a0c5be73 Little correction 2017-02-03 20:12:26 +01:00
Marcos García de La Fuente
2dfced366e NEW #2763 Go to document block after clicking in Generate document button
Close #2763
2017-02-03 20:11:06 +01:00
Marcos García de La Fuente
a94a951a89 Little improvements to admin pages where a FREE_TEXT or a watermark constant was set 2017-02-03 19:38:33 +01:00
Laurent Destailleur
d03f804025 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-02-03 17:00:51 +01:00
arnaud
7f6ab748c5 NEW add rapport file for supplier paiement 2017-02-03 16:42:06 +01:00
arnaud
6d3e43ddaf NEW Report page and menu for suppliers paiements 2017-02-03 16:34:14 +01:00
Laurent Destailleur
10353d1e1a Merge pull request #6370 from defrance/patch-72
FIX : $resaction not used in all case in hookmanager
2017-02-03 16:09:19 +01:00
Laurent Destailleur
3a649590f1 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-02-03 16:02:54 +01:00
Laurent Destailleur
ffedf1fd57 New demo page 2017-02-03 16:02:37 +01:00
Laurent Destailleur
1dd62c7daf New demo page 2017-02-03 16:01:06 +01:00
Laurent Destailleur
e232a5a444 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-02-03 15:36:05 +01:00
Laurent Destailleur
bda915c63a Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-02-03 15:34:59 +01:00
Laurent Destailleur
a0251a262a The demo has its own CSS file. 2017-02-03 15:34:09 +01:00
Laurent Destailleur
bd812a0bef NEW new demo entry page 2017-02-03 14:48:16 +01:00
Laurent Destailleur
bc43a052f4 Default usage to send token is header. 2017-02-03 12:16:13 +01:00
BENKE Charlie
3f236b1ebf FIX : $resaction not used in all case
Please integrate on next 5.0
2017-02-03 12:14:29 +01:00
Laurent Destailleur
53661e1e4f Merge pull request #6211 from GPCsolutions/optimizetranslate
[Qual] Optimize language file loading
2017-02-03 11:55:29 +01:00
Laurent Destailleur
9d3c774163 Merge pull request #6364 from atm-ph/new_trigger_in_expensereport_class
NEW add triggers for expensereport object
2017-02-03 11:46:59 +01:00
Laurent Destailleur
3dea950c24 Merge pull request #6355 from atm-ph/new_alternate_htmlid_select_project
New htmlid can be use instead of htmlname for select projects
2017-02-03 11:44:54 +01:00
florian HENRY
dccddf5c7e NEW : change render extrafields checkbox list for multiselectarray 2017-02-03 09:25:26 +01:00
Laurent Destailleur
bdca134e99 NEW Change to allow a specific numbering rule for invoice with POS
module.
2017-02-02 23:49:17 +01:00
Laurent Destailleur
a42ad74a37 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-02-02 23:22:34 +01:00
Laurent Destailleur
b4c97e2279 Update pad files 2017-02-02 23:14:51 +01:00
Gustavo Novaro
f815d1bed3 Code style 2017-02-02 17:30:06 -03:00
atm-ph
ac20a1a874 Fix remove param htmlid in ajax_combobox 2017-02-02 20:47:45 +01:00
Marcos García de La Fuente
d06fb423c0 Merge branch 'develop' into prod-attr
# Conflicts:
#	htdocs/core/class/html.form.class.php
#	htdocs/fourn/commande/card.php
#	htdocs/fourn/facture/card.php
#	htdocs/langs/en_US/products.lang
2017-02-02 20:07:41 +01:00
phf
f2fdee0ed2 New add trigger for expensereport object 2017-02-02 11:42:38 +01:00
Laurent Destailleur
64da0e77d5 Merge pull request #6358 from defrance/patch-71
FIX : fill fourn remise percent with select product mode
2017-02-02 02:27:35 +01:00
Laurent Destailleur
cd6f5fb8cb Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-02-02 02:26:09 +01:00
Laurent Destailleur
13f37b2cb9 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-02-02 02:25:49 +01:00
Laurent Destailleur
672e81d466 Merge pull request #6352 from philippe-opendsi/develop
NEW Option to reload supplier order and invoice create  page
2017-02-02 01:23:53 +01:00
Laurent Destailleur
9d797f59a1 Merge pull request #6345 from marcosgdf/bug-4758
FIX #4758 PHP warning when installing to PostgreSQL with incorrect credentials
2017-02-02 01:09:23 +01:00
Laurent Destailleur
4e43a815d1 Merge pull request #6359 from aspangaro/6.0-3
Fix : [FP17] Correct some problems on category accounting account page
2017-02-02 01:02:49 +01:00
Laurent Destailleur
f15295d4bc Merge pull request #6350 from aspangaro/6.0-chartofaccounts
New : [FP17] Accountancy - Add select field in list of accounts
2017-02-02 01:02:30 +01:00
Laurent Destailleur
c3fb559d3b Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/core/modules/modProduct.class.php
2017-02-01 20:58:17 +01:00
Laurent Destailleur
d945a0de92 NEW Uniformize behaviour: Action to make order is an action button. 2017-02-01 14:59:51 +01:00
aspangaro
2ce4ba99fe Fix : [FP17] Correct some fix on category accounting account page 2017-02-01 06:54:01 +01:00
BENKE Charlie
772d862766 Update product.class.php 2017-01-31 23:13:58 +01:00
BENKE Charlie
d84e50d15c get remisepercent of product if select list
when we use the select list of product instead of free search we don't fill the remise
2017-01-31 23:11:16 +01:00
Laurent Destailleur
373f918543 Fix css 2017-01-31 16:14:56 +01:00
Laurent Destailleur
218e49298a Uniformize field names 2017-01-31 14:10:06 +01:00
phf
aea6a8f9ec Fix ( 2017-01-31 14:03:54 +01:00
Laurent Destailleur
4cec071af5 Add tms field 2017-01-31 14:00:53 +01:00
phf
e73c60b526 New htmlid can be use instead of htmlname for select projects 2017-01-31 12:20:45 +01:00
philippe-opendsi
399aea179f New : Option to reload supplier order and invoice to retrieve payment terms & type
Add RELOAD_PAGE_ON_SUPPLIER_CHANGE
2017-01-31 10:15:04 +01:00
aspangaro
e1e2c49d93 NEW : [FP17] Accountancy - Add select field in list of accounts 2017-01-31 06:08:40 +01:00
atm-ph
8e9a9637a0 Fix travis 2017-01-30 21:52:52 +01:00
florian HENRY
a8ffc2fd9a Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into dev_NEW_copyeventfiles 2017-01-30 10:33:25 +01:00
Marcos García de La Fuente
58d77a14af FIX #4758 PHP warning when installing to PostgreSQL with incorrect credentials
Closes #4758
2017-01-29 23:05:20 +01:00
atm-ph
ccad6d6dde New show on project "overview" tab the informations about movements stock 2017-01-29 13:36:33 +01:00
atm-ph
56d75c552d New movement stock can be linked to project 2017-01-29 13:04:06 +01:00
florian HENRY
055a00a338 fix travis 2017-01-27 15:18:12 +01:00
florian HENRY
cb6209de31 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
dev_changelistchild

Conflicts:
	htdocs/core/class/commonobject.class.php
2017-01-27 15:16:28 +01:00
Laurent Destailleur
10bacda820 Prepare migration 5-6 2017-01-27 13:56:16 +01:00
Laurent Destailleur
fcfea4e6d1 Add missing field fk_user_modif 2017-01-27 13:26:31 +01:00
Laurent Destailleur
68711184b3 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-01-27 13:23:41 +01:00
Laurent Destailleur
8d9639cd09 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-01-27 13:23:21 +01:00
Laurent Destailleur
87a74e78b6 Merge pull request #6246 from atm-florian/develop
NEW : supplier invoice : calculation of limit payment date on update
2017-01-27 01:46:43 +01:00
Laurent Destailleur
f919f70096 Merge branch 'develop' into develop 2017-01-27 01:46:21 +01:00
Laurent Destailleur
c48400331f Merge pull request #6157 from atm-ph/new_develop_use_rate_on_document_date
NEW get multicurrency rate from document date (propal, order)
2017-01-27 01:32:52 +01:00
Laurent Destailleur
119d0c3938 Merge pull request #6231 from IonAgorria/mail-lines
#NEW: Add email template for each line in object
2017-01-27 01:30:53 +01:00
Laurent Destailleur
29df2c9115 Merge branch 'develop' into mail-lines 2017-01-27 01:29:58 +01:00
Laurent Destailleur
70091eceed Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/expensereport/card.php
2017-01-27 01:26:11 +01:00
Laurent Destailleur
9f1959ffc8 Fix MVC Actions must be done before output 2017-01-27 01:21:20 +01:00
Laurent Destailleur
105a53b333 Merge pull request #6333 from atm-quentin/Mass_withdrawal_request
NEW Mass withdrawal request
2017-01-27 00:55:16 +01:00
Laurent Destailleur
14c31b451c Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-01-27 00:53:04 +01:00
Laurent Destailleur
3c86507ce6 FIX #6328 2017-01-27 00:51:22 +01:00
Laurent Destailleur
3321d865d7 Merge pull request #6304 from IonAgorria/fix-objelem
NEW: Add supplier order/invoice to elementproperties
2017-01-27 00:34:17 +01:00
Laurent Destailleur
b3901e059d Merge pull request #6331 from defrance/patch-69
PHP7 warning error on $page not affected
2017-01-27 00:26:36 +01:00
Laurent Destailleur
053afe21dd Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/user/class/user.class.php
2017-01-26 23:40:16 +01:00
Laurent Destailleur
c39fcce9f1 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-01-26 10:45:38 +01:00
BENKE Charlie
e73a132ed9 PHP7 warning error on $page not affected 2017-01-25 16:24:12 +01:00
fappels
77cb9032a5 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-01-25 11:25:41 +01:00
florian HENRY
32441d9ee3 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into dev_NEW_copyeventfiles 2017-01-25 11:03:42 +01:00
florian HENRY
13917cebdc Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into dev_changelistchild 2017-01-25 11:02:23 +01:00
florian HENRY
06d9f99d05 fix travis 2017-01-25 11:01:35 +01:00
florian HENRY
dbae39b7b9 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop 2017-01-25 10:34:32 +01:00
Quentin Vial-Gouteyron
94b42021bd fix payment method 2017-01-24 15:15:31 +01:00
Laurent Destailleur
d076ffe73b Use correct thirdparty for numbering module 2017-01-24 15:03:33 +01:00
Laurent Destailleur
f591e2b1b1 FIX Combo list of VAT is wrong on POS 2017-01-24 14:29:05 +01:00
Quentin Vial-Gouteyron
6011c98515 FIX payment method exception 2017-01-24 12:22:23 +01:00
Quentin Vial-Gouteyron
39a92df647 Massive withdrawal request 2017-01-24 11:50:07 +01:00
Laurent Destailleur
1878647d26 NEW Add statistics on supplier tab. 2017-01-23 20:54:52 +01:00
florian HENRY
d714a52f95 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
dev_changelistchild

Conflicts:
	htdocs/core/class/commonobject.class.php
2017-01-23 11:35:11 +01:00
Laurent Destailleur
7622d3b2fb Fix missing info admin picto. Fix colspan. 2017-01-23 10:23:24 +01:00
florian HENRY
00ead9d262 Merge branch 'develop' into dev_NEW_copyeventfiles
Conflicts:
	htdocs/core/actions_sendmails.inc.php
2017-01-23 08:33:05 +01:00
florian HENRY
7d7f1bf9ed Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop 2017-01-23 08:30:20 +01:00
Laurent Destailleur
daf40ed573 NEW Direct open of card after a search if on record only found. 2017-01-22 23:35:32 +01:00
Laurent Destailleur
5fd8b1efcb Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-01-22 21:23:35 +01:00
Laurent Destailleur
39151d7a74 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-01-22 12:14:18 +01:00
Laurent Destailleur
8b116259f9 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop

Conflicts:
	htdocs/core/lib/images.lib.php
2017-01-21 21:57:38 +01:00
Laurent Destailleur
5362d10c0d Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/core/class/hookmanager.class.php
2017-01-21 21:56:24 +01:00
Laurent Destailleur
3ab4782d93 Merge pull request #6210 from defrance/patch-64
FIX : prevent error with realpath
2017-01-21 12:36:34 +01:00
Laurent Destailleur
4abbbd963e Merge pull request #6181 from gnovaro/develop
Improve composer installing instructions
2017-01-21 12:33:30 +01:00
Laurent Destailleur
9a5670787f Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-01-21 12:26:50 +01:00
Laurent Destailleur
809e3ce4d5 Debug browser notification 2017-01-20 20:10:16 +01:00
Laurent Destailleur
b602e04fc8 Merge pull request #6272 from simnandez/develop
NEW: Event notifications in browser
2017-01-20 18:14:21 +01:00
Laurent Destailleur
ea97491a8f Merge pull request #6288 from marcosgdf/fr-6280
NEW #6280: Generate PDF after creating an invoice from a customer order
2017-01-20 18:11:47 +01:00
Laurent Destailleur
02c4c21c0a Merge pull request #6267 from gnovaro/develop
Improve code style
2017-01-20 18:11:10 +01:00
Laurent Destailleur
06abcbd4e9 Merge pull request #6305 from IonAgorria/fix-ordtoinv
Fix #6161: supplier order to facture not working
2017-01-20 18:08:55 +01:00
Laurent Destailleur
bf0b5c0666 Merge pull request #6301 from sealeo-org/develop
Fix : script sync members from LDAP
2017-01-20 18:06:23 +01:00
Laurent Destailleur
a250ba5f56 Close #6307 #6306 2017-01-20 17:52:52 +01:00
Juanjo Menent
d7edcdd03c Merge remote-tracking branch 'origin/develop' into develop 2017-01-20 15:56:13 +01:00
Juanjo Menent
2374aa351e Merge remote-tracking branch 'upstream/develop' into develop 2017-01-20 15:55:51 +01:00
Laurent Destailleur
e66aabea85 Fix error in total of tasks 2017-01-20 14:35:18 +01:00
Laurent Destailleur
5b8ff63981 Fix bad value 2017-01-20 14:17:58 +01:00
Laurent Destailleur
6780b20968 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-01-20 14:11:55 +01:00
Laurent Destailleur
94249b7926 NEW Add statistics on tabs 2017-01-20 14:03:07 +01:00
Laurent Destailleur
412be59f78 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/filefunc.inc.php
2017-01-20 12:09:39 +01:00
arnaud
ddbd6c371d MERGE DEGUEU 2017-01-20 11:58:30 +01:00
Ion
4d8df737f3 Fix #6161 supplier order to facture not working 2017-01-20 11:27:11 +01:00
Ion
9270b2c54c Add supplier order/invoice to elementproperties 2017-01-20 10:57:41 +01:00
Speed
32653c1b94 Updated script sync members from LDAP
Replace "Cotisation" class with its new name "Subscription"
2017-01-18 19:38:50 +01:00
Laurent Destailleur
227b616ca3 Fix bad default value 2017-01-18 16:51:42 +01:00
Laurent Destailleur
ed98227303 Merge pull request #6292 from marcosgdf/remove-pdf-create-functions
NEW Removed deprecated pdf_create functions
2017-01-18 16:48:23 +01:00
Laurent Destailleur
562bdbc9f5 Merge pull request #6291 from gnovaro/patch-1
Improve code style
2017-01-18 16:44:56 +01:00
Laurent Destailleur
f2d361d29b Merge pull request #6286 from defrance/patch-68
Add contract default mail (and some old path to order)
2017-01-18 16:41:47 +01:00
Laurent Destailleur
acb2c57f47 Merge pull request #6290 from marcosgdf/little-change-generatedoc
Uniformize code: Little improvement to generateDocument function
2017-01-18 16:38:39 +01:00
Laurent Destailleur
47c37855b1 Merge pull request #6287 from grandoc/develop
update code for next php versions
2017-01-18 16:36:39 +01:00
Laurent Destailleur
d4413d370e Merge pull request #6296 from fmarcet/peru
Fix: Show correct bank account order
2017-01-18 15:56:08 +01:00
Laurent Destailleur
2566df8252 Merge pull request #6298 from benlo06/fix_shipping_contactid
FIX getIdContact for shipping
2017-01-18 15:53:32 +01:00
Laurent Destailleur
9be75ed019 Merge pull request #6299 from bgenere/FIX-c6bd1a7-on-Task-delete
FIX can not delete a task if time spent on it
2017-01-18 15:52:46 +01:00
bgenere
c6bd1a7d7d FIX issue on Task delete
Added a control on time spent so it is not possible to delete a task
where some time spent has already been tracked.
2017-01-18 10:57:18 +01:00
Laurent Destailleur
49fc8129ac NEW Can change customer from POS 2017-01-18 01:37:12 +01:00
Benoit
73852beb4e FIX contactid for shipping pdf 2017-01-17 21:55:21 +01:00
Laurent Destailleur
160f8c3085 Add translation comparison doc 2017-01-17 11:11:32 +01:00
Ferran Marcet
caba4836b3 Fix: Show correct bank account order 2017-01-17 10:13:13 +01:00
Ferran Marcet
819dc44533 Fix: Show correct bank account order 2017-01-17 10:01:59 +01:00
Gustavo Novaro
22a815a1b4 Merge remote-tracking branch 'upstream/develop' into develop 2017-01-17 01:21:44 -03:00
Marcos García de La Fuente
8225b06018 NEW Removed commande_pdf_create, contract_pdf_create,expedition_pdf_create, facture_pdf_create, delivery_order_pdf_create, task_pdf_create, project_pdf_create, propale_pdf_create, supplier_invoice_pdf_create, supplier_order_pdf_create, supplier_proposal_pdf_create deprecated functions 2017-01-16 21:59:02 +01:00
Gustavo Novaro
0f6cb52376 Improve code style
Replace var for public and private.
2017-01-16 17:40:13 -03:00
Marcos García de La Fuente
e0cbcadd98 In case Model for document generation is not defined, the criteria to select the model is now:
1. Model for the object
 2. Custom default module
 3. Hardcoded default module
2017-01-16 21:16:05 +01:00
Marcos García de La Fuente
6dbb3efc89 NEW #6280: Generate PDF after creating an invoice from a customer order
Close #6280
2017-01-16 20:24:26 +01:00
Philippe GRAND
2525a6e3a4 update code for next php versions 2017-01-16 17:24:50 +01:00
BENKE Charlie
c0a8752ef4 Update card.php 2017-01-16 14:17:38 +01:00
BENKE Charlie
e701ea0b2f Add dictionnary mail for contract 2017-01-16 14:06:34 +01:00
Juanjo Menent
9674bdef54 Best directory for img 2017-01-16 13:40:57 +01:00
Juanjo Menent
e232c1c408 Merge remote-tracking branch 'upstream/develop' into develop 2017-01-16 13:37:01 +01:00
Laurent Destailleur
da64d4d398 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-01-16 10:58:45 +01:00
Laurent Destailleur
fafe71ec52 Fix autocalculation of surface and volume. 2017-01-16 10:55:33 +01:00
Laurent Destailleur
1b1bab94ca More complete commit for #6114 2017-01-16 10:43:22 +01:00
Laurent Destailleur
81d76f8600 Merge pull request #6114 from defrance/patch-52
NEW Allow to change heigth and width on product
2017-01-16 10:19:47 +01:00
Laurent Destailleur
41f6d70eaf Merge pull request #6269 from defrance/patch-65
Fix: forgotten translation
2017-01-16 10:18:37 +01:00
Laurent Destailleur
f43b3ebda4 Fix holiday class 2017-01-16 09:30:00 +01:00
Laurent Destailleur
6a79a80320 Reenable php 7.1 2017-01-16 08:50:17 +01:00
Laurent Destailleur
6bfd534a36 NEW PHP 7.1 compatibility 2017-01-16 01:21:33 +01:00
Laurent Destailleur
9d72f1df62 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-01-16 01:12:11 +01:00
Laurent Destailleur
94a180a775 Fix POO best practice 2017-01-16 00:54:08 +01:00
Laurent Destailleur
9c1895a03a Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-01-16 00:49:19 +01:00
Laurent Destailleur
846e827e09 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-01-16 00:49:11 +01:00
Laurent Destailleur
0bac99028e Merge pull request #6276 from aljawaid/develop
Fix: Add Missing Translation String
2017-01-16 00:43:00 +01:00
Laurent Destailleur
d95ac3bbdd Fix warning 2017-01-16 00:16:20 +01:00
Laurent Destailleur
4ecd657f34 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-01-16 00:02:43 +01:00
Laurent Destailleur
7bccaff28a Fix remove warnings 2017-01-15 23:32:14 +01:00
Juanjo Menent
58c25a68a8 NEW: Event notifications in browser 2017-01-15 18:48:32 +01:00
IJ
79714f7ede Merge pull request #2 from aljawaid/aljawaid-patch-4
Fix: Add Missing Translation String
2017-01-15 11:06:51 +00:00
IJ
d5120ae7cc Fix: Add Missing Translation String
When product batch module is disabled, the translation string is missing for dispatch line.
2017-01-15 11:04:32 +00:00
Marcos García de La Fuente
d09a3628c5 Merge branch 'develop' into prod-attr
# Conflicts:
#	htdocs/compta/facture.php
2017-01-14 23:59:14 +01:00
Juanjo Menent
d18c8e3a14 NEW: Event notifications in browser 2017-01-14 01:25:33 +01:00
Juanjo Menent
3a40d5a4f1 NEW: Events notifications in browser 2017-01-13 16:13:01 +01:00
Juanjo Menent
6cc3ef0c99 NEW: Events notifications in browser 2017-01-13 16:08:49 +01:00
BENKE Charlie
6014314610 forgotten translation
translation lefted on last 5.RC version
2017-01-13 09:05:10 +01:00
Laurent Destailleur
c3e5e0dd3f Update doc 2017-01-12 21:50:35 +01:00
Gustavo Novaro
751aa2a2aa Improve code style 2017-01-12 12:11:45 -03:00
BENKE Charlie
972a31ebe9 Update images.lib.php
in fact $dir is not used in the function
2017-01-12 16:03:07 +01:00
Laurent Destailleur
4349eac7ea Merge pull request #6225 from aspangaro/5.0-18
Expense report - Better presentation - return lines order by date
2017-01-12 11:37:31 +01:00
Laurent Destailleur
9671810d13 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-01-12 11:33:25 +01:00
Laurent Destailleur
2c6672d17a Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/core/tpl/login.tpl.php
2017-01-12 11:32:51 +01:00
Laurent Destailleur
b28ba7a5ff Merge pull request #6252 from gnovaro/develop
Improve cashdesk code style. Ticket now have ticket.css file
2017-01-12 11:31:51 +01:00
Laurent Destailleur
32a3f74ea1 Merge pull request #6108 from defrance/patch-51
NEW Can send contract by mail from contract card
2017-01-12 11:26:44 +01:00
Laurent Destailleur
4d134a4a4e Merge pull request #6085 from defrance/patch-49
NEW Extend option PDF_HIDE_PRODUCT_REF_IN_SUPPLIER_LINES to change supplier ref display mode in PDF
2017-01-12 11:19:54 +01:00
Laurent Destailleur
25dcb10c1d Merge pull request #6066 from atm-florian/dev_exportthirdparty
NEW : Can export thirdparty with sale representative that is a subordinate (Need hidden option SOCIETE_EXPORT_SUBORDINATES_CHILDS)
2017-01-12 11:17:15 +01:00
Laurent Destailleur
0548e9cc4e Merge pull request #6226 from aspangaro/5.0-19
NEW Expense report now send email on different validatin steps (Remove DEPLACEMENT_TO_CLEAN)
2017-01-12 11:15:14 +01:00
Laurent Destailleur
64b932f78c Merge pull request #6261 from GPCsolutions/travis-php7.1
[Qual] Add PHP 7.1 to Travis test matrix
2017-01-12 11:12:25 +01:00
Laurent Destailleur
97f71d33ce Merge pull request #6263 from aspangaro/6.0-1
New : Loan - Edit mode more complete
2017-01-12 10:35:42 +01:00
Laurent Destailleur
29a8c8105e Merge pull request #6258 from aljawaid/patch-1
Fix: User-friendly Tooltip
2017-01-12 10:12:51 +01:00
Laurent Destailleur
14fb01da11 Merge pull request #6250 from gnovaro/patch-6
Bug: Fix missing ,
2017-01-12 10:06:01 +01:00
aspangaro
9154843c1b Merge remote-tracking branch 'Upstream/develop' into 5.0-24
Conflicts:
	htdocs/loan/card.php
2017-01-11 05:25:57 +01:00
aspangaro
dcae6e644d New : Loan - Add control and edit mode more complete 2017-01-11 05:12:48 +01:00
Raphaël Doursenaud
0f89fa2b11 [Qual] Add PHP 7.1 to Travis test matrix 2017-01-10 11:44:21 +01:00
Laurent Destailleur
5c233a41b3 NEW Add hook "formatNotificationMessage" 2017-01-09 23:55:53 +01:00
Laurent Destailleur
93ab224614 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-01-09 23:33:36 +01:00
Laurent Destailleur
c4ff1f983c Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-01-09 23:32:36 +01:00
florian HENRY
232cacab80 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop 2017-01-09 16:51:54 +01:00
IJ
635abe58be User-friendly tooltip 2017-01-09 10:14:11 +00:00
Alexis Algoud
65b956b011 NEW sql for inventory 2017-01-09 10:33:33 +01:00
Alexis Algoud
8b4a43ec77 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into NEW_inventory_coreobject_listview 2017-01-09 10:31:05 +01:00
Laurent Destailleur
c9cce66d98 Merge remote-tracking branch 'origin/5.0' into develop 2017-01-09 10:25:05 +01:00
Laurent Destailleur
52666ea971 Merge remote-tracking branch 'origin/5.0' into develop 2017-01-09 10:22:20 +01:00
Laurent Destailleur
fd008f88b1 Add github tools 2017-01-09 10:21:59 +01:00
Gustavo Novaro
2248429eda Improve cashdesk code style. Ticket now have ticket.css file 2017-01-08 04:57:47 -03:00
Gustavo Novaro
3e77fed815 Fix missing , 2017-01-08 01:59:04 -03:00
Laurent Destailleur
8e615a83e5 Better tooltip 2017-01-08 01:07:28 +01:00
Laurent Destailleur
785b2d46b3 FIX Accept spaces around the | criteria 2017-01-08 01:00:47 +01:00
Laurent Destailleur
163ee094ec Revert "FIX Accept spaces around the | criteria"
This reverts commit df9121d6fa.
2017-01-07 21:46:26 +01:00
Laurent Destailleur
5446ff667a Fix translation 2017-01-07 21:33:23 +01:00
Laurent Destailleur
df9121d6fa FIX Accept spaces around the | criteria 2017-01-07 21:33:13 +01:00
Laurent Destailleur
1b3af1df07 More space between text 2017-01-07 21:03:45 +01:00
Laurent Destailleur
f00f3101d9 Merge pull request #6013 from aljawaid/develop
NEW: Make Top Menu Entries Independent Translation Strings
2017-01-07 20:45:44 +01:00
Laurent Destailleur
51b9802de4 NEW Hook to allow inserting custom product head #6001 2017-01-07 20:42:35 +01:00
Laurent Destailleur
4c4aeba855 Fix project on loans 2017-01-07 17:54:47 +01:00
Laurent Destailleur
d23aa8ef3c git push origin developMerge branch 'Franck-MOREAU-develop' into develop 2017-01-07 17:45:50 +01:00
Laurent Destailleur
e9853f3cd7 Merge branch 'develop' of https://github.com/Franck-MOREAU/dolibarr into
Franck-MOREAU-develop

Conflicts:
	htdocs/core/lib/functions.lib.php
	htdocs/install/mysql/migration/4.0.0-5.0.0.sql
	htdocs/loan/card.php
	htdocs/loan/class/loan.class.php
	htdocs/projet/element.php
2017-01-07 17:45:05 +01:00
Laurent Destailleur
1d291ee0e8 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-01-07 17:07:29 +01:00
arnaud
b813144edb NEW generation ODT 2017-01-06 16:44:09 +01:00
florian HENRY
c8c78dc9cf Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop 2017-01-06 14:48:05 +01:00
florian HENRY
c4f0433805 fix date echance 2017-01-06 14:47:57 +01:00
Laurent Destailleur
e57f834434 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/filefunc.inc.php
2017-01-04 17:06:02 +01:00
Alexis Algoud
370be70e46 Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into NEW_inventory_coreobject_listview 2017-01-03 16:30:50 +01:00
Laurent Destailleur
4907f9581f Fix warning 2017-01-03 11:35:07 +01:00
Laurent Destailleur
27c056d377 Avoid duplicate function error 2017-01-03 11:30:27 +01:00
Laurent Destailleur
febd23fe41 Clean dead code 2017-01-03 11:22:03 +01:00
Laurent Destailleur
728dd3f7b3 Add field ref into ecm_files table. 2017-01-03 11:06:24 +01:00
Laurent Destailleur
7aad6683fa Add cast to remove scrutinizer warning 2017-01-03 10:50:37 +01:00
Laurent Destailleur
c27a1c1705 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-01-03 01:34:46 +01:00
Laurent Destailleur
598e559563 Fix migration 2017-01-02 19:30:12 +01:00
Laurent Destailleur
afe5c6b296 Fix migration 2017-01-02 18:44:11 +01:00
Laurent Destailleur
c04c62e62c Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-01-02 18:40:51 +01:00
Laurent Destailleur
f023d6485f Prepare 6.0 dev 2017-01-02 18:39:55 +01:00
Laurent Destailleur
67c513a9c1 Prepare 6.0 dev 2017-01-02 18:38:22 +01:00
Ion Agorria
522fb4cf7a Add email template for each line in object 2016-12-31 17:39:01 +01:00
Laurent Destailleur
d3176ec0ed Merge pull request #6223 from gnovaro/patch-5
var to public
2016-12-31 17:27:25 +01:00
Laurent Destailleur
1f2f03c287 Merge pull request #6222 from gnovaro/patch-4
var to public
2016-12-31 17:27:07 +01:00
Laurent Destailleur
70f70c884c Merge pull request #6221 from gnovaro/patch-3
Var to public
2016-12-31 17:26:54 +01:00
Laurent Destailleur
088a948e5a Merge pull request #6220 from gnovaro/patch-2
Var to public
2016-12-31 17:26:40 +01:00
Laurent Destailleur
2c4e8926f8 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop6 2016-12-31 17:24:14 +01:00
Laurent Destailleur
f46ce68d08 NEW Can sort thumbs visible on product card 2016-12-31 16:16:20 +01:00
Laurent Destailleur
f1961b0207 Work on sorting/indexing upload files 2016-12-31 03:43:22 +01:00
Marcos García de La Fuente
154425e2bc Fixed PHP fatal error 2016-12-27 16:13:39 +01:00
Marcos García de La Fuente
47a444b2ab Merge branch 'develop' into prod-attr 2016-12-27 15:54:53 +01:00
aspangaro
4705a87548 Finish work 2016-12-27 14:48:14 +01:00
aspangaro
8a24f2fc91 Work in progress 2016-12-27 08:14:05 +01:00
aspangaro
c21300f0fa Expense report - Remove DEPLACEMENT_TO_CLEAN 2016-12-27 06:45:36 +01:00
aspangaro
e11db44b6d Merge remote-tracking branch 'Upstream/develop' into 5.0-18 2016-12-27 05:49:57 +01:00
aspangaro
1338237d7c Expense report - Better presentation - return list order by date 2016-12-27 05:48:18 +01:00
Laurent Destailleur
b5c815367c Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop6 2016-12-26 15:44:31 +01:00
Marcos García de La Fuente
5669f734b8 Merge branch 'develop' into prod-attr
# Conflicts:
#	htdocs/comm/propal/card.php
#	htdocs/commande/card.php
#	htdocs/compta/facture.php
#	htdocs/core/class/html.form.class.php
#	htdocs/core/tpl/objectline_create.tpl.php
#	htdocs/fourn/commande/card.php
#	htdocs/fourn/facture/card.php
#	htdocs/install/mysql/migration/4.0.0-5.0.0.sql
2016-12-24 21:39:40 +01:00
Gustavo Novaro
e71f216f16 var to public
Improve code style
2016-12-23 14:21:15 -03:00
Gustavo Novaro
191f69ec79 var to public
Improve code style
2016-12-23 14:06:11 -03:00
Gustavo Novaro
76999cf41e Var to public
Improve code style
2016-12-23 12:44:07 -03:00
Gustavo Novaro
3557e4eb37 Var to public 2016-12-23 12:40:13 -03:00
florian HENRY
337897e0a1 NEW : Allow extrafields list select to be dependands on other standard
list and not only other extrafields list
2016-12-23 15:01:49 +01:00
BENKE Charlie
ed5ac9c617 Update images.lib.php 2016-12-23 07:11:35 +01:00
Raphaël Doursenaud
ac92e23b59 [Qual] Optimize language file loading
Using fscanf() and the proper format is about twice as fast as
using fgets() followed by explode() and trim().

This is a small optimization per se but since this code is
called often it yields about 33% rendering time improvement on
the homepage where about 50% of the time is spent on loading the
translation files.
2016-12-23 01:11:50 +01:00
Laurent Destailleur
cfde9e2ec5 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop6 2016-12-22 18:04:13 +01:00
Laurent Destailleur
ba7ca3da6e Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop6

Conflicts:
	htdocs/core/photos_resize.php
	htdocs/install/mysql/data/llx_c_action_trigger.sql
2016-12-22 17:57:42 +01:00
BENKE Charlie
6544175cf2 prevent error with realpath
if some bad caracters are present in the name of file ( ° by exemple)
2016-12-22 16:50:45 +01:00
Laurent Destailleur
26098082d0 NEW Uploaded files are indexed into database 2016-12-20 22:14:27 +01:00
Laurent Destailleur
ed0ffd6f5a NEW Uploaded files are indexed into database 2016-12-20 19:42:25 +01:00
Laurent Destailleur
08449a2d4f Prepare action tracking on products 2016-12-20 12:05:00 +01:00
Gustavo Novaro
6653e2dbe7 Revert "Code refactoring. Improve folder structure. For better project implementation. Most hosting server have a default folder public or public_html insted of htdocs, htdocs is a exclusive folder for apache web server, for example is no the same folder in NGINX."
This reverts commit e91c2c6e77.
2016-12-19 03:42:36 -03:00
Laurent Destailleur
a736f3782c FIX security bugs 2016-12-18 13:21:09 +01:00
Laurent Destailleur
78bf209119 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop6 2016-12-18 02:21:57 +01:00
Alexis Algoud
f0ea610401 change date value 2016-12-16 17:06:05 +01:00
Alexis Algoud
41ddaf5d9b fix but major bug on date name, as to seach a solution 2016-12-16 16:28:10 +01:00
Alexis Algoud
79867a85d0 fix list issue 2016-12-16 16:09:02 +01:00
Alexis Algoud
4d375bcf95 debug translate 2016-12-16 11:31:14 +01:00
Gustavo Novaro
e91c2c6e77 Code refactoring. Improve folder structure. For better project implementation. Most hosting server have a default folder public or public_html insted of htdocs, htdocs is a exclusive folder for apache web server, for example is no the same folder in NGINX. 2016-12-16 03:56:48 -03:00
Alexis Algoud
e65ae08e5c langs 2016-12-15 17:42:14 +01:00
Alexis Algoud
b7a6a71dff move file to core 2016-12-15 17:20:46 +01:00
Alexis Algoud
1596760d21 fix regulate / apply new PMP / add or remove line 2016-12-15 17:02:20 +01:00
Gustavo Novaro
7a6fcc744a Improve composer installing instructions
Add a new section describing how to install composer to manage dependecies, and make a clean install directly from console.
2016-12-15 11:36:42 -03:00
Alexis Algoud
9f6f874655 fix 2016-12-15 12:33:26 +01:00
Alexis Algoud
81b01cd055 fix 2016-12-15 11:23:13 +01:00
Alexis Algoud
703b8708e3 fix create 2016-12-15 10:39:59 +01:00
Alexis Algoud
a463759ba3 init query builder into db 2016-12-14 16:54:05 +01:00
Alexis Algoud
565bcf2332 debug fetch method 2016-12-14 16:11:37 +01:00
Alexis Algoud
a636d27ccb Div 2016-12-14 14:34:12 +01:00
florian HENRY
a99ac7fb6b taking account @eldy remarks 2016-12-13 16:52:49 +01:00
florian HENRY
2f138c0c37 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into dev_exportthirdparty 2016-12-13 16:49:39 +01:00
Alexis Algoud
efc22a4cd8 include default list conception 2016-12-13 09:49:59 +01:00
Alexis Algoud
baf1acb4fd debug 2016-12-13 09:17:43 +01:00
Laurent Destailleur
902169cb66 Can sort on position on list of documents 2016-12-13 00:40:12 +01:00
Laurent Destailleur
e1a5a90f0a NEW Uploaded files are indexed into database 2016-12-13 00:15:21 +01:00
Alexis Algoud
dfb9ae234c debug 2016-12-12 19:03:02 +01:00
Alexis Algoud
cdfbed5d08 new listview 2016-12-12 17:36:22 +01:00
Laurent Destailleur
51eb3726dc Code comment 2016-12-12 15:41:31 +01:00
Laurent Destailleur
bfb628dab6 Code comment 2016-12-12 15:37:39 +01:00
jfefe
b8284447fd API can receive documents 2016-12-12 15:20:44 +01:00
Laurent Destailleur
e26cb0f238 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop6 2016-12-12 13:00:20 +01:00
Alexis Algoud
a7813c37a1 init inventory integration 2016-12-12 12:36:00 +01:00
phf
1db907e2af Fix missing default value for new parameter 2016-12-11 21:15:24 +01:00
phf
f5bffeb535 New get multicurrency rate from document date (propal, order) 2016-12-11 16:30:01 +01:00
BENKE Charlie
b7af046147 Add automated compute 2016-12-11 01:53:33 +01:00
BENKE Charlie
300c91fd7f Update card.php 2016-12-10 13:25:33 +01:00
BENKE Charlie
7c7626e445 allow to change height and width 2016-12-10 13:19:33 +01:00
BENKE Charlie
ba8deb29c9 Update card.php 2016-12-10 12:28:52 +01:00
BENKE Charlie
cbfb7df05e Add send contract by mail 2016-12-10 12:23:02 +01:00
gauthier
ef721bebc6 FIX : break with no iteration 2016-12-09 17:48:03 +01:00
florian HENRY
a797c45e3b sdf 2016-12-09 16:28:06 +01:00
florian HENRY
101afeeb73 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into dev_exportthirdparty 2016-12-09 16:18:36 +01:00
florian HENRY
1e39805945 integrate Eldy remarks 2016-12-09 16:14:43 +01:00
florian HENRY
e48d65120d Merge branch 'develop' of local repository into dev_exportthirdparty 2016-12-09 14:16:37 +01:00
Laurent Destailleur
3396dfc7f6 NEW Index upload files into database. 2016-12-08 22:12:45 +01:00
BENKE Charlie
d86503cb66 additionnal feature on supplier ref display
we have like this 3 mode of display supplier ref
2016-12-05 11:09:47 +01:00
BENKE Charlie
7ab7149e64 just little indenting 2016-12-05 11:03:12 +01:00
florian HENRY
c1652169f2 NEW : Add in export thirdparty for user limit on view thirpdarty to
sales team also to subsidiaries
2016-11-30 16:09:59 +01:00
gauthier
d8aa572ad7 FIX : fetch discount desappeared in develop... 2016-11-28 17:38:20 +01:00
gauthier
34a123759f Merge branch 'NEW_reduc_on_excess_received' of github.com:atm-gauthier/dolibarr into develop_NEW_reduc_on_excess_received 2016-11-28 17:13:35 +01:00
gauthier
9a1309256d Merge branch 'NEW_reduc_on_excess_received' of github.com:atm-gauthier/dolibarr into develop_NEW_reduc_on_excess_received 2016-11-28 17:13:09 +01:00
gauthier
3f6f1ac86f fix : where fk_facture = object id 2016-11-28 17:12:17 +01:00
Marcos García de La Fuente
91be05932e Added missing modAttributes file 2016-11-27 21:50:27 +01:00
Marcos García de La Fuente
cf0ee36150 Merge branch 'develop' into prod-attr
# Conflicts:
#	htdocs/core/class/html.form.class.php
#	htdocs/install/mysql/migration/4.0.0-5.0.0.sql
2016-11-27 18:10:01 +01:00
gauthier
792e12e6c5 FIX : interface 2016-11-25 11:09:15 +01:00
gauthier
c433829d27 NEW : interface 2016-11-25 11:04:42 +01:00
gauthier
480b08bd0b NEW : convert exceiss received to reduc 2016-11-24 15:48:04 +01:00
IJ
1ca40c0d9d Merge pull request #1 from aljawaid/aljawaid-patch-2
New: Add Hidden Options Quick Reference Link
2016-11-22 02:33:29 +00:00
IJ
b631db1d60 New: Add Hidden Options Quick Reference Link
Add the dolibarr wiki link for quick reference from the page Setup>Other Setup
2016-11-22 02:29:25 +00:00
IJ
66693c5268 Update products.lang 2016-11-19 22:42:03 +00:00
IJ
9bb60e8d2c Update agenda.lang 2016-11-19 22:41:35 +00:00
IJ
5a8b844c49 Update other.lang 2016-11-19 22:41:08 +00:00
IJ
d5fe7b8b9c Add Search Tip for User
Add a simple tip on the search strings which could be used by the end user when they are searching from the main search box.
Tested strings are '*' and *|*
This would be very useful to the end user and new users
2016-11-19 12:21:47 +00:00
IJ
6ebafe1a87 Add Translation String for Agenda
Add translation string so it can be used independently for the top menu
2016-11-19 11:32:28 +00:00
IJ
9f28795159 Add Unique Top Menu Translation
Add unique top menu translation for products/services so it can be better translated separately from other words/links using the same text.
** Requires re-enabling module
2016-11-19 11:29:35 +00:00
IJ
5c46095fa3 Add Translation String for Tools
Add translation string so it can be used independently for the top menu
2016-11-19 10:52:30 +00:00
IJ
636fbb476c Add Unique Top Menu Translation
Add unique top menu translation for Tools so it can be better translated separately from other words/links using the same text.
2016-11-19 10:49:12 +00:00
IJ
f96fd895e3 Add Products/Services Menu Translation String
Add the translation string into language file
2016-11-19 10:40:45 +00:00
IJ
86d195fa81 Add Unique Top Menu Translation
Add unique top menu translation for products/services so it can be better translated separately from other words/links using the same text.
2016-11-19 10:37:15 +00:00
IJ
056b76a831 Better Separator for Products/Services in Top Menu
Easier to read when both modules are enabled
2016-11-19 10:34:22 +00:00
florian HENRY
71cff4032c NEW : option to copy into attachement files of events, files send by
mail (with auto event creation)
2016-11-18 16:26:12 +01:00
florian HENRY
44aa601848 again revert to fk_project instead of fk_projet 2016-11-16 11:11:50 +01:00
florian HENRY
ff734bb5d9 Fix travis 2016-11-16 09:40:29 +01:00
florian HENRY
afd17feffe Merge remote-tracking branch 'origin/develop' into franck_develop 2016-11-16 09:38:50 +01:00
florian HENRY
a251f0df51 Various fix on Loan and project link 2016-11-16 09:38:13 +01:00
moreauf
f97bab6fb8 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop

Conflicts:
	htdocs/install/mysql/migration/4.0.0-5.0.0.sql
2016-11-15 08:35:25 +01:00
moreauf
081be37787 NEW: Add project and Hook to Loan
BUG: Correct discard_closed parametters management in project
2016-11-14 19:25:50 +01:00
Marcos García de La Fuente
1c15cfa722 Adapted code to new changes 2016-11-06 15:17:41 +01:00
Marcos García de La Fuente
286095f5cd Merge branch 'develop' into prod-attr
# Conflicts:
#	htdocs/core/class/html.form.class.php
#	htdocs/core/tpl/objectline_create.tpl.php
#	htdocs/fourn/facture/card.php
#	htdocs/install/mysql/migration/3.9.0-4.0.0.sql
2016-11-06 15:01:40 +01:00
Marcos García de La Fuente
05728075d6 Merge branch 'develop' into prod-attr
# Conflicts:
#	htdocs/core/class/html.form.class.php
#	htdocs/core/tpl/objectline_create.tpl.php
#	htdocs/install/mysql/migration/3.9.0-4.0.0.sql
#	htdocs/install/mysql/migration/4.0.0-5.0.0.sql
2016-09-06 21:06:33 +02:00
Marcos García de La Fuente
8ceb494569 Added comments on classes to fix travis errors 2016-07-25 10:37:39 +02:00
Marcos García de La Fuente
b1c552ee9d Merge branch 'develop' into prod-attr
# Conflicts:
#	htdocs/install/mysql/tables/llx_product_attribute.key.sql
#	htdocs/install/mysql/tables/llx_product_attribute_combination2val.sql
2016-07-24 11:54:38 +02:00
Marcos García de La Fuente
c082505021 NEW Added product attributes feature 2016-07-24 11:27:52 +02:00
geoffrey.girard
d9a1be48cf ADD : new link on weather board for proposals late
this link sort on datep asc
2016-06-01 11:19:10 +02:00
a-schild
cfaf4902f2 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2015-07-08 15:17:26 +02:00
a-schild
64d4a08dc6 Added translations, corrected title printing in the new way 2015-07-08 09:58:51 +02:00
a-schild
43897d913e Corrected center to html5 css class instead of center tag 2015-07-08 09:44:59 +02:00
a-schild
3ffbb800d2 Merge remote-tracking branch 'upstream/develop' into develop 2015-07-08 09:26:21 +02:00
a-schild
8353e1d462 Show due days in make payments 2015-07-08 09:18:04 +02:00
a-schild
2999d0b37a Show due days in not payed supplier bills 2015-07-08 08:58:30 +02:00
a-schild
0fe39d4e4b Show due date when creating payments, so user can select the bills to pay 2015-07-07 18:33:09 +02:00
a-schild
134f13c63f Removed conflict code from merge/checkout 2015-07-07 18:17:22 +02:00
a-schild
1dfb0cac4e Allow filtering on date fields for supplier factures 2015-07-07 18:08:10 +02:00
2115 changed files with 128082 additions and 73858 deletions

View File

@@ -6,7 +6,7 @@ Bug reports and feature requests
<a name="not-a-support-forum"></a>*Note*: Issues are not a support forum. If you need help using the software, please use [the forums](http://www.dolibarr.org/forum).
Issues are managed on [GitHub](https://github.com/Dolibarr/dolibarr/Issues).
Issues are managed on [GitHub](https://github.com/Dolibarr/dolibarr/issues).
1. Please [use the search engine](https://help.github.com/articles/searching-issues) to check if nobody's already reported your problem.
2. [Create an issue](https://help.github.com/articles/creating-an-issue). Choose an appropriate title. Prepend appropriately with Bug or Feature Request.

View File

@@ -292,6 +292,9 @@ script:
php upgrade.php 4.0.0 5.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade400500.log
php upgrade2.php 4.0.0 5.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade400500-2.log
php step5.php 4.0.0 5.0.0 > $TRAVIS_BUILD_DIR/upgrade400500-3.log
php upgrade.php 5.0.0 6.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade500600.log
php upgrade2.php 5.0.0 6.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade500600-2.log
php step5.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-3.log
cd -
set +e
echo

View File

@@ -224,6 +224,18 @@ source_file = htdocs/langs/en_US/members.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[dolibarr.modulebuilder]
file_filter = htdocs/langs/<lang>/modulebuilder.lang
source_file = htdocs/langs/en_US/modulebuilder.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[dolibarr.multicurrency]
file_filter = htdocs/langs/<lang>/multicurrency.lang
source_file = htdocs/langs/en_US/multicurrency.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[dolibarr.oauth]
file_filter = htdocs/langs/<lang>/oauth.lang
source_file = htdocs/langs/en_US/oauth.lang
@@ -326,6 +338,12 @@ source_file = htdocs/langs/en_US/stocks.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[dolibarr.stripe]
file_filter = htdocs/langs/<lang>/stripe.lang
source_file = htdocs/langs/en_US/stripe.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[dolibarr.suppliers]
file_filter = htdocs/langs/<lang>/suppliers.lang
source_file = htdocs/langs/en_US/suppliers.lang
@@ -350,18 +368,18 @@ source_file = htdocs/langs/en_US/users.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[dolibarr.withdrawals]
file_filter = htdocs/langs/<lang>/withdrawals.lang
source_file = htdocs/langs/en_US/withdrawals.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[dolibarr.website]
file_filter = htdocs/langs/<lang>/website.lang
source_file = htdocs/langs/en_US/website.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[dolibarr.withdrawals]
file_filter = htdocs/langs/<lang>/withdrawals.lang
source_file = htdocs/langs/en_US/withdrawals.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[dolibarr.workflow]
file_filter = htdocs/langs/<lang>/workflow.lang
source_file = htdocs/langs/en_US/workflow.lang

148
COPYRIGHT
View File

@@ -14,23 +14,24 @@ Component Version License GPL Compatible
PHP libraries:
AdoDb-Date 0.36 Modified BSD License Yes Date convertion (not into rpm package)
ChromePHP 4.1.0 Apache Software License 2.0 Yes Return server log to chrome browser console
CKEditor 4.5.8 LGPL-2.1+ Yes Editor WYSIWYG
CKEditor 4.6.2 LGPL-2.1+ Yes Editor WYSIWYG
EvalMath 1.0 BSD Yes Safe math expressions evaluation
Escpos-php MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
FPDI 1.5.2 Apache Software License 2.0 Yes PDF templates management
GeoIP 1.4 LGPL-2.1+ Yes Sample code to make geoip convert (not into deb package)
Mobiledetect 2.8.17 MIT License Yes Detect mobile devices browsers
NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package)
PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency
odtPHP 1.0.1 GPL-2+ b Yes Library to build/edit ODT files
odtPHP 1.0.1 GPL-2+ Yes Library to build/edit ODT files
ParseDown 1.6 MIT License Yes Markdown parser
PHPExcel 1.8.1 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
php-iban 1.4.7 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
PHPoAuthLib 0.8.2 MIT License Yes Library to provide oauth1 and oauth2 to different service
PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
Restler 3.0.0RC6 LGPL-3+ Yes Library to develop REST Web services
Restler 3.0.0RC6 LGPL-3+ Yes Library to develop REST Web services (+ swagger-ui js lib into dir explorer)
TCPDF 6.2.12 LGPL-3+ Yes PDF generation
TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement
Swift Mailer 5.4.2-DEV MIT license Yes Comprehensive mailing tools for PHP
Stripe 4.7.0 MIT licence Yes Library for Stripe module
JS libraries:
jQuery 1.11.3 MIT License Yes JS library
@@ -44,147 +45,20 @@ jQuery JCrop 0.9.8 GPL and MIT License Yes
jQuery Jeditable 1.7.1 GPL and MIT License Yes JS library plugin jeditable (to edit in place)
jQuery jNotify 1.1.00 Apache Software License 2.0 Yes JS library plugin jNotify (to use ajax popups)
jQuery jPicker 1.1.6 GPL and MIT License Yes JS library for color picker with not defined list of colors
jQuery jqueryFileTree 1.0.1 GPL and MIT License Yes JS library for color picker with not defined list of colors
jQuery jquerytreeview 1.4.1 MIT License Yes JS library for color picker with not defined list of colors
jQuery Layout 1.4.3 GPL and MIT License Yes JS library plugin Layout
jQuery Mobile 1.3.0 GPL and MIT License Yes JS library for smartphone (not used)
jQuery jqueryFileTree 1.0.1 GPL and MIT License Yes JS library for filetree
jQuery jquerytreeview 1.4.1 MIT License Yes JS library for filetree
jQuery TableDnD 0.6 GPL and MIT License Yes JS library plugin TableDnD (to reorder table rows)
jQuery Timepicker 1.1.0 GPL and MIT License Yes JS library Timepicker addon for Datepicker
jQuery Tiptip 1.3 GPL and MIT License Yes JS library for tooltips
jsGanttImproved 1.7.5.2 BSD License Yes JS library (to build Gantt reports)
JsTimezoneDetect 1.0.6 MIT License Yes JS library to detect user timezone
SwaggerUI 2.0.24 GPL-2+ Yes JS library to offer the REST API explorer
For licenses compatibility informations:
http://www.gnu.org/licenses/licenses.en.html
Copyright
---------
Copyright (C) 2016
Copyright (C) 2015
- Laurent Destailleur <eldy@users.sourceforge.net>
- Marcos García <marcosgdf@gmail.com>
- Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
- Frederic France <frederic.france@free.fr>
- Regis Houssin <regis.houssin@capnetworks.com>
Copyright (C) 2014
- Laurent Destailleur <eldy@users.sourceforge.net>
- Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
- Jean-François Ferry <jfefe@aternatik.fr>
- Marcos García <marcosgdf@gmail.com>
- Philippe Grand <philippe.grand@atoo-net.com>
- Florian Henry <florian.henry@open-concept.pro>
- Regis Houssin <regis.houssin@capnetworks.com>
- Maxime Kohlhaas <mko@atm-consulting.fr>
- Juanjo Menent <jmenent@2byte.es>
- Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
- Frederic France <frederic.france@free.fr>
Copyright (C) 2013
- Christophe Battarel <christophe.battarel@altairis.fr>
- Laurent Destailleur <eldy@users.sourceforge.net>
- Jean-François Ferry <jfefe@aternatik.fr>
- Marcos García <marcosgdf@gmail.com>
- Philippe Grand <philippe.grand@atoo-net.com>
- Florian Henry <florian.henry@open-concept.pro>
- Regis Houssin <regis.houssin@capnetworks.com>
- Maxime Kohlhaas <mko@atm-consulting.fr>
- Juanjo Menent <jmenent@2byte.es>
- Adolfo Segura <adolfo.segura@gmail.com>
- Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
Copyright (C) 2012
- Christophe Battarel <christophe.battarel@altairis.fr>
- Laurent Destailleur <eldy@users.sourceforge.net>
- Jean-François Ferry <jfefe@aternatik.fr>
- Marcos García <marcosgdf@gmail.com>
- Philippe Grand <philippe.grand@atoo-net.com>
- Jean Heimburger <jean@tiaris.info>
- Florian Henry <florian.henry@open-concept.pro>
- Regis Houssin <regis.houssin@capnetworks.com>
- Maxime Kohlhaas <mko@atm-consulting.fr>
- Juanjo Menent <jmenent@2byte.es>
- Nicolas Péré <nicolas@amarok2.net>
- Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
Copyright (C) 2011
- Laurent Destailleur <eldy@users.sourceforge.net>
- Regis Houssin <regis.houssin@capnetworks.com>
- Juanjo Menent <jmenent@2byte.es>
- Philippe Grand <philippe.grand@atoo-net.com>
- Jean Heimburger <jean@tiaris.info>
Copyright (C) 2010
- Laurent Destailleur <eldy@users.sourceforge.net>
- Regis Houssin <regis.houssin@capnetworks.com>
- Juanjo Menent <jmenent@2byte.es>
- r2gnl
- meos
Copyright (C) 2009
- Laurent Destailleur <eldy@users.sourceforge.net>
- Regis Houssin <regis.houssin@capnetworks.com>
- Juanjo Menent <jmenent@2byte.es>
Copyright (C) 2008
- Laurent Destailleur <eldy@users.sourceforge.net>
- Regis Houssin <regis.houssin@capnetworks.com>
- Rodolphe Quiedeville <rodolphe@quiedeville.org>
- Jeremie Ollivier <jeremie.o@laposte.net>
Copyright (C) 2007
- Rodolphe Quiedeville <rodolphe@quiedeville.org>
- Laurent Destailleur <eldy@users.sourceforge.net>
- Regis Houssin <regis.houssin@capnetworks.com>
- Auguria SARL <info@auguria.org>
- Jean Heimburger <jean@tiaris.info>
- Jeremie Ollivier <jeremie.o@laposte.net>
Copyright (C) 2006
- Auguria SARL <info@auguria.org>
- Marc Barilley/Ocebo <marc@ocebo.com>
- Laurent Destailleur <eldy@users.sourceforge.net>
- Rodolphe Quiedeville <rodolphe@quiedeville.org>
- Regis Houssin <regis.houssin@capnetworks.com>
- Andre Cianfarani <acianfa@free.fr>
- Yannick Warnier <ywarnier@beeznest.org>
- Jean Heimburger <jean@tiaris.info>
Copyright (C) 2005
- Brice Davoleau <brice.davoleau@gmail.com>
- Laurent Destailleur <eldy@users.sourceforge.net>
- Benoit Mortier <benoit.mortier@opensides.be>
- Rodolphe Quiedeville <rodolphe@quiedeville.org>
- Eric Seigne <erics@rycks.com>
- Matthieu Valleton <mv@seeschloss.org>
- Regis Houssin <regis.houssin@capnetworks.com>
Copyright (C) 2004
- Laurent Destailleur <eldy@users.sourceforge.net>
- Rodolphe Quiedeville <rodolphe@quiedeville.org>
- Eric Seigne <erics@rycks.com>
- Benoit Mortier <benoit.mortier@opensides.be>
- Christophe Combelles <ccomb@free.fr>
- Sebastien Di Cintio <sdicintio@ressource-toi.org>
Copyright (C) 2003
- Jean-Louis Bergamo <jlb@j1b.org>
- Xavier Dutoit <doli@sydesy.com>
- Rodolphe Quiedeville <rodolphe@quiedeville.org>
- Emmanuel Raviart <eraviart@entrouvert.com>
- Eric Seigne <erics@rycks.com>
Copyright (C) 2002
- Jean-Louis Bergamo <jlb@j1b.org>
- Rodolphe Quiedeville <rodolphe@quiedeville.org>
Copyright (C) 2001
- Rodolphe Quiedeville <rodolphe@quiedeville.org>
Copyright / Authors
-------------------
See page https://github.com/Dolibarr/dolibarr/graphs/contributors

147
ChangeLog
View File

@@ -2,6 +2,93 @@
English Dolibarr ChangeLog
--------------------------------------------------------------
***** ChangeLog for 6.0.0 compared to 5.0.* *****
For developers:
NEW: Add a lot of API REST: dictionaryevents, memberstypes, ...
NEW: Big refactorization of multicompany transverse mode.
NEW: getEntity function use true $shared value by default.
WARNING:
Following changes may create regression for some external modules, but were necessary to make Dolibarr better:
* The hook getNodeList has been replaced by a normalized 'addreplace' hook getDirList.
* The trigger USER_SETINGROUP and USER_REMOVEFROMGROUP has been replaced with trigger USER_MODIFY.
* The page societe/soc.php was renamed into societe/card.php to match page naming conventions.
* The page compta/facture.php was renamed into compta/facture/card.php to match page naming conventions.
* The signature of method ->delete() of class Product and PriceExpression was changed from
->delete(id, notrigger) to ->delete(User, notrigger) to match standard dev rules.
* The signature of method ->delete() of class Adherent was changed from
->delete(id) to ->delete(id, User, notrigger) to match standard dev rules.
* Removed CommonObject::displayMarginInfos (was deprecated in 3.8). Use same method into
html.formmargin.class.php
* Removed Societe::set_commnucation_level (was deprecated in 4.0). Was not used.
* Removed the trigger file of PAYPAL module that stored data that was not used by Dolibarr. The trigger event still
exists, but if an external module need action on it, it must provides itself its trigger file.
* Use $conf->global->MULTICOMPANY_TRANSVERSE_MODE instead $conf->multicompany->transverse_mode
* Use getEntity('xxx') instead getEntity('xxx', 1) and use getEntity('xxx', 0) instead getEntity('xxx')
***** ChangeLog for 5.0.3 compared to 5.0.2 *****
FIX: #6677 Expired contracts dashboard box does not show the name of the thirdparty
FIX: #6813
FIX: 6863
FIX: #6877
FIX: #6881
FIX: Better sanitizing of search all parameter.
FIX: Correction with author and validator user on orders
FIX: dialog window with md theme must not be hidden by left menu part.
FIX: doactions hook missing in invoice model page
FIX: Fullname when member is a moral entity with no name.
FIX: Link to files on bank account tab broken with multicompany FIX: Link to preview on thirdparty broken with multicompany
FIX: New vat code not correctly implemented if "1 price per customer".
FIX: Pagination of invoices
FIX: pagination on resources
FIX: REST API not possible to add agendaevents
FIX: situation invoice broken due to the all percent application form inside addline form
FIX: SQL injection on user/index.php parameter search_statut.
FIX: XSS
***** ChangeLog for 5.0.2 compared to 5.0.1 *****
FIX: #6468 + Fix missing translation
FIX: #6517 #6525 Autocompletion of thirdparty after n chars not implemented
FIX: #6613 Default subject for Supplier proposal emails is filled with a non-existing key
FIX: #6614
FIX: #6619 Template invoices list do not respect restricted thirdparty user rights
FIX: #6621 Documents tab shows greyed out upload form even if the option to show actions not available is disabled
FIX: #6623 User card shows "Return to list" link even if the user has no rights to list users
FIX: #6636 Complete fix
FIX: #6669 User with no permission to edit customer invoices can see a edit button in project entry
FIX: #6671 Cannot remove thirdparty type with "#" in its name
FIX: #6673 Missing "nature" table header in thirdparty list
FIX: #6675 Restricted user with no agenda permissions can see a button to create appointment in thirdparty contact list
FIX: #6679 User with restricted supplier invoice permissions can edit project, payment conditions, payment mode
FIX: #6680 User with restricted supplier invoice permissions sees "reopen" button even if he has no permission to do it
FIX: #6718 Bug: Discount amount is not locally formatted in CommonObject View
FIX: #6767 serious critical error, no login possible with postgresql and ipv6.
FIX: #6795 #6796
FIX: Add option MAIN_MAIL_USE_MULTI_PART to include text content into HTML email and add option MAIN_MAIL_ADD_INLINE_IMAGES_IF_IN_MEDIAS to restore the inline images feature.
FIX: ajax autocomplete on clone
FIX: A non admin user can not download files attached to user.
FIX: Can't download delivery receipts (function dol_check_secure_access_document)
FIX: complete hourly rate when not defined into table of time spent
FIX: dont get empty "Incoterms : - " string if no incoterm
FIX: dont lose supplier ref if no supplier price in database
FIX: Enter a direct bank transaction
FIX: extrafield css for boolean type
FIX: forgotten parameter for right multicompany use
FIX: Found duplicate line when it is not.
FIX: global $dateSelector isn't the good one, then date selector on objectline_create tpl was hidden
FIX: Journal code of bank must be visible of accountaing module on.
FIX: length_accounta return variable name
FIX: limit+1 dosn't show Total line
FIX: No filter on company when showing the link to elements.
FIX: overwrapping of weight/volume on rouget template
FIX: Several bugs in accounting module.
FIX: shared bank account with multicompany not visible in invoice setup
FIX: spaces not allowed into vat code
FIX: supplier default condition not retrieved on create
FIX: supplier order line were always created with rang = 0
***** ChangeLog for 5.0.1 compared to 5.0.0 *****
FIX: #6503: SQL error in "Last pending payment invoices"
FIX: #6505 Project elements page shows greyed-out links even if the option to show actions not available is disabled
@@ -173,9 +260,67 @@ Dolibarr better:
- Method commande->set_availability(user, availability_id) removed from commande class, use method commande->availability(availability_id, notrigger).
Dolibarr 5.0 was frozen before PHP 7.1 was released. Unit tests are successful on PHP 7.1 but we don't have enough
feedback to confirm all application is compatible. Current officiel supported PHP versions are PHP 5.3 to 7.0.
feedback to confirm whole application is compatible. Current officiel supported PHP versions are PHP 5.3 to 7.0.
***** ChangeLog for 4.0.6 to 4.0.5 *****
FIX: #6613 Default subject for Supplier proposal emails is filled with a non-existing key
FIX: #6623 User card shows "Return to list" link even if the user has no rights to list users
FIX: #6636 Complete fix
FIX: #6669 User with no permission to edit customer invoices can see a edit button in project entry
FIX: #6671 Cannot remove thirdparty type with "#" in its name
FIX: #6673 Missing "nature" table header in thirdparty list
FIX: #6675 Restricted user with no agenda permissions can see a button to create appointment in thirdparty contact list
FIX: #6677 Expired contracts dashboard box does not show the name of the thirdparty
FIX: #6679 User with restricted supplier invoice permissions can edit project, payment conditions, payment mode
FIX: #6680 User with restricted supplier invoice permissions sees "reopen" button even if he has no permission to do it
FIX: #6813
FIX: Correction with author and validator user on orders
FIX: doactions hook missing in invoice model page
FIX: dont get empty "Incoterms : - " string if no incoterm
FIX: dont lose supplier ref if no supplier price in database
FIX: forgotten parameter for right multicompany use
FIX: global $dateSelector isn't the good one, then date selector on objectline_create tpl was hidden
FIX: limit+1 dosn't show Total line
FIX: supplier order line were always created with rang = 0
***** ChangeLog for 4.0.5 to 4.0.4 *****
FIX: #6234
FIX: #6259
FIX: #6330
FIX: #6360
FIX: #6411
FIX: #6443
FIX: #6444
FIX: #6453
FIX: #6503: SQL error in "Last pending payment invoices"
FIX: #6505 Project elements page shows greyed-out links even if the option to show actions not available is disabled
FIX: #6507: Statistics counter show wrong total Contract numbers when the user does not have full access
FIX: #6533 #6590
FIX: #6619 Template invoices list do not respect restricted thirdparty user rights
FIX: #6621 Documents tab shows greyed out upload form even if the option to show actions not available is disabled
FIX: add entity param to document link
FIX: Can use quote into supplier ref on order line add
FIX: Change the customer code only if error on duplicate
FIX: Creation of credit note on invoice with deposit stole the discount.
FIX: delete bank class lines when we delete bank_categ
FIX: deletion of bank tag
FIX: detail of deposit and credit not was not visible into final invoice
FIX: Error management during bank account creation
FIX: error management in bank account deletion.
FIX: event status is not modified when assign an user
FIX: forgotten fk_facture_fourn attribute on supplierinvoice line object
FIX: If bank module on, field must be required to register payment of expense report.
FIX: load multicurrency informations on supplier order and bill lines fetch
FIX: Missing total on project overview.
FIX: multicurrency_subprice
FIX: param billed when we change page
FIX: protection against infinite loop on hierarchy
FIX: Supplier Order list filter by project
FIX: the dolCopyDir fails if target dir does not exists.
FIX: use param for http links
***** ChangeLog for 4.0.4 to 4.0.3 *****
FIX: #6227 Document models table header "Unit" is shown in 2 lines in Spanish
FIX: #6230

View File

@@ -26,6 +26,16 @@ Other licenses apply for some included dependencies. See [COPYRIGHT](https://git
Releases can be downloaded from [official website](https://www.dolibarr.org/).
### Install from composer
If you do not already have Composer installed, you may do so by following the instructions at getcomposer.org. On Linux and Mac OS X, you'll run the following commands:
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
On Windows, you'll download and run https://getcomposer.org/Composer-Setup.exe
composer create-project dolibarr/dolibarr erp
### Simple setup
If you have low technical skills and you're looking to install Dolibarr ERP/CRM in few clicks, you can use one of the packaged versions:

View File

@@ -152,7 +152,7 @@ tag 729538 -moreinfo
##### Testing a package into unstable env
##### Testing a package into a chroot environment
Check you have a mysql server available from another interface than "localhost".
Set line in /etc/mysql/my.cnf if required and restart mysql
@@ -160,9 +160,11 @@ Set line in /etc/mysql/my.cnf if required and restart mysql
[mysqld]
bind-address = *
Create a chroot called "unstable-amd64-sbuild".
Create a chroot called "jessie" or "unstable".
Chroot env is stored into /srv/chroot directory.
> sudo sbuild-createchroot --keyring=unstable /srv/chroot/unstable http://ftp.uk.debian.org/debian
or
> sudo sbuild-createchroot jessie /srv/chroot/jessie http://ftp.uk.debian.org/debian
Pour lister les env chroot
> schroot -l
@@ -170,8 +172,9 @@ or
> ls /srv/chroot
Puis pour se connecter et préparer l'environnement
> schroot -c name_of_chroot
> schroot -c name_of_chroot (exemple schroot -c unstable-amd64-sbuild)
> cat /etc/debian_chroot to check which debian branch we are into
> apt-get install vi dialog
> vi /usr/sbin/policy-rc.d and replace return code 101 (not allowed) into 0 (ok)
> apt-get update
> apt-get upgrade
@@ -320,8 +323,8 @@ x.y.z+dfsgw
Note: If there was errors solved manually after get-orig-sources.sh, you may need to make a git commit
* Update/fix debian/* files used to build package.
At least, add an entry into debian/changelog
> dch -v x.y.z+dfsgw-v "My comment" will add entry.
At least, add an entry into debian/changelog with command
> dch -v x.y.z+dfsgw-1 "My comment"
For example: dch -v x.y.z+dfsgw-1 "New upstream release." for a new version (x.y.z = version, w start from 1 and increased for each new import)
Then check/modify changelog to replace "version" or "unstable" with "UNRELEASED".
Then check/modify also the user/date signature:
@@ -332,23 +335,27 @@ Then check/modify also the user/date signature:
To update dolibarr debian package when only files into debian has changed:
* Change files and commit.
* Add a tag debian/x.y.z+dfsgw-2 (increase the last 1 into 2, 3...)
* Add a line into changelog for version debian/x.y.z+dfsgw-v (increase the last v into 2, 3...)
> dch -v x.y.z+dfsgw-v "My comment"
* git tag will be added when package is pushed.
To update dolibarr debian package when only files not into debian has changed:
* Manually, add patches into debian/patches and update file debian/series, or do the 2 steps with "quilt import filepatch.patch"
* Checkout the branch you want to work on: master of debian/...
* Manually, add patches into debian/patches and update the file debian/series, or do the 2 steps with "quilt import filepatch.patch"
* You can test patching of serie with "quilt push" (autant de fois que de patch). Avec "quilt pop -a", on revient a l'état du upstream sans les patch.
* Update the debian/changelog to add entry of change.
Once files has been prepared, it's time to test:
* Try to build package
> rm -fr ../build-area;
> git-buildpackage -us -uc --git-debian-branch=[master|jessie] --git-upstream-branch=[upstream|upstream-3.5.x|3.5.5]
> git-buildpackage -us -uc --git-debian-branch=[master|jessie] --git-upstream-branch=[upstream|upstream-jessie|upstream-3.5.x|3.5.5]
ou
> git-buildpackage -us -uc --git-ignore-branch --git-upstream-branch=[upstream|upstream-3.5.x|3.5.5]
> git-buildpackage -us -uc --git-ignore-branch --git-upstream-branch=[upstream|upstream-jessie|upstream-3.5.x|3.5.5]
Note: To build an old version, do: git checkout oldtagname -b newbranchname; git-buildpackage -us -uc --git-debian-branch=newbranchname --git-upstream-branch=[upstream|upstream-3.5.x]
Note: To build an old version, do: git checkout oldtagname -b newbranchname; git-buildpackage -us -uc --git-debian-branch=newbranchname --git-upstream-branch=[upstream|upstream-jessie|upstream-3.5.x|3.5.5]
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommited file
Note: You can use git-buildpackage -us -uc -d if you want to test build when dependencies does not match
Note: Package is built into directory ../build-area
@@ -381,13 +388,14 @@ http://packages.qa.debian.org
* Package will be into release when test will be moved as stable.
##### Send an unblock request
##### Send an unblock request to make a full update of a stable package
Use this to move from unstable to testing.
reportbug -B debian --smtphost=smtp.gmail.com:587 --smtpuser=xxxx --smtppasswd=yyyy --tls
Choose package "release.debian.org"
Then "unblock"
Then usertag "unblock"
Then name of package "dolibarr"
Fill message, for example:
"Please unblock package dolibarr
@@ -397,11 +405,11 @@ so it is a better solution to validate this maintenance release than applying a
After discussion with ..., it appears that security holes are enough to request this unblock request."
Use this to request an update of a stable package
Use this to request an full update of a stable package
reportbug -B debian --smtphost=smtp.gmail.com:587 --smtpuser=xxxx --smtppasswd=yyyy --tls
Choose package "release.debian.org"
Then "unblock"
Then usertag "unblock"
Then name of package "dolibarr"
Fill message, for example:
"
@@ -413,11 +421,27 @@ Pro are:
- It fixes also stability bugs
- Patches were already tested because deployed and used by several thousands of users.
- It is easier for package maintener to include this official set of fixes than applying one patch after one patch for each debian report or backported each patch into a dedicated version.
- Debian maintenance version matches with official project maintenance version (better when all fixes are not related to the way the software is packaged)
- Debian maintenance version is inline with official project maintenance version (better when all fixes are not related to the way the software is packaged)
Cons are:
- The patch include more than the only one security reported fxes
- The patch include more than the only one security reported fixes
So I just need to know if it's ok to push such a version 3.5.7 (fixes for 3.5.* branch) instead of only one fix for only the few (the only) reported debian bugs,
since it provides more stability and is for me a more secured process.
"
##### Send an request to ask a simple fix of a stable package
Use this to ask to apply patches on a stable version.
reportbug -B debian --smtphost=smtp.gmail.com:587 --smtpuser=xxxx --smtppasswd=yyyy --tls
Choose package "release.debian.org"
Then usertag "jessie-pu" (if tags is not available in list, choose another one, and change it later into email content text)
Then name of package "dolibarr"
Fill message, for example:
"Please unblock package dolibarr
A security error CVE-2015-3935 was reported and is fixed into package 3.5.7.
Note that package 3.5.7 contains not only fixed for bugs reported to debian. It includes other fixes, but they are all related to stability or security,
so it is a better solution to validate this maintenance release than applying a patch of the only CVE-2015-3935.
After discussion with ..., it appears that security holes are enough to request this unblock request."
Note: If there is a response to ask more information, don't forget to remove the tag during answer.

View File

@@ -10,12 +10,13 @@ Build-Depends: debhelper (>= 9), po-debconf
Package: dolibarr
Architecture: all
Depends: libapache2-mod-php | libapache2-mod-phpfilter | php-cgi | php-fpm | php,
php-cli,
# For debian 7 or 8 or 9
Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5 | libapache2-mod-php | libapache2-mod-phpfilter | php-cgi | php-fpm | php,
php5-cli | php-cli,
# Required PHP extensions
php-mysql | php-mysqli, php-curl, php-gd, php-ldap,
php5-mysql | php5-mysqli | php-mysql | php-mysqli, php5-curl | php-curl, php5-gd | php-gd, php5-ldap | php-gd,
# Required PHP libraries
php-pear, php-mail-mime, php-xml, php-mbstring,
php-pear, php-mail-mime,
# php-tcpdf,
# libfpdf-tpl-php, php-fpdf,
# libphp-adodb,
@@ -30,7 +31,9 @@ Depends: libapache2-mod-php | libapache2-mod-phpfilter | php-cgi | php-fpm | php
${misc:Depends},
${perl:Depends}
Recommends: apache2 | lighttpd | httpd,
mariadb-server | virtual-mysql-server
mariadb-server | virtual-mysql-server,
# Required PHP extensions for debian 9 but we can't add them into a Depends, it does not exists on debian 7 and 8
php-xml, php-mbstring
Suggests: www-browser, php5-geoip
Description: Web based software to manage a company or foundation
Dolibarr ERP & CRM is an easy to use open source/free software package for

View File

@@ -61,7 +61,7 @@ apache_install() {
# Enable dolibarr conf
if which a2enconf >/dev/null 2>&1 ;then
# a2enconf exists for ubuntu only
echo "Enable link for Apache config file with a3enconf"
echo "Enable link for Apache config file with a2enconf"
a2enconf dolibarr
else
if [ -d /etc/$webserver/conf.d ] && [ ! -e /etc/$webserver/conf.d/dolibarr.conf ]; then

View File

@@ -7,7 +7,7 @@
//
$force_install_packager='deb';
$force_install_noedit=2;
$force_install_noedit=1;
$force_install_message='KeepDefaultValuesDeb';
#$force_install_main_data_root='/usr/share/dolibarr/documents';
$force_install_main_data_root='/var/lib/dolibarr/documents';

View File

@@ -4,7 +4,12 @@ dolibarr: source-contains-prebuilt-javascript-object htdocs/includes/jsgantt/*
dolibarr: source-contains-prebuilt-javascript-object htdocs/includes/jstz/*
# Those are false positives, the files are their own sources since
# they are not minified
source-is-missing htdocs/includes/jsgantt/jsgantt.js *
source-is-missing htdocs/includes/jquery/plugins/colorpicker/jquery.colorpicker.js *
source-is-missing htdocs/includes/jquery/plugins/select2/select2.js *
source-is-missing htdocs/includes/jquery/plugins/select2/select2_locale_ar.js *
source-is-missing htdocs/includes/ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/*.js
source-is-missing htdocs/includes/ckeditor/ckeditor/plugins/specialchar/dialogs/lang/*.js
source-is-missing htdocs/includes/ckeditor/ckeditor/lang/*.js
source-is-missing htdocs/includes/ckeditor/ckeditor/plugins/*/dialogs/*.js
source-is-missing htdocs/includes/ckeditor/ckeditor/plugins/*/filter/*.js
source-is-missing htdocs/includes/ckeditor/ckeditor/plugins/templates/templates/default.js
source-is-missing htdocs/includes/mobiledetect/mobiledetectlib/Mobile_Detect.json
source-is-missing htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/*.js

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env php
<?php
/* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2015-2017 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -40,55 +40,117 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
* Main
*/
if (empty($argv[1]))
{
print "Usage: ".$script_file." release=x.y.z\n";
exit -1;
}
parse_str($argv[1]);
$includecustom=0;
$includeconstants=array();
if ($release != DOL_VERSION)
if (empty($argv[1]))
{
print 'Error: release is not version declared into filefunc.in.php.'."\n";
print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n";
exit -1;
}
$i=0;
while ($i < $argc)
{
if (! empty($argv[$i])) parse_str($argv[$i]);
if (preg_match('/includeconstant=/',$argv[$i]))
{
$tmp=explode(':', $includeconstant, 3);
if (count($tmp) != 3)
{
print "Error: Bad parameter includeconstant ".$includeconstant."\n";
exit -1;
}
$includeconstants[$tmp[0]][$tmp[1]] = $tmp[2];
}
$i++;
}
if (empty($includecustom))
{
if (DOL_VERSION != $release)
{
print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$release.')'."\n";
print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1]\n";
exit -1;
}
}
else
{
if (! preg_match('/'.preg_quote(DOL_VERSION,'/').'-/',$release))
{
print 'Error: When parameter "includecustom" is set, version declared into filefunc.inc.php ('.DOL_VERSION.') must be used with a suffix into "release" parmater (ex: '.DOL_VERSION.'-mydistrib).'."\n";
print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1]\n";
exit -1;
}
}
print "Release : ".$release."\n";
print "Include custom in signature : ".$includecustom."\n";
print "Include constants in signature : ";
foreach ($includeconstants as $countrycode => $tmp)
{
foreach($tmp as $constname => $constvalue)
{
print $constname.'='.$constvalue." ";
}
}
print "\n";
//$outputfile=dirname(__FILE__).'/../htdocs/install/filelist-'.$release.'.xml';
$outputdir=dirname(__FILE__).'/../htdocs/install';
print 'Delete current files '.$outputdir.'/filelist*.xml'."\n";
dol_delete_file($outputdir.'/filelist*.xml',0,1,1);
print 'Delete current files '.$outputdir.'/filelist-'.$release.'.xml'."\n";
dol_delete_file($outputdir.'/filelist-'.$release.'.xml',0,1,1);
$checksumconcat=array();
$outputfile=$outputdir.'/filelist-'.$release.'.xml';
$fp = fopen($outputfile,'w');
fputs($fp, '<?xml version="1.0" encoding="UTF-8" ?>'."\n");
fputs($fp, '<checksum_list version="'.$release.'">'."\n");
fputs($fp, '<checksum_list version="'.$release.'" date="'.dol_print_date(dol_now(), 'dayhourrfc').'" generator="'.$script_file.'">'."\n");
fputs($fp, '<dolibarr_htdocs_dir>'."\n");
foreach ($includeconstants as $countrycode => $tmp)
{
fputs($fp, '<dolibarr_constants country="'.$countrycode.'">'."\n");
foreach($tmp as $constname => $constvalue)
{
$valueforchecksum=(empty($constvalue)?'0':$constvalue);
$checksumconcat[]=$valueforchecksum;
fputs($fp, ' <constant name="'.$constname.'">'.$valueforchecksum.'</constant>'."\n");
}
fputs($fp, '</dolibarr_constants>'."\n");
}
$checksumconcat=array();
fputs($fp, '<dolibarr_htdocs_dir includecustom="'.$includecustom.'">'."\n");
$dir_iterator1 = new RecursiveDirectoryIterator(dirname(__FILE__).'/../htdocs/');
/*$dir_iterator1 = new RecursiveDirectoryIterator(dirname(__FILE__).'/../htdocs/');
$iterator1 = new RecursiveIteratorIterator($dir_iterator1);
// need to ignore document custom etc
$files = new RegexIterator($iterator1, '#^(?:[A-Z]:)?(?:/(?!(?:custom|documents|conf|install|nltechno))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
// Need to ignore document custom etc. Note: this also ignore natively symbolic links.
$files = new RegexIterator($iterator1, '#^(?:[A-Z]:)?(?:/(?!(?:'.($includecustom?'':'custom\/|').'documents\/|conf\/|install\/))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
*/
$regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
$regextoexclude='('.($includecustom?'':'custom|').'documents|conf|install)$'; // Exclude dirs
$files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
$dir='';
$needtoclose=0;
foreach ($files as $file) {
$newdir = str_replace(dirname(__FILE__).'/../htdocs', '', dirname($file));
if ($newdir!=$dir) {
foreach ($files as $filetmp) {
$file = $filetmp['fullname'];
//$newdir = str_replace(dirname(__FILE__).'/../htdocs', '', dirname($file));
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
if ($newdir!=$dir) {
if ($needtoclose)
fputs($fp, '</dir>'."\n");
fputs($fp, '<dir name="'.$newdir.'" >'."\n");
fputs($fp, ' </dir>'."\n");
fputs($fp, ' <dir name="'.$newdir.'" >'."\n");
$dir = $newdir;
$needtoclose=1;
}
if (filetype($file)=="file") {
$md5=md5_file($file);
$checksumconcat[]=$md5;
fputs($fp, '<md5file name="'.basename($file).'">'.$md5.'</md5file>'."\n");
fputs($fp, ' <md5file name="'.basename($file).'">'.$md5.'</md5file>'."\n");
}
}
fputs($fp, '</dir>'."\n");
fputs($fp, ' </dir>'."\n");
fputs($fp, '</dolibarr_htdocs_dir>'."\n");
asort($checksumconcat); // Sort list of checksum
@@ -102,28 +164,36 @@ $checksumconcat=array();
fputs($fp, '<dolibarr_script_dir version="'.$release.'">'."\n");
$dir_iterator2 = new RecursiveDirectoryIterator(dirname(__FILE__).'/../scripts/');
// TODO Replace RecursiveDirectoryIterator with dol_dir_list
/*$dir_iterator2 = new RecursiveDirectoryIterator(dirname(__FILE__).'/../scripts/');
$iterator2 = new RecursiveIteratorIterator($dir_iterator2);
// need to ignore document custom etc
$files = new RegexIterator($iterator2, '#^(?:[A-Z]:)?(?:/(?!(?:custom|documents|conf|install|nltechno))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
// Need to ignore document custom etc. Note: this also ignore natively symbolic links.
$files = new RegexIterator($iterator2, '#^(?:[A-Z]:)?(?:/(?!(?:custom|documents|conf|install))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
*/
$regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
$regextoexclude='(custom|documents|conf|install)$'; // Exclude dirs
$files = dol_dir_list(dirname(__FILE__).'/../scripts/', 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
$dir='';
$needtoclose=0;
foreach ($files as $file) {
$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file));
foreach ($files as $filetmp) {
$file = $filetmp['fullname'];
//$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file));
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file));
if ($newdir!=$dir) {
if ($needtoclose)
fputs($fp, '</dir>'."\n");
fputs($fp, '<dir name="'.$newdir.'" >'."\n");
fputs($fp, ' </dir>'."\n");
fputs($fp, ' <dir name="'.$newdir.'" >'."\n");
$dir = $newdir;
$needtoclose=1;
}
if (filetype($file)=="file") {
$md5=md5_file($file);
$checksumconcat[]=$md5;
fputs($fp, '<md5file name="'.basename($file).'">'.$md5.'</md5file>'."\n");
fputs($fp, ' <md5file name="'.basename($file).'">'.$md5.'</md5file>'."\n");
}
}
fputs($fp, '</dir>'."\n");
fputs($fp, ' </dir>'."\n");
fputs($fp, '</dolibarr_script_dir>'."\n");
asort($checksumconcat); // Sort list of checksum

View File

@@ -14,12 +14,12 @@
#----------------------------------------------------------------------------
use Cwd;
use Term::ANSIColor;
# Change this to defined target for option 98 and 99
$PROJECT="dolibarr";
$PUBLISHSTABLE="eldy,dolibarr\@frs.sourceforge.net:/home/frs/project/dolibarr";
$PUBLISHBETARC="ldestailleur\@asso.dolibarr.org:/home/dolibarr/dolibarr.org/httpdocs/files";
$PUBLISHBETARC="ldestailleur\@vmprod.dolibarr.org:/home/dolibarr/dolibarr.org/httpdocs/files";
#@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
@@ -313,20 +313,6 @@ foreach my $target (sort keys %CHOOSEDTARGET) {
print "\n";
# Build xml check file
#-----------------------
if ($CHOOSEDTARGET{'-CHKSUM'})
{
print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/build/generate_filecheck_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n";
$ret=`php $SOURCE/build/generate_filelist_xml.php release=$MAJOR.$MINOR.$BUILD`;
print $ret."\n";
# Copy to final dir
$NEWDESTI=$DESTI;
print "Copy \"$SOURCE/htdocs/install/filelist-$MAJOR.$MINOR.$BUILD.xml\" to $NEWDESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml\n";
use File::Copy qw(copy);
copy "$SOURCE/htdocs/install/filelist-$MAJOR.$MINOR.$BUILD.xml", "$NEWDESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml";
}
#print join(',',sort keys %CHOOSEDTARGET)."\n";
@@ -335,7 +321,10 @@ if ($CHOOSEDTARGET{'-CHKSUM'})
$nboftargetok=0;
$nboftargetneedbuildroot=0;
$nbofpublishneedtag=0;
$nbofpublishneedchangelog=0;
foreach my $target (sort keys %CHOOSEDTARGET) {
if ($target eq '-CHKSUM') { $nbofpublishneedchangelog++; }
if ($CHOOSEDTARGET{$target} < 0) { next; }
if ($target ne 'EXE' && $target ne 'EXEDOLIWAMP' && $target ne '-CHKSUM')
{
@@ -345,34 +334,31 @@ foreach my $target (sort keys %CHOOSEDTARGET) {
}
foreach my $target (sort keys %CHOOSEDPUBLISH) {
if ($CHOOSEDPUBLISH{$target} < 0) { next; }
if ($target eq 'ASSO') { $nbofpublishneedtag++; }
if ($target eq 'SF') { $nbofpublishneedtag++; }
if ($target eq 'ASSO') { $nbofpublishneedchangelog++; $nbofpublishneedtag++; }
if ($target eq 'SF') { $nbofpublishneedchangelog++; $nbofpublishneedtag++; }
$nboftargetok++;
}
if ($nboftargetok) {
# Update GIT tag if required
#---------------------------
if ($nbofpublishneedtag)
# Check Changelog
#----------------
if ($nbofpublishneedchangelog)
{
print "Go to directory $SOURCE\n";
$olddir=getcwd();
chdir("$SOURCE");
# Test that the ChangeLog is ok
$TMPBUILDTOCHECKCHANGELOG=$BUILD;
$TMPBUILDTOCHECKCHANGELOG =~ s/\-rc\d*//;
$TMPBUILDTOCHECKCHANGELOG =~ s/\-beta\d*//;
print "Check if ChangeLog is ok for version $MAJOR.$MINOR\.$TMPBUILDTOCHECKCHANGELOG\n";
print "\nCheck if ChangeLog is ok for version $MAJOR.$MINOR\.$TMPBUILDTOCHECKCHANGELOG\n";
$ret=`grep "ChangeLog for $MAJOR.$MINOR\.$TMPBUILDTOCHECKCHANGELOG" "$SOURCE/ChangeLog" 2>&1`;
if (! $ret)
{
print "Error: The ChangeLogFile was not updated. Run the following command before building package for $MAJOR.$MINOR.$BUILD:\n";
print color("yellow"), "Error: The ChangeLogFile was not updated. Run the following command before building package for $MAJOR.$MINOR.$BUILD:\n", color('reset');
}
else
{
print "ChangeLog for $MAJOR.$MINOR\.$BUILD was found into '$SOURCE/ChangeLog. But you can regenerate it with commande:'\n";
print "ChangeLog for $MAJOR.$MINOR\.$BUILD was found into '$SOURCE/ChangeLog. But you can regenerate it with command:'\n";
}
if (! $BUILD || $BUILD eq '0-rc') # For a major version
{
@@ -385,9 +371,39 @@ if ($nboftargetok) {
print "\n";
if (! $ret)
{
exit;
print "\nPress F to force and continue anyway (or other key to stop)... ";
my $WAITKEY=<STDIN>;
chomp($WAITKEY);
if ($WAITKEY ne 'F')
{
print "Canceled.\n";
exit;
}
}
}
# Build xml check file
#-----------------------
if ($CHOOSEDTARGET{'-CHKSUM'})
{
print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/build/generate_filecheck_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n";
$ret=`php $SOURCE/build/generate_filelist_xml.php release=$MAJOR.$MINOR.$BUILD`;
print $ret."\n";
# Copy to final dir
$NEWDESTI=$DESTI;
print "Copy \"$SOURCE/htdocs/install/filelist-$MAJOR.$MINOR.$BUILD.xml\" to $NEWDESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml\n";
use File::Copy qw(copy);
copy "$SOURCE/htdocs/install/filelist-$MAJOR.$MINOR.$BUILD.xml", "$NEWDESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml";
}
# Update GIT tag if required
#---------------------------
if ($nbofpublishneedtag)
{
print "Go to directory $SOURCE\n";
$olddir=getcwd();
chdir("$SOURCE");
print 'Run git tag -a -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n";
$ret=`git tag -a -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD" 2>&1`;
if ($ret =~ /(already exists|existe déjà)/)
@@ -509,7 +525,6 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/documents`;
# Removed known external modules to avoid any error when packaging from env where external modules are tested
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom/*`; # For custom we want to keep dir
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/allscreens*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ancotec*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/cabinetmed*`;
@@ -518,6 +533,7 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/dolimed*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/dolimod*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/factory*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/forceproject*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/lead*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/management*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`;
@@ -532,8 +548,6 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/oblyon*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/allscreen*`;
# Removed other test files
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/eldy/*.new`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/api/explorer`; # This is a dev tool
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`;
$ret=`rm -fr $BUILDROOT/$PROJECT/test`;
$ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`;
@@ -547,13 +561,12 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/samples`; # Keep this removal in case we embed libraries
#$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/_source`; # _source must be kept into tarball
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/datatables/extensions/TableTools/swf`; # Source of this flash is not available
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/datatables/extras/TableTools/swf`; # Source of this flash is not available
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/select2/release.sh`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/doc`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/example`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/test`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mobiledetect/mobiledetectlib/.gitmodules`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/samples`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/php-iban/docs`;
@@ -566,14 +579,19 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/license.md`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/freefont-*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/ae_fonts_*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/utils`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/LICENSE.TXT`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/freefont-*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/ae_fonts_*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/utils`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/LICENSE.TXT`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/savant`;
print "Remove subdir of custom dir\n";
print "find $BUILDROOT/$PROJECT/htdocs/custom/* -type d -exec rm -fr {} \\;\n";
$ret=`find $BUILDROOT/$PROJECT/htdocs/custom/* -type d -exec rm -fr {} \\; >/dev/null 2>&1`; # For custom we want to remove all subdirs but not files
}
# Build package for each target
@@ -892,9 +910,6 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/mike42/escpos-php/LICENSE.md`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/mobiledetect/mobiledetectlib/LICENSE.txt`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/LICENSE`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/tecnickcom/tcpdf/fonts/freefont-20120503/COPYING`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/tecnickcom/tcpdf/fonts/ae_fonts_2.0/COPYING`;
# Removed files we don't need
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/_source`;
@@ -957,13 +972,12 @@ if ($nboftargetok) {
$ret=`$cmd`;
$ret=`chmod 755 $BUILDROOT/$PROJECT.tmp/debian/rules`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/translation/autotranslator.class.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/modMyModule.class.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_api_class.class.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_card.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_class.class.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_list.php`;
$ret=`chmod -R 755 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_script.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_webservice_server.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/class/myobject.class.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/class/myobject_api_class.class.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/core/modules/modMyModule.class.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/myobject_card.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/myobject_list.php`;
$ret=`chmod -R 755 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/scripts/myobject.php`;
$cmd="find $BUILDROOT/$PROJECT.tmp/scripts -name '*.php' -type f -exec chmod 755 {} \\; ";
$ret=`$cmd`;
$cmd="find $BUILDROOT/$PROJECT.tmp/scripts -name '*.sh' -type f -exec chmod 755 {} \\; ";

View File

@@ -7,20 +7,20 @@
</MASTER_PAD_VERSION_INFO>
<Company_Info>
<Company_Name>Dolibarr team</Company_Name>
<Address_1>11 rue raymond Queneau</Address_1>
<Address_1>20 rue camponac</Address_1>
<Address_2 />
<City_Town>Rueil Malmaison</City_Town>
<City_Town>Pessac</City_Town>
<State_Province />
<Zip_Postal_Code>92500</Zip_Postal_Code>
<Zip_Postal_Code>33600</Zip_Postal_Code>
<Country>FRANCE</Country>
<Company_WebSite_URL>http://www.dolibarr.org</Company_WebSite_URL>
<Company_WebSite_URL>https://www.dolibarr.org</Company_WebSite_URL>
<Contact_Info>
<Author_First_Name>Dolibarr team</Author_First_Name>
<Author_Last_Name>Dolibarr team</Author_Last_Name>
<Author_Email>dolibarr-dev@nongnu.org</Author_Email>
<Author_Email>contact@dolibarr.org</Author_Email>
<Contact_First_Name>Dolibarr team</Contact_First_Name>
<Contact_Last_Name>Dolibarr team</Contact_Last_Name>
<Contact_Email>dolibarr-dev@nongnu.org</Contact_Email>
<Contact_Email>contact@dolibarr.org</Contact_Email>
</Contact_Info>
<Support_Info>
<Sales_Email>dolibarr-dev@nongnu.org</Sales_Email>
@@ -34,10 +34,10 @@
</Company_Info>
<Program_Info>
<Program_Name>Dolibarr</Program_Name>
<Program_Version>3.5</Program_Version>
<Program_Release_Month>01</Program_Release_Month>
<Program_Version>5.0</Program_Version>
<Program_Release_Month>02</Program_Release_Month>
<Program_Release_Day>01</Program_Release_Day>
<Program_Release_Year>2014</Program_Release_Year>
<Program_Release_Year>2017</Program_Release_Year>
<Program_Cost_Dollars />
<Program_Cost_Other_Code />
<Program_Cost_Other />
@@ -71,8 +71,8 @@
<Char_Desc_45>Dolibarr ERP &amp; CRM</Char_Desc_45>
<Char_Desc_80>Dolibarr ERP &amp; CRM, the easy to use open source software to manage your activity</Char_Desc_80>
<Char_Desc_250>Dolibarr ERP &amp; CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to manage.</Char_Desc_250>
<Char_Desc_450>Dolibarr ERP &amp; CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450>
<Char_Desc_2000>Dolibarr ERP &amp; CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple:
<Char_Desc_450>Dolibarr ERP &amp; CRM is a software package built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450>
<Char_Desc_2000>Dolibarr ERP &amp; CRM is a software package built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, Odoo, Neogia, Compiere, etc) because everything was made to be more simple:
Simple to install
Simple to use
Simple to develop
@@ -101,14 +101,14 @@ Dolibarr intègre en effet sa propre architecture (design patterns) permettant
</Program_Descriptions>
<Web_Info>
<Application_URLs>
<Application_Info_URL>http://www.dolibarr.org</Application_Info_URL>
<Application_Order_URL>http://www.dolibarr.org</Application_Order_URL>
<Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
<Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
<Application_XML_File_URL>http://www.dolibarr.org/files/pad_dolibarr.xml</Application_XML_File_URL>
<Application_Info_URL>https://www.dolibarr.org</Application_Info_URL>
<Application_Order_URL>https://www.dolibarr.org</Application_Order_URL>
<Application_Screenshot_URL>https://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
<Application_Icon_URL>https://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
<Application_XML_File_URL>https://www.dolibarr.org/files/pad_dolibarr.xml</Application_XML_File_URL>
</Application_URLs>
<Download_URLs>
<Primary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Primary_Download_URL>
<Primary_Download_URL>https://www.dolibarr.org/files/dolibarr.tgz</Primary_Download_URL>
<Secondary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Secondary_Download_URL>
<Additional_Download_URL_1 />
<Additional_Download_URL_2 />

View File

@@ -0,0 +1,232 @@
<?xml version="1.0" encoding="UTF-8" ?>
<XML_DIZ_INFO>
<MASTER_PAD_VERSION_INFO>
<MASTER_PAD_VERSION>3.11</MASTER_PAD_VERSION>
<MASTER_PAD_EDITOR>PADGen 3.1.1.47 http://www.padgen.org</MASTER_PAD_EDITOR>
<MASTER_PAD_INFO>Portable Application Description, or PAD for short, is a data set that is used by shareware authors to disseminate information to anyone interested in their software products. To find out more go to http://pad.asp-software.org</MASTER_PAD_INFO>
</MASTER_PAD_VERSION_INFO>
<Company_Info>
<Company_Name>Dolibarr team</Company_Name>
<Address_1>20 rue camponac</Address_1>
<Address_2 />
<City_Town>Pessac</City_Town>
<State_Province />
<Zip_Postal_Code>33600</Zip_Postal_Code>
<Country>FRANCE</Country>
<Company_WebSite_URL>https://www.dolibarr.org</Company_WebSite_URL>
<Contact_Info>
<Author_First_Name>Dolibarr team</Author_First_Name>
<Author_Last_Name>Dolibarr team</Author_Last_Name>
<Author_Email>contact@dolibarr.org</Author_Email>
<Contact_First_Name>Dolibarr team</Contact_First_Name>
<Contact_Last_Name>Dolibarr team</Contact_Last_Name>
<Contact_Email>contact@dolibarr.org</Contact_Email>
</Contact_Info>
<Support_Info>
<Sales_Email>dolibarr-dev@nongnu.org</Sales_Email>
<Support_Email>dolibarr-dev@nongnu.org</Support_Email>
<General_Email>dolibarr-dev@nongnu.org</General_Email>
<Sales_Phone />
<Support_Phone />
<General_Phone />
<Fax_Phone />
</Support_Info>
</Company_Info>
<Program_Info>
<Program_Name>Dolibarr</Program_Name>
<Program_Version>5.0</Program_Version>
<Program_Release_Month>02</Program_Release_Month>
<Program_Release_Day>01</Program_Release_Day>
<Program_Release_Year>2017</Program_Release_Year>
<Program_Cost_Dollars />
<Program_Cost_Other_Code />
<Program_Cost_Other />
<Program_Type>Freeware</Program_Type>
<Program_Release_Status>Major Update</Program_Release_Status>
<Program_Install_Support>No Install Support</Program_Install_Support>
<Program_OS_Support>Linux,Mac OS X,Mac Other,Unix,Win2000,Win7 x32,Win7 x64,Win98,WinOther,WinServer,WinVista,WinVista x64,WinXP,Other</Program_OS_Support>
<Program_Language>English,Arabic,Catalan,Chinese,Danish,Dutch,Finnish,French,German,Greek,Icelandic,Italian,Norwegian,Polish,Portuguese,Romanian,Russian,Slovenian,Spanish,Swedish,Turkish</Program_Language>
<Program_Change_Info>Increase performances, Setup process is easier, Reduce number of clicks required to use software</Program_Change_Info>
<Program_Specific_Category>Business</Program_Specific_Category>
<Program_Category_Class>Business::Accounting &amp; Finance</Program_Category_Class>
<Program_System_Requirements>None</Program_System_Requirements>
<File_Info>
<File_Size_Bytes>18037439</File_Size_Bytes>
<File_Size_K>18037</File_Size_K>
<File_Size_MB>18.03</File_Size_MB>
</File_Info>
<Expire_Info>
<Has_Expire_Info>N</Has_Expire_Info>
<Expire_Count />
<Expire_Based_On>Days</Expire_Based_On>
<Expire_Other_Info />
<Expire_Month />
<Expire_Day />
<Expire_Year />
</Expire_Info>
</Program_Info>
<Program_Descriptions>
<English>
<Keywords>dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp</Keywords>
<Char_Desc_45>Dolibarr ERP &amp; CRM</Char_Desc_45>
<Char_Desc_80>Dolibarr ERP &amp; CRM, the easy to use open source software to manage your activity</Char_Desc_80>
<Char_Desc_250>Dolibarr ERP &amp; CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to manage.</Char_Desc_250>
<Char_Desc_450>Dolibarr ERP &amp; CRM is a software package built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450>
<Char_Desc_2000>Dolibarr ERP &amp; CRM is a software package built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple:
Simple to install
Simple to use
Simple to develop
Note that Dolibarr is also available with an auto-installer for Windows or Ubuntu users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. This version is called DoliWamp (for Windows) or DoliBuntu (for Ubuntu/Debian).</Char_Desc_2000>
</English>
<French>
<Keywords>dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp</Keywords>
<Char_Desc_45>Dolibarr ERP &amp; CRM</Char_Desc_45>
<Char_Desc_80>Dolibarr ERP &amp; CRM, le gestionnaire simple pour gérer votre activité</Char_Desc_80>
<Char_Desc_250>Dolibarr ERP &amp; CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
<Char_Desc_450>Dolibarr ERP &amp; CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP).</Char_Desc_450>
<Char_Desc_2000>Dolibarr ERP &amp; CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S):
Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle)
Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie)
Simple pour le développement (pas de frameworks lourds).
Dolibarr intègre en effet sa propre architecture (design patterns) permettant à tout développeur d'être tout de suite opérationnel sans connaissances particulières autre que le PHP. </Char_Desc_2000>
</French>
<Italian>
<Keywords>erp, crm, gestionale, medie imprese, fondazioni</Keywords>
<Char_Desc_45>Gestionale open source e gratuito</Char_Desc_45>
<Char_Desc_80>Gestionale open source e gratuito per piccole e medie imprese, fondazioni</Char_Desc_80>
<Char_Desc_250>Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività.</Char_Desc_250>
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
</Italian>
</Program_Descriptions>
<Web_Info>
<Application_URLs>
<Application_Info_URL>https://www.dolibarr.org</Application_Info_URL>
<Application_Order_URL>https://www.dolibarr.org</Application_Order_URL>
<Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
<Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
<Application_XML_File_URL>https://www.dolibarr.org/files/pad_dolibarr.xml</Application_XML_File_URL>
</Application_URLs>
<Download_URLs>
<Primary_Download_URL>https://www.dolibarr.org/files/dolibarr.zip</Primary_Download_URL>
<Secondary_Download_URL>http://www.dolibarr.org/files/dolibarr.zip</Secondary_Download_URL>
<Additional_Download_URL_1 />
<Additional_Download_URL_2 />
</Download_URLs>
</Web_Info>
<Permissions>
<Distribution_Permissions>GNU GPL</Distribution_Permissions>
<EULA>GNU GPL</EULA>
</Permissions>
<Affiliates>
<Affiliates_FORM>Y</Affiliates_FORM>
<Affiliates_VERSION>1.4</Affiliates_VERSION>
<Affiliates_URL>http://pad.asp-software.org/extensions/Affiliates.htm</Affiliates_URL>
<Affiliates_Information_Page />
<Affiliates_Avangate_Order_Page />
<Affiliates_Avangate_Vendor_ID />
<Affiliates_Avangate_Product_ID />
<Affiliates_Avangate_Maximum_Commission_Rate />
<Affiliates_BMTMicro_Order_Page />
<Affiliates_BMTMicro_Vendor_ID />
<Affiliates_BMTMicro_Product_ID />
<Affiliates_BMTMicro_Maximum_Commission_Rate />
<Affiliates_Cleverbridge_Order_Page />
<Affiliates_Cleverbridge_Vendor_ID />
<Affiliates_Cleverbridge_Product_ID />
<Affiliates_Cleverbridge_Maximum_Commission_Rate />
<Affiliates_clixGalore_Order_Page />
<Affiliates_clixGalore_Vendor_ID />
<Affiliates_clixGalore_Product_ID />
<Affiliates_clixGalore_Maximum_Commission_Rate />
<Affiliates_CommissionJunction_Order_Page />
<Affiliates_CommissionJunction_Vendor_ID />
<Affiliates_CommissionJunction_Product_ID />
<Affiliates_CommissionJunction_Maximum_Commission_Rate />
<Affiliates_DigiBuy_Order_Page />
<Affiliates_DigiBuy_Vendor_ID />
<Affiliates_DigiBuy_Product_ID />
<Affiliates_DigiBuy_Maximum_Commission_Rate />
<Affiliates_DigitalCandle_Order_Page />
<Affiliates_DigitalCandle_Vendor_ID />
<Affiliates_DigitalCandle_Product_ID />
<Affiliates_DigitalCandle_Maximum_Commission_Rate />
<Affiliates_Emetrix_Order_Page />
<Affiliates_Emetrix_Vendor_ID />
<Affiliates_Emetrix_Product_ID />
<Affiliates_Emetrix_Maximum_Commission_Rate />
<Affiliates_eSellerate_Order_Page />
<Affiliates_eSellerate_Vendor_ID />
<Affiliates_eSellerate_Product_ID />
<Affiliates_eSellerate_Maximum_Commission_Rate />
<Affiliates_Kagi_Order_Page />
<Affiliates_Kagi_Vendor_ID />
<Affiliates_Kagi_Product_ID />
<Affiliates_Kagi_Maximum_Commission_Rate />
<Affiliates_LinkShare_Order_Page />
<Affiliates_LinkShare_Vendor_ID />
<Affiliates_LinkShare_Product_ID />
<Affiliates_LinkShare_Maximum_Commission_Rate />
<Affiliates_NorthStarSol_Order_Page />
<Affiliates_NorthStarSol_Vendor_ID />
<Affiliates_NorthStarSol_Product_ID />
<Affiliates_NorthStarSol_Maximum_Commission_Rate />
<Affiliates_OneNetworkDirect_Order_Page />
<Affiliates_OneNetworkDirect_Vendor_ID />
<Affiliates_OneNetworkDirect_Product_ID />
<Affiliates_OneNetworkDirect_Maximum_Commission_Rate />
<Affiliates_Order1_Order_Page />
<Affiliates_Order1_Vendor_ID />
<Affiliates_Order1_Product_ID />
<Affiliates_Order1_Maximum_Commission_Rate />
<Affiliates_Osolis_Order_Page />
<Affiliates_Osolis_Vendor_ID />
<Affiliates_Osolis_Product_ID />
<Affiliates_Osolis_Maximum_Commission_Rate />
<Affiliates_Plimus_Order_Page />
<Affiliates_Plimus_Vendor_ID />
<Affiliates_Plimus_Product_ID />
<Affiliates_Plimus_Maximum_Commission_Rate />
<Affiliates_Regnet_Order_Page />
<Affiliates_Regnet_Vendor_ID />
<Affiliates_Regnet_Product_ID />
<Affiliates_Regnet_Maximum_Commission_Rate />
<Affiliates_Regnow_Order_Page />
<Affiliates_Regnow_Vendor_ID />
<Affiliates_Regnow_Product_ID />
<Affiliates_Regnow_Maximum_Commission_Rate />
<Affiliates_Regsoft_Order_Page />
<Affiliates_Regsoft_Vendor_ID />
<Affiliates_Regsoft_Product_ID />
<Affiliates_Regsoft_Maximum_Commission_Rate />
<Affiliates_ShareIt_Order_Page />
<Affiliates_ShareIt_Vendor_ID />
<Affiliates_ShareIt_Product_ID />
<Affiliates_ShareIt_Maximum_Commission_Rate />
<Affiliates_Shareasale_Order_Page />
<Affiliates_Shareasale_Vendor_ID />
<Affiliates_Shareasale_Product_ID />
<Affiliates_Shareasale_Maximum_Commission_Rate />
<Affiliates_SWReg_Order_Page />
<Affiliates_SWReg_Vendor_ID />
<Affiliates_SWReg_Product_ID />
<Affiliates_SWReg_Maximum_Commission_Rate />
<Affiliates_V-Share_Order_Page />
<Affiliates_V-Share_Vendor_ID />
<Affiliates_V-Share_Product_ID />
<Affiliates_V-Share_Maximum_Commission_Rate />
<Affiliates_VFree_Order_Page />
<Affiliates_VFree_Vendor_ID />
<Affiliates_VFree_Product_ID />
<Affiliates_VFree_Maximum_Commission_Rate />
<Affiliates_Yaskifo_Order_Page />
<Affiliates_Yaskifo_Vendor_ID />
<Affiliates_Yaskifo_Product_ID />
<Affiliates_Yaskifo_Maximum_Commission_Rate />
</Affiliates>
<ASP>
<ASP_FORM>Y</ASP_FORM>
<ASP_Member>N</ASP_Member>
<ASP_Member_Number />
</ASP>
</XML_DIZ_INFO>

View File

@@ -7,13 +7,13 @@
</MASTER_PAD_VERSION_INFO>
<Company_Info>
<Company_Name>NLTechno</Company_Name>
<Address_1>11 Rue raymond Queneau</Address_1>
<Address_1>20 Rue Camponac</Address_1>
<Address_2 />
<City_Town>Rueil Malmaison</City_Town>
<City_Town>Pessac</City_Town>
<State_Province />
<Zip_Postal_Code>92500</Zip_Postal_Code>
<Zip_Postal_Code>33600</Zip_Postal_Code>
<Country>FRANCE</Country>
<Company_WebSite_URL>http://www.nltechno.com</Company_WebSite_URL>
<Company_WebSite_URL>https://www.dolibarr.org</Company_WebSite_URL>
<Contact_Info>
<Author_First_Name>NLTechno</Author_First_Name>
<Author_Last_Name>NLTechno</Author_Last_Name>
@@ -34,10 +34,10 @@
</Company_Info>
<Program_Info>
<Program_Name>DoliWamp</Program_Name>
<Program_Version>3.5</Program_Version>
<Program_Release_Month>01</Program_Release_Month>
<Program_Version>5.0</Program_Version>
<Program_Release_Month>02</Program_Release_Month>
<Program_Release_Day>01</Program_Release_Day>
<Program_Release_Year>2014</Program_Release_Year>
<Program_Release_Year>2017</Program_Release_Year>
<Program_Cost_Dollars />
<Program_Cost_Other_Code />
<Program_Cost_Other />
@@ -53,7 +53,7 @@
<File_Info>
<File_Size_Bytes>26048004</File_Size_Bytes>
<File_Size_K>25437</File_Size_K>
<File_Size_MB>24.84</File_Size_MB>
<File_Size_MB>45.84</File_Size_MB>
</File_Info>
<Expire_Info>
<Has_Expire_Info>N</Has_Expire_Info>
@@ -72,7 +72,7 @@
<Char_Desc_80>DoliWamp, the easy to use Dolibarr for Windows to manage your company,foundation</Char_Desc_80>
<Char_Desc_250>DoliWamp is the Dolibarr ERP/CRM for Windows, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs.</Char_Desc_250>
<Char_Desc_450>DoliWamp is the Dolibarr ERP/CRM autoinstaller for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. Dolibarr ERP/CRM is a software package built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations.</Char_Desc_450>
<Char_Desc_2000>DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP &amp; CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop.
<Char_Desc_2000>DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP &amp; CRM is a software package built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop.
DoliWamp is the auto-installer for Windows users with no technical knowledge to install Dolibarr ERP/CRM and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file.</Char_Desc_2000>
</English>
<French>
@@ -96,12 +96,12 @@ DoliWamp is the auto-installer for Windows users with no technical knowledge to
<Application_URLs>
<Application_Info_URL>http://www.nltechno.com/doliwamp/</Application_Info_URL>
<Application_Order_URL>http://www.nltechno.com/doliwamp/</Application_Order_URL>
<Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
<Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
<Application_XML_File_URL>http://www.dolibarr.org/files/pad_doliwamp.xml</Application_XML_File_URL>
<Application_Screenshot_URL>https://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
<Application_Icon_URL>https://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
<Application_XML_File_URL>https://www.dolibarr.org/files/pad_doliwamp.xml</Application_XML_File_URL>
</Application_URLs>
<Download_URLs>
<Primary_Download_URL>http://www.dolibarr.org/files/doliwamp.exe</Primary_Download_URL>
<Primary_Download_URL>https://www.dolibarr.org/files/doliwamp.exe</Primary_Download_URL>
<Secondary_Download_URL>http://www.dolibarr.org/files/doliwamp.exe</Secondary_Download_URL>
<Additional_Download_URL_1 />
<Additional_Download_URL_2 />

View File

@@ -0,0 +1,225 @@
<?xml version="1.0" encoding="UTF-8" ?>
<XML_DIZ_INFO>
<MASTER_PAD_VERSION_INFO>
<MASTER_PAD_VERSION>3.11</MASTER_PAD_VERSION>
<MASTER_PAD_EDITOR>PADGen 3.1.1.47 http://www.padgen.org</MASTER_PAD_EDITOR>
<MASTER_PAD_INFO>Portable Application Description, or PAD for short, is a data set that is used by shareware authors to disseminate information to anyone interested in their software products. To find out more go to http://pad.asp-software.org</MASTER_PAD_INFO>
</MASTER_PAD_VERSION_INFO>
<Company_Info>
<Company_Name>NLTechno</Company_Name>
<Address_1>20 Rue Camponac</Address_1>
<Address_2 />
<City_Town>Pessac</City_Town>
<State_Province />
<Zip_Postal_Code>33600</Zip_Postal_Code>
<Country>FRANCE</Country>
<Company_WebSite_URL>https://www.dolibarr.org</Company_WebSite_URL>
<Contact_Info>
<Author_First_Name>NLTechno</Author_First_Name>
<Author_Last_Name>NLTechno</Author_Last_Name>
<Author_Email>contact@nltechno.com</Author_Email>
<Contact_First_Name>NLTechno</Contact_First_Name>
<Contact_Last_Name>NLTechno</Contact_Last_Name>
<Contact_Email>contact@nltechno.com</Contact_Email>
</Contact_Info>
<Support_Info>
<Sales_Email>support@nltechno.com</Sales_Email>
<Support_Email>support@nltechno.com</Support_Email>
<General_Email>support@nltechno.com</General_Email>
<Sales_Phone />
<Support_Phone />
<General_Phone />
<Fax_Phone />
</Support_Info>
</Company_Info>
<Program_Info>
<Program_Name>DoliWamp</Program_Name>
<Program_Version>5.0</Program_Version>
<Program_Release_Month>02</Program_Release_Month>
<Program_Release_Day>01</Program_Release_Day>
<Program_Release_Year>2017</Program_Release_Year>
<Program_Cost_Dollars />
<Program_Cost_Other_Code />
<Program_Cost_Other />
<Program_Type>Freeware</Program_Type>
<Program_Release_Status>Major Update</Program_Release_Status>
<Program_Install_Support>Install and Uninstall</Program_Install_Support>
<Program_OS_Support>Win2000,Win7 x32,Win7 x64,Win98,WinOther,WinServer,WinVista,WinVista x64,WinXP,Other</Program_OS_Support>
<Program_Language>English,Arabic,Catalan,Chinese,Dutch,Finnish,French,German,Icelandic,Italian,Norwegian,Polish,Portuguese,Romanian,Russian,Slovenian,Spanish,Swedish,Turkish</Program_Language>
<Program_Change_Info>Increase performances, Setup process is easier, Reduce number of clicks required to use software</Program_Change_Info>
<Program_Specific_Category>Business</Program_Specific_Category>
<Program_Category_Class>Business::Accounting &amp; Finance</Program_Category_Class>
<Program_System_Requirements>None</Program_System_Requirements>
<File_Info>
<File_Size_Bytes>26048004</File_Size_Bytes>
<File_Size_K>25437</File_Size_K>
<File_Size_MB>45.84</File_Size_MB>
</File_Info>
<Expire_Info>
<Has_Expire_Info>N</Has_Expire_Info>
<Expire_Count />
<Expire_Based_On>Days</Expire_Based_On>
<Expire_Other_Info />
<Expire_Month />
<Expire_Day />
<Expire_Year />
</Expire_Info>
</Program_Info>
<Program_Descriptions>
<English>
<Keywords>doliwamp, dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management</Keywords>
<Char_Desc_45>DoliWamp, Dolibarr ERP/CRM for Windows</Char_Desc_45>
<Char_Desc_80>DoliWamp, the easy to use Dolibarr for Windows to manage your company,foundation</Char_Desc_80>
<Char_Desc_250>DoliWamp is the Dolibarr ERP/CRM for Windows, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs.</Char_Desc_250>
<Char_Desc_450>DoliWamp is the Dolibarr ERP/CRM autoinstaller for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. Dolibarr ERP/CRM is a software package built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations.</Char_Desc_450>
<Char_Desc_2000>DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP &amp; CRM is a software package built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop.
DoliWamp is the auto-installer for Windows users with no technical knowledge to install Dolibarr ERP/CRM and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file.</Char_Desc_2000>
</English>
<French>
<Keywords>doliwamp, dolibarr, erp, crm, factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations, entreprises, PME, TPE</Keywords>
<Char_Desc_45>DoliWamp, Dolibarr ERP/CRM pour Windows</Char_Desc_45>
<Char_Desc_80>DoliWamp, la distribution de Dolibarr pour gérer votre entreprise ou association</Char_Desc_80>
<Char_Desc_250>DoliWamp est la version spécialisée pour Windows de Dolibarr ERP-CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
<Char_Desc_450>DoliWamp est la version spécialisée pour Windows de Dolibarr ERP-CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_450>
<Char_Desc_2000>DoliWamp est la version spécialisée pour Windows de Dolibarr ERP-CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_2000>
</French>
<Italian>
<Keywords>doliwamp, dolibarr, erp, crm, gestionale, medie imprese, fondazioni</Keywords>
<Char_Desc_45>DoliWamp, Dolibarr ERP/CRM per Windows</Char_Desc_45>
<Char_Desc_80>Gestionale open source e gratuito per piccole e medie imprese, fondazioni</Char_Desc_80>
<Char_Desc_250>Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività.</Char_Desc_250>
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
</Italian>
</Program_Descriptions>
<Web_Info>
<Application_URLs>
<Application_Info_URL>http://www.nltechno.com/doliwamp/</Application_Info_URL>
<Application_Order_URL>http://www.nltechno.com/doliwamp/</Application_Order_URL>
<Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
<Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
<Application_XML_File_URL>https://www.dolibarr.org/files/pad_doliwamp.xml</Application_XML_File_URL>
</Application_URLs>
<Download_URLs>
<Primary_Download_URL>https://www.dolibarr.org/files/doliwamp.exe</Primary_Download_URL>
<Secondary_Download_URL>http://www.dolibarr.org/files/doliwamp.exe</Secondary_Download_URL>
<Additional_Download_URL_1 />
<Additional_Download_URL_2 />
</Download_URLs>
</Web_Info>
<Permissions>
<Distribution_Permissions>GNU GPL</Distribution_Permissions>
<EULA>GNU GPL</EULA>
</Permissions>
<Affiliates>
<Affiliates_FORM>Y</Affiliates_FORM>
<Affiliates_VERSION>1.4</Affiliates_VERSION>
<Affiliates_URL>http://pad.asp-software.org/extensions/Affiliates.htm</Affiliates_URL>
<Affiliates_Information_Page />
<Affiliates_Avangate_Order_Page />
<Affiliates_Avangate_Vendor_ID />
<Affiliates_Avangate_Product_ID />
<Affiliates_Avangate_Maximum_Commission_Rate />
<Affiliates_BMTMicro_Order_Page />
<Affiliates_BMTMicro_Vendor_ID />
<Affiliates_BMTMicro_Product_ID />
<Affiliates_BMTMicro_Maximum_Commission_Rate />
<Affiliates_Cleverbridge_Order_Page />
<Affiliates_Cleverbridge_Vendor_ID />
<Affiliates_Cleverbridge_Product_ID />
<Affiliates_Cleverbridge_Maximum_Commission_Rate />
<Affiliates_clixGalore_Order_Page />
<Affiliates_clixGalore_Vendor_ID />
<Affiliates_clixGalore_Product_ID />
<Affiliates_clixGalore_Maximum_Commission_Rate />
<Affiliates_CommissionJunction_Order_Page />
<Affiliates_CommissionJunction_Vendor_ID />
<Affiliates_CommissionJunction_Product_ID />
<Affiliates_CommissionJunction_Maximum_Commission_Rate />
<Affiliates_DigiBuy_Order_Page />
<Affiliates_DigiBuy_Vendor_ID />
<Affiliates_DigiBuy_Product_ID />
<Affiliates_DigiBuy_Maximum_Commission_Rate />
<Affiliates_DigitalCandle_Order_Page />
<Affiliates_DigitalCandle_Vendor_ID />
<Affiliates_DigitalCandle_Product_ID />
<Affiliates_DigitalCandle_Maximum_Commission_Rate />
<Affiliates_Emetrix_Order_Page />
<Affiliates_Emetrix_Vendor_ID />
<Affiliates_Emetrix_Product_ID />
<Affiliates_Emetrix_Maximum_Commission_Rate />
<Affiliates_eSellerate_Order_Page />
<Affiliates_eSellerate_Vendor_ID />
<Affiliates_eSellerate_Product_ID />
<Affiliates_eSellerate_Maximum_Commission_Rate />
<Affiliates_Kagi_Order_Page />
<Affiliates_Kagi_Vendor_ID />
<Affiliates_Kagi_Product_ID />
<Affiliates_Kagi_Maximum_Commission_Rate />
<Affiliates_LinkShare_Order_Page />
<Affiliates_LinkShare_Vendor_ID />
<Affiliates_LinkShare_Product_ID />
<Affiliates_LinkShare_Maximum_Commission_Rate />
<Affiliates_NorthStarSol_Order_Page />
<Affiliates_NorthStarSol_Vendor_ID />
<Affiliates_NorthStarSol_Product_ID />
<Affiliates_NorthStarSol_Maximum_Commission_Rate />
<Affiliates_OneNetworkDirect_Order_Page />
<Affiliates_OneNetworkDirect_Vendor_ID />
<Affiliates_OneNetworkDirect_Product_ID />
<Affiliates_OneNetworkDirect_Maximum_Commission_Rate />
<Affiliates_Order1_Order_Page />
<Affiliates_Order1_Vendor_ID />
<Affiliates_Order1_Product_ID />
<Affiliates_Order1_Maximum_Commission_Rate />
<Affiliates_Osolis_Order_Page />
<Affiliates_Osolis_Vendor_ID />
<Affiliates_Osolis_Product_ID />
<Affiliates_Osolis_Maximum_Commission_Rate />
<Affiliates_Plimus_Order_Page />
<Affiliates_Plimus_Vendor_ID />
<Affiliates_Plimus_Product_ID />
<Affiliates_Plimus_Maximum_Commission_Rate />
<Affiliates_Regnet_Order_Page />
<Affiliates_Regnet_Vendor_ID />
<Affiliates_Regnet_Product_ID />
<Affiliates_Regnet_Maximum_Commission_Rate />
<Affiliates_Regnow_Order_Page />
<Affiliates_Regnow_Vendor_ID />
<Affiliates_Regnow_Product_ID />
<Affiliates_Regnow_Maximum_Commission_Rate />
<Affiliates_Regsoft_Order_Page />
<Affiliates_Regsoft_Vendor_ID />
<Affiliates_Regsoft_Product_ID />
<Affiliates_Regsoft_Maximum_Commission_Rate />
<Affiliates_ShareIt_Order_Page />
<Affiliates_ShareIt_Vendor_ID />
<Affiliates_ShareIt_Product_ID />
<Affiliates_ShareIt_Maximum_Commission_Rate />
<Affiliates_Shareasale_Order_Page />
<Affiliates_Shareasale_Vendor_ID />
<Affiliates_Shareasale_Product_ID />
<Affiliates_Shareasale_Maximum_Commission_Rate />
<Affiliates_SWReg_Order_Page />
<Affiliates_SWReg_Vendor_ID />
<Affiliates_SWReg_Product_ID />
<Affiliates_SWReg_Maximum_Commission_Rate />
<Affiliates_V-Share_Order_Page />
<Affiliates_V-Share_Vendor_ID />
<Affiliates_V-Share_Product_ID />
<Affiliates_V-Share_Maximum_Commission_Rate />
<Affiliates_VFree_Order_Page />
<Affiliates_VFree_Vendor_ID />
<Affiliates_VFree_Product_ID />
<Affiliates_VFree_Maximum_Commission_Rate />
<Affiliates_Yaskifo_Order_Page />
<Affiliates_Yaskifo_Vendor_ID />
<Affiliates_Yaskifo_Product_ID />
<Affiliates_Yaskifo_Maximum_Commission_Rate />
</Affiliates>
<ASP>
<ASP_FORM>Y</ASP_FORM>
<ASP_Member>N</ASP_Member>
<ASP_Member_Number />
</ASP>
</XML_DIZ_INFO>

View File

@@ -18,8 +18,8 @@ License: GPLv3+
#Packager: Laurent Destailleur (Eldy) <eldy@users.sourceforge.net>
Vendor: Dolibarr dev team
URL: http://www.dolibarr.org
Source0: http://www.dolibarr.org/files/lastbuild/package_rpm_redhat-fedora/%{name}-%{version}.tgz
URL: https://www.dolibarr.org
Source0: https://www.dolibarr.org/files/lastbuild/package_rpm_redhat-fedora/%{name}-%{version}.tgz
Patch0: %{name}-forrpm.patch
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -165,6 +165,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/bookmarks
%_datadir/dolibarr/htdocs/cashdesk
%_datadir/dolibarr/htdocs/categories
%_datadir/dolibarr/htdocs/collab
%_datadir/dolibarr/htdocs/comm
%_datadir/dolibarr/htdocs/commande
%_datadir/dolibarr/htdocs/compta
@@ -173,6 +174,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/contrat
%_datadir/dolibarr/htdocs/core
%_datadir/dolibarr/htdocs/cron
%_datadir/dolibarr/htdocs/custom
%_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm
%_datadir/dolibarr/htdocs/expedition
@@ -192,6 +194,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/loan
%_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin
%_datadir/dolibarr/htdocs/modulebuilder
%_datadir/dolibarr/htdocs/multicurrency
%_datadir/dolibarr/htdocs/opensurvey
%_datadir/dolibarr/htdocs/paybox
@@ -202,10 +205,12 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/public
%_datadir/dolibarr/htdocs/resource
%_datadir/dolibarr/htdocs/societe
%_datadir/dolibarr/htdocs/stripe
%_datadir/dolibarr/htdocs/supplier_proposal
%_datadir/dolibarr/htdocs/support
%_datadir/dolibarr/htdocs/theme
%_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/websites
%_datadir/dolibarr/htdocs/*.ico

View File

@@ -26,17 +26,17 @@ License: GPL-3.0+
#Packager: Laurent Destailleur (Eldy) <eldy@users.sourceforge.net>
Vendor: Dolibarr dev team
URL: http://www.dolibarr.org
URL: https://www.dolibarr.org
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
Source0: http://www.dolibarr.org/files/lastbuild/package_rpm_redhat-fedora/%{name}-%{version}.tgz
Source0: https://www.dolibarr.org/files/lastbuild/package_rpm_redhat-fedora/%{name}-%{version}.tgz
%else
%if 0%{?mdkversion}
Source0: http://www.dolibarr.org/files/lastbuild/package_rpm_mandriva/%{name}-%{version}.tgz
Source0: https://www.dolibarr.org/files/lastbuild/package_rpm_mandriva/%{name}-%{version}.tgz
%else
%if 0%{?suse_version}
Source0: http://www.dolibarr.org/files/lastbuild/package_rpm_opensuse/%{name}-%{version}.tgz
Source0: https://www.dolibarr.org/files/lastbuild/package_rpm_opensuse/%{name}-%{version}.tgz
%else
Source0: http://www.dolibarr.org/files/lastbuild/package_rpm_generic/%{name}-%{version}.tgz
Source0: https://www.dolibarr.org/files/lastbuild/package_rpm_generic/%{name}-%{version}.tgz
%endif
%endif
%endif
@@ -245,6 +245,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/bookmarks
%_datadir/dolibarr/htdocs/cashdesk
%_datadir/dolibarr/htdocs/categories
%_datadir/dolibarr/htdocs/collab
%_datadir/dolibarr/htdocs/comm
%_datadir/dolibarr/htdocs/commande
%_datadir/dolibarr/htdocs/compta
@@ -253,6 +254,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/contrat
%_datadir/dolibarr/htdocs/core
%_datadir/dolibarr/htdocs/cron
%_datadir/dolibarr/htdocs/custom
%_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm
%_datadir/dolibarr/htdocs/expedition
@@ -272,6 +274,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/loan
%_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin
%_datadir/dolibarr/htdocs/modulebuilder
%_datadir/dolibarr/htdocs/multicurrency
%_datadir/dolibarr/htdocs/opensurvey
%_datadir/dolibarr/htdocs/paybox
@@ -282,10 +285,12 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/public
%_datadir/dolibarr/htdocs/resource
%_datadir/dolibarr/htdocs/societe
%_datadir/dolibarr/htdocs/stripe
%_datadir/dolibarr/htdocs/supplier_proposal
%_datadir/dolibarr/htdocs/support
%_datadir/dolibarr/htdocs/theme
%_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/websites
%_datadir/dolibarr/htdocs/*.ico

View File

@@ -18,8 +18,8 @@ License: GPL-3.0+
#Packager: Laurent Destailleur (Eldy) <eldy@users.sourceforge.net>
Vendor: Dolibarr dev team
URL: http://www.dolibarr.org
Source0: http://www.dolibarr.org/files/lastbuild/package_rpm_mandriva/%{name}-%{version}.tgz
URL: https://www.dolibarr.org
Source0: https://www.dolibarr.org/files/lastbuild/package_rpm_mandriva/%{name}-%{version}.tgz
Patch0: %{name}-forrpm.patch
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -170,6 +170,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/contrat
%_datadir/dolibarr/htdocs/core
%_datadir/dolibarr/htdocs/cron
%_datadir/dolibarr/htdocs/custom
%_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm
%_datadir/dolibarr/htdocs/expedition
@@ -189,6 +190,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/loan
%_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin
%_datadir/dolibarr/htdocs/modulebuilder
%_datadir/dolibarr/htdocs/multicurrency
%_datadir/dolibarr/htdocs/opensurvey
%_datadir/dolibarr/htdocs/paybox
@@ -199,10 +201,12 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/public
%_datadir/dolibarr/htdocs/resource
%_datadir/dolibarr/htdocs/societe
%_datadir/dolibarr/htdocs/stripe
%_datadir/dolibarr/htdocs/supplier_proposal
%_datadir/dolibarr/htdocs/support
%_datadir/dolibarr/htdocs/theme
%_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/websites
%_datadir/dolibarr/htdocs/*.ico

View File

@@ -18,8 +18,8 @@ License: GPL-3.0+
#Packager: Laurent Destailleur (Eldy) <eldy@users.sourceforge.net>
Vendor: Dolibarr dev team
URL: http://www.dolibarr.org
Source0: http://www.dolibarr.org/files/lastbuild/package_rpm_opensuse/%{name}-%{version}.tgz
URL: https://www.dolibarr.org
Source0: https://www.dolibarr.org/files/lastbuild/package_rpm_opensuse/%{name}-%{version}.tgz
Patch0: %{name}-forrpm.patch
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -173,6 +173,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/bookmarks
%_datadir/dolibarr/htdocs/cashdesk
%_datadir/dolibarr/htdocs/categories
%_datadir/dolibarr/htdocs/collab
%_datadir/dolibarr/htdocs/comm
%_datadir/dolibarr/htdocs/commande
%_datadir/dolibarr/htdocs/compta
@@ -181,6 +182,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/contrat
%_datadir/dolibarr/htdocs/core
%_datadir/dolibarr/htdocs/cron
%_datadir/dolibarr/htdocs/custom
%_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm
%_datadir/dolibarr/htdocs/expedition
@@ -200,6 +202,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/loan
%_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin
%_datadir/dolibarr/htdocs/modulebuilder
%_datadir/dolibarr/htdocs/multicurrency
%_datadir/dolibarr/htdocs/opensurvey
%_datadir/dolibarr/htdocs/paybox
@@ -210,10 +213,12 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/public
%_datadir/dolibarr/htdocs/resource
%_datadir/dolibarr/htdocs/societe
%_datadir/dolibarr/htdocs/stripe
%_datadir/dolibarr/htdocs/supplier_proposal
%_datadir/dolibarr/htdocs/support
%_datadir/dolibarr/htdocs/theme
%_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/websites
%_datadir/dolibarr/htdocs/*.ico

View File

@@ -3,20 +3,18 @@ This file describe changes made on external library after beeing included
in Dolibarr root.
ALL:
----
Replace "& new" by "new"
Check "DOL_CHANGE"
CKEDITOR:
---------
CKEDITOR (4.6.2):
-----------------
* In ckeditor/ckeditor/contents.css
Replace:
margin: 20px;
body { ... margin: 20px;
With
margin: 5px;
body { ... margin: 5px;
@@ -33,21 +31,6 @@ Replace call to serialize_val with no bugged value
FPDI:
-----
Replace:
$this->_readXref($this->_xref, $this->_findXref());
with:
try {
$this->_readXref($this->_xref, $this->_findXref());
}
catch(Exception $e)
{
print $e->getMessage();
exit;
}
TCPDF:
------
@@ -56,7 +39,7 @@ define('QR_FIND_FROM_RANDOM', 2);
with
define('QR_FIND_FROM_RANDOM', false);
* Removed useless directories (examples, tools)
* Removed useless directories ("examples", "tools")
* Fix
// initialize subsetchars

View File

@@ -5,5 +5,5 @@
#
# ldapsearch -h hostname -x
# ldapsearch -h hostname -x -b "ou=people,dc=teclib,dc=infra"
# ldapsearch -h hostname -x -z 0 -b "o=somecompany.com" -D "cn=manager,o=somecompany.com" -W "(objectclass=*)"
# ldapsearch -h hostname -x -b "o=somecompany.com" -D "cn=manager,o=somecompany.com" -W "(objectclass=*)"
# ldapsearch -h hostname -x -z 0 -b "o=somecompany.com" -D "cn=manager,o=somecompany.com" -w password "(objectclass=*)"
# ldapsearch -h hostname -x -b "o=somecompany.com" -D "cn=manager,o=somecompany.com" -w password "(objectclass=*)"

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,13 @@
JOURNALCODE JOURNALLIB ECRITURENUM ECRITUREDATE COMPTENUM COMPTELIB COMPAUXNUM COMPAUXLIB PIECEREF PIECEDATE ECRITURELIB DEBIT CREDIT ECRITURELET DATELET VALIDDATE MONTANTDEVISE IDEVISE
Banque Banque 17293 20170109 401PPRO PUBLI-PROV L08 20170109 PPRO domiciliation 1TR 187,20 0,00 20170109
Banque Banque 17293 20170109 5121CRA CR AGRICOLE L08 20170109 PPRO domiciliation 1TR 0,00 187,20 20170109
Banque Banque 17295 20170109 401ORPA ORANGE PARIS Report 20170109 ORPA adsl par 12 96,00 0,00 20170109
Banque Banque 17295 20170109 5121CRA CR AGRICOLE Report 20170109 ORPA adsl par 12 0,00 96,00 20170109
Banque Banque 17302 20170105 401ORVI ORANGE VEBRON INTERNET Report 20170105 ORVI adsl veb 12 26,00 0,00 20170109
Banque Banque 17302 20170105 5121CRA CR AGRICOLE Report 20170105 ORVI adsl veb 12 0,00 26,00 20170109
Fournisseurs Fournisseurs 17305 20170119 401ZDAV SANDRA DAVILA A01 20170119 ZDAV courtage s/ ventes 0,00 508,00 20170119
Fournisseurs Fournisseurs 17305 20170119 622200 Courtages s/ ventes A01 20170119 ZDAV courtage s/ ventes 508,00 0,00 20170119
Banque Banque 17306 20170119 5121CRA CR AGRICOLE A01 20170119 ZDAV courtage s/ ventes 0,00 508,00 20170119
Banque Banque 17306 20170119 401ZDAV SANDRA DAVILA A01 20170119 ZDAV courtage s/ ventes 508,00 0,00 20170119
Banque Banque 17307 20170119 401ZDAV SANDRA DAVILA A01 20170119 ZDAV courtage s/ ventes 508,00 0,00 20170131
Banque Banque 17307 20170119 5121CRA CR AGRICOLE A01 20170119 ZDAV courtage s/ ventes 0,00 508,00 20170131

View File

@@ -1,2 +0,0 @@
out.*
socpeople*

View File

@@ -1,34 +0,0 @@
README (English)
--------------------------------
This directory contains PHP script samples that can be used to start a development on Dolibarr.
*** build_class_from_table.php:
This is the script to use to generate PHP code of a PHP POJO class
object, a PHP script that use this POJO. This script use the files
skeleton_*.php to build its generated code.
*** modMyModule.class.php:
Is a sample of module descriptor that you can use if you want to build a new module/plugin for
Dolibarr.
*** skeleton_script.php:
Is a sample you can use as an example if you need to build a script to run on command line
*** skeleton_page.php:
Is a sample you can use as an example if you need to build an HTML page to include in Dolibarr GUI.
*** skeleton_class.class.php:
Is a sample you can use as an example if you need to build a class file to access a new table required by a Dolibarr development.
However it is better to run the build_class_from_table.php script that accepts a table name as a parameter and will uses the description table within database and the skeleton_class.class.php file to generate full code for your class file.
After running this script, the class to access your table (insert a record, update, delete and select) is directly finished and can be used by your module's code.
No more coding is needed to get access to table with this script because the file is completely generated once.

1
dev/skeletons/README.md Normal file
View File

@@ -0,0 +1 @@
Files and tools were moved into htdocs/modulebuilder/template

View File

@@ -1,123 +0,0 @@
#!/usr/bin/env php
<?php
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file dev/skeletons/build_api_class.php
* \ingroup core
* \brief Create a complete API class file from existant class file
*/
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path=dirname(__FILE__).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
exit;
}
// Include Dolibarr environment
require_once($path."../../htdocs/master.inc.php");
// After this $db is a defined handler to database.
// Main
$version='1';
@set_time_limit(0);
$error=0;
$langs->load("main");
print "***** $script_file ($version) *****\n";
// -------------------- START OF BUILD_API_FROM_CLASS --------------------
// Check parameters
if (! isset($argv[1]) && ! isset($argv[2]))
{
print "Usage: $script_file phpClassFile phpClassName\n";
exit;
}
// Show parameters
print 'Classfile='.$argv[1]."\n";
print 'Classname='.$argv[2]."\n";
$classfile=$argv[1];
$classname=$argv[2];
$classmin=strtolower($classname);
$classnameApi = $classname.'Api';
$property=array();
$targetcontent='';
// Load the class and read properties
require_once($classfile);
$property=array();
$class = new $classname($db);
$values=get_class_vars($classname);
unset($values['db']);
unset($values['error']);
unset($values['errors']);
unset($values['element']);
unset($values['table_element']);
unset($values['table_element_line']);
unset($values['fk_element']);
unset($values['ismultientitymanaged']);
// Read skeleton_api_class.class.php file
$skeletonfile=$path.'skeleton_api_class.class.php';
$sourcecontent=file_get_contents($skeletonfile);
if (! $sourcecontent)
{
print "\n";
print "Error: Failed to read skeleton sample '".$skeletonfile."'\n";
print "Try to run script from skeletons directory.\n";
exit;
}
// Define output variables
$outfile='out.api_'.$classmin.'.class.php';
$targetcontent=$sourcecontent;
// Substitute class name
$targetcontent=preg_replace('/skeleton_api_class\.class\.php/', 'api_'.$classmin.'.class.php', $targetcontent);
$targetcontent=preg_replace('/skeleton/', $classmin, $targetcontent);
//$targetcontent=preg_replace('/\$table_element=\'skeleton\'/', '\$table_element=\''.$tablenoprefix.'\'', $targetcontent);
$targetcontent=preg_replace('/SkeletonApi/', $classnameApi, $targetcontent);
$targetcontent=preg_replace('/Skeleton/', $classname, $targetcontent);
// Build file
$fp=fopen($outfile,"w");
if ($fp)
{
fputs($fp, $targetcontent);
fclose($fp);
print "\n";
print "File '".$outfile."' has been built in current directory.\n";
}
else $error++;
// -------------------- END OF BUILD_CLASS_FROM_TABLE SCRIPT --------------------
print "You can now rename generated files by removing the 'out.' prefix in their name and store them into directory /module/class.\n";
return $error;

View File

@@ -1,676 +0,0 @@
#!/usr/bin/env php
<?php
/* Copyright (C) 2008-2014 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file dev/skeletons/build_class_from_table.php
* \ingroup core
* \brief Create a complete class file from a table in database
*/
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path=dirname(__FILE__).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
exit;
}
// Include Dolibarr environment
require_once($path."../../htdocs/master.inc.php");
// After this $db is a defined handler to database.
// Main
$version='3.2';
@set_time_limit(0);
$error=0;
$langs->load("main");
print "***** $script_file ($version) *****\n";
// -------------------- START OF BUILD_CLASS_FROM_TABLE SCRIPT --------------------
// Check parameters
if (! isset($argv[1]) || ! isset($argv[2]) || (isset($argv[3]) && ! isset($argv[7])))
{
print "Usage: $script_file tablename modulename [server port databasename user pass]\n";
exit;
}
if (isset($argv[3]) && isset($argv[4]) && isset($argv[5]) && isset($argv[6]) && isset($argv[7]))
{
print 'Use specific database ids'."\n";
$db=getDoliDBInstance('mysqli',$argv[3],$argv[6],$argv[7],$argv[5],$argv[4]);
}
if ($db->type != 'mysql' && $db->type != 'mysqli')
{
print "Error: This script works with mysql or mysqli driver only\n";
exit;
}
$table=$argv[1];
$module=$argv[2];
// Show parameters
print 'Tablename: '.$table."\n";
print 'Modulename: '.$module."\n";
print "Current dir: ".getcwd()."\n";
print "Database name: ".$db->database_name."\n";
// Define array with list of properties
$property=array();
$foundprimary=0;
$resql=$db->DDLDescTable($table);
if ($resql)
{
$i=0;
while($obj=$db->fetch_object($resql))
{
//var_dump($obj);
$i++;
$property[$i]['field']=$obj->Field;
if ($obj->Key == 'PRI')
{
$property[$i]['primary']=1;
$foundprimary=1;
}
else
{
$property[$i]['primary']=1;
}
$property[$i]['type'] =$obj->Type;
$property[$i]['null'] =$obj->Null;
$property[$i]['extra']=$obj->Extra;
if ($property[$i]['type'] == 'date'
|| $property[$i]['type'] == 'datetime'
|| $property[$i]['type'] == 'timestamp')
{
$property[$i]['istime']=true;
}
else
{
$property[$i]['istime']=false;
}
if (preg_match('/varchar/i',$property[$i]['type'])
|| preg_match('/text/i',$property[$i]['type']))
{
$property[$i]['ischar']=true;
}
else
{
$property[$i]['ischar']=false;
}
if (preg_match('/int/i',$property[$i]['type']))
{
$property[$i]['isint']=true;
}
else
{
$property[$i]['isint']=false;
}
}
}
else
{
print "Error: Failed to get description for table '".$table."'.\n";
return false;
}
//var_dump($property);
// Define substitute fetch/select parameters
$varpropselect="\n";
$cleanparam='';
$i=0;
foreach($property as $key => $prop)
{
$i++;
if ($prop['field'] != 'rowid')
{
$varpropselect.="\t\t\$sql .= \" ";
$varpropselect.="t.".$prop['field'];
if ($i < count($property)) $varpropselect.=",";
$varpropselect.="\";";
$varpropselect.="\n";
}
}
//--------------------------------
// Build skeleton_class.class.php
//--------------------------------
// Define working variables
$table=strtolower($table);
$tablenoprefix=preg_replace('/'.preg_quote(MAIN_DB_PREFIX,'/').'/i','',$table);
$classname=preg_replace('/_/','',ucfirst($tablenoprefix));
$classmin=preg_replace('/_/','',strtolower($classname));
// Read skeleton_class.class.php file
$skeletonfile=$path.'skeleton_class.class.php';
$sourcecontent=file_get_contents($skeletonfile);
if (! $sourcecontent)
{
print "\n";
print "Error: Failed to read skeleton sample '".$skeletonfile."'\n";
print "Try to run script from skeletons directory.\n";
exit;
}
// Define output variables
$outfile=$classmin.'.class.php';
$targetcontent=$sourcecontent;
// Substitute module name
$targetcontent=preg_replace('/dev\/skeletons/', $module, $targetcontent);
$targetcontent=preg_replace('/mymodule othermodule1 othermodule2/', $module, $targetcontent);
$targetcontent=preg_replace('/mymodule/', $module, $targetcontent);
// Substitute class name
$targetcontent=preg_replace('/skeleton_class\.class\.php/', $classmin.'.class.php', $targetcontent);
$targetcontent=preg_replace('/\$element = \'skeleton\'/', '\$element = \''.$classmin.'\'', $targetcontent);
$targetcontent=preg_replace('/\$table_element = \'skeleton\'/', '\$table_element = \''.$tablenoprefix.'\'', $targetcontent);
$targetcontent=preg_replace('/Skeleton_Class/', $classname, $targetcontent);
$targetcontent=preg_replace('/skeletons/', $classmin, $targetcontent);
$targetcontent=preg_replace('/skeleton/', $classmin, $targetcontent);
// Substitute comments
$targetcontent=preg_replace('/This file is an example to create a new class file/', 'Put here description of this class', $targetcontent);
$targetcontent=preg_replace('/\s*\/\/\.\.\./', '', $targetcontent);
$targetcontent=preg_replace('/Put here some comments/','Initialy built by build_class_from_table on '.strftime('%Y-%m-%d %H:%M',mktime()), $targetcontent);
// Substitute table name
$targetcontent=preg_replace('/MAIN_DB_PREFIX."mytable/', 'MAIN_DB_PREFIX."'.$tablenoprefix, $targetcontent);
// Substitute declaration parameters
$varprop="\n";
$cleanparam='';
foreach($property as $key => $prop)
{
if ($prop['field'] != 'rowid' && $prop['field'] != 'id')
{
$varprop.="\tpublic \$".$prop['field'];
if ($prop['istime']) $varprop.=" = ''";
$varprop.=";";
if ($prop['comment']) $varprop.="\t// ".$prop['extra'];
$varprop.="\n";
}
}
$targetcontent=preg_replace('/'.preg_quote('public $prop1;','/').'/', $varprop, $targetcontent);
$targetcontent=preg_replace('/'.preg_quote('public $prop2;','/').'/', '', $targetcontent);
$targetcontent=preg_replace('/\*((\s|\n|\r|\t)*)\@var mixed Sample property 1((\s|\n|\r|\t)*)/', '', $targetcontent);
$targetcontent=preg_replace('/\*((\s|\n|\r|\t)*)\@var mixed Sample property 2((\s|\n|\r|\t)*)/', '', $targetcontent);
// Substitute clean parameters
$varprop="\n";
$cleanparam='';
foreach($property as $key => $prop)
{
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
{
$varprop.="\t\tif (isset(\$this->".$prop['field'].")) {\n\t\t\t \$this->".$prop['field']." = trim(\$this->".$prop['field'].");\n\t\t}";
$varprop.="\n";
}
}
$targetcontent=preg_replace('/if \(isset\(\$this->prop1\)\) {((\n|\r|\t)*)\$this->prop1 = trim\(\$this->prop1\);((\n|\r|\t)*)}/', $varprop, $targetcontent);
$targetcontent=preg_replace('/if \(isset\(\$this->prop2\)\) {((\n|\r|\t)*)\$this->prop2 = trim\(\$this->prop2\);((\n|\r|\t)*)}/', '', $targetcontent);
$no_output_field=0;
foreach($property as $key => $prop)
{
if ($prop['field'] == 'tms') $no_output_field++; // This is a field of type timestamp edited automatically
if ($prop['extra'] == 'auto_increment') $no_output_field++;
}
// Substitute insert into parameters
$varprop="\n";
$cleanparam='';
$i=0;
foreach($property as $key => $prop)
{
$i++;
$addfield=1;
if ($prop['field'] == 'tms') $addfield=0; // This is a field of type timestamp edited automatically
if ($prop['extra'] == 'auto_increment') $addfield=0;
if ($addfield)
{
$varprop.="\t\t\$sql.= '".$prop['field'];
if ($i < (count($property)-$no_output_field)) $varprop.=",";
$varprop.="';";
$varprop.="\n";
}
}
$targetcontent=preg_replace('/\$sql \.= \' field1,\';/', $varprop, $targetcontent);
$targetcontent=preg_replace('/\$sql \.= \' field2\';/', '', $targetcontent);
// Substitute insert values parameters
$varprop="\n";
$cleanparam='';
$i=0;
//Count nb field to output to manage commat at end SQL instruction
foreach($property as $key => $prop)
{
$addfield=1;
if ($prop['field'] == 'tms') $addfield=0; // This is a field of type timestamp edited automatically
if ($prop['extra'] == 'auto_increment') $addfield=0;
if ($addfield)
{
$i++;
$varprop.="\t\t\$sql .= ' ";
if ($prop['field']=='datec')
{
$varprop.='\'."\'".$this->db->idate(dol_now())."\'"';
}
elseif ($prop['istime'])
{
$varprop.='\'.(! isset($this->'.$prop['field'].') || dol_strlen($this->'.$prop['field'].')==0?\'NULL\':"\'".$this->db->idate(';
$varprop.="\$this->".$prop['field'];
$varprop.=").\"'\")";
}
elseif ($prop['ischar'])
{
$varprop.="'.(! isset(\$this->".$prop['field'].")?'NULL':\"'\".";
$varprop.="\$this->db->escape(\$this->".$prop['field'].")";
$varprop.=".\"'\")";
}
elseif ($prop['field']=='fk_user_mod' || $prop['field']=='fk_user_author')
{
$varprop.="'.\$user->id";
}
elseif ($prop['isint'])
{
$varprop.='\'.(! isset($this->'.$prop['field'].')?\'NULL\':';
$varprop.="\$this->".$prop['field'];
$varprop.=')';
}
else
{
$varprop.='\'.(! isset($this->'.$prop['field'].')?\'NULL\':"\'".';
$varprop.="\$this->".$prop['field'];
$varprop.='."\'")';
}
if ($i < (count($property)-$no_output_field)) $varprop.=".','";
$varprop.=';';
$varprop.="\n";
}
}
$patern1='/\$sql \.= \' (.*)\' \. \$this->prop1 \. \'(.*),\';/';
$patern2='/\$sql \.= \' (.*)\' \. \$this->prop2 \. \'(.*)\';/';
$targetcontent=preg_replace($patern1, $varprop, $targetcontent);
$targetcontent=preg_replace($patern2, '', $targetcontent);
// Substitute update values parameters
//Count nb field to output to manage commat at end SQL instruction
$no_output_field=0;
foreach($property as $key => $prop)
{
if ($prop['extra'] == 'auto_increment') $no_output_field++;
}
$varprop="\n";
$cleanparam='';
$i=0;
foreach($property as $key => $prop)
{
$addfield=1;
if ($prop['extra'] == 'auto_increment') $addfield=0;
if ($addfield)
{
$i++;
$varprop.="\t\t\$sql .= ' ";
$varprop.=$prop['field'].' = ';
if ($prop['field']=='tms') {
$varprop.='\'.(dol_strlen($this->'.$prop['field'].') != 0 ? "\'".$this->db->idate(';
$varprop.='$this->'.$prop['field'];
$varprop.=')."\'" : "\'".$this->db->idate(dol_now())."\'")';
}
elseif ($prop['istime'])
{
$varprop.='\'.(! isset($this->'.$prop['field'].') || dol_strlen($this->'.$prop['field'].') != 0 ? "\'".$this->db->idate(';
$varprop.='$this->'.$prop['field'];
$varprop.=')."\'" : \'null\')';
}
elseif ($prop['field']=='fk_user_mod') {
$varprop.="'.\$user->id";
}
else
{
$varprop.="'.";
if ($prop['ischar']) $varprop.='(isset($this->'.$prop['field'].')?"\'".$this->db->escape($this->'.$prop['field'].')."\'":"null")';
elseif ($prop['isint']) $varprop.='(isset($this->'.$prop['field'].')?$this->'.$prop['field'].':"null")';
else $varprop.='(isset($this->'.$prop['field'].')?$this->'.$prop['field'].':"null")';
}
if ($i < (count($property)-$no_output_field)) $varprop.=".','";
$varprop.=';';
$varprop.="\n";
}
}
$targetcontent=preg_replace('/\$sql \.= " field1=".\(isset\(\$this->field1\)\?"\'".\$this->db->escape\(\$this->field1\)."\'":"null"\).",";/', $varprop, $targetcontent);
$targetcontent=preg_replace('/\$sql \.= " field2=".\(isset\(\$this->field2\)\?"\'".\$this->db->escape\(\$this->field2\)."\'":"null"\)."";/', '', $targetcontent);
// Substitute fetch/select parameters
$targetcontent=preg_replace('/\$sql \.= \' t\.field1,\';/', $varpropselect, $targetcontent);
$targetcontent=preg_replace('/\$sql \.= \' t\.field2\';/', '', $targetcontent);
// Substitute select set parameters
$varprop="\n";
$varpropline="\n";
$cleanparam='';
$i=0;
foreach($property as $key => $prop)
{
$i++;
if ($prop['field'] != 'rowid' && $prop['field'] != 'id')
{
$varprop.="\t\t\t\t\$this->".$prop['field']." = ";
if ($prop['istime']) $varprop.='$this->db->jdate(';
$varprop.='$obj->'.$prop['field'];
if ($prop['istime']) $varprop.=')';
$varprop.=";";
$varprop.="\n";
$varpropline.="\t\t\t\t\$line->".$prop['field']." = ";
if ($prop['istime']) $varpropline.='$this->db->jdate(';
$varpropline.='$obj->'.$prop['field'];
if ($prop['istime']) $varpropline.=')';
$varpropline.=";";
$varpropline.="\n";
}
}
$targetcontent=preg_replace('/\$this->prop1 = \$obj->field1;/', $varprop, $targetcontent);
$targetcontent=preg_replace('/\$this->prop2 = \$obj->field2;/', '', $targetcontent);
//Substirute fetchAll
$targetcontent=preg_replace('/\$line->prop1 = \$obj->field1;/', $varpropline, $targetcontent);
$targetcontent=preg_replace('/\$line->prop2 = \$obj->field2;/', '', $targetcontent);
// Substitute initasspecimen parameters
$varprop="\n";
$cleanparam='';
foreach($property as $key => $prop)
{
if ($prop['field'] != 'rowid' && $prop['field'] != 'id')
{
$varprop.="\t\t\$this->".$prop['field']." = '';";
$varprop.="\n";
}
}
$targetcontent=preg_replace('/\$this->prop1 = \'prop1\';/', $varprop, $targetcontent);
$targetcontent=preg_replace('/\$this->prop2 = \'prop2\';/', '', $targetcontent);
// Build file
$fp=fopen($outfile,"w");
if ($fp)
{
fputs($fp, $targetcontent);
fclose($fp);
print "\n";
print "File '".$outfile."' has been built in current directory.\n";
}
else $error++;
//--------------------------------------------------------------------
// Build skeleton_script.php, skeleton_list.php and skeleton_card.php
//--------------------------------------------------------------------
$skeletonfiles=array(
$path.'skeleton_script.php' => $classmin.'_script.php',
$path.'skeleton_list.php' => $classmin.'_list.php',
$path.'skeleton_card.php' => $classmin.'_card.php'
);
foreach ($skeletonfiles as $skeletonfile => $outfile)
{
$sourcecontent=file_get_contents($skeletonfile);
if (! $sourcecontent)
{
print "\n";
print "Error: Failed to read skeleton sample '".$skeletonfile."'\n";
print "Try to run script from skeletons directory.\n";
exit;
}
// Define output variables
$targetcontent=$sourcecontent;
// Substitute module name
$targetcontent=preg_replace('/dev\/skeletons/', $module, $targetcontent);
$targetcontent=preg_replace('/mymodule othermodule1 othermodule2/', $module, $targetcontent);
$targetcontent=preg_replace('/mymodule/', $module, $targetcontent);
// Substitute class name
$targetcontent=preg_replace('/skeleton_class\.class\.php/', $classmin.'.class.php', $targetcontent);
$targetcontent=preg_replace('/skeleton_script\.php/', $classmin.'_script.php', $targetcontent);
$targetcontent=preg_replace('/\$element = \'skeleton\'/', '\$element=\''.$classmin.'\'', $targetcontent);
$targetcontent=preg_replace('/\$table_element = \'skeleton\'/', '\$table_element=\''.$classmin.'\'', $targetcontent);
$targetcontent=preg_replace('/Skeleton_Class/', $classname, $targetcontent);
$targetcontent=preg_replace('/skeletons/', $classmin, $targetcontent);
$targetcontent=preg_replace('/skeleton/', $classmin, $targetcontent);
// Substitute comments
$targetcontent=preg_replace('/This file is an example to create a new class file/', 'Put here description of this class', $targetcontent);
$targetcontent=preg_replace('/\s*\/\/\.\.\./', '', $targetcontent);
$targetcontent=preg_replace('/Put here some comments/','Initialy built by build_class_from_table on '.strftime('%Y-%m-%d %H:%M',mktime()), $targetcontent);
// Substitute table name
$targetcontent=preg_replace('/MAIN_DB_PREFIX."mytable/', 'MAIN_DB_PREFIX."'.$tablenoprefix, $targetcontent);
// Substitute GETPOST search_fieldx
$varprop="\n";
$cleanparam='';
foreach($property as $key => $prop)
{
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
{
if ($prop['isint']) $varprop.='$search_'.$prop['field']."=GETPOST('search_".$prop['field']."','int');\n";
else $varprop.='$search_'.$prop['field']."=GETPOST('search_".$prop['field']."','alpha');\n";
}
}
$targetcontent=preg_replace('/'.preg_quote('$search_field1=GETPOST("search_field1");','/').'/', $varprop, $targetcontent);
$targetcontent=preg_replace('/'.preg_quote('$search_field2=GETPOST("search_field2");','/').'/', '', $targetcontent);
// Substitute GETPOST fieldx
$varprop="\n";
$cleanparam='';
foreach($property as $key => $prop)
{
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
{
if ($prop['isint']) $varprop.="\t\$object->".$prop['field']."=GETPOST('".$prop['field']."','int');\n";
else $varprop.="\t\$object->".$prop['field']."=GETPOST('".$prop['field']."','alpha');\n";
}
}
$targetcontent=preg_replace('/'.preg_quote('$object->prop1=GETPOST("field1");','/').'/', $varprop, $targetcontent);
$targetcontent=preg_replace('/'.preg_quote('$object->prop2=GETPOST("field2");','/').'/', '', $targetcontent);
// Substitute reset search_field = '';
$varprop="\n";
$cleanparam='';
foreach($property as $key => $prop)
{
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
{
$varprop.='$search_'.$prop['field']."='';\n";
}
}
$targetcontent=preg_replace('/'.preg_quote('$search_field1=\'\';','/').'/', $varprop, $targetcontent);
$targetcontent=preg_replace('/'.preg_quote('$search_field2=\'\';','/').'/', '', $targetcontent);
// Substitute fetch/select parameters
$targetcontent=preg_replace('/\$sql\s*\.= " t\.field1,";/', $varpropselect, $targetcontent);
$targetcontent=preg_replace('/\$sql\s*\.= " t\.field2";/', '', $targetcontent);
// Substitute where for search
$varprop="\n";
$cleanparam='';
foreach($property as $key => $prop)
{
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
{
$varprop.='if ($search_'.$prop['field'].') $sql.= natural_search("'.$prop['field'].'",$search_'.$prop['field'].');'."\n";
}
}
$targetcontent=preg_replace('/'.preg_quote('if ($search_field1) $sql.= natural_search("field1",$search_field1);','/').'/', $varprop, $targetcontent);
$targetcontent=preg_replace('/'.preg_quote('if ($search_field2) $sql.= natural_search("field2",$search_field2);','/').'/', '', $targetcontent);
// substitute $params.=
$varprop="\n";
$cleanparam='';
foreach($property as $key => $prop)
{
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
{
$varprop.="if (\$search_".$prop['field']." != '') \$params.= '&amp;search_".$prop['field']."='.urlencode(\$search_".$prop['field'].");\n";
}
}
$targetcontent=preg_replace('/'.preg_quote("if (\$search_field1 != '') \$params.= '&amp;search_field1='.urlencode(\$search_field1);",'/').'/', $varprop, $targetcontent);
$targetcontent=preg_replace('/'.preg_quote("if (\$search_field2 != '') \$params.= '&amp;search_field2='.urlencode(\$search_field2);",'/').'/', '', $targetcontent);
// Substitute arrayfields
$varprop="\n";
$cleanparam='';
foreach($property as $key => $prop)
{
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
{
$varprop.="'t.".$prop['field']."'=>array('label'=>\$langs->trans(\"Field".$prop['field']."\"), 'checked'=>1),\n";
}
}
$targetcontent=preg_replace('/'.preg_quote("'t.field1'=>array('label'=>\$langs->trans(\"Field1\"), 'checked'=>1),",'/').'/', $varprop, $targetcontent);
$targetcontent=preg_replace('/'.preg_quote("'t.field2'=>array('label'=>\$langs->trans(\"Field2\"), 'checked'=>1),",'/').'/', '', $targetcontent);
// Substitute print_liste_field_titre
$varprop="\n";
$cleanparam='';
foreach($property as $key => $prop)
{
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
{
$varprop.="if (! empty(\$arrayfields['t.".$prop['field']."']['checked'])) print_liste_field_titre(\$arrayfields['t.".$prop['field']."']['label'],\$_SERVER['PHP_SELF'],'t.".$prop['field']."','',\$params,'',\$sortfield,\$sortorder);\n";
}
}
$targetcontent=preg_replace('/LIST_OF_TD_TITLE_FIELDS/', $varprop, $targetcontent);
// Substitute fields title search
$varprop="\n";
$cleanparam='';
foreach($property as $key => $prop)
{
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
{
$varprop.="if (! empty(\$arrayfields['t.".$prop['field']."']['checked'])) print '<td class=\"liste_titre\"><input type=\"text\" class=\"flat\" name=\"search_".$prop['field']."\" value=\"'.\$search_".$prop['field'].".'\" size=\"10\"></td>';\n";
}
}
$targetcontent=preg_replace('/LIST_OF_TD_TITLE_SEARCH/', $varprop, $targetcontent);
// Substitute where for <td>.fieldx.</td>
$varprop="\n";
$cleanparam='';
foreach($property as $key => $prop)
{
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
{
$varprop.="if (! empty(\$arrayfields['t.".$prop['field']."']['checked'])) print '<td>'.\$obj->".$prop['field'].".'</td>';\n";
}
}
$targetcontent=preg_replace('/'.preg_quote("if (! empty(\$arrayfields['t.field1']['checked'])) print '<td>'.\$obj->field1.'</td>';",'/').'/', $varprop, $targetcontent);
$targetcontent=preg_replace('/'.preg_quote("if (! empty(\$arrayfields['t.field2']['checked'])) print '<td>'.\$obj->field2.'</td>';",'/').'/', '', $targetcontent);
// LIST_OF_TD_LABEL_FIELDS_CREATE - List of td for card view
$varprop="\n";
$cleanparam='';
foreach($property as $key => $prop)
{
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
{
$varprop.="print '<tr><td class=\"fieldrequired\">'.\$langs->trans(\"Field".$prop['field']."\").'</td><td><input class=\"flat\" type=\"text\" name=\"".$prop['field']."\" value=\"'.GETPOST('".$prop['field']."').'\"></td></tr>';\n";
}
}
$targetcontent=preg_replace('/LIST_OF_TD_LABEL_FIELDS_CREATE/', $varprop, $targetcontent);
// LIST_OF_TD_LABEL_FIELDS_EDIT - List of td for card view
$varprop="\n";
$cleanparam='';
foreach($property as $key => $prop)
{
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
{
$varprop.="print '<tr><td class=\"fieldrequired\">'.\$langs->trans(\"Field".$prop['field']."\").'</td><td><input class=\"flat\" type=\"text\" name=\"".$prop['field']."\" value=\"'.\$object->".$prop['field'].".'\"></td></tr>';\n";
}
}
$targetcontent=preg_replace('/LIST_OF_TD_LABEL_FIELDS_EDIT/', $varprop, $targetcontent);
// LIST_OF_TD_LABEL_FIELDS_VIEW - List of td for card view
$varprop="\n";
$cleanparam='';
foreach($property as $key => $prop)
{
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
{
$varprop.="print '<tr><td class=\"fieldrequired\">'.\$langs->trans(\"Field".$prop['field']."\").'</td><td>\$object->".$prop['field']."</td></tr>';\n";
}
}
$targetcontent=preg_replace('/LIST_OF_TD_LABEL_FIELDS_VIEW/', $varprop, $targetcontent);
// LIST_OF_TD_FIELDS_LIST
// Build file
$fp=fopen($outfile,"w");
if ($fp)
{
fputs($fp, $targetcontent);
fclose($fp);
print "File '".$outfile."' has been built in current directory.\n";
}
else $error++;
}
// -------------------- END OF BUILD_CLASS_FROM_TABLE SCRIPT --------------------
print "You can now move generated files to store them into directory /yourmodule/class (for .class.php file) or /yourmodule.\n";
return $error;

View File

@@ -1,179 +0,0 @@
#!/usr/bin/env php
<?php
/* Copyright (C) 2009 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file dev/skeletons/build_webservice_from_class.php
* \ingroup core
* \brief Create a complete webservice file from CRUD functions of a PHP class
*/
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path=dirname(__FILE__).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
exit;
}
// Include Dolibarr environment
require_once($path."../../htdocs/master.inc.php");
// After this $db is a defined handler to database.
// Main
$version='1.8';
@set_time_limit(0);
$error=0;
$langs->load("main");
print "***** $script_file ($version) *****\n";
// -------------------- START OF BUILD_CLASS_FROM_TABLE SCRIPT --------------------
// Check parameters
if (! isset($argv[1]) && ! isset($argv[2]))
{
print "Usage: $script_file phpClassFile phpClassName\n";
exit;
}
// Show parameters
print 'Classfile='.$argv[1]."\n";
print 'Classname='.$argv[2]."\n";
$classfile=$argv[1];
$classname=$argv[2];
$classmin=strtolower($classname);
$property=array();
$targetcontent='';
// Load the class and read properties
require_once($classfile);
$property=array();
$class = new $classname($db);
$values=get_class_vars($classname);
unset($values['db']);
unset($values['error']);
unset($values['errors']);
unset($values['element']);
unset($values['table_element']);
unset($values['table_element_line']);
unset($values['fk_element']);
unset($values['ismultientitymanaged']);
$properties=array_keys($values);
// Read skeleton_class.class.php file
$skeletonfile='skeleton_webservice_server.php';
$sourcecontent=file_get_contents($skeletonfile);
if (! $sourcecontent)
{
print "\n";
print "Error: Failed to read skeleton sample '".$skeletonfile."'\n";
print "Try to run script from skeletons directory.\n";
exit;
}
// Define output variables
$outfile='out.server_'.$classmin.'.php';
$targetcontent=$sourcecontent;
// Substitute class name
$targetcontent=preg_replace('/Skeleton/', $classname, $targetcontent);
$targetcontent=preg_replace('/skeleton/', $classmin, $targetcontent);
// Substitute declaration parameters
$varprop="\n";
$cleanparam='';
$i=0;
while($i<count($properties))
{
$varprop.="'".$properties[$i]."' => array('name'=>'".$properties[$i]."','type'=>'xsd:string')";
$i++;
if ($i == count($properties))
$varprop.="\n";
else
$varprop.=",\n";
}
$targetcontent=preg_replace('/\'prop1\'=>\'xxx\',/', $varprop, $targetcontent);
$targetcontent=preg_replace('/\'prop2\'=>\'xxx\',/', '', $targetcontent);
// Substitute get method parameters
$varprop="\n";
$cleanparam='';
$i=0;
while($i<count($properties))
{
$varprop.="'".$properties[$i]."' => $".$classmin."->".$properties[$i];
$i++;
if ($i == count($properties))
$varprop.="\n";
else
$varprop.=",\n";
}
$targetcontent=preg_replace('/\'prop1\'=>\$'.$classmin.'->prop1,/', $varprop, $targetcontent);
$targetcontent=preg_replace('/\'prop2\'=>\$'.$classmin.'->prop2,/', '', $targetcontent);
// Substitute get method parameters
$varprop="\n\t\t";
$cleanparam='';
$i=0;
while($i<count($properties))
{
$varprop.='$newobject->'.$properties[$i].'=$'.$classmin.'->'.$properties[$i].';';
$i++;
if ($i == count($properties))
$varprop.="\n";
else
$varprop.="\n\t\t";
}
$targetcontent=preg_replace('/\$newobject->prop1=\$'.$classmin.'->prop1;/', $varprop, $targetcontent);
$targetcontent=preg_replace('/\$newobject->prop2=\$'.$classmin.'->prop2;/', '', $targetcontent);
// Build file
$fp=fopen($outfile,"w");
if ($fp)
{
fputs($fp, $targetcontent);
fclose($fp);
print "File '".$outfile."' has been built in current directory.\n";
}
else $error++;
// -------------------- END OF BUILD_CLASS_FROM_TABLE SCRIPT --------------------
print "You must rename files by removing the 'out.' prefix in their name.\n";
return $error;

View File

@@ -1,351 +0,0 @@
<?php
/* Copyright (C) 2007-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) ---Put here your own copyright and developer email---
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file dev/skeletons/skeleton_card.php
* \ingroup mymodule othermodule1 othermodule2
* \brief This file is an example of a php page
* Put here some comments
*/
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1');
//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1');
//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1');
//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); // Do not check anti CSRF attack test
//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK','1'); // Do not check style html tag into posted data
//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Do not check anti POST attack test
//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no need to load and show top and left menu
//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php
//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
//if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session)
// Change this following line to use the correct relative path (../, ../../, etc)
$res=0;
if (! $res && file_exists("../main.inc.php")) $res=@include '../main.inc.php'; // to work if your module directory is into dolibarr root htdocs directory
if (! $res && file_exists("../../main.inc.php")) $res=@include '../../main.inc.php'; // to work if your module directory is into a subdir of root htdocs directory
if (! $res && file_exists("../../../dolibarr/htdocs/main.inc.php")) $res=@include '../../../dolibarr/htdocs/main.inc.php'; // Used on dev env only
if (! $res && file_exists("../../../../dolibarr/htdocs/main.inc.php")) $res=@include '../../../../dolibarr/htdocs/main.inc.php'; // Used on dev env only
if (! $res) die("Include of main fails");
// Change this following line to use the correct relative path from htdocs
include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php');
dol_include_once('/mymodule/class/skeleton_class.class.php');
// Load traductions files requiredby by page
$langs->load("mymodule");
$langs->load("other");
// Get parameters
$id = GETPOST('id','int');
$action = GETPOST('action','alpha');
$cancel = GETPOST('cancel');
$backtopage = GETPOST('backtopage');
$myparam = GETPOST('myparam','alpha');
$search_field1=GETPOST("search_field1");
$search_field2=GETPOST("search_field2");
if (empty($action) && empty($id) && empty($ref)) $action='view';
// Protection if external user
if ($user->societe_id > 0)
{
//accessforbidden();
}
//$result = restrictedArea($user, 'mymodule', $id);
$object = new Skeleton_Class($db);
$extrafields = new ExtraFields($db);
// fetch optionals attributes and labels
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
// Load object
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
// Initialize technical object to manage hooks of modules. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('skeleton'));
/*******************************************************************
* ACTIONS
*
* Put here all code to do according to value of "action" parameter
********************************************************************/
$parameters=array();
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
if (empty($reshook))
{
if ($cancel)
{
if ($action != 'addlink')
{
$urltogo=$backtopage?$backtopage:dol_buildpath('/mymodule/list.php',1);
header("Location: ".$urltogo);
exit;
}
if ($id > 0 || ! empty($ref)) $ret = $object->fetch($id,$ref);
$action='';
}
// Action to add record
if ($action == 'add')
{
if (GETPOST('cancel'))
{
$urltogo=$backtopage?$backtopage:dol_buildpath('/mymodule/list.php',1);
header("Location: ".$urltogo);
exit;
}
$error=0;
/* object_prop_getpost_prop */
$object->prop1=GETPOST("field1");
$object->prop2=GETPOST("field2");
if (empty($object->ref))
{
$error++;
setEventMessages($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Ref")), null, 'errors');
}
if (! $error)
{
$result=$object->create($user);
if ($result > 0)
{
// Creation OK
$urltogo=$backtopage?$backtopage:dol_buildpath('/mymodule/list.php',1);
header("Location: ".$urltogo);
exit;
}
{
// Creation KO
if (! empty($object->errors)) setEventMessages(null, $object->errors, 'errors');
else setEventMessages($object->error, null, 'errors');
$action='create';
}
}
else
{
$action='create';
}
}
// Action to update record
if ($action == 'update')
{
$error=0;
$object->prop1=GETPOST("field1");
$object->prop2=GETPOST("field2");
if (empty($object->ref))
{
$error++;
setEventMessages($langs->transnoentitiesnoconv("ErrorFieldRequired",$langs->transnoentitiesnoconv("Ref")), null, 'errors');
}
if (! $error)
{
$result=$object->update($user);
if ($result > 0)
{
$action='view';
}
else
{
// Creation KO
if (! empty($object->errors)) setEventMessages(null, $object->errors, 'errors');
else setEventMessages($object->error, null, 'errors');
$action='edit';
}
}
else
{
$action='edit';
}
}
// Action to delete
if ($action == 'confirm_delete')
{
$result=$object->delete($user);
if ($result > 0)
{
// Delete OK
setEventMessages("RecordDeleted", null, 'mesgs');
header("Location: ".dol_buildpath('/mymodule/list.php',1));
exit;
}
else
{
if (! empty($object->errors)) setEventMessages(null, $object->errors, 'errors');
else setEventMessages($object->error, null, 'errors');
}
}
}
/***************************************************
* VIEW
*
* Put here all code to build page
****************************************************/
llxHeader('','MyPageName','');
$form=new Form($db);
// Put here content of your page
// Example : Adding jquery code
print '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
function init_myfunc()
{
jQuery("#myid").removeAttr(\'disabled\');
jQuery("#myid").attr(\'disabled\',\'disabled\');
}
init_myfunc();
jQuery("#mybutton").click(function() {
init_myfunc();
});
});
</script>';
// Part to create
if ($action == 'create')
{
print load_fiche_titre($langs->trans("NewMyModule"));
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="action" value="add">';
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
dol_fiche_head();
print '<table class="border centpercent">'."\n";
// print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td><input class="flat" type="text" size="36" name="label" value="'.$label.'"></td></tr>';
// LIST_OF_TD_LABEL_FIELDS_CREATE
print '</table>'."\n";
dol_fiche_end();
print '<div class="center"><input type="submit" class="button" name="add" value="'.$langs->trans("Create").'"> &nbsp; <input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></div>';
print '</form>';
}
// Part to edit record
if (($id || $ref) && $action == 'edit')
{
print load_fiche_titre($langs->trans("MyModule"));
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
dol_fiche_head();
print '<table class="border centpercent">'."\n";
// print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td><input class="flat" type="text" size="36" name="label" value="'.$label.'"></td></tr>';
// LIST_OF_TD_LABEL_FIELDS_EDIT
print '</table>';
dol_fiche_end();
print '<div class="center"><input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
print ' &nbsp; <input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
print '</div>';
print '</form>';
}
// Part to show record
if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create')))
{
$res = $object->fetch_optionals($object->id, $extralabels);
$head = commande_prepare_head($object);
dol_fiche_head($head, 'order', $langs->trans("CustomerOrder"), 0, 'order');
print load_fiche_titre($langs->trans("MyModule"));
dol_fiche_head();
if ($action == 'delete') {
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteMyOjbect'), $langs->trans('ConfirmDeleteMyObject'), 'confirm_delete', '', 0, 1);
print $formconfirm;
}
print '<table class="border centpercent">'."\n";
// print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td>'.$object->label.'</td></tr>';
// LIST_OF_TD_LABEL_FIELDS_VIEW
print '</table>';
dol_fiche_end();
// Buttons
print '<div class="tabsAction">'."\n";
$parameters=array();
$reshook=$hookmanager->executeHooks('addMoreActionsButtons',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
if (empty($reshook))
{
if ($user->rights->mymodule->write)
{
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=edit">'.$langs->trans("Modify").'</a></div>'."\n";
}
if ($user->rights->mymodule->delete)
{
print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete">'.$langs->trans('Delete').'</a></div>'."\n";
}
}
print '</div>'."\n";
// Example 2 : Adding links to objects
// Show links to link elements
//$linktoelem = $form->showLinkToObjectBlock($object, null, array('skeleton'));
//$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
}
// End of page
llxFooter();
$db->close();

View File

@@ -1,272 +0,0 @@
<?php
/* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/webservices/server_skeleton.php
* \brief File that is entry point to call Dolibarr WebServices
* \version $Id: server_skeleton.php,v 1.7 2010/12/19 11:49:37 eldy Exp $
*/
// This is to make Dolibarr working with Plesk
set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs');
require_once("../master.inc.php");
require_once(NUSOAP_PATH.'/nusoap.php'); // Include SOAP
require_once(DOL_DOCUMENT_ROOT."/core/lib/ws.lib.php");
require_once(DOL_DOCUMENT_ROOT."/skeleton/class/skeleton.class.php");
dol_syslog("Call Skeleton webservices interfaces");
// Enable and test if module web services is enabled
if (empty($conf->global->MAIN_MODULE_WEBSERVICES))
{
$langs->load("admin");
dol_syslog("Call Dolibarr webservices interfaces with module webservices disabled");
print $langs->trans("WarningModuleNotActive",'WebServices').'.<br><br>';
print $langs->trans("ToActivateModule");
exit;
}
// Create the soap Object
$server = new nusoap_server();
$server->soap_defencoding='UTF-8';
$server->decode_utf8=false;
$ns='http://www.dolibarr.org/ns/';
$server->configureWSDL('WebServicesDolibarrSkeleton',$ns);
$server->wsdl->schemaTargetNamespace=$ns;
// Define WSDL Authentication object
$server->wsdl->addComplexType(
'authentication',
'complexType',
'struct',
'all',
'',
array(
'dolibarrkey' => array('name'=>'dolibarrkey','type'=>'xsd:string'),
'sourceapplication' => array('name'=>'sourceapplication','type'=>'xsd:string'),
'login' => array('name'=>'login','type'=>'xsd:string'),
'password' => array('name'=>'password','type'=>'xsd:string'),
'entity' => array('name'=>'entity','type'=>'xsd:string'),
)
);
// Define WSDL Return object
$server->wsdl->addComplexType(
'result',
'complexType',
'struct',
'all',
'',
array(
'result_code' => array('name'=>'result_code','type'=>'xsd:string'),
'result_label' => array('name'=>'result_label','type'=>'xsd:string'),
)
);
// Define other specific objects
$server->wsdl->addComplexType(
'skeleton',
'complexType',
'struct',
'all',
'',
array(
'prop1'=>'xxx',
'prop2'=>'xxx',
//...
)
);
// 5 styles: RPC/encoded, RPC/literal, Document/encoded (not WS-I compliant), Document/literal, Document/literal wrapped
// Style merely dictates how to translate a WSDL binding to a SOAP message. Nothing more. You can use either style with any programming model.
// http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/
$styledoc='rpc'; // rpc/document (document is an extend into SOAP 1.0 to support unstructured messages)
$styleuse='encoded'; // encoded/literal/literal wrapped
// Better choice is document/literal wrapped but literal wrapped not supported by nusoap.
// Register WSDL
$server->register(
'getSkeleton',
// Entry values
array('authentication'=>'tns:authentication','id'=>'xsd:string','ref'=>'xsd:string','ref_ext'=>'xsd:string'),
// Exit values
array('result'=>'tns:result','skeleton'=>'tns:skeleton'),
$ns,
$ns.'#getSkeleton',
$styledoc,
$styleuse,
'WS to get skeleton'
);
// Register WSDL
$server->register(
'createSkeleton',
// Entry values
array('authentication'=>'tns:authentication','skeleton'=>'tns:skeleton'),
// Exit values
array('result'=>'tns:result','id'=>'xsd:string'),
$ns,
$ns.'#createSkeleton',
$styledoc,
$styleuse,
'WS to create a skeleton'
);
/**
* Get Skeleton
*
* @param array $authentication Array of authentication information
* @param int $id Id of object
* @param string $ref Ref of object
* @param string $ref_ext Ref external of object
* @return mixed
*/
function getSkeleton($authentication,$id,$ref='',$ref_ext='')
{
global $db,$conf,$langs;
dol_syslog("Function: getSkeleton login=".$authentication['login']." id=".$id." ref=".$ref." ref_ext=".$ref_ext);
if ($authentication['entity']) $conf->entity=$authentication['entity'];
// Init and check authentication
$objectresp=array();
$errorcode='';$errorlabel='';
$error=0;
$fuser=check_authentication($authentication,$error,$errorcode,$errorlabel);
// Check parameters
if (! $error && (($id && $ref) || ($id && $ref_ext) || ($ref && $ref_ext)))
{
$error++;
$errorcode='BAD_PARAMETERS'; $errorlabel="Parameter id, ref and ref_ext can't be both provided. You must choose one or other but not both.";
}
if (! $error)
{
$fuser->getrights();
if ($fuser->rights->skeleton->read)
{
$skeleton=new Skeleton($db);
$result=$skeleton->fetch($id,$ref,$ref_ext);
if ($result > 0)
{
// Create
$objectresp = array(
'result'=>array('result_code'=>'OK', 'result_label'=>''),
'skeleton'=>array(
'prop1'=>$skeleton->prop1,
'prop2'=>$skeleton->prop2,
//...
)
);
}
else
{
$error++;
$errorcode='NOT_FOUND'; $errorlabel='Object not found for id='.$id.' nor ref='.$ref.' nor ref_ext='.$ref_ext;
}
}
else
{
$error++;
$errorcode='PERMISSION_DENIED'; $errorlabel='User does not have permission for this request';
}
}
if ($error)
{
$objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel));
}
return $objectresp;
}
/**
* Create Skeleton
*
* @param array $authentication Array of authentication information
* @param Skeleton $skeleton $skeleton
* @return array Array result
*/
function createSkeleton($authentication,$skeleton)
{
global $db,$conf,$langs;
$now=dol_now();
dol_syslog("Function: createSkeleton login=".$authentication['login']);
if ($authentication['entity']) $conf->entity=$authentication['entity'];
// Init and check authentication
$objectresp=array();
$errorcode='';$errorlabel='';
$error=0;
$fuser=check_authentication($authentication,$error,$errorcode,$errorlabel);
// Check parameters
if (! $error)
{
$newobject=new Skeleton($db);
$newobject->prop1=$skeleton->prop1;
$newobject->prop2=$skeleton->prop2;
//...
$db->begin();
$result=$newobject->create($fuser);
if ($result <= 0)
{
$error++;
}
if (! $error)
{
$db->commit();
$objectresp=array('result'=>array('result_code'=>'OK', 'result_label'=>''),'id'=>$newobject->id,'ref'=>$newobject->ref);
}
else
{
$db->rollback();
$error++;
$errorcode='KO';
$errorlabel=$newobject->error;
}
}
if ($error)
{
$objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel));
}
return $objectresp;
}
// Return the results.
$server->service(file_get_contents("php://input"));

View File

@@ -0,0 +1,8 @@
#!/bin/sh
FROM=2016-01-01
TO=2016-12-31
echo "git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l"
git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l

View File

@@ -0,0 +1,15 @@
#/bin/bash
Releases=("3.8" "3.9" "4.0" "5.0", "develop")
Dates=("2010-01-01", "2011-01-01", "2012-01-01", "2013-01-01", "2014-01-01", "2015-01-01", "2016-07-01")
let "counter = 1"
for i in "${Releases[@]}"
do
git shortlog -s -n --after=${Dates[counter-1]} --before=${Dates[counter]}
echo -n "Total $i: "
git log --pretty=oneline --after=${Dates[counter-1]} --before=${Dates[counter]} | wc -l
echo "======================="
echo
let "counter +=1"
done

View File

@@ -0,0 +1,14 @@
Term Dolibarr SAP Odoo ...
----------------------------------------------------------------------------
Thirdparty Contact partner Partner/Contact (company)
Contact/address Contact person Partner/Contact (individual)
Financial ?? Invoicing
Income / Expense ?? Profit / Loss
Balance Net profit

View File

@@ -300,6 +300,8 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
if (preg_match('/^BoxTitleLatest/', $value)) $qualifiedforclean=0;
// install.lang
if (preg_match('/^KeepDefaultValues/', $value)) $qualifiedforclean=0;
// mail.lang
if (preg_match('/MailingModuleDesc/i', $value)) $qualifiedforclean=0;
// main.lang
if (preg_match('/^Duration/', $value)) $qualifiedforclean=0;
if (preg_match('/^FormatDate/', $value)) $qualifiedforclean=0;
@@ -308,6 +310,8 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
if (preg_match('/^.*Bytes$/', $value)) $qualifiedforclean=0;
if (preg_match('/^NoteSomeFeaturesAreDisabled/', $value)) $qualifiedforclean=0;
if (preg_match('/^(DoTest|Under|Limits|Cards|CurrentValue|DateLimit|DateAndHour|NbOfLines|NbOfObjects|NbOfReferes|TotalTTCShort|VATs)/', $value)) $qualifiedforclean=0;
// modulebuilder
if (preg_match('/^ModuleBuilderDesc/', $value)) $qualifiedforclean=0;
// orders
if (preg_match('/^OrderSource/', $value)) $qualifiedforclean=0;
if (preg_match('/^TypeContact_/', $value)) $qualifiedforclean=0;

View File

@@ -1,8 +1,16 @@
README (English)
# README (English)
--------------------------------
* Most screen captures and icons are Dolibarr contributions, however,
some icons are from http://led24.de/iconset/. This is original README file for this source:
* Screen captures and icons are Dolibarr contributions
* Most logos were created by Dolibarr developers. You may find sources of them on:
https://github.com/Dolibarr/foundation
* Few icons are from http://led24.de/iconset/. This is original README file for this source:
-------------------------------------------------------
You can do whatever you want with these icons (use on web or in desktop applications) as long as you dont pass them off as your own and remove this readme file. A credit statement and a link back to
http://led24.de/iconset/ or http://led24.de/ would be appreciated.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 23 KiB

BIN
doc/images/dolibarr_logo.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

1
htdocs/.gitignore vendored
View File

@@ -4,6 +4,7 @@
/dolimed*
/ecommerce*
/extensions*
/forceproject*
/google*
/lead
/multicompany*

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
@@ -27,7 +27,6 @@ require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
// Langs
$langs->load("compta");
@@ -37,10 +36,11 @@ $langs->load("accountancy");
$langs->load("salaries");
$mesg = '';
$action = GETPOST('action');
$action = GETPOST('action','aZ09');
$cancel = GETPOST('cancel');
$id = GETPOST('id', 'int');
$rowid = GETPOST('rowid', 'int');
$search_account = GETPOST("search_account");
$search_label = GETPOST("search_label");
$search_accountparent = GETPOST("search_accountparent");
@@ -52,10 +52,9 @@ if ($user->societe_id > 0) accessforbidden();
if (! $user->rights->accounting->chartofaccount) accessforbidden();
// Load variable for pagination
$limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit;
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'sortorder');
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit;
$page = GETPOST("page", 'int');
if ($page == - 1) {
$page = 0;
@@ -63,13 +62,23 @@ if ($page == - 1) {
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (! $sortfield)
$sortfield = "aa.account_number";
if (! $sortorder)
$sortorder = "ASC";
if (! $sortfield) $sortfield = "aa.account_number";
if (! $sortorder) $sortorder = "ASC";
$arrayfields=array(
'aa.account_number'=>array('label'=>$langs->trans("AccountNumber"), 'checked'=>1),
'aa.label'=>array('label'=>$langs->trans("Label"), 'checked'=>1),
'aa.account_parent'=>array('label'=>$langs->trans("Accountparent"), 'checked'=>0),
'aa.pcg_type'=>array('label'=>$langs->trans("Pcgtype"), 'checked'=>0),
'aa.pcg_subtype'=>array('label'=>$langs->trans("Pcgsubtype"), 'checked'=>0),
'aa.active'=>array('label'=>$langs->trans("Activated"), 'checked'=>1)
);
$accounting = new AccountingAccount($db);
// Initialize technical object to manage context to save list fields
$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'accountingaccountlist';
/*
* Actions
@@ -95,6 +104,7 @@ if (empty($reshook))
$search_accountparent = "";
$search_pcgtype = "";
$search_pcgsubtype = "";
$search_array_options=array();
}
if (GETPOST('change_chart'))
@@ -136,6 +146,8 @@ if (empty($reshook))
* View
*/
$form=new Form($db);
llxHeader('', $langs->trans("ListAccounts"));
if ($action == 'delete') {
@@ -154,21 +166,11 @@ if ($db->type == 'pgsql') $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_accou
else $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = CAST(aa.account_parent AS UNSIGNED)";
$sql .= " WHERE asy.rowid = " . $pcgver;
if (strlen(trim($search_account))) {
$sql .= natural_search("aa.account_number", $search_account);
}
if (strlen(trim($search_label))) {
$sql .= natural_search("aa.label", $search_label);
}
if (strlen(trim($search_accountparent))) {
$sql .= natural_search("aa.account_parent", $search_accountparent);
}
if (strlen(trim($search_pcgtype))) {
$sql .= natural_search("aa.pcg_type", $search_pcgtype);
}
if (strlen(trim($search_pcgsubtype))) {
$sql .= natural_search("aa.pcg_subtype", $search_pcgsubtype);
}
if (strlen(trim($search_account))) $sql .= natural_search("aa.account_number", $search_account);
if (strlen(trim($search_label))) $sql .= natural_search("aa.label", $search_label);
if (strlen(trim($search_accountparent))) $sql .= natural_search("aa.account_parent", $search_accountparent);
if (strlen(trim($search_pcgtype))) $sql .= natural_search("aa.pcg_type", $search_pcgtype);
if (strlen(trim($search_pcgsubtype))) $sql .= natural_search("aa.pcg_subtype", $search_pcgsubtype);
$sql .= $db->order($sortfield, $sortorder);
// Count total nb of records
@@ -184,39 +186,46 @@ $sql .= $db->plimit($limit + 1, $offset);
dol_syslog('accountancy/admin/account.php:: $sql=' . $sql);
$resql = $db->query($sql);
if ($resql) {
if ($resql)
{
$num = $db->num_rows($resql);
$params='';
if ($search_account != "") $params.= '&amp;search_account='.urlencode($search_account);
if ($search_label != "") $params.= '&amp;search_label='.urlencode($search_label);
if ($search_accountparent != "") $params.= '&amp;search_accountparent='.urlencode($search_accountparent);
if ($search_pcgtype != "") $params.= '&amp;search_pcgtype='.urlencode($search_pcgtype);
if ($search_pcgsubtype != "") $params.= '&amp;search_pcgsubtype='.urlencode($search_pcgsubtype);
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($search_account) $params.= '&search_account='.urlencode($search_account);
if ($search_label) $params.= '&search_label='.urlencode($search_label);
if ($search_accountparent) $params.= '&search_accountparent='.urlencode($search_accountparent);
if ($search_pcgtype) $params.= '&search_pcgtype='.urlencode($search_pcgtype);
if ($search_pcgsubtype) $params.= '&search_pcgsubtype='.urlencode($search_pcgsubtype);
if ($optioncss != '') $param.='&optioncss='.$optioncss;
print '<form method="GET" action="' . $_SERVER["PHP_SELF"] . '">';
print '<form method="POST" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
print '<input type="hidden" name="action" value="list">';
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
$htmlbuttonadd = '<a class="butAction" href="./card.php?action=create">' . $langs->trans("Addanaccount") . '</a>';
print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $htmlbuttonadd);
// Box to select active chart of account
$var = ! $var;
print $langs->trans("Selectchartofaccounts") . " : ";
print '<select class="flat" name="chartofaccounts" id="chartofaccounts">';
$sql = "SELECT rowid, pcg_version, label, active";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_system";
$sql .= " WHERE active = 1";
dol_syslog('accountancy/admin/index.php:: $sql=' . $sql);
dol_syslog('accountancy/admin/account.php:: $sql=' . $sql);
$resqlchart = $db->query($sql);
$var = true;
if ($resqlchart) {
$numbis = $db->num_rows($resqlchart);
$i = 0;
while ( $i < $numbis ) {
$var = ! $var;
$row = $db->fetch_row($resqlchart);
print '<option value="' . $row[0] . '"';
@@ -231,37 +240,41 @@ if ($resql) {
print '<br>';
print '<br>';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("AccountNumber"), $_SERVER["PHP_SELF"], "aa.account_number", "", $params, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "aa.label", "", $params, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Accountparent"), $_SERVER["PHP_SELF"], "aa.account_parent", "", $params, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Pcgtype"), $_SERVER["PHP_SELF"], "aa.pcg_type", "", $params, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Pcgsubtype"), $_SERVER["PHP_SELF"], "aa.pcg_subtype", "", $params, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Activated"), $_SERVER["PHP_SELF"], "aa.active", "", $params, "", $sortfield, $sortorder);
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $params, "", 'width="60" align="center"', $sortfield, $sortorder);
print '</tr>';
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<tr class="liste_titre">';
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_account" value="' . $search_account . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat" size="20" name="search_label" value="' . $search_label . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_accountparent" value="' . $search_accountparent . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat" size="6" name="search_pcgtype" value="' . $search_pcgtype . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat" size="6" name="search_pcgsubtype" value="' . $search_pcgsubtype . '"></td>';
print '<td class="liste_titre">&nbsp;</td>';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
// Line for search fields
print '<tr class="liste_titre_filter">';
if (! empty($arrayfields['aa.account_number']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_account" value="' . $search_account . '"></td>';
if (! empty($arrayfields['aa.label']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" size="20" name="search_label" value="' . $search_label . '"></td>';
if (! empty($arrayfields['aa.account_parent']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_accountparent" value="' . $search_accountparent . '"></td>';
if (! empty($arrayfields['aa.pcg_type']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" size="6" name="search_pcgtype" value="' . $search_pcgtype . '"></td>';
if (! empty($arrayfields['aa.pcg_subtype']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" size="6" name="search_pcgsubtype" value="' . $search_pcgsubtype . '"></td>';
if (! empty($arrayfields['aa.active']['checked'])) print '<td class="liste_titre">&nbsp;</td>';
print '<td align="right" colspan="2" class="liste_titre">';
$searchpitco=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
print $searchpitco;
$searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
print $searchpicto;
print '</td>';
print '</tr>';
$var = false;
print '<tr class="liste_titre">';
if (! empty($arrayfields['aa.account_number']['checked'])) print_liste_field_titre($arrayfields['aa.account_number']['label'], $_SERVER["PHP_SELF"],"aa.account_number","",$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['aa.label']['checked'])) print_liste_field_titre($arrayfields['aa.label']['label'], $_SERVER["PHP_SELF"],"aa.label","",$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['aa.account_parent']['checked'])) print_liste_field_titre($arrayfields['aa.account_parent']['label'], $_SERVER["PHP_SELF"],"aa.account_parent", "", $param,'align="left"',$sortfield,$sortorder);
if (! empty($arrayfields['aa.pcg_type']['checked'])) print_liste_field_titre($arrayfields['aa.pcg_type']['label'],$_SERVER["PHP_SELF"],'aa.pcg_type','',$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['aa.pcg_subtype']['checked'])) print_liste_field_titre($arrayfields['aa.pcg_subtype']['label'],$_SERVER["PHP_SELF"],'aa.pcg_subtype','',$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['aa.active']['checked'])) print_liste_field_titre($arrayfields['aa.active']['label'],$_SERVER["PHP_SELF"],'aa.active','',$param,'',$sortfield,$sortorder);
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="center"',$sortfield,$sortorder,'maxwidthsearch ');
print "</tr>\n";
$accountstatic = new AccountingAccount($db);
$accountparent = new AccountingAccount($db);
$i = 0;
while ( $i < min($num, $limit) )
$i=0;
while ($i < min($num, $limit))
{
$obj = $db->fetch_object($resql);
@@ -269,36 +282,82 @@ if ($resql) {
$accountstatic->label = $obj->label;
$accountstatic->account_number = $obj->account_number;
print '<tr ' . $bc[$var] . '>';
print '<td>' . $accountstatic->getNomUrl(1) . '</td>';
print '<td>' . $obj->label . '</td>';
print '<tr class="oddeven">';
if (! empty($obj->account_parent))
{
$accountparent->id = $obj->rowid2;
$accountparent->label = $obj->label2;
$accountparent->account_number = $obj->account_number2;
print '<td>' . $accountparent->getNomUrl(1) . '</td>';
}
else
// Account number
if (! empty($arrayfields['aa.account_number']['checked']))
{
print '<td>&nbsp;</td>';
print "<td>";
print $accountstatic->getNomUrl(1);
print "</td>\n";
if (! $i) $totalarray['nbfield']++;
}
print '<td>' . $obj->pcg_type . '</td>';
print '<td>' . $obj->pcg_subtype . '</td>';
print '<td>';
if (empty($obj->active)) {
print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $obj->rowid . '&action=enable">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a>';
} else {
print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $obj->rowid . '&action=disable">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a>';
// Account label
if (! empty($arrayfields['aa.label']['checked']))
{
print "<td>";
print $obj->label;
print "</td>\n";
if (! $i) $totalarray['nbfield']++;
}
print '</td>';
// Account parent
if (! empty($arrayfields['aa.account_parent']['checked']))
{
if (! empty($obj->account_parent))
{
$accountparent->id = $obj->rowid2;
$accountparent->label = $obj->label2;
$accountparent->account_number = $obj->account_number2;
print "<td>";
print $accountparent->getNomUrl(1);
print "</td>\n";
if (! $i) $totalarray['nbfield']++;
}
else
{
print '<td>&nbsp;</td>';
if (! $i) $totalarray['nbfield']++;
}
}
// Chart of accounts type
if (! empty($arrayfields['aa.pcg_type']['checked']))
{
print "<td>";
print $obj->pcg_type;
print "</td>\n";
if (! $i) $totalarray['nbfield']++;
}
// Chart of accounts subtype
if (! empty($arrayfields['aa.pcg_subtype']['checked']))
{
print "<td>";
print $obj->pcg_subtype;
print "</td>\n";
if (! $i) $totalarray['nbfield']++;
}
// Activated or not
if (! empty($arrayfields['aa.active']['checked']))
{
print '<td>';
if (empty($obj->active)) {
print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $obj->rowid . '&action=enable">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a>';
} else {
print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $obj->rowid . '&action=disable">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a>';
}
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
// Action
print '<td align="center">';
if ($user->rights->accounting->chartofaccount) {
@@ -311,13 +370,14 @@ if ($resql) {
print '</a>';
}
print '</td>' . "\n";
if (! $i) $totalarray['nbfield']++;
print "</tr>\n";
$var = ! $var;
$i++;
}
print "</table>";
print "</div>";
print '</form>';
} else {
dol_print_error($db);

View File

@@ -39,7 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
$langs->load("errors");
$langs->load("admin");
@@ -217,21 +217,6 @@ if ($id == 25)
}
}
// Define localtax_typeList (used for dictionary "llx_c_tva")
$localtax_typeList = array();
if ($id == 10)
{
$localtax_typeList = array(
"0" => $langs->trans("No"),
"1" => $langs->trans("Yes").' ('.$langs->trans("Type")." 1)", //$langs->trans("%ageOnAllWithoutVAT"),
"2" => $langs->trans("Yes").' ('.$langs->trans("Type")." 2)", //$langs->trans("%ageOnAllBeforeVAT"),
"3" => $langs->trans("Yes").' ('.$langs->trans("Type")." 3)", //$langs->trans("%ageOnProductsWithoutVAT"),
"4" => $langs->trans("Yes").' ('.$langs->trans("Type")." 4)", //$langs->trans("%ageOnProductsBeforeVAT"),
"5" => $langs->trans("Yes").' ('.$langs->trans("Type")." 5)", //$langs->trans("%ageOnServiceWithoutVAT"),
"6" => $langs->trans("Yes").' ('.$langs->trans("Type")." 6)" //$langs->trans("%ageOnServiceBeforeVAT"),
);
}
/*
@@ -736,11 +721,11 @@ if ($id)
{
if ($tabname[$id] == MAIN_DB_PREFIX.'c_email_templates' && $action == 'edit')
{
fieldList($fieldlist,$obj,$tabname[$id],'hide');
fieldListAccountModel($fieldlist,$obj,$tabname[$id],'hide');
}
else
{
fieldList($fieldlist,$obj,$tabname[$id],'add');
fieldListAccountModel($fieldlist,$obj,$tabname[$id],'add');
}
}
@@ -757,8 +742,7 @@ if ($id)
{
print '<tr><td colspan="8">* '.$langs->trans("AvailableVariables").": ";
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
$formmail=new FormMail($db);
$tmp=$formmail->getAvailableSubstitKey('form');
$tmp=FormMail::getAvailableSubstitKey('formemail');
print implode(', ', $tmp);
print '</td></tr>';
}
@@ -901,8 +885,8 @@ if ($id)
if ($id == 4) print '<td></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre" colspan="2" align="right">';
$searchpitco=$form->showFilterAndCheckAddButtons(0);
print $searchpitco;
$searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto;
print '</td>';
print '</tr>';
@@ -911,11 +895,9 @@ if ($id)
// Lines with values
while ($i < $num)
{
$var = ! $var;
$obj = $db->fetch_object($resql);
//print_r($obj);
print '<tr '.$bc[$var].' id="rowid-'.$obj->rowid.'">';
print '<tr class="oddeven" id="rowid-'.$obj->rowid.'">';
if ($action == 'edit' && ($rowid == (! empty($obj->rowid)?$obj->rowid:$obj->code)))
{
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
@@ -928,7 +910,7 @@ if ($id)
$reshook=$hookmanager->executeHooks('editDictionaryFieldlist',$parameters,$obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error=$hookmanager->error; $errors=$hookmanager->errors;
if (empty($reshook)) fieldList($fieldlist,$obj,$tabname[$id],'edit');
if (empty($reshook)) fieldListAccountModel($fieldlist,$obj,$tabname[$id],'edit');
print '<td colspan="3" align="right"><a name="'.(! empty($obj->rowid)?$obj->rowid:$obj->code).'">&nbsp;</a><input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">';
print '&nbsp;<input type="submit" class="button" name="actioncancel" value="'.$langs->trans("Cancel").'"></td>';
@@ -1078,21 +1060,6 @@ if ($id)
$key = $langs->trans('SizeUnit'.strtolower($obj->unit));
$valuetoshow = ($obj->code && $key != 'SizeUnit'.strtolower($obj->unit) ? $key : $obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='localtax1_type') {
if ($obj->localtax1 != 0)
$valuetoshow=$localtax_typeList[$valuetoshow];
else
$valuetoshow = '';
$align="right";
}
else if ($fieldlist[$field]=='localtax2_type') {
if ($obj->localtax2 != 0)
$valuetoshow=$localtax_typeList[$valuetoshow];
else
$valuetoshow = '';
$align="right";
}
else if ($fieldlist[$field]=='taux') {
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
$align="right";
@@ -1198,14 +1165,13 @@ else
{
if ($showemptyline)
{
$var=!$var;
print '<tr '.$bc[$var].'><td width="30%">&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>';
print '<tr class="oddeven"><td width="30%">&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>';
$showemptyline=0;
}
$var=!$var;
$value=$tabname[$i];
print '<tr '.$bc[$var].'><td width="50%">';
print '<tr class="oddeven"><td width="50%">';
if (! empty($tabcond[$i]))
{
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$i.'">'.$langs->trans($tablib[$i]).'</a>';
@@ -1252,18 +1218,18 @@ $db->close();
* @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered
* @return void
*/
function fieldList($fieldlist, $obj='', $tabname='', $context='')
function fieldListAccountModel($fieldlist, $obj='', $tabname='', $context='')
{
global $conf,$langs,$db;
global $form;
global $region_id;
global $elementList,$sourceList,$localtax_typeList;
global $elementList,$sourceList;
global $bc;
$formadmin = new FormAdmin($db);
$formcompany = new FormCompany($db);
$formaccountancy = new FormVentilation($db);
$formaccounting = new FormAccounting($db);
foreach ($fieldlist as $field => $value)
{
if ($fieldlist[$field] == 'country')
@@ -1380,31 +1346,13 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) {
print '<td><input type="text" class="flat" value="'.(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'" size="10" name="'.$fieldlist[$field].'"></td>';
}
elseif ($fieldlist[$field]=='unit') {
print '<td>';
$units = array(
'mm' => $langs->trans('SizeUnitmm'),
'cm' => $langs->trans('SizeUnitcm'),
'point' => $langs->trans('SizeUnitpoint'),
'inch' => $langs->trans('SizeUnitinch')
);
print $form->selectarray('unit', $units, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''), 0, 0, 0);
print '</td>';
}
// Le type de taxe locale
elseif ($fieldlist[$field] == 'localtax1_type' || $fieldlist[$field] == 'localtax2_type')
{
print '<td align="center">';
print $form->selectarray($fieldlist[$field], $localtax_typeList, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''));
print '</td>';
}
elseif ($fieldlist[$field] == 'accountancy_code' || $fieldlist[$field] == 'accountancy_code_sell' || $fieldlist[$field] == 'accountancy_code_buy')
{
print '<td>';
if (! empty($conf->accounting->enabled))
{
$accountancy_account = (! empty($obj->$fieldlist[$field]) ? $obj->$fieldlist[$field] : 0);
print $formaccountancy->select_account($accountancy_account, $fieldlist[$field], 1, '', 1, 1, 'maxwidth200 maxwidthonsmartphone');
print $formaccounting->select_account($accountancy_account, $fieldlist[$field], 1, '', 1, 1, 'maxwidth200 maxwidthonsmartphone');
}
else
{

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
/**
* \file htdocs/accountancy/admin/card.php
* \ingroup Advanced accountancy
* \ingroup Advanced accountancy
* \brief Card of accounting account
*/
@@ -27,7 +27,6 @@ require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountancysystem.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
$error = 0;
@@ -37,7 +36,7 @@ $langs->load("bills");
$langs->load("accountancy");
$mesg = '';
$action = GETPOST('action');
$action = GETPOST('action','aZ09');
$backtopage = GETPOST('backtopage');
$id = GETPOST('id', 'int');
$rowid = GETPOST('rowid', 'int');
@@ -59,7 +58,7 @@ if (GETPOST('cancel'))
header("Location: ".$urltogo);
exit;
}
if ($action == 'add' && $user->rights->accounting->chartofaccount)
{
if (! $cancel) {
@@ -86,7 +85,7 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
} else {
$account_parent = GETPOST('account_parent','int');
}
$object->fk_pcg_version = $obj->pcg_version;
$object->pcg_type = GETPOST('pcg_type');
$object->pcg_subtype = GETPOST('pcg_subtype');
@@ -95,7 +94,7 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
$object->account_category = GETPOST('account_category');
$object->label = GETPOST('label', 'alpha');
$object->active = 1;
$res = $object->create($user);
if ($res == - 3) {
$error = 1;
@@ -124,9 +123,9 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
} else if ($action == 'edit' && $user->rights->accounting->chartofaccount) {
if (! $cancel) {
$result = $object->fetch($id);
$sql = 'SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $conf->global->CHARTOFACCOUNTS;
dol_syslog('accountancy/admin/card.php:: $sql=' . $sql);
$result2 = $db->query($sql);
$obj = $db->fetch_object($result2);
@@ -156,9 +155,9 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
$object->account_parent = $account_parent;
$object->account_category = GETPOST('account_category');
$object->label = GETPOST('label', 'alpha');
$result = $object->update($user);
if ($result > 0) {
$urltogo=$backtopage?$backtopage:($_SERVER["PHP_SELF"]."?id=".$id);
header("Location: " . $urltogo);
@@ -196,7 +195,6 @@ $helpurl = '';
llxheader('', $title, $helpurl);
$form = new Form($db);
$htmlacc = new FormVentilation($db);
$formaccounting = new FormAccounting($db);
$accountsystem = new AccountancySystem($db);
@@ -205,13 +203,13 @@ $accountsystem->fetch($conf->global->CHARTOFACCOUNTS);
// Create mode
if ($action == 'create') {
print load_fiche_titre($langs->trans('NewAccountingAccount'));
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">' . "\n";
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="add">';
dol_fiche_head();
print '<table class="border" width="100%">';
// Chart of account
@@ -219,8 +217,7 @@ if ($action == 'create') {
print '<td>';
print $accountsystem->ref;
print '</td></tr>';
// Account number
print '<tr><td class="titlefieldcreate"><span class="fieldrequired">' . $langs->trans("AccountNumber") . '</span></td>';
print '<td><input name="account_number" size="30" value="' . $object->account_number . '"></td></tr>';
@@ -232,7 +229,7 @@ if ($action == 'create') {
// Account parent
print '<tr><td>' . $langs->trans("Accountparent") . '</td>';
print '<td>';
print $htmlacc->select_account($object->account_parent, 'account_parent', 1, null, 0, 0, 'minwidth200');
print $formaccounting->select_account($object->account_parent, 'account_parent', 1, null, 0, 0, 'minwidth200');
print '</td></tr>';
// Category
@@ -245,72 +242,69 @@ if ($action == 'create') {
print '<tr><td>' . $langs->trans("Pcgtype") . '</td>';
print '<td>';
print '<input type="text" name="pcg_type" value="'.dol_escape_htmltag(isset($_POST['pcg_type'])?GETPOST('pcg_type','alpha'):$object->pcg_type).'">';
//print $htmlacc->select_pcgtype($object->pcg_type, 'pcg_type', 1);
print '</td></tr>';
// Chart of acounts subtype
print '<tr><td>' . $langs->trans("Pcgsubtype") . '</td>';
print '<td>';
print '<input type="text" name="pcg_subtype" value="'.dol_escape_htmltag(isset($_POST['pcg_subtype'])?GETPOST('pcg_subtype','alpha'):$object->pcg_subtype).'">';
//print $htmlacc->select_pcgsubtype($object->pcg_subtype, 'pcg_subtype', 1);
print '</td></tr>';
print '</table>';
dol_fiche_end();
print '<div class="center">';
print '<input class="button" type="submit" value="' . $langs->trans("Save") . '">';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input class="button" type="submit" name="cancel" value="' . $langs->trans("Cancel") . '">';
print '</div>';
print '</form>';
} else if ($id) {
$result = $object->fetch($id);
if ($result > 0) {
dol_htmloutput_mesg($mesg);
$head = accounting_prepare_head($object);
// Edit mode
if ($action == 'update')
{
dol_fiche_head($head, 'card', $langs->trans('AccountAccounting'), 0, 'billr');
print '<form name="update" action="' . $_SERVER["PHP_SELF"] . '" method="POST">' . "\n";
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="edit">';
print '<input type="hidden" name="id" value="' . $id . '">';
print '<input type="hidden" name="backtopage" value="' . $backtopage . '">';
print '<table class="border" width="100%">';
// Account number
print '<tr><td class="titlefieldcreate"><span class="fieldrequired">' . $langs->trans("AccountNumber") . '</span></td>';
print '<td><input name="account_number" size="30" value="' . $object->account_number . '"</td></tr>';
// Label
print '<tr><td><span class="fieldrequired">' . $langs->trans("Label") . '</span></td>';
print '<td><input name="label" size="70" value="' . $object->label . '"</td></tr>';
// Account parent
print '<tr><td>' . $langs->trans("Accountparent") . '</td>';
print '<td>';
print $htmlacc->select_account($object->account_parent, 'account_parent', 1);
print $formaccounting->select_account($object->account_parent, 'account_parent', 1);
print '</td></tr>';
// Category
print '<tr><td>'.$langs->trans("AccountingCategory").'</td>';
print '<tr><td>'.$langs->trans("AccountingCategory").'</td>';
print '<td>';
$formaccounting->select_accounting_category($object->account_category, 'account_category', 1);
print '</td></tr>';
$formaccounting->select_accounting_category($object->account_category, 'account_category', 1);
print '</td></tr>';
// Chart of accounts type
print '<tr><td>' . $langs->trans("Pcgtype") . '</td>';
print '<td>';
//print $htmlacc->select_pcgtype($object->pcg_type, 'pcg_type', 1);
print '<input type="text" name="pcg_type" value="'.dol_escape_htmltag(isset($_POST['pcg_type'])?GETPOST('pcg_type','alpha'):$object->pcg_type).'">';
print '</td></tr>';
@@ -318,29 +312,27 @@ if ($action == 'create') {
print '<tr><td>' . $langs->trans("Pcgsubtype") . '</td>';
print '<td>';
print '<input type="text" name="pcg_subtype" value="'.dol_escape_htmltag(isset($_POST['pcg_subtype'])?GETPOST('pcg_subtype','alpha'):$object->pcg_subtype).'">';
//print $htmlacc->select_pcgsubtype($object->pcg_subtype, 'pcg_subtype', 1);
print '</td></tr>';
print '</table>';
dol_fiche_end();
print '<div class="center">';
print '<input type="submit" class="button" value="' . $langs->trans("Save") . '">';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input type="submit" name="cancel" class="button" value="' . $langs->trans("Cancel") . '">';
print '</div>';
print '</form>';
} else {
// View mode
$linkback = '<a href="../admin/account.php">' . $langs->trans("BackToChartofaccounts") . '</a>';
dol_fiche_head($head, 'card', $langs->trans('AccountAccounting'), 0, 'billr');
print '<table class="border" width="100%">';
// Account number
print '<tr><td class="titlefield">' . $langs->trans("AccountNumber") . '</td>';
print '<td>' . $object->account_number . '</td>';
@@ -378,31 +370,30 @@ if ($action == 'create') {
} else {
print img_picto($langs->trans("Activated"), 'switch_on');
}*/
print '</td></tr>';
print '</table>';
dol_fiche_end();
/*
* Actions buttons
*/
print '<div class="tabsAction">';
if (! empty($user->rights->accounting->chartofaccount)) {
print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=update&id=' . $id . '">' . $langs->trans('Modify') . '</a>';
} else {
print '<a class="butActionRefused" href="#" title="' . dol_escape_htmltag($langs->trans("NotAllowed")) . '">' . $langs->trans('Modify') . '</a>';
}
if (! empty($user->rights->accounting->chartofaccount)) {
print '<a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?action=delete&id=' . $id . '">' . $langs->trans('Delete') . '</a>';
} else {
print '<a class="butActionRefused" href="#" title="' . dol_escape_htmltag($langs->trans("NotAllowed")) . '">' . $langs->trans('Delete') . '</a>';
}
print '</div>';
}
} else {

View File

@@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2016 Jamal Elbaz <jamelbaz@gmail.pro>
/* Copyright (C) 2016 Jamal Elbaz <jamelbaz@gmail.pro>
* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,9 +17,9 @@
*/
/**
* \file htdocs/accountancy/admin/categories.php
* \file htdocs/accountancy/admin/categories.php
* \ingroup Advanced accountancy
* \brief Page to assign mass categories to accounts
* \brief Page to assign mass categories to accounts
*/
require '../../main.inc.php';
@@ -28,12 +29,14 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
$error = 0;
// Langs
$langs->load("bills");
$langs->load("accountancy");
$mesg = '';
$action = GETPOST('action');
$id = GETPOST('id', 'int');
$rowid = GETPOST('rowid', 'int');
$cancel = GETPOST('cancel');
$action = GETPOST('action','aZ09');
$cat_id = GETPOST('account_category');
$selectcpt = GETPOST('cpt_bk', 'array');
$cpt_id = GETPOST('cptid');
@@ -42,38 +45,34 @@ if ($cat_id == 0) {
$cat_id = null;
}
$id = GETPOST('id', 'int');
$rowid = GETPOST('rowid', 'int');
$cancel = GETPOST('cancel');
// Security check
if (! empty($user->rights->accountancy->chartofaccount))
{
accessforbidden();
}
$AccCat = new AccountancyCategory($db);
$accountingcategory = new AccountancyCategory($db);
// si ajout de comptes
if (! empty($selectcpt)) {
$cpts = array ();
foreach ( $selectcpt as $selectedOption ) {
if (! array_key_exists($selectedOption, $cpts))
$cpts[$selectedOption] = "'" . $selectedOption . "'";
foreach ( $selectcpt as $selectedoption ) {
if (! array_key_exists($selectedoption, $cpts))
$cpts[$selectedoption] = "'" . $selectedoption . "'";
}
$return= $AccCat->updateAccAcc($cat_id, $cpts);
$return= $accountingcategory->updateAccAcc($cat_id, $cpts);
if ($return<0) {
setEventMessages($langs->trans('errors'), $AccCat->errors, 'errors');
setEventMessages($langs->trans('errors'), $accountingcategory->errors, 'errors');
} else {
setEventMessages($langs->trans('Saved'), null, 'mesgs');
}
}
if ($action == 'delete') {
if ($cpt_id) {
if ($AccCat->deleteCptCat($cpt_id)) {
setEventMessages($langs->trans('Deleted'), null, 'mesgs');
if ($accountingcategory->deleteCptCat($cpt_id)) {
setEventMessages($langs->trans('CategoryDeleted'), null, 'mesgs');
} else {
setEventMessages($langs->trans('errors'), null, 'errors');
}
@@ -84,12 +83,11 @@ if ($action == 'delete') {
/*
* View
*/
$form = new Form($db);
$formaccounting = new FormAccounting($db);
llxheader('', $langs->trans('AccountAccounting'));
$formaccounting = new FormAccounting($db);
$form = new Form($db);
print load_fiche_titre($langs->trans('AccountingCategory'));
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">' . "\n";
@@ -108,18 +106,19 @@ print '</td></tr>';
if (! empty($cat_id))
{
$return = $AccCat->getAccountsWithNoCategory($cat_id);
$return = $accountingcategory->getAccountsWithNoCategory($cat_id);
if ($return < 0) {
setEventMessages(null, $AccCat->errors, 'errors');
setEventMessages(null, $accountingcategory->errors, 'errors');
}
print '<tr><td>' . $langs->trans("AddCompteFromBK") . '</td>';
print '<tr><td>' . $langs->trans("AddAccountFromBookKeepingWithNoCategories") . '</td>';
print '<td>';
if (is_array($AccCat->lines_cptbk) && count($AccCat->lines_cptbk) > 0) {
if (is_array($accountingcategory->lines_cptbk) && count($accountingcategory->lines_cptbk) > 0) {
print '<select class="flat minwidth200" size="' . count($obj) . '" name="cpt_bk[]" multiple>';
foreach ( $AccCat->lines_cptbk as $cpt ) {
foreach ( $accountingcategory->lines_cptbk as $cpt ) {
print '<option value="' . length_accountg($cpt->numero_compte) . '">' . length_accountg($cpt->numero_compte) . ' (' . $cpt->label_compte . ' ' . $cpt->doc_ref . ')</option>';
}
print '</select><br><input class="button" type="submit" id="" class="action-delete" value="' . $langs->trans("Add") . '"> ';
print '</select><br>';
print '<input class="button" type="submit" id="" class="action-delete" value="' . $langs->trans("Add") . '"> ';
}
print '</td></tr>';
}
@@ -133,29 +132,29 @@ print '</form>';
if ($action == 'display' || $action == 'delete') {
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><th class="liste_titre">' . $langs->trans("AccountAccounting") . '</th><th class="liste_titre">' . $langs->trans("Description") . '</th><th class="liste_titre" width="60" align="center">Action</th></tr>';
print "<table class='noborder' width='100%'>\n";
print '<tr class="liste_titre">';
print '<td class="liste_titre">'.$langs->trans("AccountAccounting")."</td>";
print '<td class="liste_titre" colspan="2">'.$langs->trans("Label")."</td>";
print "</tr>\n";
if (! empty($cat_id)) {
$return = $AccCat->display($cat_id);
$return = $accountingcategory->display($cat_id);
if ($return < 0) {
setEventMessages(null, $AccCat->errors, 'errors');
setEventMessages(null, $accountingcategory->errors, 'errors');
}
$j = 1;
if (is_array($AccCat->lines_display) && count($AccCat->lines_display) > 0) {
foreach ( $AccCat->lines_display as $cpt ) {
$var = ! $var;
print '<tr ' . $bc[$var] . '>';
if (is_array($accountingcategory->lines_display) && count($accountingcategory->lines_display) > 0) {
foreach ( $accountingcategory->lines_display as $cpt ) {
print '<tr class="oddeven">';
print '<td>' . length_accountg($cpt->account_number) . '</td>';
print '<td>' . $cpt->label . '</td>';
print $form->formconfirm($_SERVER["PHP_SELF"] . "?account_category=$cat_id&cptid=" . $cpt->rowid, $langs->trans("DeleteCptCategory"), $langs->trans("ConfirmDeleteCptCategory"), "delete", '', 0, "action-delete" . $j);
print '<td>';
//print img_delete();
print '<input class="button" type="button" id="action-delete' . $j . '" value="' . $langs->trans("Delete") . '">';
print '</td>';
print '<td align="right">';
print "<a href= '".$_SERVER['PHP_SELF']."?action=delete&account_category=" . $cat_id . "&cptid=" . $cpt->rowid."'>";
print img_delete($langs->trans("DeleteFromCat")).' ';
print $langs->trans("DeleteFromCat")."</a>";
print "</td>";
print "</tr>\n";
$j ++;
}
}
}

View File

@@ -39,7 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/html.formventilation.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
$langs->load("errors");
$langs->load("admin");
@@ -168,9 +168,6 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
{
if ($value == 'country_id' && in_array($tablib[$id],array('DictionaryVAT','DictionaryRegion','DictionaryCompanyType','DictionaryHolidayTypes','DictionaryRevenueStamp','DictionaryAccountancysystem','DictionaryAccountancyCategory'))) continue; // For some pages, country is not mandatory
if ($value == 'country' && in_array($tablib[$id],array('DictionaryCanton','DictionaryCompanyType','DictionaryRevenueStamp'))) continue; // For some pages, country is not mandatory
if ($value == 'localtax1' && empty($_POST['localtax1_type'])) continue;
if ($value == 'localtax2' && empty($_POST['localtax2_type'])) continue;
if ($value == 'color' && empty($_POST['color'])) continue;
if ($value == 'formula' && empty($_POST['formula'])) continue;
if ((! isset($_POST[$value]) || $_POST[$value]=='')
&& (! in_array($listfield[$f], array('decalage','module','accountancy_code','accountancy_code_sell','accountancy_code_buy')) // Fields that are not mandatory
@@ -183,17 +180,12 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
// We take translate key of field
if ($fieldnamekey == 'libelle' || ($fieldnamekey == 'label')) $fieldnamekey='Label';
if ($fieldnamekey == 'libelle_facture') $fieldnamekey = 'LabelOnDocuments';
if ($fieldnamekey == 'nbjour') $fieldnamekey='NbOfDays';
if ($fieldnamekey == 'decalage') $fieldnamekey='Offset';
if ($fieldnamekey == 'module') $fieldnamekey='Module';
if ($fieldnamekey == 'code') $fieldnamekey = 'Code';
if ($fieldnamekey == 'note') $fieldnamekey = 'Note';
if ($fieldnamekey == 'taux') $fieldnamekey = 'Rate';
if ($fieldnamekey == 'type') $fieldnamekey = 'Type';
if ($fieldnamekey == 'position') $fieldnamekey = 'Position';
if ($fieldnamekey == 'unicode') $fieldnamekey = 'Unicode';
if ($fieldnamekey == 'deductible') $fieldnamekey = 'Deductible';
if ($fieldnamekey == 'sortorder') $fieldnamekey = 'SortOrder';
if ($fieldnamekey == 'category_type') $fieldnamekey = 'Calculated';
setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)), null, 'errors');
@@ -217,7 +209,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
$msg .= $langs->transnoentities('ErrorFieldFormat', $langs->transnoentities('Code')).'<br />';
}*/
}
if (isset($_POST["country"]) && ($_POST["country"]=='0') && ($id != 2))
if (isset($_POST["country"]) && ($_POST["country"]=='0'))
{
if (in_array($tablib[$id],array('DictionaryCompanyType','DictionaryHolidayTypes'))) // Field country is no mandatory for such dictionaries
{
@@ -229,15 +221,8 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
setEventMessages($langs->transnoentities("ErrorFieldRequired",$langs->transnoentities("Country")), null, 'errors');
}
}
if ($id == 3 && ! is_numeric($_POST["code"]))
{
$ok=0;
setEventMessages($langs->transnoentities("ErrorFieldMustBeANumeric",$langs->transnoentities("Code")), null, 'errors');
}
// Clean some parameters
if ((! empty($_POST["localtax1_type"]) || ($_POST['localtax1_type'] == '0')) && empty($_POST["localtax1"])) $_POST["localtax1"]='0'; // If empty, we force to 0
if ((! empty($_POST["localtax2_type"]) || ($_POST['localtax2_type'] == '0')) && empty($_POST["localtax2"])) $_POST["localtax2"]='0'; // If empty, we force to 0
if ($_POST["accountancy_code"] <= 0) $_POST["accountancy_code"]=''; // If empty, we force to null
if ($_POST["accountancy_code_sell"] <= 0) $_POST["accountancy_code_sell"]=''; // If empty, we force to null
if ($_POST["accountancy_code_buy"] <= 0) $_POST["accountancy_code_buy"]=''; // If empty, we force to null
@@ -466,34 +451,12 @@ $formadmin=new FormAdmin($db);
llxHeader();
$titre=$langs->trans("DictionarySetup");
$titre=$langs->trans($tablib[$id]);
$linkback='';
if ($id)
{
$titre.=' - '.$langs->trans($tablib[$id]);
$linkback='<a href="'.$_SERVER['PHP_SELF'].'">'.$langs->trans("BackToDictionaryList").'</a>';
}
$titlepicto='title_setup';
if ($id == 10 && GETPOST('from') == 'accountancy')
{
$titre=$langs->trans("MenuVatAccounts");
$titlepicto='title_accountancy';
}
if ($id == 7 && GETPOST('from') == 'accountancy')
{
$titre=$langs->trans("MenuTaxAccounts");
$titlepicto='title_accountancy';
}
print load_fiche_titre($titre,$linkback,$titlepicto);
if (empty($id))
{
print $langs->trans("DictionaryDesc");
print " ".$langs->trans("OnlyActiveElementsAreShown")."<br>\n";
}
print "<br>\n";
// Confirmation de la suppression de la ligne
if ($action == 'delete')
@@ -563,19 +526,6 @@ if ($id)
$valuetoshow=ucfirst($fieldlist[$field]); // Par defaut
$valuetoshow=$langs->trans($valuetoshow); // try to translate
$align="left";
if ($fieldlist[$field]=='source') { $valuetoshow=$langs->trans("Contact"); }
if ($fieldlist[$field]=='price') { $valuetoshow=$langs->trans("PriceUHT"); }
if ($fieldlist[$field]=='taux') {
if ($tabname[$id] != MAIN_DB_PREFIX."c_revenuestamp") $valuetoshow=$langs->trans("Rate");
else $valuetoshow=$langs->trans("Amount");
$align='center';
}
if ($fieldlist[$field]=='localtax1_type') { $valuetoshow=$langs->trans("UseLocalTax")." 2"; $align="center"; $sortable=0; }
if ($fieldlist[$field]=='localtax1') { $valuetoshow=$langs->trans("Rate")." 2"; $align="center"; }
if ($fieldlist[$field]=='localtax2_type') { $valuetoshow=$langs->trans("UseLocalTax")." 3"; $align="center"; $sortable=0; }
if ($fieldlist[$field]=='localtax2') { $valuetoshow=$langs->trans("Rate")." 3"; $align="center"; }
if ($fieldlist[$field]=='organization') { $valuetoshow=$langs->trans("Organization"); }
if ($fieldlist[$field]=='lang') { $valuetoshow=$langs->trans("Language"); }
if ($fieldlist[$field]=='type') {
if ($tabname[$id] == MAIN_DB_PREFIX."c_paiement") $valuetoshow=$form->textwithtooltip($langs->trans("Type"),$langs->trans("TypePaymentDesc"),2,1,img_help(1,''));
else $valuetoshow=$langs->trans("Type");
@@ -584,49 +534,20 @@ if ($id)
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label')
{
$valuetoshow=$langs->trans("Label");
if ($id != 25) $valuetoshow.="*";
}
if ($fieldlist[$field]=='libelle_facture') { $valuetoshow=$langs->trans("LabelOnDocuments")."*"; }
if ($fieldlist[$field]=='country') {
if (in_array('region_id',$fieldlist)) { print '<td>&nbsp;</td>'; continue; } // For region page, we do not show the country input
$valuetoshow=$langs->trans("Country");
}
if ($fieldlist[$field]=='recuperableonly') { $valuetoshow=$langs->trans("NPR"); $align="center"; }
if ($fieldlist[$field]=='nbjour') { $valuetoshow=$langs->trans("NbOfDays"); }
if ($fieldlist[$field]=='type_cdr') { $valuetoshow=$langs->trans("AtEndOfMonth"); $align="center"; }
if ($fieldlist[$field]=='decalage') { $valuetoshow=$langs->trans("Offset"); }
if ($fieldlist[$field]=='width' || $fieldlist[$field]=='nx') { $valuetoshow=$langs->trans("Width"); }
if ($fieldlist[$field]=='height' || $fieldlist[$field]=='ny') { $valuetoshow=$langs->trans("Height"); }
if ($fieldlist[$field]=='unit' || $fieldlist[$field]=='metric') { $valuetoshow=$langs->trans("MeasuringUnit"); }
if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $valuetoshow=''; }
if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); }
if ($fieldlist[$field]=='accountancy_code_sell'){ $valuetoshow=$langs->trans("AccountancyCodeSell"); }
if ($fieldlist[$field]=='accountancy_code_buy'){ $valuetoshow=$langs->trans("AccountancyCodeBuy"); }
if ($fieldlist[$field]=='pcg_version' || $fieldlist[$field]=='fk_pcg_version') { $valuetoshow=$langs->trans("Pcg_version"); }
if ($fieldlist[$field]=='account_parent') { $valuetoshow=$langs->trans("Accountparent"); }
if ($fieldlist[$field]=='pcg_type') { $valuetoshow=$langs->trans("Pcg_type"); }
if ($fieldlist[$field]=='pcg_subtype') { $valuetoshow=$langs->trans("Pcg_subtype"); }
if ($fieldlist[$field]=='sortorder') { $valuetoshow=$langs->trans("SortOrder"); }
if ($fieldlist[$field]=='short_label') { $valuetoshow=$langs->trans("ShortLabel"); }
if ($fieldlist[$field]=='type_template') { $valuetoshow=$langs->trans("TypeOfTemplate"); }
if ($fieldlist[$field]=='range_account') { $valuetoshow=$langs->trans("Range"); }
if ($fieldlist[$field]=='range_account') { $valuetoshow=$langs->trans("Range"); }
if ($fieldlist[$field]=='sens') { $valuetoshow=$langs->trans("Sens"); }
if ($fieldlist[$field]=='category_type') { $valuetoshow=$langs->trans("Calculated"); }
if ($fieldlist[$field]=='formula') { $valuetoshow=$langs->trans("Formula"); }
if ($fieldlist[$field]=='paper_size') { $valuetoshow=$langs->trans("PaperSize"); }
if ($fieldlist[$field]=='orientation') { $valuetoshow=$langs->trans("Orientation"); }
if ($fieldlist[$field]=='leftmargin') { $valuetoshow=$langs->trans("LeftMargin"); }
if ($fieldlist[$field]=='topmargin') { $valuetoshow=$langs->trans("TopMargin"); }
if ($fieldlist[$field]=='spacex') { $valuetoshow=$langs->trans("SpaceX"); }
if ($fieldlist[$field]=='spacey') { $valuetoshow=$langs->trans("SpaceY"); }
if ($fieldlist[$field]=='font_size') { $valuetoshow=$langs->trans("FontSize"); }
if ($fieldlist[$field]=='custom_x') { $valuetoshow=$langs->trans("CustomX"); }
if ($fieldlist[$field]=='custom_y') { $valuetoshow=$langs->trans("CustomY"); }
if ($fieldlist[$field]=='content') { $valuetoshow=$langs->trans("Content"); }
if ($fieldlist[$field]=='percent') { $valuetoshow=$langs->trans("Percentage"); }
if ($fieldlist[$field]=='affect') { $valuetoshow=$langs->trans("Info"); }
if ($fieldlist[$field]=='delay') { $valuetoshow=$langs->trans("NoticePeriod"); }
if ($fieldlist[$field]=='newbymonth') { $valuetoshow=$langs->trans("NewByMonth"); }
if ($valuetoshow != '')
{
@@ -639,7 +560,6 @@ if ($id)
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') $alabelisused=1;
}
if ($id == 4) print '<td></td>';
print '<td>';
print '<input type="hidden" name="id" value="'.$id.'">';
print '</td>';
@@ -649,7 +569,7 @@ if ($id)
print '</tr>';
// Line to enter new values
print "<tr ".$bcnd[$var].">";
print '<tr class="oddeven nodrag nodrop nohover">';
$obj = new stdClass();
// If data was already input, we define them in obj to populate input fields.
@@ -669,7 +589,7 @@ if ($id)
if (empty($reshook))
{
fieldList($fieldlist,$obj,$tabname[$id],'add');
fieldListAccountingCategories($fieldlist,$obj,$tabname[$id],'add');
}
print '<td colspan="4" align="right">';
@@ -679,15 +599,9 @@ if ($id)
$colspan=count($fieldlist)+3;
if (! empty($alabelisused)) // If there is one label among fields, we show legend of *
{
print '<tr><td colspan="'.$colspan.'">* '.$langs->trans("LabelUsedByDefault").'.</td></tr>';
}
print '<tr><td colspan="'.$colspan.'">&nbsp;</td></tr>'; // Keep &nbsp; to have a line with enough height
}
// List of available record in database
dol_syslog("htdocs/admin/dict", LOG_DEBUG);
$resql=$db->query($sql);
@@ -712,101 +626,8 @@ if ($id)
print '</td></tr>';
}
// Title of lines
print '<tr class="liste_titre liste_titre_add">';
foreach ($fieldlist as $field => $value)
{
// Determine le nom du champ par rapport aux noms possibles
// dans les dictionnaires de donnees
$showfield=1; // By defaut
$align="left";
$sortable=1;
$valuetoshow='';
/*
$tmparray=getLabelOfField($fieldlist[$field]);
$showfield=$tmp['showfield'];
$valuetoshow=$tmp['valuetoshow'];
$align=$tmp['align'];
$sortable=$tmp['sortable'];
*/
$valuetoshow=ucfirst($fieldlist[$field]); // By defaut
$valuetoshow=$langs->trans($valuetoshow); // try to translate
if ($fieldlist[$field]=='source') { $valuetoshow=$langs->trans("Contact"); }
if ($fieldlist[$field]=='price') { $valuetoshow=$langs->trans("PriceUHT"); }
if ($fieldlist[$field]=='taux') {
if ($tabname[$id] != MAIN_DB_PREFIX."c_revenuestamp") $valuetoshow=$langs->trans("Rate");
else $valuetoshow=$langs->trans("Amount");
$align='center';
}
if ($fieldlist[$field]=='localtax1_type') { $valuetoshow=$langs->trans("UseLocalTax")." 2"; $align="center"; $sortable=0; }
if ($fieldlist[$field]=='localtax1') { $valuetoshow=$langs->trans("Rate")." 2"; $align="center"; $sortable=0; }
if ($fieldlist[$field]=='localtax2_type') { $valuetoshow=$langs->trans("UseLocalTax")." 3"; $align="center"; $sortable=0; }
if ($fieldlist[$field]=='localtax2') { $valuetoshow=$langs->trans("Rate")." 3"; $align="center"; $sortable=0; }
if ($fieldlist[$field]=='organization') { $valuetoshow=$langs->trans("Organization"); }
if ($fieldlist[$field]=='lang') { $valuetoshow=$langs->trans("Language"); }
if ($fieldlist[$field]=='type') { $valuetoshow=$langs->trans("Type"); }
if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); }
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label')
{
$valuetoshow=$langs->trans("Label");
if ($id != 25) $valuetoshow.="*";
}
if ($fieldlist[$field]=='libelle_facture') { $valuetoshow=$langs->trans("LabelOnDocuments")."*"; }
if ($fieldlist[$field]=='country') { $valuetoshow=$langs->trans("Country"); }
if ($fieldlist[$field]=='recuperableonly') { $valuetoshow=$langs->trans("NPR"); $align="center"; }
if ($fieldlist[$field]=='nbjour') { $valuetoshow=$langs->trans("NbOfDays"); }
if ($fieldlist[$field]=='type_cdr') { $valuetoshow=$langs->trans("AtEndOfMonth"); $align="center"; }
if ($fieldlist[$field]=='decalage') { $valuetoshow=$langs->trans("Offset"); }
if ($fieldlist[$field]=='width' || $fieldlist[$field]=='nx') { $valuetoshow=$langs->trans("Width"); }
if ($fieldlist[$field]=='height' || $fieldlist[$field]=='ny') { $valuetoshow=$langs->trans("Height"); }
if ($fieldlist[$field]=='unit' || $fieldlist[$field]=='metric') { $valuetoshow=$langs->trans("MeasuringUnit"); }
if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $showfield=0; }
if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); }
if ($fieldlist[$field]=='accountancy_code_sell'){ $valuetoshow=$langs->trans("AccountancyCodeSell"); $sortable=0; }
if ($fieldlist[$field]=='accountancy_code_buy'){ $valuetoshow=$langs->trans("AccountancyCodeBuy"); $sortable=0; }
if ($fieldlist[$field]=='fk_pcg_version') { $valuetoshow=$langs->trans("Pcg_version"); }
if ($fieldlist[$field]=='account_parent') { $valuetoshow=$langs->trans("Accountsparent"); }
if ($fieldlist[$field]=='pcg_type') { $valuetoshow=$langs->trans("Pcg_type"); }
if ($fieldlist[$field]=='pcg_subtype') { $valuetoshow=$langs->trans("Pcg_subtype"); }
if ($fieldlist[$field]=='sortorder') { $valuetoshow=$langs->trans("SortOrder"); }
if ($fieldlist[$field]=='short_label') { $valuetoshow=$langs->trans("ShortLabel"); }
if ($fieldlist[$field]=='type_template') { $valuetoshow=$langs->trans("TypeOfTemplate"); }
if ($fieldlist[$field]=='range_account') { $valuetoshow=$langs->trans("Range"); }
if ($fieldlist[$field]=='sens') { $valuetoshow=$langs->trans("Sens"); }
if ($fieldlist[$field]=='category_type') { $valuetoshow=$langs->trans("Calculated"); }
if ($fieldlist[$field]=='formula') { $valuetoshow=$langs->trans("Formula"); }
if ($fieldlist[$field]=='paper_size') { $valuetoshow=$langs->trans("PaperSize"); }
if ($fieldlist[$field]=='orientation') { $valuetoshow=$langs->trans("Orientation"); }
if ($fieldlist[$field]=='leftmargin') { $valuetoshow=$langs->trans("LeftMargin"); }
if ($fieldlist[$field]=='topmargin') { $valuetoshow=$langs->trans("TopMargin"); }
if ($fieldlist[$field]=='spacex') { $valuetoshow=$langs->trans("SpaceX"); }
if ($fieldlist[$field]=='spacey') { $valuetoshow=$langs->trans("SpaceY"); }
if ($fieldlist[$field]=='font_size') { $valuetoshow=$langs->trans("FontSize"); }
if ($fieldlist[$field]=='custom_x') { $valuetoshow=$langs->trans("CustomX"); }
if ($fieldlist[$field]=='custom_y') { $valuetoshow=$langs->trans("CustomY"); }
if ($fieldlist[$field]=='content') { $valuetoshow=$langs->trans("Content"); }
if ($fieldlist[$field]=='percent') { $valuetoshow=$langs->trans("Percentage"); }
if ($fieldlist[$field]=='affect') { $valuetoshow=$langs->trans("Info"); }
if ($fieldlist[$field]=='delay') { $valuetoshow=$langs->trans("NoticePeriod"); }
if ($fieldlist[$field]=='newbymonth') { $valuetoshow=$langs->trans("NewByMonth"); }
// Affiche nom du champ
if ($showfield)
{
print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable?$fieldlist[$field]:''), ($page?'page='.$page.'&':''), $param, "align=".$align, $sortfield, $sortorder);
}
}
// Favorite - Only activated on country dictionary
if ($id == 4) print getTitleFieldOfList($langs->trans("Favorite"), 0, $_SERVER["PHP_SELF"], "favorite", ($page?'page='.$page.'&':''), $param, 'align="center"', $sortfield, $sortorder);
print getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], "active", ($page?'page='.$page.'&':''), $param, 'align="center"', $sortfield, $sortorder);
print getTitleFieldOfList('');
print getTitleFieldOfList('');
print getTitleFieldOfList('');
print '</tr>';
// Title line with search boxes
print '<tr class="liste_titre">';
print '<tr class="liste_titre liste_titre_add liste_titre_filter">';
$filterfound=0;
foreach ($fieldlist as $field => $value)
{
@@ -829,27 +650,78 @@ if ($id)
}
}
}
if ($id == 4) print '<td></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre" colspan="3" align="center">';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre" align="center">';
if ($filterfound)
{
$searchpitco=$form->showFilterAndCheckAddButtons(0);
print $searchpitco;
$searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto;
}
print '</td>';
print '</tr>';
// Title of lines
print '<tr class="liste_titre">';
foreach ($fieldlist as $field => $value)
{
// Determine le nom du champ par rapport aux noms possibles
// dans les dictionnaires de donnees
$showfield=1; // By defaut
$align="left";
$sortable=1;
$valuetoshow='';
$valuetoshow=ucfirst($fieldlist[$field]); // By defaut
$valuetoshow=$langs->trans($valuetoshow); // try to translate
if ($fieldlist[$field]=='source') { $valuetoshow=$langs->trans("Contact"); }
if ($fieldlist[$field]=='price') { $valuetoshow=$langs->trans("PriceUHT"); }
if ($fieldlist[$field]=='taux') {
if ($tabname[$id] != MAIN_DB_PREFIX."c_revenuestamp") $valuetoshow=$langs->trans("Rate");
else $valuetoshow=$langs->trans("Amount");
$align='center';
}
if ($fieldlist[$field]=='type') { $valuetoshow=$langs->trans("Type"); }
if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); }
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label')
{
$valuetoshow=$langs->trans("Label");
if ($id != 25) $valuetoshow.="*";
}
if ($fieldlist[$field]=='country') { $valuetoshow=$langs->trans("Country"); }
if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $showfield=0; }
if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); }
if ($fieldlist[$field]=='accountancy_code_sell'){ $valuetoshow=$langs->trans("AccountancyCodeSell"); $sortable=0; }
if ($fieldlist[$field]=='accountancy_code_buy'){ $valuetoshow=$langs->trans("AccountancyCodeBuy"); $sortable=0; }
if ($fieldlist[$field]=='fk_pcg_version') { $valuetoshow=$langs->trans("Pcg_version"); }
if ($fieldlist[$field]=='account_parent') { $valuetoshow=$langs->trans("Accountsparent"); }
if ($fieldlist[$field]=='pcg_type') { $valuetoshow=$langs->trans("Pcg_type"); }
if ($fieldlist[$field]=='pcg_subtype') { $valuetoshow=$langs->trans("Pcg_subtype"); }
if ($fieldlist[$field]=='type_template') { $valuetoshow=$langs->trans("TypeOfTemplate"); }
if ($fieldlist[$field]=='range_account') { $valuetoshow=$langs->trans("Range"); }
if ($fieldlist[$field]=='sens') { $valuetoshow=$langs->trans("Sens"); }
if ($fieldlist[$field]=='category_type') { $valuetoshow=$langs->trans("Calculated"); }
// Affiche nom du champ
if ($showfield)
{
print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable?$fieldlist[$field]:''), ($page?'page='.$page.'&':''), $param, "align=".$align, $sortfield, $sortorder);
}
}
print getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], "active", ($page?'page='.$page.'&':''), $param, 'align="center"', $sortfield, $sortorder);
print getTitleFieldOfList('');
print getTitleFieldOfList('');
print getTitleFieldOfList('');
print '</tr>';
if ($num)
{
// Lines with values
while ($i < $num)
{
$var = ! $var;
$obj = $db->fetch_object($resql);
//print_r($obj);
print '<tr '.$bc[$var].' id="rowid-'.$obj->rowid.'">';
print '<tr class="oddeven" id="rowid-'.$obj->rowid.'">';
if ($action == 'edit' && ($rowid == (! empty($obj->rowid)?$obj->rowid:$obj->code)))
{
$tmpaction='edit';
@@ -858,9 +730,11 @@ if ($id)
$error=$hookmanager->error; $errors=$hookmanager->errors;
// Show fields
if (empty($reshook)) fieldList($fieldlist,$obj,$tabname[$id],'edit');
if (empty($reshook)) fieldListAccountingCategories($fieldlist,$obj,$tabname[$id],'edit');
print '<td colspan="3" align="center">';
print '<td></td>';
print '<td></td>';
print '<td align="center">';
print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
print '<input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">';
@@ -910,19 +784,6 @@ if ($id)
$valuetoshow=($key != "Country".strtoupper($obj->country_code)?$obj->country_code." - ".$key:$obj->country);
}
}
else if ($fieldlist[$field]=='recuperableonly' || $fieldlist[$field] == 'deductible' || $fieldlist[$field] == 'category_type') {
$valuetoshow=yn($valuetoshow);
$align="center";
}
else if ($fieldlist[$field]=='type_cdr') {
if(empty($valuetoshow)) $valuetoshow = $langs->trans('None');
elseif($valuetoshow == 1) $valuetoshow = $langs->trans('AtEndOfMonth');
elseif($valuetoshow == 2) $valuetoshow = $langs->trans('CurrentNext');
$align="center";
}
else if ($fieldlist[$field]=='price' || preg_match('/^amount/i',$fieldlist[$field])) {
$valuetoshow=price($valuetoshow);
}
else if ($fieldlist[$field]=='libelle_facture') {
$langs->load("bills");
$key=$langs->trans("PaymentCondition".strtoupper($obj->code));
@@ -1001,9 +862,6 @@ if ($id)
else if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') {
$showfield=0;
}
else if ($fieldlist[$field]=='unicode') {
$valuetoshow = $langs->getCurrencySymbol($obj->code,1);
}
else if ($fieldlist[$field]=='label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') {
$langs->load("products");
$valuetoshow=$langs->trans($obj->{$fieldlist[$field]});
@@ -1012,32 +870,6 @@ if ($id)
$langs->load("products");
$valuetoshow = $langs->trans($obj->{$fieldlist[$field]});
}
else if (($fieldlist[$field] == 'unit') && ($tabname[$id] == MAIN_DB_PREFIX.'c_paper_format'))
{
$key = $langs->trans('SizeUnit'.strtolower($obj->unit));
$valuetoshow = ($obj->code && $key != 'SizeUnit'.strtolower($obj->unit) ? $key : $obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='localtax1' || $fieldlist[$field]=='localtax2') {
$align="center";
}
else if ($fieldlist[$field]=='localtax1_type') {
if ($obj->localtax1 != 0)
$valuetoshow=$localtax_typeList[$valuetoshow];
else
$valuetoshow = '';
$align="center";
}
else if ($fieldlist[$field]=='localtax2_type') {
if ($obj->localtax2 != 0)
$valuetoshow=$localtax_typeList[$valuetoshow];
else
$valuetoshow = '';
$align="center";
}
else if ($fieldlist[$field]=='taux') {
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
$align="center";
}
else if (in_array($fieldlist[$field],array('recuperableonly')))
{
$align="center";
@@ -1055,7 +887,7 @@ if ($id)
// Can an entry be erased or disabled ?
$iserasable=1;$canbedisabled=1;$canbemodified=1; // true by default
if (isset($obj->code) && $id != 10)
if (isset($obj->code))
{
if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) { $iserasable = 0; $canbedisabled = 0; }
else if ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; }
@@ -1071,16 +903,6 @@ if ($id)
if ($param) $url .= '&'.$param;
$url.='&';
// Favorite
// Only activated on country dictionary
if ($id == 4)
{
print '<td align="center" class="nowrap">';
if ($iserasable) print '<a href="'.$url.'action='.$acts[$obj->favorite].'_favorite">'.$actl[$obj->favorite].'</a>';
else print $langs->trans("AlwaysActive");
print '</td>';
}
// Active
print '<td align="center" class="nowrap">';
if ($canbedisabled) print '<a href="'.$url.'action='.$acts[$obj->active].'">'.$actl[$obj->active].'</a>';
@@ -1102,7 +924,7 @@ if ($id)
{
print '<td align="center">';
if ($user->admin) print '<a href="'.$url.'action=delete">'.img_delete().'</a>';
//else print '<a href="#">'.img_delete().'</a>'; // Some dictionnary can be edited by other profile than admin
//else print '<a href="#">'.img_delete().'</a>'; // Some dictionary can be edited by other profile than admin
print '</td>';
}
else print '<td>&nbsp;</td>';
@@ -1145,7 +967,7 @@ $db->close();
* @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered
* @return void
*/
function fieldList($fieldlist, $obj='', $tabname='', $context='')
function fieldListAccountingCategories($fieldlist, $obj='', $tabname='', $context='')
{
global $conf,$langs,$db;
global $form, $mysoc;
@@ -1155,7 +977,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
$formadmin = new FormAdmin($db);
$formcompany = new FormCompany($db);
if (! empty($conf->accounting->enabled)) $formaccountancy = new FormVentilation($db);
if (! empty($conf->accounting->enabled)) $formaccounting = new FormAccounting($db);
foreach ($fieldlist as $field => $value)
{
@@ -1298,7 +1120,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
{
$fieldname = $fieldlist[$field];
$accountancy_account = (! empty($obj->$fieldname) ? $obj->$fieldname : 0);
print $formaccountancy->select_account($accountancy_account, $fieldlist[$field], 1, '', 1, 1, 'maxwidth200 maxwidthonsmartphone');
print $formaccounting->select_account($accountancy_account, $fieldlist[$field], 1, '', 1, 1, 'maxwidth200 maxwidthonsmartphone');
}
else
{

View File

@@ -32,7 +32,7 @@ require '../../main.inc.php';
// Class
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
$langs->load("compta");
$langs->load("bills");
@@ -117,12 +117,11 @@ if ($action == 'update') {
llxHeader();
$form = new Form($db);
$formaccountancy = new FormVentilation($db);
$formaccounting = new FormAccounting($db);
$linkback = '';
print load_fiche_titre($langs->trans('MenuDefaultAccounts'), $linkback, 'title_accountancy');
print '<br>';
print $langs->trans("DefaultBindingDesc").'<br>';
print '<br>';
@@ -135,15 +134,14 @@ print '<input type="hidden" name="action" value="update">';
print '<table class="noborder" width="100%">';
foreach ( $list_account as $key ) {
$var = ! $var;
print '<tr ' . $bc[$var] . ' class="value">';
print '<tr class="oddeven value">';
// Param
$label = $langs->trans($key);
print '<td>' . $label . '</td>';
// Value
print '<td>'; // Do not force align=right, or it align also the content of the select box
print $formaccountancy->select_account($conf->global->$key, $key, 1, '', 1, 1);
print $formaccounting->select_account($conf->global->$key, $key, 1, '', 1, 1);
print '</td>';
print '</tr>';
}

View File

@@ -130,7 +130,7 @@ print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="update">';
dol_fiche_head($head, 'export', $langs->trans("Configuration"), 0, 'cron');
dol_fiche_head($head, 'export', $langs->trans("Configuration"), -1, 'cron');
$var = true;
@@ -148,9 +148,8 @@ $var = ! $var;
$num = count($main_option);
if ($num) {
foreach ( $main_option as $key ) {
$var = ! $var;
print '<tr ' . $bc[$var] . ' class="value">';
print '<tr class="oddeven value">';
// Param
$label = $langs->trans($key);
@@ -178,7 +177,7 @@ print '</tr>';
$var = ! $var;
print '<tr ' . $bc[$var] . '>';
print '<tr class="oddeven">';
print '<td width="50%">' . $langs->trans("Selectmodelcsv") . '</td>';
if (! $conf->use_javascript_ajax) {
print '<td class="nowrap">';
@@ -212,7 +211,7 @@ if ($num2) {
print '<tr><td colspan="2" bgcolor="red"><b>' . $langs->trans('OptionsDeactivatedForThisExportModel') . '</b></td></tr>';
}
print '<tr ' . $bc[$var] . '>';
print '<tr class="oddeven">';
print '<td width="50%">' . $langs->trans("Selectformat") . '</td>';
if (! $conf->use_javascript_ajax) {
print '<td class="nowrap">';
@@ -230,10 +229,8 @@ if ($num2) {
}
print "</td></tr>";
foreach ( $model_option as $key ) {
$var = ! $var;
print '<tr ' . $bc[$var] . ' class="value">';
foreach ( $model_option as $key ) {
print '<tr class="oddeven value">';
// Param
$label = $langs->trans($key);

View File

@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
/* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -25,14 +25,14 @@ require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/fiscalyear.class.php';
$action = GETPOST('action');
$action = GETPOST('action','aZ09');
// Load variable for pagination
$limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit;
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
$sortfield = GETPOST('sortfield','alpha');
$sortorder = GETPOST('sortorder','alpha');
$page = GETPOST('page','int');
if ($page == -1) { $page = 0; }
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
@@ -125,7 +125,7 @@ if ($result) {
while ( $i < $num && $i < $max ) {
$obj = $db->fetch_object($result);
$fiscalyearstatic->id = $obj->rowid;
print '<tr ' . $bc[$var] . '>';
print '<tr class="oddeven">';
print '<td><a href="fiscalyear_card.php?id=' . $obj->rowid . '">' . img_object($langs->trans("ShowFiscalYear"), "technic") . ' ' . $obj->rowid . '</a></td>';
print '<td align="left">' . $obj->label . '</td>';
print '<td align="left">' . dol_print_date($db->jdate($obj->date_start), 'day') . '</td>';
@@ -136,7 +136,7 @@ if ($result) {
$i ++;
}
} else {
print '<tr ' . $bc[$var] . '><td colspan="5" class="opacitymedium">' . $langs->trans("None") . '</td></tr>';
print '<tr class="oddeven"><td colspan="5" class="opacitymedium">' . $langs->trans("None") . '</td></tr>';
}
print '</table>';
} else {

View File

@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@zendsi.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -176,13 +176,15 @@ if ($action == 'create')
print $form->select_date(($date_end ? $date_end : - 1), 'fiscalyearend');
print '</td></tr>';
/*
// Statut
print '<tr>';
print '<td class="fieldrequired">' . $langs->trans("Status") . '</td>';
print '<td class="valeur">';
print $form->selectarray('statut', $statut2label, GETPOST('statut'));
print '</td></tr>';
*/
print '</table>';
dol_fiche_end();
@@ -232,7 +234,8 @@ if ($action == 'create')
// Statut
print '<tr><td>' . $langs->trans("Statut") . '</td><td>';
print $form->selectarray('statut', $statut2label, $object->statut);
// print $form->selectarray('statut', $statut2label, $object->statut);
print $object->getLibStatut(4);
print '</td></tr>';
print '</table>';
@@ -304,7 +307,7 @@ if ($action == 'create')
print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=edit&id=' . $id . '">' . $langs->trans('Modify') . '</a>';
print '<a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?action=delete&id=' . $id . '">' . $langs->trans('Delete') . '</a>';
// print '<a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?action=delete&id=' . $id . '">' . $langs->trans('Delete') . '</a>';
print '</div>';
}

View File

@@ -1,8 +1,7 @@
<?php
/*
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -28,7 +27,7 @@ require '../../main.inc.php';
// Class
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
// langs
$langs->load("compta");
@@ -40,11 +39,11 @@ $langs->load("accountancy");
if (! $user->admin)
accessforbidden();
$limit = GETPOST("limit")?GETPOST("limit","int"):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
$limit = GETPOST('limit','int')?GETPOST('limit','int'):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
if ($page == -1) { $page = 0; }
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
@@ -65,22 +64,22 @@ if ($_POST["action"] == 'import') {
if (is_array($to_import) && count($to_import) > 0) {
print '<div><font color="red">' . count($to_import) . ' ' . $langs->trans("SelectedLines") . '</font></div>';
$sql = 'SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $conf->global->CHARTOFACCOUNTS;
$result = $db->query($sql);
if ($result && ($db->num_rows($result) > 0)) {
$obj = $db->fetch_object($result);
$cpt = 0;
foreach ( $to_import as $maLigneCochee ) {
$accounting = new AccountingAccount($db);
$monLabel = GETPOST('label' . $maLigneCochee);
$monParentAccount = GETPOST('AccountParent' . $maLigneCochee);
$monType = GETPOST('pcgType' . $maLigneCochee);
$monSubType = GETPOST('pcgSubType' . $maLigneCochee);
$accounting->fk_pcg_version = $obj->pcg_version;
$accounting->account_number = $maLigneCochee;
$accounting->label = $monLabel;
@@ -126,10 +125,10 @@ if ($result) {
$num_lines = $db->num_rows($result);
$i = 0;
print_barre_liste($langs->trans("ImportAccount"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num_lines);
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST">' . "\n";
print '<input type="hidden" name="action" value="import">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td>' . $langs->trans("AccountAccouting") . '</td>';
print '<td>' . $langs->trans("label") . '</td>';
@@ -138,45 +137,43 @@ if ($result) {
print '<td>' . $langs->trans("Pcgsubtype") . '</td>';
print '<td align="center">' . $langs->trans("Import") . '</td>';
print '</tr>';
$form = new Form($db);
$htmlacc = new FormVentilation($db);
$formaccounting = new FormAccounting($db);
$var = true;
while ( $i < min($num_lines, $limit) ) {
$objp = $db->fetch_object($result);
$var = ! $var;
print '<tr'. $bc[$var].'>';
print '<tr class="oddeven">';
print '<td align="left">';
print $objp->accounting;
print '</td>';
print '<td align="left">';
print '<input name="label" size="30" value="">';
print '</td>';
// Colonne choix du compte
print '<td>';
print $htmlacc->select_account($accounting->account_parent, 'AccountParent');
print $formaccounting->select_account($accounting->account_parent, 'AccountParent');
print '</td>';
print '<td>';
print $htmlacc->select_pcgtype($accounting->pcg_type, 'pcgType');
print '<input type="text" name="pcgType" value="'.dol_escape_htmltag(isset($_POST['pcg_subtype'])?GETPOST('pcg_subtype','alpha'):$accounting->pcg_type).'">';
print '</td>';
print '<td>';
print $htmlacc->select_pcgsubtype($accounting->pcg_subtype, 'pcgSubType');
print '<input type="text" name="pcgSubType" value="'.dol_escape_htmltag(isset($_POST['pcg_subtype'])?GETPOST('pcg_subtype','alpha'):$accounting->pcg_subtype).'">';
print '</td>';
// Colonne choix ligne a ventiler
$checked = ('label' == 'O') ? ' checked' : '';
print '<td align="center">';
print '<input type="checkbox" name="mesCasesCochees[]" ' . $checked . ' value="' . $objp->accounting . '"/>';
print '</td>';
print '</tr>';
$i ++;
}

View File

@@ -1,11 +1,11 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -31,8 +31,6 @@ require '../../main.inc.php';
// Class
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
$langs->load("compta");
$langs->load("bills");
@@ -142,18 +140,17 @@ if ($action == 'setmanagezero') {
}
if ($action == 'setdisabledirectinput') {
$setdisabledirectinput = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "BANK_DISABLE_DIRECT_INPUT", $setdisabledirectinput, 'yesno', 0, '', $conf->entity);
if (! $res > 0)
$error ++;
if (! $error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'mesgs');
}
$setdisabledirectinput = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "BANK_DISABLE_DIRECT_INPUT", $setdisabledirectinput, 'yesno', 0, '', $conf->entity);
if (! $res > 0)
$error ++;
if (! $error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'mesgs');
}
}
/*
* View
*/
@@ -161,7 +158,6 @@ if ($action == 'setdisabledirectinput') {
llxHeader();
$form = new Form($db);
$formaccountancy = new FormVentilation($db);
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
print load_fiche_titre($langs->trans('ConfigAccountingExpert'), $linkback, 'title_setup');
@@ -172,7 +168,7 @@ print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="update">';
dol_fiche_head($head, 'general', $langs->trans("Configuration"), 0, 'cron');
dol_fiche_head($head, 'general', $langs->trans("Configuration"), -1, 'cron');
// Default mode for calculating turnover (parameter ACCOUNTING_MODE)
@@ -215,8 +211,7 @@ print "</tr>\n";
if (! empty($user->admin))
{
// TO DO Mutualize code for yes/no constants
$var = ! $var;
print "<tr " . $bc[$var] . ">";
print '<tr class="oddeven">';
print '<td>' . $langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_TODO") . '</td>';
if (! empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO)) {
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsorttodo&value=0">';
@@ -229,8 +224,7 @@ if (! empty($user->admin))
}
print '</tr>';
$var = ! $var;
print "<tr " . $bc[$var] . ">";
print '<tr class="oddeven">';
print '<td>' . $langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_DONE") . '</td>';
if (! empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE)) {
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsortdone&value=0">';
@@ -243,22 +237,20 @@ if (! empty($user->admin))
}
print '</tr>';
$var = ! $var;
print "<tr " . $bc[$var] . ">";
print '<td>' . $langs->trans("BANK_DISABLE_DIRECT_INPUT") . '</td>';
if (! empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) {
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=0">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>';
} else {
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=1">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>';
}
print '</tr>';
$var = ! $var;
print "<tr " . $bc[$var] . ">";
print '<tr class="oddeven">';
print '<td>' . $langs->trans("BANK_DISABLE_DIRECT_INPUT") . '</td>';
if (! empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) {
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=0">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>';
} else {
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=1">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>';
}
print '</tr>';
print '<tr class="oddeven">';
print '<td>' . $langs->trans("ACCOUNTING_MANAGE_ZERO") . '</td>';
if (! empty($conf->global->ACCOUNTING_MANAGE_ZERO)) {
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setmanagezero&value=0">';
@@ -276,9 +268,7 @@ if (! empty($user->admin))
// Param a user $user->rights->accountancy->chartofaccount can access
foreach ($list as $key)
{
$var = ! $var;
print '<tr ' . $bc[$var] . ' class="value">';
print '<tr class="oddeven value">';
if (! empty($conf->global->ACCOUNTING_MANAGE_ZERO) && ($key == 'ACCOUNTING_LENGTH_GACCOUNT' || $key == 'ACCOUNTING_LENGTH_AACCOUNT')) continue;
@@ -306,7 +296,7 @@ print '<div class="center"><input type="submit" class="button" value="' . $langs
print '<br>';
print '<br>';
print $langs->trans("AccountancySetupDoneFromAccountancyMenu", $langs->transnoentitiesnoconv("Home").'-'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy"));
print '<div class="opacitymedium">'.$langs->trans("AccountancySetupDoneFromAccountancyMenu", $langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy")).'</div>';
print '<br>';
print '</form>';

View File

@@ -1,210 +0,0 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* \file htdocs/accountancy/admin/journal.php
* \ingroup Advanced accountancy
* \brief Setup page to configure accounting expert module
*/
require '../../main.inc.php';
// Class
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/bank.lib.php';
require_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php';
$langs->load("compta");
$langs->load("bills");
$langs->load("admin");
$langs->load("accountancy");
$langs->load("salaries");
// Security check
if (empty($user->admin) || ! empty($user->rights->accountancy->chartofaccount))
{
accessforbidden();
}
$action = GETPOST('action', 'alpha');
// Other parameters ACCOUNTING_*
$list = array (
'ACCOUNTING_SELL_JOURNAL',
'ACCOUNTING_PURCHASE_JOURNAL',
'ACCOUNTING_SOCIAL_JOURNAL',
'ACCOUNTING_MISCELLANEOUS_JOURNAL',
'ACCOUNTING_EXPENSEREPORT_JOURNAL'
);
/*
* Actions
*/
if ($action == 'update') {
$error = 0;
// Save vars
foreach ($list as $constname)
{
$constvalue = GETPOST($constname, 'alpha');
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
$error ++;
}
}
// Save bank account journals
$arrayofbankaccount = GETPOST('bank_account', 'array');
foreach($arrayofbankaccount as $key => $code)
{
$bankaccount = new Account($db);
$res = $bankaccount->fetch($key);
if ($res > 0)
{
$bankaccount->accountancy_journal = $code;
$bankaccount->update($user);
}
else
{
$error++;
break;
}
}
if (! $error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
/*
* View
*/
llxHeader();
$form = new Form($db);
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
print load_fiche_titre($langs->trans('ConfigAccountingExpert'), $linkback, 'title_setup');
$head = admin_accounting_prepare_head(null);
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="update">';
dol_fiche_head($head, 'journal', $langs->trans("Configuration"), 0, 'cron');
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="2">' . $langs->trans('Journaux') . '</td>';
print "</tr>\n";
foreach ( $list as $key ) {
$var = ! $var;
print '<tr ' . $bc[$var] . ' class="value">';
// Param
$label = $langs->trans($key);
print '<td width="50%"><label for="' . $key . '">' . $label . '</label></td>';
// Value
print '<td>';
print '<input type="text" size="20" id="' . $key . '" name="' . $key . '" value="' . $conf->global->$key . '">';
print '</td></tr>';
}
print "</table>\n";
print '<br>';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="2">' . $langs->trans('JournalFinancial') . ' ('.$langs->trans('Opened').')</td>';
print "</tr>\n";
// Bank account
$sql = "SELECT rowid, ref, label, number, account_number, accountancy_journal";
$sql .= " FROM " . MAIN_DB_PREFIX . "bank_account";
$sql .= " WHERE entity = " . $conf->entity;
$sql .= " AND clos = 0";
$sql .= " ORDER BY label";
$resql = $db->query($sql);
if ($resql) {
$numr = $db->num_rows($resql);
$i = 0;
if ($numr > 0)
$bankaccountstatic = new Account($db);
while ( $i < $numr ) {
$objp = $db->fetch_object($resql);
$var = ! $var;
$bankaccountstatic->rowid = $objp->rowid;
$bankaccountstatic->id = $objp->rowid;
$bankaccountstatic->ref = $objp->ref;
$bankaccountstatic->label = $objp->label;
$bankaccountstatic->number = $objp->number;
$bankaccountstatic->account_number = $objp->account_number;
$bankaccountstatic->accountancy_journal = $objp->accountancy_journal;
print '<tr ' . $bc[$var] . ' class="value">';
// Param
print '<td width="50%"><label for="' . $objp->rowid . '">' . $langs->trans("Journal");
print ' - '.$bankaccountstatic->getNomUrl(1);
print '</label></td>';
// Value
print '<td>';
print '<input type="text" size="20" id="' . $objp->rowid . '" name="bank_account['.$objp->rowid.']" value="' . $objp->accountancy_journal . '">';
print '</td></tr>';
$i ++;
}
$db->free($resql);
}
else
{
dol_print_error($db);
}
print "</table>\n";
dol_fiche_end();
print '<div class="center"><input type="submit" class="button" value="' . $langs->trans('Modify') . '" name="button"></div>';
print '</form>';
llxFooter();
$db->close();

View File

@@ -0,0 +1,752 @@
<?php
/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com>
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* \file htdocs/accountancy/admin/journals_list.php
* \ingroup Advanced accountancy
* \brief Setup page to configure journals
*/
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php';
$langs->load("admin");
$langs->load("compta");
$langs->load("accountancy");
$action=GETPOST('action','alpha')?GETPOST('action','alpha'):'view';
$confirm=GETPOST('confirm','alpha');
$id=GETPOST('id','int');
$rowid=GETPOST('rowid','alpha');
// Security access
if (! empty($user->rights->accountancy->chartofaccount))
{
accessforbidden();
}
$acts[0] = "activate";
$acts[1] = "disable";
$actl[0] = img_picto($langs->trans("Disabled"),'switch_off');
$actl[1] = img_picto($langs->trans("Activated"),'switch_on');
$listoffset=GETPOST('listoffset');
$listlimit=GETPOST('listlimit')>0?GETPOST('listlimit'):1000;
$active = 1;
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
if ($page == -1) { $page = 0 ; }
$offset = $listlimit * $page ;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (empty($sortfield)) $sortfield='code';
if (empty($sortorder)) $sortorder='ASC';
$error = 0;
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('admin'));
// This page is a generic page to edit dictionaries
// Put here declaration of dictionaries properties
// Sort order to show dictionary (0 is space). All other dictionaries (added by modules) will be at end of this.
$taborder=array(35);
// Name of SQL tables of dictionaries
$tabname=array();
$tabname[35]= MAIN_DB_PREFIX."accounting_journal";
// Dictionary labels
$tablib=array();
$tablib[35]= "DictionaryAccountancyJournal";
// Requests to extract data
$tabsql=array();
$tabsql[35]= "SELECT a.rowid as rowid, a.code as code, a.label, a.nature, a.active FROM ".MAIN_DB_PREFIX."accounting_journal as a";
// Criteria to sort dictionaries
$tabsqlsort=array();
$tabsqlsort[35]="code ASC";
// Nom des champs en resultat de select pour affichage du dictionnaire
$tabfield=array();
$tabfield[35]= "code,label,nature";
// Nom des champs d'edition pour modification d'un enregistrement
$tabfieldvalue=array();
$tabfieldvalue[35]= "code,label,nature";
// Nom des champs dans la table pour insertion d'un enregistrement
$tabfieldinsert=array();
$tabfieldinsert[35]= "code,label,nature";
// Nom du rowid si le champ n'est pas de type autoincrement
// Example: "" if id field is "rowid" and has autoincrement on
// "nameoffield" if id field is not "rowid" or has not autoincrement on
$tabrowid=array();
$tabrowid[35]= "";
// Condition to show dictionary in setup page
$tabcond=array();
$tabcond[35]= ! empty($conf->accounting->enabled);
// List of help for fields
$tabhelp=array();
$tabhelp[35] = array('code'=>$langs->trans("EnterAnyCode"));
// List of check for fields (NOT USED YET)
$tabfieldcheck=array();
$tabfieldcheck[35] = array();
// Complete all arrays with entries found into modules
complete_dictionary_with_modules($taborder,$tabname,$tablib,$tabsql,$tabsqlsort,$tabfield,$tabfieldvalue,$tabfieldinsert,$tabrowid,$tabcond,$tabhelp,$tabfieldcheck);
// Define elementList and sourceList (used for dictionary type of contacts "llx_c_type_contact")
$elementList = array();
// Must match ids defined into eldy.lib.php
$sourceList = array(
'1' => $langs->trans('AccountingJournalType1'),
'2' => $langs->trans('AccountingJournalType2'),
'3' => $langs->trans('AccountingJournalType3'),
'4' => $langs->trans('AccountingJournalType4'),
'9' => $langs->trans('AccountingJournalType9')
);
/*
* Actions
*/
if (GETPOST('button_removefilter') || GETPOST('button_removefilter.x') || GETPOST('button_removefilter_x'))
{
$search_country_id = '';
}
// Actions add or modify an entry into a dictionary
if (GETPOST('actionadd') || GETPOST('actionmodify'))
{
$listfield=explode(',', str_replace(' ', '',$tabfield[$id]));
$listfieldinsert=explode(',',$tabfieldinsert[$id]);
$listfieldmodify=explode(',',$tabfieldinsert[$id]);
$listfieldvalue=explode(',',$tabfieldvalue[$id]);
// Check that all fields are filled
$ok=1;
foreach ($listfield as $f => $value)
{
if ($fieldnamekey == 'libelle' || ($fieldnamekey == 'label')) $fieldnamekey='Label';
if ($fieldnamekey == 'code') $fieldnamekey = 'Code';
if ($fieldnamekey == 'nature') $fieldnamekey = 'Nature';
}
// Other checks
if (isset($_POST["code"]))
{
if ($_POST["code"]=='0')
{
$ok=0;
setEventMessages($langs->transnoentities('ErrorCodeCantContainZero'), null, 'errors');
}
/*if (!is_numeric($_POST['code'])) // disabled, code may not be in numeric base
{
$ok = 0;
$msg .= $langs->transnoentities('ErrorFieldFormat', $langs->transnoentities('Code')).'<br />';
}*/
}
// Clean some parameters
if ($_POST["accountancy_code"] <= 0) $_POST["accountancy_code"]=''; // If empty, we force to null
if ($_POST["accountancy_code_sell"] <= 0) $_POST["accountancy_code_sell"]=''; // If empty, we force to null
if ($_POST["accountancy_code_buy"] <= 0) $_POST["accountancy_code_buy"]=''; // If empty, we force to null
// Si verif ok et action add, on ajoute la ligne
if ($ok && GETPOST('actionadd'))
{
if ($tabrowid[$id])
{
// Recupere id libre pour insertion
$newid=0;
$sql = "SELECT max(".$tabrowid[$id].") newid from ".$tabname[$id];
$result = $db->query($sql);
if ($result)
{
$obj = $db->fetch_object($result);
$newid=($obj->newid + 1);
} else {
dol_print_error($db);
}
}
// Add new entry
$sql = "INSERT INTO ".$tabname[$id]." (";
// List of fields
if ($tabrowid[$id] && ! in_array($tabrowid[$id],$listfieldinsert))
$sql.= $tabrowid[$id].",";
$sql.= $tabfieldinsert[$id];
$sql.=",active)";
$sql.= " VALUES(";
// List of values
if ($tabrowid[$id] && ! in_array($tabrowid[$id],$listfieldinsert))
$sql.= $newid.",";
$i=0;
foreach ($listfieldinsert as $f => $value)
{
if ($value == 'entity') {
$_POST[$listfieldvalue[$i]] = $conf->entity;
}
if ($i) $sql.=",";
if ($_POST[$listfieldvalue[$i]] == '' && ! ($listfieldvalue[$i] == 'code' && $id == 10)) $sql.="null"; // For vat, we want/accept code = ''
else $sql.="'".$db->escape($_POST[$listfieldvalue[$i]])."'";
$i++;
}
$sql.=",1)";
dol_syslog("actionadd", LOG_DEBUG);
$result = $db->query($sql);
if ($result) // Add is ok
{
setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs');
$_POST=array('id'=>$id); // Clean $_POST array, we keep only
}
else
{
if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
setEventMessages($langs->transnoentities("ErrorRecordAlreadyExists"), null, 'errors');
}
else {
dol_print_error($db);
}
}
}
// Si verif ok et action modify, on modifie la ligne
if ($ok && GETPOST('actionmodify'))
{
if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; }
else { $rowidcol="rowid"; }
// Modify entry
$sql = "UPDATE ".$tabname[$id]." SET ";
// Modifie valeur des champs
if ($tabrowid[$id] && ! in_array($tabrowid[$id],$listfieldmodify))
{
$sql.= $tabrowid[$id]."=";
$sql.= "'".$db->escape($rowid)."', ";
}
$i = 0;
foreach ($listfieldmodify as $field)
{
if ($field == 'price' || preg_match('/^amount/i',$field) || $field == 'taux') {
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
}
else if ($field == 'entity') {
$_POST[$listfieldvalue[$i]] = $conf->entity;
}
if ($i) $sql.=",";
$sql.= $field."=";
if ($_POST[$listfieldvalue[$i]] == '' && ! ($listfieldvalue[$i] == 'code' && $id == 10)) $sql.="null"; // For vat, we want/accept code = ''
else $sql.="'".$db->escape($_POST[$listfieldvalue[$i]])."'";
$i++;
}
$sql.= " WHERE ".$rowidcol." = '".$rowid."'";
dol_syslog("actionmodify", LOG_DEBUG);
//print $sql;
$resql = $db->query($sql);
if (! $resql)
{
setEventMessages($db->error(), null, 'errors');
}
}
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
}
if (GETPOST('actioncancel'))
{
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
}
if ($action == 'confirm_delete' && $confirm == 'yes') // delete
{
if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; }
else { $rowidcol="rowid"; }
$sql = "DELETE from ".$tabname[$id]." WHERE ".$rowidcol."='".$rowid."'";
dol_syslog("delete", LOG_DEBUG);
$result = $db->query($sql);
if (! $result)
{
if ($db->errno() == 'DB_ERROR_CHILD_EXISTS')
{
setEventMessages($langs->transnoentities("ErrorRecordIsUsedByChild"), null, 'errors');
}
else
{
dol_print_error($db);
}
}
}
// activate
if ($action == $acts[0])
{
if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; }
else { $rowidcol="rowid"; }
if ($rowid) {
$sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE ".$rowidcol."='".$rowid."'";
}
elseif ($_GET["code"]) {
$sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code='".$_GET["code"]."'";
}
$result = $db->query($sql);
if (!$result)
{
dol_print_error($db);
}
}
// disable
if ($action == $acts[1])
{
if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; }
else { $rowidcol="rowid"; }
if ($rowid) {
$sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE ".$rowidcol."='".$rowid."'";
}
elseif ($_GET["code"]) {
$sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code='".$_GET["code"]."'";
}
$result = $db->query($sql);
if (!$result)
{
dol_print_error($db);
}
}
/*
* View
*/
$form = new Form($db);
$formadmin=new FormAdmin($db);
llxHeader();
$titre=$langs->trans("DictionarySetup");
$linkback='';
if ($id)
{
$titre.=' - '.$langs->trans($tablib[$id]);
$titlepicto='title_accountancy';
}
print load_fiche_titre($titre,$linkback,$titlepicto);
if (empty($id))
{
print $langs->trans("DictionaryDesc");
print " ".$langs->trans("OnlyActiveElementsAreShown")."<br>\n";
}
print "<br>\n";
// Confirmation de la suppression de la ligne
if ($action == 'delete')
{
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$_GET["code"].'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1);
}
//var_dump($elementList);
/*
* Show a dictionary
*/
if ($id)
{
// Complete requete recherche valeurs avec critere de tri
$sql=$tabsql[$id];
if ($search_country_id > 0)
{
if (preg_match('/ WHERE /',$sql)) $sql.= " AND ";
else $sql.=" WHERE ";
$sql.= " c.rowid = ".$search_country_id;
}
if ($sortfield)
{
// If sort order is "country", we use country_code instead
if ($sortfield == 'country') $sortfield='country_code';
$sql.= " ORDER BY ".$sortfield;
if ($sortorder)
{
$sql.=" ".strtoupper($sortorder);
}
$sql.=", ";
// Clear the required sort criteria for the tabsqlsort to be able to force it with selected value
$tabsqlsort[$id]=preg_replace('/([a-z]+\.)?'.$sortfield.' '.$sortorder.',/i','',$tabsqlsort[$id]);
$tabsqlsort[$id]=preg_replace('/([a-z]+\.)?'.$sortfield.',/i','',$tabsqlsort[$id]);
}
else {
$sql.=" ORDER BY ";
}
$sql.=$tabsqlsort[$id];
$sql.=$db->plimit($listlimit+1,$offset);
//print $sql;
$fieldlist=explode(',',$tabfield[$id]);
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="from" value="'.dol_escape_htmltag(GETPOST('from','alpha')).'">';
print '<table class="noborder" width="100%">';
// Form to add a new line
if ($tabname[$id])
{
$alabelisused=0;
$var=false;
$fieldlist=explode(',',$tabfield[$id]);
// Line for title
print '<tr class="liste_titre">';
foreach ($fieldlist as $field => $value)
{
// Determine le nom du champ par rapport aux noms possibles
// dans les dictionnaires de donnees
$valuetoshow=ucfirst($fieldlist[$field]); // Par defaut
$valuetoshow=$langs->trans($valuetoshow); // try to translate
$align="left";
if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); }
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label')
{
$valuetoshow=$langs->trans("Label");
}
if ($fieldlist[$field]=='nature') { $valuetoshow=$langs->trans("Nature"); }
if ($valuetoshow != '')
{
print '<td align="'.$align.'">';
if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1,$valuetoshow).'</a>';
else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]);
else print $valuetoshow;
print '</td>';
}
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') $alabelisused=1;
}
print '<td>';
print '<input type="hidden" name="id" value="'.$id.'">';
print '</td>';
print '<td style="min-width: 26px;"></td>';
print '<td style="min-width: 26px;"></td>';
print '<td style="min-width: 26px;"></td>';
print '</tr>';
// Line to enter new values
print '<tr class="oddeven nodrag nodrap nohover">';
$obj = new stdClass();
// If data was already input, we define them in obj to populate input fields.
if (GETPOST('actionadd'))
{
foreach ($fieldlist as $key=>$val)
{
if (GETPOST($val) != '')
$obj->$val=GETPOST($val);
}
}
$tmpaction = 'create';
$parameters=array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
$reshook=$hookmanager->executeHooks('createDictionaryFieldlist',$parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error=$hookmanager->error; $errors=$hookmanager->errors;
if (empty($reshook))
{
fieldList($fieldlist,$obj,$tabname[$id],'add');
}
print '<td colspan="4" align="right">';
print '<input type="submit" class="button" name="actionadd" value="'.$langs->trans("Add").'">';
print '</td>';
print "</tr>";
print '<tr><td colspan="7">&nbsp;</td></tr>'; // Keep &nbsp; to have a line with enough height
}
// List of available record in database
dol_syslog("htdocs/admin/dict", LOG_DEBUG);
$resql=$db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
$i = 0;
$var=true;
$param = '&id='.$id;
if ($search_country_id > 0) $param.= '&search_country_id='.$search_country_id;
$paramwithsearch = $param;
if ($sortorder) $paramwithsearch.= '&sortorder='.$sortorder;
if ($sortfield) $paramwithsearch.= '&sortfield='.$sortfield;
if (GETPOST('from')) $paramwithsearch.= '&from='.GETPOST('from','alpha');
// There is several pages
if ($num > $listlimit)
{
print '<tr class="none"><td align="right" colspan="'.(3+count($fieldlist)).'">';
print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit), '<li class="pagination"><span>'.$langs->trans("Page").' '.($page+1).'</span></li>');
print '</td></tr>';
}
// Title of lines
print '<tr class="liste_titre liste_titre_add">';
foreach ($fieldlist as $field => $value)
{
// Determine le nom du champ par rapport aux noms possibles
// dans les dictionnaires de donnees
$showfield=1; // By defaut
$align="left";
$sortable=1;
$valuetoshow='';
/*
$tmparray=getLabelOfField($fieldlist[$field]);
$showfield=$tmp['showfield'];
$valuetoshow=$tmp['valuetoshow'];
$align=$tmp['align'];
$sortable=$tmp['sortable'];
*/
$valuetoshow=ucfirst($fieldlist[$field]); // By defaut
$valuetoshow=$langs->trans($valuetoshow); // try to translate
if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); }
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') { $valuetoshow=$langs->trans("Label"); }
if ($fieldlist[$field]=='nature') { $valuetoshow=$langs->trans("Nature"); }
// Affiche nom du champ
if ($showfield)
{
print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable?$fieldlist[$field]:''), ($page?'page='.$page.'&':''), $param, "align=".$align, $sortfield, $sortorder);
}
}
print getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], "active", ($page?'page='.$page.'&':''), $param, 'align="center"', $sortfield, $sortorder);
print getTitleFieldOfList('');
print getTitleFieldOfList('');
print getTitleFieldOfList('');
print '</tr>';
// Title line with search boxes
print '<tr class="liste_titre_filter">';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre" align="center">';
if ($filterfound)
{
$searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto;
}
print '</td>';
print '</tr>';
if ($num)
{
// Lines with values
while ($i < $num)
{
$obj = $db->fetch_object($resql);
//print_r($obj);
print '<tr class="oddeven" id="rowid-'.$obj->rowid.'">';
if ($action == 'edit' && ($rowid == (! empty($obj->rowid)?$obj->rowid:$obj->code)))
{
$tmpaction='edit';
$parameters=array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
$reshook=$hookmanager->executeHooks('editDictionaryFieldlist',$parameters,$obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error=$hookmanager->error; $errors=$hookmanager->errors;
// Show fields
if (empty($reshook)) fieldList($fieldlist,$obj,$tabname[$id],'edit');
print '<td align="center" colspan="4">';
print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
print '<input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">';
print '<input type="submit" class="button" name="actioncancel" value="'.$langs->trans("Cancel").'">';
print '<div name="'.(! empty($obj->rowid)?$obj->rowid:$obj->code).'"></div>';
print '</td>';
}
else
{
$tmpaction = 'view';
$parameters=array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
$reshook=$hookmanager->executeHooks('viewDictionaryFieldlist',$parameters,$obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error=$hookmanager->error; $errors=$hookmanager->errors;
if (empty($reshook))
{
foreach ($fieldlist as $field => $value)
{
$showfield=1;
$align="left";
$valuetoshow=$obj->{$fieldlist[$field]};
if ($valuetoshow=='all') {
$valuetoshow=$langs->trans('All');
}
else if ($fieldlist[$field]=='nature' && $tabname[$id]==MAIN_DB_PREFIX.'accounting_journal') {
$langs->load("accountancy");
$key=$langs->trans("AccountingJournalType".strtoupper($obj->nature));
$valuetoshow=($obj->nature && $key != "AccountingJournalType".strtoupper($obj->nature)?$key:$obj->{$fieldlist[$field]});
}
$class='tddict';
// Show value for field
if ($showfield) print '<!-- '.$fieldlist[$field].' --><td align="'.$align.'" class="'.$class.'">'.$valuetoshow.'</td>';
}
}
// Can an entry be erased or disabled ?
$iserasable=1;$canbedisabled=1;$canbemodified=1; // true by default
if (isset($obj->code) && $id != 10)
{
if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) { $iserasable = 0; $canbedisabled = 0; }
else if ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; }
else if ($obj->code == 'EF0') { $iserasable = 0; $canbedisabled = 0; }
}
$canbemodified=$iserasable;
$url = $_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(! empty($obj->rowid)?$obj->rowid:(! empty($obj->code)?$obj->code:'')).'&code='.(! empty($obj->code)?urlencode($obj->code):'');
if ($param) $url .= '&'.$param;
$url.='&';
// Active
print '<td align="center" class="nowrap">';
if ($canbedisabled) print '<a href="'.$url.'action='.$acts[$obj->active].'">'.$actl[$obj->active].'</a>';
else
{
if (in_array($obj->code, array('AC_OTH','AC_OTH_AUTO'))) print $langs->trans("AlwaysActive");
else if (isset($obj->type) && in_array($obj->type, array('systemauto')) && empty($obj->active)) print $langs->trans("Deprecated");
else if (isset($obj->type) && in_array($obj->type, array('system')) && ! empty($obj->active) && $obj->code != 'AC_OTH') print $langs->trans("UsedOnlyWithTypeOption");
else print $langs->trans("AlwaysActive");
}
print "</td>";
// Modify link
if ($canbemodified) print '<td align="center"><a class="reposition" href="'.$url.'action=edit">'.img_edit().'</a></td>';
else print '<td>&nbsp;</td>';
// Delete link
if ($iserasable)
{
print '<td align="center">';
if ($user->admin) print '<a href="'.$url.'action=delete">'.img_delete().'</a>';
//else print '<a href="#">'.img_delete().'</a>'; // Some dictionary can be edited by other profile than admin
print '</td>';
}
else print '<td>&nbsp;</td>';
print '<td></td>';
print '</td>';
}
print "</tr>\n";
$i++;
}
}
}
else {
dol_print_error($db);
}
print '</table>';
print '</form>';
}
print '<br>';
llxFooter();
$db->close();
/**
* Show fields in insert/edit mode
*
* @param array $fieldlist Array of fields
* @param Object $obj If we show a particular record, obj is filled with record fields
* @param string $tabname Name of SQL table
* @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered
* @return void
*/
function fieldList($fieldlist, $obj='', $tabname='', $context='')
{
global $conf,$langs,$db;
global $form, $mysoc;
global $region_id;
global $elementList,$sourceList,$localtax_typeList;
global $bc;
$formadmin = new FormAdmin($db);
$formcompany = new FormCompany($db);
foreach ($fieldlist as $field => $value)
{
if ($fieldlist[$field] == 'nature')
{
print '<td>';
print $form->selectarray('nature', $sourceList,(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''));
print '</td>';
}
elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) {
print '<td><input type="text" class="flat minwidth100" value="'.(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'" name="'.$fieldlist[$field].'"></td>';
}
else
{
print '<td>';
$size=''; $class='';
if ($fieldlist[$field]=='code') $class='maxwidth100';
if ($fieldlist[$field]=='label') $class='quatrevingtpercent';
if ($fieldlist[$field]=='sortorder' || $fieldlist[$field]=='sens' || $fieldlist[$field]=='category_type') $size='size="2" ';
print '<input type="text" '.$size.'class="flat'.($class?' '.$class:'').'" value="'.(isset($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'" name="'.$fieldlist[$field].'">';
print '</td>';
}
}
}

View File

@@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/report.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
@@ -70,11 +70,11 @@ $accounting_product_mode = GETPOST('accounting_product_mode', 'alpha');
$btn_changeaccount = GETPOST('changeaccount');
$btn_changetype = GETPOST('changetype');
$limit = GETPOST("limit")?GETPOST("limit","int"):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
$limit = GETPOST('limit','int')?GETPOST('limit','int'):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
if ($page == -1) { $page = 0; }
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
@@ -184,7 +184,7 @@ if ($action == 'update') {
* View
*/
$form = new FormVentilation($db);
$form = new FormAccounting($db);
// Defaut AccountingAccount RowId Product / Service
// at this time ACCOUNTING_SERVICE_SOLD_ACCOUNT & ACCOUNTING_PRODUCT_SOLD_ACCOUNT are account number not accountingacount rowid
@@ -218,7 +218,7 @@ else
{
$sql.=" p.accountancy_code_sell = aa.account_number AND aa.fk_pcg_version = '" . $pcgvercode . "'";
}
$sql.= ' WHERE p.entity IN ('.getEntity('product', 1).')';
$sql.= ' WHERE p.entity IN ('.getEntity('product').')';
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
if (strlen(trim($search_current_account))) {
$sql .= natural_search("p.accountancy_code_buy",$search_current_account);
@@ -279,6 +279,7 @@ if ($result)
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="page" value="'.$page.'">';
print load_fiche_titre($langs->trans("ProductsBinding"), '', 'title_accountancy');
print '<br>';
@@ -312,22 +313,8 @@ if ($result)
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '', 0, '', '', $limit);
print '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print_liste_field_titre($langs->trans("Description"), $_SERVER["PHP_SELF"], "p.description", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("OnSell"), $_SERVER["PHP_SELF"], "p.tosell", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("OnBuy"), $_SERVER["PHP_SELF"], "p.tobuy", "", $param, 'align="center"', $sortfield, $sortorder);
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
$fieldtosortaccount="p.accountancy_code_buy";
}
else $fieldtosortaccount="p.accountancy_code_sell";
print_liste_field_titre($langs->trans("CurrentDedicatedAccountingAccount"), $_SERVER["PHP_SELF"], $fieldtosortaccount, "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("AssignDedicatedAccountingAccount"));
print_liste_field_titre('', '', '', '', '', 'align="center"');
print '</tr>';
print '<tr class="liste_titre">';
print '<tr class="liste_titre_filter">';
print '<td class="liste_titre"><input type="text" class="flat" size="8" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print '<td class="liste_titre"><input type="text" class="flat" size="20" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
@@ -342,12 +329,28 @@ if ($result)
print ' '.$langs->trans("or").' '.$form->selectarray('search_current_account_valid', $listofvals, $search_current_account_valid, 1);
print '</td>';
print '<td class="liste_titre">&nbsp;</td>';
print '<td align="right" class="liste_titre">';
$searchpitco=$form->showFilterAndCheckAddButtons(1, 'checkforselect', 1);
print $searchpitco;
print '<td align="center" class="liste_titre">';
$searchpicto=$form->showFilterButtons();
print $searchpicto;
print '</td>';
print '</tr>';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print_liste_field_titre($langs->trans("Description"), $_SERVER["PHP_SELF"], "p.description", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("OnSell"), $_SERVER["PHP_SELF"], "p.tosell", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("OnBuy"), $_SERVER["PHP_SELF"], "p.tobuy", "", $param, 'align="center"', $sortfield, $sortorder);
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
$fieldtosortaccount="p.accountancy_code_buy";
}
else $fieldtosortaccount="p.accountancy_code_sell";
print_liste_field_titre($langs->trans("CurrentDedicatedAccountingAccount"), $_SERVER["PHP_SELF"], $fieldtosortaccount, "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("AssignDedicatedAccountingAccount"));
$clickpitco=$form->showCheckAddButtons('checkforselect', 1);
print_liste_field_titre($clickpitco, '', '', '', '', 'align="center"');
print '</tr>';
$product_static = new Product($db);
$var = true;
@@ -381,8 +384,7 @@ if ($result)
$compta_prodbuy_id = $aarowid_servbuy;
}
$var = ! $var;
print '<tr '. $bc[$var].'>';
print '<tr class="oddeven">';
print '<td>';
print $product_static->getNomUrl(1);
@@ -440,7 +442,7 @@ if ($result)
}
// Checkbox select
print '<td align="right">';
print '<td align="center">';
print '<input type="checkbox" class="checkforselect" name="chk_prod[]" value="' . $obj->rowid . '"/></td>';
print "</tr>";
$i ++;

View File

@@ -28,8 +28,8 @@ require '../../main.inc.php';
// Class
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
// Langs
@@ -55,13 +55,13 @@ if (GETPOST("button_export_csv_x") || GETPOST("button_export_csv")) {
$action = 'export_csv';
}
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit;
$limit = GETPOST('limit','int')?GETPOST('limit', 'int'):$conf->liste_limit;
$offset = $limit * $page;
$object = new BookKeeping($db);
$formventilation = new FormVentilation($db);
$formaccounting = new FormAccounting($db);
$formother = new FormOther($db);
$form = new Form($db);
@@ -98,7 +98,7 @@ if (! empty($search_accountancy_code_end)) {
* Action
*/
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers
{
$search_accountancy_code_start = '';
$search_accountancy_code_end = '';
@@ -137,7 +137,7 @@ if ($action == 'export_csv') {
}
else {
$title_page = $langs->trans("AccountBalance") . ' ' . dol_print_date($search_date_start) . '-' . dol_print_date($search_date_end);
$title_page = $langs->trans("AccountBalance") . (($search_date_start || $search_date_end) ? ' ' . dol_print_date($search_date_start) . '-' . dol_print_date($search_date_end) : '');
llxHeader('', $title_page);
@@ -160,7 +160,7 @@ else {
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
$button = '<input type="submit" name="button_export_csv" class="butAction" value="' . $langs->trans("Export") . '" />';
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, 0, 'title_accountancy', 0, $button);
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, $result, 'title_accountancy', 0, $button);
$moreforfilter = '';
@@ -182,6 +182,22 @@ else {
}
print '<table class="liste ' . ($moreforfilter ? "listwithfilterbefore" : "") . '">';
print '<tr class="liste_titre_filter">';
print '<td class="liste_titre" colspan="5">';
print $langs->trans('From');
print $formaccounting->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array(), 1, 1, '');
print ' ';
print $langs->trans('to');
print $formaccounting->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array(), 1, 1, '');
print '</td>';
print '<td align="right" class="liste_titre">';
$searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto;
print '</td>';
print '</tr>';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("AccountAccounting"), $_SERVER['PHP_SELF'], "t.numero_compte", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Label"), $_SERVER['PHP_SELF'], "t.label_compte", "", $options, "", $sortfield, $sortorder);
@@ -191,28 +207,6 @@ else {
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
print "</tr>\n";
print '<tr class="liste_titre">';
print '<td class="liste_titre" colspan="2">';
print $langs->trans('From');
print $formventilation->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array(), 1, 1, '');
print '<br>';
print $langs->trans('to');
print $formventilation->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array(), 1, 1, '');
print '</td>';
print '<td class="liste_titre center">&nbsp;</td>';
print '<td class="liste_titre center">&nbsp;</td>';
print '<td class="liste_titre center">&nbsp;</td>';
print '<td align="right" class="liste_titre">';
$searchpitco=$form->showFilterAndCheckAddButtons(0);
print $searchpitco;
print '</td>';
print '</tr>';
$var = True;
$total_debit = 0;
$total_credit = 0;
$sous_total_debit = 0;
@@ -220,7 +214,6 @@ else {
$displayed_account = "";
foreach ($object->lines as $line) {
$var = ! $var;
$link = '';
$total_debit += $line->debit;
$total_credit += $line->credit;
@@ -229,7 +222,7 @@ else {
if (empty($description)) {
$link = '<a href="../admin/card.php?action=create&compte=' . length_accountg($line->numero_compte) . '">' . img_edit_add() . '</a>';
}
print '<tr ' . $bc[$var] . '>';
print '<tr class="oddeven">';
// Permet d'afficher le compte comptable
if ($root_account_description != $displayed_account) {

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -18,19 +18,23 @@
*/
/**
* \file htdocs/accountancy/bookkeeping/card.php
* \file htdocs/accountancy/bookkeeping/card.php
* \ingroup Advanced accountancy
* \brief Page to show book-entry
* \brief Page to show book-entry
*/
require '../../main.inc.php';
// Class
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
// Langs
$langs->load("accountancy");
$langs->load("bank");
$langs->load("bills");
$langs->load("trips");
// Security check
$id = GETPOST('id', 'int');
@@ -38,7 +42,7 @@ if ($user->societe_id > 0) {
accessforbidden();
}
$action = GETPOST('action');
$action = GETPOST('action','aZ09');
$piece_num = GETPOST("piece_num");
$mesg = '';
@@ -210,7 +214,7 @@ else if ($action == "confirm_create") {
llxHeader();
$html = new Form($db);
$formventilation = new FormVentilation($db);
$formaccountancy = new FormAccounting($db);
/*
* Confirmation to delete the command
@@ -223,26 +227,6 @@ if ($action == 'delete') {
if ($action == 'create') {
print load_fiche_titre($langs->trans("CreateMvts"));
$code_journal_array = array (
$conf->global->ACCOUNTING_SELL_JOURNAL => $conf->global->ACCOUNTING_SELL_JOURNAL,
$conf->global->ACCOUNTING_PURCHASE_JOURNAL => $conf->global->ACCOUNTING_PURCHASE_JOURNAL,
$conf->global->ACCOUNTING_SOCIAL_JOURNAL => $conf->global->ACCOUNTING_SOCIAL_JOURNAL,
$conf->global->ACCOUNTING_MISCELLANEOUS_JOURNAL => $conf->global->ACCOUNTING_MISCELLANEOUS_JOURNAL,
$conf->global->ACCOUNTING_EXPENSEREPORT_JOURNAL => $conf->global->ACCOUNTING_EXPENSEREPORT_JOURNAL
);
$sql = 'SELECT DISTINCT accountancy_journal FROM ' . MAIN_DB_PREFIX . 'bank_account WHERE clos=0';
$resql = $db->query($sql);
if (! $resql) {
setEventMessages($db->lasterror, null, 'errors');
} else {
while ( $obj_bank = $db->fetch_object($resql) ) {
if (! empty($obj_bank->accountancy_journal)) {
$code_journal_array[$obj_bank->accountancy_journal] = $obj_bank->accountancy_journal;
}
}
}
$book = new BookKeeping($db);
$next_num_mvt = $book->getNextNumMvt();
if (empty($next_num_mvt))
@@ -270,9 +254,10 @@ if ($action == 'create') {
print '</tr>';
print '<tr>';
print '<td class="fieldrequired">' . $langs->trans("Codejournal") . '</td>';
print '<td>' . $html->selectarray('code_journal', $code_journal_array) . '</td>';
print '</tr>';
print '<td class="fieldrequired">'.$langs->trans("AccountancyJournal").'</td>';
print '<td>';
print $formaccountancy->select_journal('', 'code_journal', '', 0, '', 1, 1, 1, 1);
print '</td></tr>';
print '<tr>';
print '<td>' . $langs->trans("Docref") . '</td>';
@@ -305,29 +290,54 @@ if ($action == 'create') {
dol_fiche_head();
print '<div class="fichecenter">';
print '<table class="border" width="100%">';
print '<tr class="pair">';
print '<td class="titlefield">' . $langs->trans("NumMvts") . '</td>';
print '<td>' . $book->piece_num . '</td>';
print '</tr>';
print '<tr class="impair">';
print '<td>' . $langs->trans("Docdate") . '</td>';
print '<td>' . dol_print_date($book->doc_date, 'daytextshort') . '</td>';
print '</tr>';
print '<tr class="pair">';
print '<td>' . $langs->trans("Codejournal") . '</td>';
print '<td>' . $book->code_journal . '</td>';
print '</tr>';
print '<td>';
$accountingjournal = new AccountingJournal($db);
$accountingjournal->fetch('',$book->code_journal);
print $accountingjournal->getNomUrl(0,1,1,'',1);
print '</td></tr>';
print '<tr class="impair">';
print '<td>' . $langs->trans("Docref") . '</td>';
print '<td>' . $book->doc_ref . '</td>';
print '</tr>';
$typelabel = $book->doc_type;
if ($typelabel == 'bank') {
$typelabel = $langs->trans('Bank');
}
if ($typelabel == 'customer_invoice') {
$typelabel = $langs->trans('CustomerInvoice');
}
if ($typelabel == 'supplier_invoice') {
$typelabel = $langs->trans('SupplierInvoice');
}
if ($typelabel == 'expense_report') {
$typelabel = $langs->trans('ExpenseReport');
}
print '<tr class="pair">';
print '<td>' . $langs->trans("Doctype") . '</td>';
print '<td>' . $book->doc_type . '</td>';
print '<td>' . $typelabel . '</td>';
print '</tr>';
print '</table>';
print '</div>';
dol_fiche_end();
print '<br>';
@@ -369,8 +379,7 @@ if ($action == 'create') {
print "</tr>\n";
foreach ($book->linesmvt as $line) {
$var = ! $var;
print '<tr ' . $bc[$var] . '>';
print '<tr class="oddeven">';
$total_debit += $line->debit;
$total_credit += $line->credit;
@@ -378,10 +387,10 @@ if ($action == 'create') {
if ($action == 'update' && $line->id == $id) {
print '<td>';
print $formventilation->select_account($line->numero_compte, 'account_number', 0, array (), 1, 1, '');
print $formaccounting->select_account($line->numero_compte, 'account_number', 0, array (), 1, 1, '');
print '</td>';
print '<td>';
print $formventilation->select_auxaccount($line->code_tiers, 'code_tiers', 1);
print $formaccounting->select_auxaccount($line->code_tiers, 'code_tiers', 1);
print '</td>';
print '<td><input type="text" size="15" name="label_compte" value="' . $line->label_compte . '"/></td>';
print '<td align="right"><input type="text" size="6" name="debit" value="' . price($line->debit) . '"/></td>';
@@ -420,17 +429,16 @@ if ($action == 'create') {
}
if ($action == "" || $action == 'add') {
$var = ! $var;
print '<tr ' . $bc[$var] . '>';
print '<tr class="oddeven">';
print '<td>';
print $formventilation->select_account($account_number, 'account_number', 0, array (), 1, 1, '');
print $formaccounting->select_account($account_number, 'account_number', 0, array (), 1, 1, '');
print '</td>';
print '<td>';
print $formventilation->select_auxaccount($code_tiers, 'code_tiers', 1);
print $formaccounting->select_auxaccount($code_tiers, 'code_tiers', 1);
print '</td>';
print '<td><input type="text" size="15" name="label_compte" value="' . $label_compte . '"/></td>';
print '<td align="right"><input type="text" size="6" name="debit" value="' . price($debit) . '"/></td>';
print '<td align="right"><input type="text" size="6" name="credit" value="' . price($credit) . '"/></td>';
print '<td align="right"><input type="text" class="right maxwidth50" name="debit" value="' . price($debit) . '"/></td>';
print '<td align="right"><input type="text" class="right maxwidth50" name="credit" value="' . price($credit) . '"/></td>';
print '<td></td>';
print '<td></td>';
print '<td><input type="submit" class="button" name="save" value="' . $langs->trans("Add") . '"></td>';

View File

@@ -1,8 +1,8 @@
<?php
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -28,9 +28,10 @@ require '../../main.inc.php';
// Class
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
// Langs
$langs->load("accountancy");
@@ -79,7 +80,7 @@ $search_direction = GETPOST('search_direction', 'alpha');
$search_ledger_code = GETPOST('search_ledger_code', 'alpha');
// Load variable for pagination
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
$limit = GETPOST('limit','int')?GETPOST('limit', 'int'):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
$sortfield = GETPOST('sortfield', 'alpha');
$sortorder = GETPOST('sortorder', 'alpha');
$page = GETPOST('page','int');
@@ -93,7 +94,7 @@ if ($sortfield == "") $sortfield = "t.rowid";
$object = new BookKeeping($db);
$formventilation = new FormVentilation($db);
$formaccounting = new FormAccounting($db);
$formother = new FormOther($db);
$form = new Form($db);
@@ -291,7 +292,6 @@ $title_page = $langs->trans("Bookkeeping");
llxHeader('', $title_page);
// List
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
$nbtotalofrecords = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter);
@@ -321,8 +321,8 @@ if ($action == 'delbookkeepingyear') {
if (empty($delyear)) {
$delyear = dol_print_date(dol_now(), '%Y');
}
$year_array = $formventilation->selectyear_accountancy_bookkepping($delyear, 'delyear', 0, 'array');
$journal_array = $formventilation->selectjournal_accountancy_bookkepping($deljournal, 'deljournal', 0, 'array');
$year_array = $formaccounting->selectyear_accountancy_bookkepping($delyear, 'delyear', 0, 'array');
$journal_array = $formaccounting->selectjournal($deljournal, 'deljournal', '', 1, 'array', 1, 1);
$form_question['delyear'] = array (
'name' => 'delyear',
@@ -354,13 +354,14 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="page" value="'.$page.'">';
$button = '<a class="butAction" name="button_export_csv" href="'.$_SERVER["PHP_SELF"].'?action=export_csv'.($param?'&'.$param:'').'">';
if (count($filter)) $button.= $langs->trans("ExportFilteredList");
else $button.= $langs->trans("ExportList");
$button.= '</a>';
$groupby = ' <a href="./listbyaccount.php">' . $langs->trans("GroupByAccountAccounting") . '</a>';
$groupby = ' <a class="nohover" href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php"">' . $langs->trans("GroupByAccountAccounting") . '</a>';
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $button, $result, $nbtotalofrecords, 'title_accountancy', 0, $groupby, '', $limit);
@@ -371,20 +372,8 @@ print '<div class="inline-block divButAction"><a class="butActionDelete" name="b
print '</div>';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("TransactionNumShort"), $_SERVER['PHP_SELF'], "t.piece_num", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Docdate"), $_SERVER['PHP_SELF'], "t.doc_date", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Docref"), $_SERVER['PHP_SELF'], "t.doc_ref", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("AccountAccountingShort"), $_SERVER['PHP_SELF'], "t.numero_compte", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Code_tiers"), $_SERVER['PHP_SELF'], "t.code_tiers", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Label"), $_SERVER['PHP_SELF'], "t.label_compte", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "t.debit", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "t.credit", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Codejournal"), $_SERVER['PHP_SELF'], "t.code_journal", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $param, "", 'width="60" align="center"', $sortfield, $sortorder);
print "</tr>\n";
print '<tr class="liste_titre">';
print '<tr class="liste_titre_filter">';
print '<td class="liste_titre"><input type="text" name="search_mvt_num" size="6" value="' . dol_escape_htmltag($search_mvt_num) . '"></td>';
print '<td class="liste_titre center">';
print $langs->trans('From') . ': ';
@@ -396,17 +385,17 @@ print '</td>';
print '<td class="liste_titre"><input type="text" name="search_doc_ref" size="8" value="' . dol_escape_htmltag($search_doc_ref) . '"></td>';
print '<td class="liste_titre">';
print $langs->trans('From');
print $formventilation->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, '');
print $formaccounting->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, '');
print '<br>';
print $langs->trans('to');
print $formventilation->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array (), 1, 1, '');
print $formaccounting->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array (), 1, 1, '');
print '</td>';
print '<td class="liste_titre">';
print $langs->trans('From');
print $formventilation->select_auxaccount($search_accountancy_aux_code_start, 'search_accountancy_aux_code_start', 1);
print $formaccounting->select_auxaccount($search_accountancy_aux_code_start, 'search_accountancy_aux_code_start', 1);
print '<br>';
print $langs->trans('to');
print $formventilation->select_auxaccount($search_accountancy_aux_code_end, 'search_accountancy_aux_code_end', 1);
print $formaccounting->select_auxaccount($search_accountancy_aux_code_end, 'search_accountancy_aux_code_end', 1);
print '</td>';
print '<td class="liste_titre">';
print '<input type="text" size="7" class="flat" name="search_mvt_label" value="' . $search_mvt_label . '"/>';
@@ -415,12 +404,26 @@ print '<td class="liste_titre center">&nbsp;</td>';
print '<td class="liste_titre center">&nbsp;</td>';
print '<td class="liste_titre center"><input type="text" name="search_ledger_code" size="3" value="' . $search_ledger_code . '"></td>';
print '<td class="liste_titre center">';
$searchpitco=$form->showFilterAndCheckAddButtons(0);
print $searchpitco;
$searchpicto=$form->showFilterButtons();
print $searchpicto;
print '</td>';
print '</tr>';
$var = True;
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("TransactionNumShort"), $_SERVER['PHP_SELF'], "t.piece_num", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Docdate"), $_SERVER['PHP_SELF'], "t.doc_date", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Docref"), $_SERVER['PHP_SELF'], "t.doc_ref", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("AccountAccountingShort"), $_SERVER['PHP_SELF'], "t.numero_compte", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Code_tiers"), $_SERVER['PHP_SELF'], "t.code_tiers", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Label"), $_SERVER['PHP_SELF'], "t.label_compte", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "t.debit", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "t.credit", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Codejournal"), $_SERVER['PHP_SELF'], "t.code_journal", "", $param, 'align="center"', $sortfield, $sortorder);
$checkpicto='';
if ($massactionbutton) $checkpicto=$form->showCheckAddButtons('checkforselect', 1);
print_liste_field_titre($checkpicto, $_SERVER["PHP_SELF"], "", $param, "", 'width="60" align="center"', $sortfield, $sortorder);
print "</tr>\n";
$total_debit = 0;
$total_credit = 0;
@@ -431,17 +434,21 @@ foreach ($object->lines as $line ) {
$total_debit += $line->debit;
$total_credit += $line->credit;
print '<tr '. $bc[$var].'>';
print '<tr class="oddeven">';
print '<td><a href="./card.php?piece_num=' . $line->piece_num . '">' . $line->piece_num . '</a></td>';
print '<td align="center">' . dol_print_date($line->doc_date, 'day') . '</td>';
print '<td>' . $line->doc_ref . '</td>';
print '<td class="nowrap">' . $line->doc_ref . '</td>';
print '<td>' . length_accountg($line->numero_compte) . '</td>';
print '<td>' . length_accounta($line->code_tiers) . '</td>';
print '<td>' . $line->label_compte . '</td>';
print '<td align="right">' . price($line->debit) . '</td>';
print '<td align="right">' . price($line->credit) . '</td>';
print '<td align="center">' . $line->code_journal . '</td>';
$accountingjournal = new AccountingJournal($db);
$accountingjournal->fetch('',$line->code_journal);
print '<td align="center">' . $accountingjournal->getNomUrl(0,0,0,'',0) . '</td>';
print '<td align="center">';
print '<a href="./card.php?piece_num=' . $line->piece_num . '">' . img_edit() . '</a>&nbsp;';
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=delmouv&mvt_num=' . $line->piece_num . $param . '&page=' . $page . '">' . img_delete() . '</a>';
@@ -456,10 +463,10 @@ print '</td>';
print '<td align="right">';
print price($total_debit);
print '</td>';
print '<td align="right">';
print '<td align="right">';
print price($total_credit);
print '</td>';
print '<td></td>';
print '<td colspan="2"></td>';
print '</tr>';
print "</table>";

View File

@@ -29,8 +29,8 @@ require '../../main.inc.php';
// Class
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
// Langs
@@ -59,7 +59,7 @@ $search_direction = GETPOST('search_direction', 'alpha');
$search_ledger_code = GETPOST('search_ledger_code', 'alpha');
// Load variable for pagination
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
$limit = GETPOST('limit','int')?GETPOST('limit', 'int'):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
$sortfield = GETPOST('sortfield', 'alpha');
$sortorder = GETPOST('sortorder', 'alpha');
$page = GETPOST('page','int');
@@ -75,7 +75,7 @@ if (empty($search_date_end)) $search_date_end = dol_mktime(0, 0, 0, 12, 31, dol_
$object = new BookKeeping($db);
$formventilation = new FormVentilation($db);
$formaccounting = new FormAccounting($db);
$formother = new FormOther($db);
$form = new Form($db);
@@ -188,7 +188,7 @@ if ($action == 'delbookkeepingyear') {
if (empty($delyear)) {
$delyear = dol_print_date(dol_now(), '%Y');
}
$year_array = $formventilation->selectyear_accountancy_bookkepping($delyear, 'delyear', 0, 'array');
$year_array = $formaccounting->selectyear_accountancy_bookkepping($delyear, 'delyear', 0, 'array');
$form_question['delyear'] = array (
'name' => 'delyear',
@@ -207,7 +207,7 @@ if ($action == 'delbookkeepingyear') {
print '<form method="GET" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
$viewflat = ' <a href="./list.php">' . $langs->trans("ViewFlatList") . '</a>';
$viewflat = ' <a class="nohover" href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/list.php">' . $langs->trans("ViewFlatList") . '</a>';
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, $nbtotalofrecords,'title_accountancy',0,$viewflat,'',$limit);
@@ -222,17 +222,6 @@ print '<div class="inline-block divButAction"><a class="butAction" href="./card.
print '</div>';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans("AccountAccounting") . '</td>';
print_liste_field_titre($langs->trans("TransactionNumShort"), $_SERVER['PHP_SELF'], "t.piece_num", "", $options, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Docdate"), $_SERVER['PHP_SELF'], "t.doc_date", "", $options, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Docref"), $_SERVER['PHP_SELF'], "t.doc_ref", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("SuppliersInvoices") . ' / ' . $langs->trans("CustomersInvoices"));
print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Codejournal"), $_SERVER['PHP_SELF'], "t.code_journal", "", $options, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
print "</tr>\n";
print '<tr class="liste_titre">';
print '<td class="liste_titre">' . $object->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, '') . '</td>';
@@ -250,10 +239,22 @@ print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre" align="right"><input type="text" name="search_ledger_code" size="3" value="' . $search_ledger_code . '"></td>';
print '<td class="liste_titre" align="right" colspan="2">';
$searchpitco=$form->showFilterAndCheckAddButtons(0);
print $searchpitco;
$searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto;
print '</td>';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("AccountAccountingShort"), $_SERVER['PHP_SELF']);
print_liste_field_titre($langs->trans("TransactionNumShort"), $_SERVER['PHP_SELF'], "t.piece_num", "", $options, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Docdate"), $_SERVER['PHP_SELF'], "t.doc_date", "", $options, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Docref"), $_SERVER['PHP_SELF'], "t.doc_ref", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Label"));
print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Codejournal"), $_SERVER['PHP_SELF'], "t.code_journal", "", $options, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
print "</tr>\n";
print '</tr>';
$var = True;
@@ -265,7 +266,6 @@ $sous_total_credit = 0;
$displayed_account_number = null; // Start with undefined to be able to distinguish with empty
foreach ( $object->lines as $line ) {
$var = ! $var;
$total_debit += $line->debit;
$total_credit += $line->credit;
@@ -278,9 +278,10 @@ foreach ( $object->lines as $line ) {
// Affiche un Sous-Total par compte comptable
if (isset($displayed_account_number)) {
print '<tr class="liste_total"><td align="right" colspan="4">'.$langs->trans("SubTotal").':</td><td class="nowrap" align="right">'.price($sous_total_debit).'</td><td class="nowrap" align="right">'.price($sous_total_credit).'</td>';
print "<td>&nbsp;</td>\n";
print '</tr>';
print '<tr class="liste_total"><td align="right" colspan="5">'.$langs->trans("SubTotal").':</td><td class="nowrap" align="right">'.price($sous_total_debit).'</td><td class="nowrap" align="right">'.price($sous_total_credit).'</td>';
print "<td>&nbsp;</td>\n";
print "<td>&nbsp;</td>\n";
print '</tr>';
}
// Show the break account
@@ -298,19 +299,20 @@ foreach ( $object->lines as $line ) {
$sous_total_credit = 0;
}
print '<tr '. $bc[$var].'>';
print '<tr class="oddeven">';
print '<td>&nbsp;</td>';
print '<td align="right">'.$line->piece_num.'</td>';
print '<td align="right"><a href="./card.php?piece_num=' . $line->piece_num . '">'.$line->piece_num.'</a></td>';
print '<td align="center">' . dol_print_date($line->doc_date, 'day') . '</td>';
print '<td><a href="./card.php?piece_num=' . $line->piece_num . '">' . $line->doc_ref . '</a></td>';
// TODO Add a link according to doc_type and fk_doc
print '<td class="nowrap">';
//if ($line->doc_type == 'supplier_invoice')
//if ($line->doc_type == 'customer_invoice')
print $line->doc_ref;
print '</td>';
// Affiche un lien vers la facture client/fournisseur
$doc_ref = preg_replace('/\(.*\)/', '', $line->doc_ref);
if ($line->doc_type == 'supplier_invoice')
print strlen(length_accounta($line->code_tiers)) == 0 ? '<td><a href="/fourn/facture/list.php?search_ref_supplier=' . $doc_ref . '">' . $line->label_compte . '</a></td>' : '<td><a href="/fourn/facture/list.php?search_ref_supplier=' . $doc_ref . '">' . $line->label_compte . '</a><br /><span style="font-size:0.8em">(' . length_accounta($line->code_tiers) . ')</span></td>';
elseif ($line->doc_type == 'customer_invoice')
print strlen(length_accounta($line->code_tiers)) == 0 ? '<td><a href="/compta/facture/list.php?search_ref=' . $doc_ref . '">' . $line->label_compte . '</a></td>' : '<td><a href="/compta/facture/list.php?search_ref=' . $doc_ref . '">' . $line->label_compte . '</a><br /><span style="font-size:0.8em">(' . length_accounta($line->code_tiers) . ')</span></td>';
else
print strlen(length_accounta($line->code_tiers)) == 0 ? '<td>' . $line->label_compte . '</td>' : '<td>' . $line->label_compte . '<br /><span style="font-size:0.8em">(' . length_accounta($line->code_tiers) . ')</span></td>';
@@ -333,6 +335,7 @@ foreach ( $object->lines as $line ) {
print '<tr class="liste_total">';
print '<td align="right" colspan="5">'.$langs->trans("SubTotal").':</td><td class="nowrap" align="right">'.price($sous_total_debit).'</td><td class="nowrap" align="right">'.price($sous_total_credit).'</td>';
print "<td>&nbsp;</td>\n";
print "<td>&nbsp;</td>\n";
print '</tr>';

View File

@@ -29,7 +29,7 @@ require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
// Langs
$langs->load("accountancy");
@@ -37,7 +37,7 @@ $langs->load("accountancy");
$page = GETPOST("page");
$sortorder = GETPOST("sortorder");
$sortfield = GETPOST("sortfield");
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit;
$limit = GETPOST('limit','int')?GETPOST('limit', 'int'):$conf->liste_limit;
$search_date_start = dol_mktime(0, 0, 0, GETPOST('date_startmonth', 'int'), GETPOST('date_startday', 'int'), GETPOST('date_startyear', 'int'));
$search_date_end = dol_mktime(0, 0, 0, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int'));
$search_doc_type = GETPOST('search_doc_type', 'alpha');
@@ -67,7 +67,7 @@ $search_code_journal = GETPOST('search_code_journal', 'alpha');
$object = new BookKeeping($db);
$form = new Form($db);
$formventilation = new FormVentilation($db);
$formaccounting = new FormAccounting($db);
// Filter
if (empty($search_date_start)) {
@@ -182,15 +182,15 @@ print $form->select_date($search_date_end, 'date_end');
print '</div>';
print '<div class="liste_titre">';
print $langs->trans('From') . ' ' . $langs->trans('AccountAccounting') . ': ';
print $formventilation->select_account($search_numero_compte_start, 'search_numero_compte_start', 1, array (), 1, 1, '');
print $formaccounting->select_account($search_numero_compte_start, 'search_numero_compte_start', 1, array (), 1, 1, '');
print $langs->trans('To') . ' ' . $langs->trans('AccountAccounting') . ': ';
print $formventilation->select_account($search_numero_compte_end, 'search_numero_compte_end', 1, array (), 1, 1, '');
print $formaccounting->select_account($search_numero_compte_end, 'search_numero_compte_end', 1, array (), 1, 1, '');
print '</div>';
print '<div class="liste_titre">';
print $langs->trans('From') . ' ' . $langs->trans('ThirdPartyAccount') . ': ';
print $formventilation->select_auxaccount($search_code_tiers_start, 'search_code_tiers_start', 1);
print $formaccounting->select_auxaccount($search_code_tiers_start, 'search_code_tiers_start', 1);
print $langs->trans('To') . ' ' . $langs->trans('ThirdPartyAccount') . ': ';
print $formventilation->select_auxaccount($search_code_tiers_end, 'searchcode_tiers_end', 1);
print $formaccounting->select_auxaccount($search_code_tiers_end, 'searchcode_tiers_end', 1);
print '</div>';
print "<table class=\"noborder\" width=\"100%\">";
@@ -267,9 +267,8 @@ print "</tr>\n";
$var = True;
foreach ( $object->lines as $line ) {
$var = ! $var;
print '<tr '. $bc[$var].'>';
print '<tr class="oddeven">';
print '<td>' . $line->piece_num . '</td>' . "\n";
print '<td>' . $line->doc_type . '</td>' . "\n";
print '<td align="center">' . dol_print_date($line->doc_date) . '</td>';

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2016 Jamal Elbaz <jamelbaz@gmail.pro>
* Copyright (C) 2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2016-2017 Alexandre Spangaro <aspangaro@zendsi.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -17,9 +17,9 @@
*/
/**
* \file htdocs/accountancy/class/accountancycategory.class.php
* \file htdocs/accountancy/class/accountancycategory.class.php
* \ingroup Advanced accountancy
* \brief File of class to manage categories of an accounting category_type
* \brief File of class to manage categories of an accounting category_type
*/
// Class
@@ -72,7 +72,6 @@ class AccountancyCategory
$this->lines_display[] = $obj;
}
}
return $num;
} else {
$this->error = "Error " . $this->db->lasterror();

View File

@@ -47,6 +47,7 @@ class AccountancyExport
public static $EXPORT_TYPE_QUADRATUS = 6;
public static $EXPORT_TYPE_EBP = 7;
public static $EXPORT_TYPE_COGILOG = 8;
public static $EXPORT_TYPE_AGIRIS = 9;
/**
*
@@ -96,6 +97,7 @@ class AccountancyExport
self::$EXPORT_TYPE_QUADRATUS => $langs->trans('Modelcsv_quadratus'),
self::$EXPORT_TYPE_EBP => $langs->trans('Modelcsv_ebp'),
self::$EXPORT_TYPE_COGILOG => $langs->trans('Modelcsv_cogilog'),
self::$EXPORT_TYPE_AGIRIS => $langs->trans('Modelcsv_agiris')
);
}
@@ -145,6 +147,9 @@ class AccountancyExport
case self::$EXPORT_TYPE_COGILOG :
$this->exportCogilog($TData);
break;
case self::$EXPORT_TYPE_AGIRIS :
$this->exportAgiris($TData);
break;
default:
$this->errors[] = $langs->trans('accountancy_error_modelnotfound');
break;
@@ -382,7 +387,7 @@ class AccountancyExport
/**
* Export format : Normal
* Export format : EBP
*
* @param array $objectLines data
*
@@ -412,6 +417,47 @@ class AccountancyExport
}
/**
* Export format : Agiris
*
* @param array $objectLines data
*
* @return void
*/
public function exportAgiris($objectLines) {
$this->separator = ';';
foreach ( $objectLines as $line ) {
$date = dol_print_date($line->doc_date, '%d%m%Y');
print $line->id . $this->separator;
print '"'.dol_trunc($line->piece_num,15,'right','UTF-8',1).'"'.$this->separator;
print $date . $this->separator;
print '"'.dol_trunc($line->piece_num,15,'right','UTF-8',1).'"'.$this->separator;
if (empty($line->code_tiers)) {
print length_accountg($line->numero_compte) . $this->separator;
} else {
if (substr($line->numero_compte, 0, 1) == 'C' || substr($line->numero_compte, 0, 1) == '9') {
print '411' . substr(str_replace(" ", "", $line->code_tiers), 0, 5) . $this->separator;
}
if (substr($line->numero_compte, 0, 1) == 'F' || substr($line->numero_compte, 0, 1) == '0') {
print '401' . substr(str_replace(" ", "", $line->code_tiers), 0, 5) . $this->separator;
}
}
print length_accounta($line->code_tiers) . $this->separator;
print price($line->debit) . $this->separator;
print price($line->credit) . $this->separator;
print price($line->montant).$this->separator;
print $line->sens.$this->separator;
print $line->code_journal . $this->separator;
print $this->end_line;
}
}
/**
*

View File

@@ -251,12 +251,12 @@ class AccountingAccount extends CommonObject
$sql .= " SET fk_pcg_version = " . ($this->fk_pcg_version ? "'" . $this->db->escape($this->fk_pcg_version) . "'" : "null");
$sql .= " , pcg_type = " . ($this->pcg_type ? "'" . $this->db->escape($this->pcg_type) . "'" : "null");
$sql .= " , pcg_subtype = " . ($this->pcg_subtype ? "'" . $this->db->escape($this->pcg_subtype) . "'" : "null");
$sql .= " , account_number = '" . $this->account_number . "'";
$sql .= " , account_parent = '" . $this->account_parent . "'";
$sql .= " , account_number = '" . $this->db->escape($this->account_number) . "'";
$sql .= " , account_parent = '" . $this->db->escape($this->account_parent) . "'";
$sql .= " , label = " . ($this->label ? "'" . $this->db->escape($this->label) . "'" : "null");
$sql .= " , fk_accounting_category = '" . $this->account_category . "'";
$sql .= " , fk_accounting_category = '" . $this->db->escape($this->account_category) . "'";
$sql .= " , fk_user_modif = " . $user->id;
$sql .= " , active = '" . $this->active . "'";
$sql .= " , active = " . $this->active;
$sql .= " WHERE rowid = " . $this->id;
dol_syslog(get_class($this) . "::update sql=" . $sql, LOG_DEBUG);
@@ -364,27 +364,63 @@ class AccountingAccount extends CommonObject
/**
* Return clicable name (with picto eventually)
*
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
* @return string Chaine avec URL
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
* @param int $withlabel 0=No label, 1=Include label of account
* @param int $nourl 1=Disable url
* @param string $moretitle Add more text to title tooltip
* @param int $notooltip 1=Disable tooltip
* @return string String with URL
*/
function getNomUrl($withpicto = 0) {
global $langs;
function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle='',$notooltip=0)
{
global $langs, $conf, $user;
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips
$result = '';
$link = '<a href="' . DOL_URL_ROOT . '/accountancy/admin/card.php?id=' . $this->id . '">';
$linkend = '</a>';
$url = DOL_URL_ROOT . '/accountancy/admin/card.php?id=' . $this->id;
$picto = 'billr';
$label = $langs->trans("Show") . ': ' . $this->account_number . ' - ' . $this->label;
if ($withpicto)
$result .= ($link . img_object($label, $picto) . $linkend);
if ($withpicto && $withpicto != 2)
$result .= ' ';
if ($withpicto != 2)
$result .= $link . $this->account_number . $linkend;
$label='';
$label = '<u>' . $langs->trans("ShowAccountingAccount") . '</u>';
if (! empty($this->account_number))
$label .= '<br><b>'.$langs->trans('AccountAccounting') . ':</b> ' . length_accountg($this->account_number);
if (! empty($this->label))
$label .= '<br><b>'.$langs->trans('Label') . ':</b> ' . $this->label;
if ($moretitle) $label.=' - '.$moretitle;
$linkclose='';
if (empty($notooltip))
{
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
{
$label=$langs->trans("ShowAccoutingAccount");
$linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"';
}
$linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
$linkclose.=' class="classfortooltip"';
}
$linkstart='<a href="'.$url.'"';
$linkstart.=$linkclose.'>';
$linkend='</a>';
if ($nourl)
{
$linkstart = '';
$linkclose = '';
$linkend = '';
}
$label_link = length_accountg($this->account_number);
if ($withlabel) $label_link .= ' - ' . $this->label;
if ($withpicto) $result.=($linkstart.img_object(($notooltip?'':$label), $picto, ($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).$linkend);
if ($withpicto && $withpicto != 2) $result .= ' ';
if ($withpicto != 2) $result.=$linkstart . $label_link . $linkend;
return $result;
}

View File

@@ -0,0 +1,204 @@
<?php
/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com>
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/accountancy/class/accountingjournal.class.php
* \ingroup Advanced accountancy
* \brief File of class to manage accounting journals
*/
/**
* Class to manage accounting accounts
*/
class AccountingJournal extends CommonObject
{
public $element='accounting_journal';
public $table_element='accounting_journal';
public $fk_element = '';
protected $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
var $rowid;
var $code;
var $label;
var $nature; // 0:various operations, 1:sale, 2:purchase, 3:bank, 9: has-new
var $active;
/**
* Constructor
*
* @param DoliDB $db Database handle
*/
function __construct($db) {
$this->db = $db;
}
/**
* Load an object from database
*
* @param int $rowid Id of record to load
* @param string $journal_code Journal code
* @return int <0 if KO, Id of record if OK and found
*/
function fetch($rowid = null, $journal_code = null)
{
if ($rowid || $journal_code)
{
$sql = "SELECT rowid, code, label, nature, active";
$sql.= " FROM ".MAIN_DB_PREFIX."accounting_journal";
$sql .= " WHERE";
if ($rowid) {
$sql .= " rowid = '" . $rowid . "'";
} elseif ($journal_code) {
$sql .= " code = '" . $journal_code . "'";
}
dol_syslog(get_class($this)."::fetch sql=" . $sql, LOG_DEBUG);
$result = $this->db->query($sql);
if ($result)
{
$obj = $this->db->fetch_object($result);
if ($obj) {
$this->id = $obj->rowid;
$this->rowid = $obj->rowid;
$this->code = $obj->code;
$this->ref = $obj->code;
$this->label = $obj->label;
$this->nature = $obj->nature;
$this->active = $obj->active;
return $this->id;
} else {
return 0;
}
}
else
{
$this->error = "Error " . $this->db->lasterror();
$this->errors[] = "Error " . $this->db->lasterror();
}
}
return -1;
}
/**
* Return clicable name (with picto eventually)
*
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
* @param int $withlabel 0=No label, 1=Include label of journal
* @param int $nourl 1=Disable url
* @param string $moretitle Add more text to title tooltip
* @param int $notooltip 1=Disable tooltip
* @return string String with URL
*/
function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle='',$notooltip=0)
{
global $langs, $conf, $user;
if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips
$result = '';
$url = DOL_URL_ROOT . '/accountancy/admin/journals_list.php?id=35';
$picto = 'billr';
$label='';
$label = '<u>' . $langs->trans("ShowAccountingJournal") . '</u>';
if (! empty($this->code))
$label .= '<br><b>'.$langs->trans('Code') . ':</b> ' . $this->code;
if (! empty($this->label))
$label .= '<br><b>'.$langs->trans('Label') . ':</b> ' . $this->label;
if ($moretitle) $label.=' - '.$moretitle;
$linkclose='';
if (empty($notooltip))
{
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
{
$label=$langs->trans("ShowAccoutingJournal");
$linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"';
}
$linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
$linkclose.=' class="classfortooltip"';
}
$linkstart='<a href="'.$url.'"';
$linkstart.=$linkclose.'>';
$linkend='</a>';
if ($nourl)
{
$linkstart = '';
$linkclose = '';
$linkend = '';
}
$label_link = $this->code;
if ($withlabel) $label_link .= ' - ' . $this->label;
if ($withpicto) $result.=($linkstart.img_object(($notooltip?'':$label), $picto, ($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).$linkend);
if ($withpicto && $withpicto != 2) $result .= ' ';
if ($withpicto != 2) $result.=$linkstart . $label_link . $linkend;
return $result;
}
/**
* Retourne le libelle du statut d'un user (actif, inactif)
*
* @param int $mode 0=libelle long, 1=libelle court
* @return string Label of type
*/
function getLibType($mode=0)
{
return $this->LibType($this->nature,$mode);
}
/**
* Return type of an accounting journal
*
* @param int $nature Id type
* @param int $mode 0=libelle long, 1=libelle court
* @return string Label of type
*/
function LibType($nature,$mode=0)
{
global $langs;
$langs->load("accountancy");
if ($mode == 0)
{
$prefix='';
if ($nature == 9) return $langs->trans('AccountingJournalType9');
if ($nature == 4) return $langs->trans('AccountingJournalType4');
if ($nature == 3) return $langs->trans('AccountingJournalType3');
if ($nature == 2) return $langs->trans('AccountingJournalType2');
if ($nature == 1) return $langs->trans('AccountingJournalType1');
}
if ($mode == 1)
{
if ($nature == 9) return $langs->trans('AccountingJournalType9');
if ($nature == 4) return $langs->trans('AccountingJournalType4');
if ($nature == 3) return $langs->trans('AccountingJournalType3');
if ($nature == 2) return $langs->trans('AccountingJournalType2');
if ($nature == 1) return $langs->trans('AccountingJournalType1');
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,381 +0,0 @@
<?php
/* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/accountancy/class/html.formventilation.class.php
* \ingroup Advanced accountancy
* \brief File of class with all html predefined components
*/
/**
* Class to manage generation of HTML components for bank module
*/
class FormVentilation extends Form
{
private $options_cache = array();
/**
* Return select filter with date of transaction
*
* @param string $htmlname Name of select field
* @param string $selectedkey Value
* @return string HTML edit field
*/
function select_bookkeeping_importkey($htmlname = 'importkey', $selectedkey = '') {
$options = array();
$sql = 'SELECT DISTINCT import_key from ' . MAIN_DB_PREFIX . 'accounting_bookkeeping';
$sql .= " WHERE entity IN (" . getEntity("accountancy", 1) . ")";
$sql .= ' ORDER BY import_key DESC';
dol_syslog(get_class($this) . "::select_bookkeeping_importkey", LOG_DEBUG);
$resql = $this->db->query($sql);
if (!$resql) {
$this->error = "Error " . $this->db->lasterror();
dol_syslog(get_class($this) . "::select_bookkeeping_importkey " . $this->error, LOG_ERR);
return - 1;
}
while ($obj = $this->db->fetch_object($resql)) {
$options[$obj->import_key] = dol_print_date($obj->import_key, 'dayhourtext');
}
return Form::selectarray($htmlname, $options, $selectedkey);
}
/**
* Return list of accounts with label by chart of accounts
*
* @param string $selectid Preselected id or code of accounting accounts (depends on $select_in)
* @param string $htmlname Name of field in html form
* @param int $showempty Add an empty field
* @param array $event Event options
* @param int $select_in 0=selectid value is a aa.rowid (default) or 1=selectid is aa.account_number
* @param int $select_out Set value returned by select. 0=rowid (default), 1=account_number
* @param string $morecss More css non HTML object
* @param string $usecache Key to use to store result into a cache. Next call with same key will reuse the cache.
* @return string String with HTML select
*/
function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $morecss='maxwidth300 maxwidthonsmartphone', $usecache='')
{
global $conf;
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
$options = array();
if ($usecache && ! empty($this->options_cache[$usecache]))
{
$options = $this->options_cache[$usecache];
$selected=$selectid;
}
else
{
$trunclength = defined('ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT') ? $conf->global->ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT : 50;
$sql = "SELECT DISTINCT aa.account_number, aa.label, aa.rowid, aa.fk_pcg_version";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
$sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS;
$sql .= " AND aa.active = 1";
$sql .= " ORDER BY aa.account_number";
dol_syslog(get_class($this) . "::select_account", LOG_DEBUG);
$resql = $this->db->query($sql);
if (!$resql) {
$this->error = "Error " . $this->db->lasterror();
dol_syslog(get_class($this) . "::select_account " . $this->error, LOG_ERR);
return -1;
}
$out = ajax_combobox($htmlname, $event);
$selected = 0;
while ($obj = $this->db->fetch_object($resql))
{
$label = length_accountg($obj->account_number) . ' - ' . $obj->label;
$label = dol_trunc($label, $trunclength);
$select_value_in = $obj->rowid;
$select_value_out = $obj->rowid;
// Try to guess if we have found default value
if ($select_in == 1) {
$select_value_in = $obj->account_number;
}
if ($select_out == 1) {
$select_value_out = $obj->account_number;
}
// Remember guy's we store in database llx_facturedet the rowid of accounting_account and not the account_number
// Because same account_number can be share between different accounting_system and do have the same meaning
if ($selectid != '' && $selectid == $select_value_in) {
//var_dump("Found ".$selectid." ".$select_value_in);
$selected = $select_value_out;
}
$options[$select_value_out] = $label;
}
$this->db->free($resql);
if ($usecache)
{
$this->options_cache[$usecache] = $options;
}
}
$out .= Form::selectarray($htmlname, $options, $selected, $showempty, 0, 0, '', 0, 0, 0, '', $morecss, 1);
return $out;
}
/**
* Return list of accounts with label by class of accounts
*
* @param string $selectid Preselected pcg_type
* @param string $htmlname Name of field in html form
* @param int $showempty Add an empty field
* @param array $event Event options
*
* @return string String with HTML select
*/
function select_pcgtype($selectid, $htmlname = 'pcg_type', $showempty = 0, $event = array()) {
global $conf;
$sql = "SELECT DISTINCT pcg_type ";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
$sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS;
$sql .= " ORDER BY pcg_type";
dol_syslog(get_class($this) . "::select_pcgtype", LOG_DEBUG);
$resql = $this->db->query($sql);
if (!$resql) {
$this->error = "Error ".$this->db->lasterror();
dol_syslog(get_class($this)."::select_pcgtype ".$this->error, LOG_ERR);
return -1;
}
$options = array();
$out = ajax_combobox($htmlname, $event);
while ($obj = $this->db->fetch_object($resql))
{
if ($obj->pcg_type != '-1')
{
$options[$obj->pcg_type] = $obj->pcg_type;
}
}
$out .= Form::selectarray($htmlname, $options, $selectid, $showempty, 0, 0, '', 0, 0, 0, '', 'minwidth200');
$this->db->free($resql);
return $out;
}
/**
* Return list of accounts with label by sub_class of accounts
*
* @param string $selectid Preselected pcg_type
* @param string $htmlname Name of field in html form
* @param int $showempty Add an empty field
* @param array $event Event options
*
* @return string String with HTML select
*/
function select_pcgsubtype($selectid, $htmlname = 'pcg_subtype', $showempty = 0, $event = array())
{
global $conf;
$sql = "SELECT DISTINCT pcg_subtype ";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
$sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS;
$sql .= " ORDER BY pcg_subtype";
dol_syslog(get_class($this) . "::select_pcgsubtype", LOG_DEBUG);
$resql = $this->db->query($sql);
if (!$resql) {
$this->error = "Error ".$this->db->lasterror();
dol_syslog(get_class($this)."::select_pcgsubtype ".$this->error, LOG_ERR);
return -1;
}
$options = array();
$out = ajax_combobox($htmlname, $event);
while ($obj = $this->db->fetch_object($resql))
{
if ($obj->pcg_type != '-1')
{
$options[$obj->pcg_subtype] = $obj->pcg_subtype;
}
}
$out .= Form::selectarray($htmlname, $options, $selectid, $showempty, 0, 0, '', 0, 0, 0, '', 'minwidth200');
$this->db->free($resql);
return $out;
}
/**
* Return list of auxilary thirdparty accounts
*
* @param string $selectid Preselected pcg_type
* @param string $htmlname Name of field in html form
* @param int $showempty Add an empty field
* @param array $event Event options
*
* @return string String with HTML select
*/
function select_auxaccount($selectid, $htmlname = 'account_num_aux', $showempty = 0, $event = array()) {
$aux_account = array();
// Auxiliary customer account
$sql = "SELECT DISTINCT code_compta, nom ";
$sql .= " FROM ".MAIN_DB_PREFIX."societe";
$sql .= " WHERE entity IN (" . getEntity("societe", 1) . ")";
$sql .= " ORDER BY code_compta";
dol_syslog(get_class($this)."::select_auxaccount", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
while ($obj = $this->db->fetch_object($resql)) {
if (!empty($obj->code_compta)) {
$aux_account[$obj->code_compta] = $obj->code_compta.' ('.$obj->nom.')';
}
}
} else {
$this->error = "Error ".$this->db->lasterror();
dol_syslog(get_class($this)."::select_pcgsubtype ".$this->error, LOG_ERR);
return -1;
}
$this->db->free($resql);
// Auxiliary supplier account
$sql = "SELECT DISTINCT code_compta_fournisseur, nom ";
$sql .= " FROM ".MAIN_DB_PREFIX."societe";
$sql .= " WHERE entity IN (" . getEntity("societe", 1) . ")";
$sql .= " ORDER BY code_compta_fournisseur";
dol_syslog(get_class($this)."::select_auxaccount", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
while ($obj = $this->db->fetch_object($resql)) {
if (!empty($obj->code_compta_fournisseur)) {
$aux_account[$obj->code_compta_fournisseur] = $obj->code_compta_fournisseur.' ('.$obj->nom.')';
}
}
} else {
$this->error = "Error ".$this->db->lasterror();
dol_syslog(get_class($this)."::select_pcgsubtype ".$this->error, LOG_ERR);
return -1;
}
$this->db->free($resql);
// Build select
$out = ajax_combobox($htmlname, $event);
$out .= Form::selectarray($htmlname, $aux_account, $selectid, $showempty, 0, 0, '', 0, 0, 0, '', 'maxwidth300');
return $out;
}
/**
* Return HTML combo list of years existing into book keepping
*
* @param string $selected Preselected value
* @param string $htmlname Name of HTML select object
* @param int $useempty Affiche valeur vide dans liste
* @param string $output_format (html/opton (for option html only)/array (to return options arrays
* @return string/array
*/
function selectyear_accountancy_bookkepping($selected = '', $htmlname = 'yearid', $useempty = 0, $output_format = 'html')
{
global $conf;
$out_array = array();
$sql = "SELECT DISTINCT date_format(doc_date,'%Y') as dtyear";
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping";
$sql .= " WHERE entity IN (" . getEntity("accountancy", 1) . ")";
$sql .= " ORDER BY date_format(doc_date,'%Y')";
dol_syslog(get_class($this)."::".__METHOD__, LOG_DEBUG);
$resql = $this->db->query($sql);
if (!$resql) {
$this->error = "Error ".$this->db->lasterror();
dol_syslog(get_class($this)."::".__METHOD__.$this->error, LOG_ERR);
return -1;
}
while ($obj = $this->db->fetch_object($resql)) {
$out_array[$obj->dtyear] = $obj->dtyear;
}
$this->db->free($resql);
if ($output_format == 'html') {
return Form::selectarray($htmlname, $out_array, $selected, $useempty, 0, 0, 'placeholder="aa"');
} else {
return $out_array;
}
}
/**
* Return HTML combo list of years existing into book keepping
*
* @param string $selected Preselected value
* @param string $htmlname Name of HTML select object
* @param int $useempty Affiche valeur vide dans liste
* @param string $output_format Html/option (for option html only)/array (to return options arrays
* @return string/array
*/
function selectjournal_accountancy_bookkepping($selected = '', $htmlname = 'journalid', $useempty = 0, $output_format = 'html')
{
global $conf,$langs;
$out_array = array();
$sql = "SELECT DISTINCT code_journal";
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping";
$sql .= " WHERE entity IN (" . getEntity("accountancy", 1) . ")";
$sql .= " ORDER BY code_journal";
dol_syslog(get_class($this)."::".__METHOD__, LOG_DEBUG);
$resql = $this->db->query($sql);
if (!$resql) {
$this->error = "Error ".$this->db->lasterror();
dol_syslog(get_class($this)."::".__METHOD__.$this->error, LOG_ERR);
return -1;
}
while ($obj = $this->db->fetch_object($resql)) {
$out_array[$obj->code_journal] = $obj->code_journal?$obj->code_journal:$langs->trans("NotDefined"); // TODO Not defined is accepted ? We should avoid this, shouldn't we ?
}
$this->db->free($resql);
if ($output_format == 'html') {
return Form::selectarray($htmlname, $out_array, $selected, $useempty, 0, 0, 'placeholder="aa"');
} else {
return $out_array;
}
}
}

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ require '../../main.inc.php';
// Class
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
// Langs
$langs->load("bills");
@@ -39,9 +39,7 @@ $id = GETPOST('id');
// Security check
if ($user->societe_id > 0)
accessforbidden();
/*
* Actions
*/
@@ -84,7 +82,7 @@ if ($cancel == $langs->trans("Cancel")) {
*/
$form = new Form($db);
$facture_static = new Facture($db);
$formventilation = new FormVentilation($db);
$formaccounting = new FormAccounting($db);
if (! empty($id)) {
$sql = "SELECT f.facnumber, f.rowid as facid, l.fk_product, l.description, l.price,";
@@ -95,51 +93,51 @@ if (! empty($id)) {
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON l.fk_code_ventilation = aa.rowid";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = l.fk_facture";
$sql .= " WHERE f.fk_statut > 0 AND l.rowid = " . $id;
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy
dol_syslog("/accounting/customer/card.php sql=" . $sql, LOG_DEBUG);
$result = $db->query($sql);
if ($result) {
$num_lines = $db->num_rows($result);
$i = 0;
if ($num_lines) {
$objp = $db->fetch_object($result);
print '<form action="' . $_SERVER["PHP_SELF"] . '?id=' . $id . '" method="post">' . "\n";
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="ventil">';
print load_fiche_titre($langs->trans('CustomersVentilation'), '', 'title_setup');
dol_fiche_head();
print '<table class="border" width="100%">';
// Ref facture
print '<tr><td>' . $langs->trans("Invoice") . '</td>';
$facture_static->ref = $objp->facnumber;
$facture_static->id = $objp->facid;
print '<td>' . $facture_static->getNomUrl(1) . '</td>';
print '</tr>';
print '<tr><td width="20%">' . $langs->trans("Line") . '</td>';
print '<td>' . nl2br($objp->description) . '</td></tr>';
print '<tr><td width="20%">' . $langs->trans("Account") . '</td><td>';
print $formventilation->select_account($objp->fk_code_ventilation, 'codeventil', 1);
print $formaccounting->select_account($objp->fk_code_ventilation, 'codeventil', 1);
print '</td></tr>';
print '</table>';
dol_fiche_end();
print '<div class="center">';
print '<input class="button" type="submit" value="' . $langs->trans("Save") . '">';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input class="button" type="submit" name="cancel" value="' . $langs->trans("Cancel") . '">';
print '</div>';
print '</form>';
} else {
print "Error";

View File

@@ -141,7 +141,7 @@ if ($action == 'validatehistory') {
$sql1.= " WHERE fd.fk_facture IN ( SELECT f.rowid FROM " . MAIN_DB_PREFIX . "facture as f";
$sql1.= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($year_current, 1, false)) . "'";
$sql1.= " AND f.datef <= '" . $db->idate(dol_get_last_day($year_current, 12, false)) . "'";
$sql1.= " AND f.entity IN (" . getEntity("accountancy", 1) . ")";
$sql1.= " AND f.entity IN (" . getEntity('accountancy') . ")";
$sql1.=")";
dol_syslog("htdocs/accountancy/customer/index.php fixaccountancycode", LOG_DEBUG);
@@ -187,7 +187,7 @@ if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
} else {
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
}
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy
dol_syslog("htdocs/accountancy/customer/index.php sql=" . $sql, LOG_DEBUG);
$result = $db->query($sql);
@@ -228,7 +228,7 @@ $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_factu
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = fd.fk_code_ventilation";
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy
$sql .= " AND aa.account_number IS NULL";
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
@@ -244,8 +244,7 @@ if ($resql) {
while ( $row = $db->fetch_row($resql)) {
$var = ! $var;
print '<tr ' . $bc[$var] . '><td>' . length_accountg($row[0]) . '</td>';
print '<tr class="oddeven"><td>' . length_accountg($row[0]) . '</td>';
print '<td align="left">' . $row[1] . '</td>';
for($i = 2; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';
@@ -285,7 +284,7 @@ $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_factu
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = fd.fk_code_ventilation";
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
} else {
@@ -301,8 +300,7 @@ if ($resql) {
while ( $row = $db->fetch_row($resql)) {
$var = ! $var;
print '<tr ' . $bc[$var] . '><td>' . length_accountg($row[0]) . '</td>';
print '<tr class="oddeven"><td>' . length_accountg($row[0]) . '</td>';
print '<td align="left">' . $row[1] . '</td>';
for($i = 2; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';
@@ -343,7 +341,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
} else {
@@ -389,7 +387,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
} else {

View File

@@ -28,7 +28,7 @@
require '../../main.inc.php';
// Class
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
@@ -43,6 +43,7 @@ $langs->load("productbatch");
$account_parent = GETPOST('account_parent');
$changeaccount = GETPOST('changeaccount');
// Search Getpost
$search_lineid = GETPOST('search_lineid', 'int');
$search_ref = GETPOST('search_ref', 'alpha');
$search_invoice = GETPOST('search_invoice', 'alpha');
$search_label = GETPOST('search_label', 'alpha');
@@ -54,7 +55,7 @@ $search_country = GETPOST('search_country', 'alpha');
$search_tvaintra = GETPOST('search_tvaintra', 'alpha');
// Load variable for pagination
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
$limit = GETPOST('limit','int')?GETPOST('limit', 'int'):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
$sortfield = GETPOST('sortfield', 'alpha');
$sortorder = GETPOST('sortorder', 'alpha');
$page = GETPOST('page', 'int');
@@ -76,7 +77,7 @@ if ($user->societe_id > 0)
if (! $user->rights->accounting->bind->write)
accessforbidden();
$formventilation = new FormVentilation($db);
$formaccounting = new FormAccounting($db);
/*
@@ -86,6 +87,7 @@ $formventilation = new FormVentilation($db);
// Purge search criteria
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers
{
$search_lineid = '';
$search_ref = '';
$search_invoice = '';
$search_label = '';
@@ -151,7 +153,7 @@ print '<script type="text/javascript">
* Customer Invoice lines
*/
$sql = "SELECT f.rowid, f.facnumber, f.type, f.datef, f.ref_client,";
$sql .= " fd.rowid as fdid, fd.description, fd.product_type, fd.total_ht, fd.total_tva, fd.tva_tx, fd.total_ttc,";
$sql .= " fd.rowid, fd.description, fd.product_type, fd.total_ht, fd.total_tva, fd.tva_tx, fd.total_ttc,";
$sql .= " s.rowid as socid, s.nom as name, s.code_compta, s.code_client,";
$sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.accountancy_code_sell, aa.rowid as fk_compte, aa.account_number, aa.label as label_compte,";
$sql .= " fd.situation_percent, co.label as country, s.tva_intra";
@@ -162,13 +164,16 @@ $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_factu
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_country as co ON co.rowid = s.fk_pays ";
$sql .= " WHERE fd.fk_code_ventilation > 0 ";
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy
$sql .= " AND f.fk_statut > 0";
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
} else {
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_STANDARD . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
}
if ($search_lineid) {
$sql .= natural_search("fd.rowid", $search_lineid, 1);
}
if (strlen(trim($search_invoice))) {
$sql .= natural_search("f.facnumber", $search_invoice);
}
@@ -196,7 +201,7 @@ if (strlen(trim($search_country))) {
if (strlen(trim($search_tvaintra))) {
$sql .= natural_search("s.tva_intra", $search_tva_intra);
}
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy
$sql .= $db->order($sortfield, $sortorder);
// Count total nb of records
@@ -243,19 +248,37 @@ if ($result) {
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="page" value="'.$page.'">';
print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
print $langs->trans("DescVentilDoneCustomer") . '<br>';
print '<br><div class="inline-block divButAction">' . $langs->trans("ChangeAccount") . '<br>';
print $formventilation->select_account($account_parent, 'account_parent', 1);
print $formaccounting->select_account($account_parent, 'account_parent', 1);
print '<input type="submit" class="button valignmiddle" value="' . $langs->trans("ChangeBinding") . '"/></div>';
$moreforfilter = '';
print '<div class="div-table-responsive">';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre_filter">';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_lineid" value="' . dol_escape_htmltag($search_lineid) . '""></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_invoice" value="' . dol_escape_htmltag($search_invoice) . '"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
//print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
print '<td class="liste_titre" align="right"><input type="text" class="right flat maxwidth50" name="search_amount" value="' . dol_escape_htmltag($search_amount) . '"></td>';
print '<td class="liste_titre" align="center"><input type="text" class="right flat maxwidth50" placeholder="%" name="search_vat" size="1" value="' . dol_escape_htmltag($search_vat) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_account" value="' . dol_escape_htmltag($search_account) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_country" value="' . dol_escape_htmltag($search_country) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_tavintra" value="' . dol_escape_htmltag($search_tavintra) . '"></td>';
print '<td class="liste_titre" align="center">';
$searchpicto=$form->showFilterButtons();
print $searchpicto;
print "</td></tr>\n";
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "fd.rowid", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"], "f.facnumber", "", $param, '', $sortfield, $sortorder);
@@ -268,46 +291,28 @@ if ($result) {
print_liste_field_titre($langs->trans("Account"), $_SERVER["PHP_SELF"], "aa.account_number", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Country"), $_SERVER["PHP_SELF"], "co.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("VATIntra"), $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre('', '', '', '', '', 'align="center"');
$clickpicto=$form->showCheckAddButtons();
print_liste_field_titre($clickpicto, '', '', '', '', 'align="center"');
print "</tr>\n";
print '<tr class="liste_titre">';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_invoice" value="' . dol_escape_htmltag($search_invoice) . '"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
//print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
print '<td class="liste_titre" align="right"><input type="text" class="flat maxwidth50" name="search_amount" value="' . dol_escape_htmltag($search_amount) . '"></td>';
print '<td class="liste_titre" align="center"><input type="text" class="flat maxwidth50" name="search_vat" size="1" value="' . dol_escape_htmltag($search_vat) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_account" value="' . dol_escape_htmltag($search_account) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_country" value="' . dol_escape_htmltag($search_country) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_tavintra" value="' . dol_escape_htmltag($search_tavintra) . '"></td>';
print '<td class="liste_titre" align="center">';
$searchpitco=$form->showFilterAndCheckAddButtons(1);
print $searchpitco;
print "</td></tr>\n";
$facture_static = new Facture($db);
$product_static = new Product($db);
$var = True;
while ( $objp = $db->fetch_object($result) ) {
$var = ! $var;
$codecompta = length_accountg($objp->account_number) . ' - ' . $objp->label_compte;
$facture_static->ref = $objp->facnumber;
$facture_static->id = $objp->rowid;
$product_static->ref = $objp->product_ref;
$product_static->id = $objp->product_id;
$product_static->type = $objp->product_type;
$product_static->label = $objp->product_label;
print '<tr '. $bc[$var].'>';
print '<tr class="oddeven">';
print '<td>' . $objp->rowid . '</td>';
// Ref Invoice
print '<td>' . $facture_static->getNomUrl(1) . '</td>';
@@ -319,31 +324,34 @@ if ($result) {
print $product_static->getNomUrl(1);
if ($objp->product_label) print '<br>'.$objp->product_label;
print '</td>';
print '<td>';
$text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->description));
$trunclength = defined('ACCOUNTING_LENGTH_DESCRIPTION') ? ACCOUNTING_LENGTH_DESCRIPTION : 32;
print $form->textwithtooltip(dol_trunc($text,$trunclength), $objp->description);
print '</td>';
print '<td align="right">' . price($objp->total_ht) . '</td>';
print '<td align="center">' . price($objp->tva_tx) . '</td>';
print '<td>';
print $codecompta . ' <a href="./card.php?id=' . $objp->fdid . '">';
print $codecompta . ' <a href="./card.php?id=' . $objp->rowid . '">';
print img_edit();
print '</a>';
print '</td>';
print '<td>' . $objp->country .'</td>';
print '<td>' . $objp->tva_intra . '</td>';
print '<td align="right"><input type="checkbox" class="checkforaction" name="changeaccount[]" value="' . $objp->fdid . '"/></td>';
print '<td class="center"><input type="checkbox" class="checkforaction" name="changeaccount[]" value="' . $objp->rowid . '"/></td>';
print "</tr>";
$i ++;
}
print "</table>";
print "</div>";
if ($nbtotalofrecords > $limit) {
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1);
}

View File

@@ -30,7 +30,7 @@ require '../../main.inc.php';
// Class
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
@@ -52,6 +52,7 @@ $toselect = GETPOST('toselect', 'array');
$mesCasesCochees = GETPOST('toselect', 'array');
// Search Getpost
$search_lineid = GETPOST('search_lineid', 'int');
$search_invoice = GETPOST('search_invoice', 'alpha');
$search_ref = GETPOST('search_ref', 'alpha');
$search_label = GETPOST('search_label', 'alpha');
@@ -62,7 +63,7 @@ $search_vat = GETPOST('search_vat', 'alpha');
$btn_ventil = GETPOST('ventil', 'alpha');
// Load variable for pagination
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
$limit = GETPOST('limit','int')?GETPOST('limit', 'int'):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
$sortfield = GETPOST('sortfield', 'alpha');
$sortorder = GETPOST('sortorder', 'alpha');
$page = GETPOST('page','int');
@@ -84,7 +85,7 @@ if ($user->societe_id > 0)
if (! $user->rights->accounting->bind->write)
accessforbidden();
$formventilation = new FormVentilation($db);
$formaccounting = new FormAccounting($db);
$accounting = new AccountingAccount($db);
$aarowid_s = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT, 1);
$aarowid_p = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT, 1);
@@ -100,6 +101,7 @@ if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction !=
// Purge search criteria
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
{
$search_lineid = '';
$search_ref = '';
$search_invoice = '';
$search_label = '';
@@ -177,7 +179,7 @@ llxHeader('', $langs->trans("Ventilation"));
// Customer Invoice lines
$sql = "SELECT f.facnumber, f.rowid as facid, f.datef, f.type as ftype,";
$sql .= " l.fk_product, l.description, l.total_ht, l.rowid, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line,";
$sql .= " l.rowid, l.fk_product, l.description, l.total_ht, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line,";
$sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_sell as code_sell, p.tva_tx as tva_tx_prod,";
$sql .= " aa.rowid as aarowid";
$sql .= " FROM " . MAIN_DB_PREFIX . "facture as f";
@@ -189,6 +191,9 @@ $sql .= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0";
$sql .= " AND product_type <= 2";
$sql .= " AND (accsys.rowid='" . $conf->global->CHARTOFACCOUNTS . "' OR p.accountancy_code_sell IS NULL OR p.accountancy_code_sell ='')";
// Add search filter like
if ($search_lineid) {
$sql .= natural_search("l.rowid", $search_lineid, 1);
}
if (strlen(trim($search_invoice))) {
$sql .= natural_search("f.facnumber",$search_invoice);
}
@@ -215,7 +220,7 @@ if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
} else {
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_STANDARD . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
}
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy
$sql .= $db->order($sortfield, $sortorder);
@@ -236,7 +241,7 @@ if ($result) {
$i = 0;
$arrayofselected=is_array($toselect)?$toselect:array();
$param='';
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
@@ -249,8 +254,7 @@ if ($result) {
//if ($user->rights->mymodule->supprimer) $arrayofmassactions['delete']=$langs->trans("Delete");
//if ($massaction == 'presend') $arrayofmassactions=array();
$massactionbutton=$form->selectMassAction('ventil', $arrayofmassactions, 1);
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">' . "\n";
print '<input type="hidden" name="action" value="ventil">';
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
@@ -258,19 +262,37 @@ if ($result) {
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
//$center='<div align="center"><input type="submit" class="butAction" value="' . $langs->trans("Ventilate") . '" name="ventil"></div>';
print '<input type="hidden" name="page" value="'.$page.'">';
print_barre_liste($langs->trans("InvoiceLines"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
print $langs->trans("DescVentilTodoCustomer") . '</br><br>';
if ($msg) print $msg.'<br>';
$moreforfilter = '';
print '<div class="div-table-responsive">';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
// We add search filter
print '<tr class="liste_titre_filter">';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_lineid" value="' . dol_escape_htmltag($search_lineid) . '""></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_invoice" value="' . dol_escape_htmltag($search_invoice) . '"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
//print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidthonsmartphone" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
print '<td class="liste_titre" align="right"><input type="text" class="flat maxwidth50 right" name="search_amount" value="' . dol_escape_htmltag($search_amount) . '"></td>';
print '<td class="liste_titre" align="right"><input type="text" class="flat maxwidth50 right" name="search_vat" placeholder="%" size="1" value="' . dol_escape_htmltag($search_vat) . '"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td align="center" class="liste_titre">';
$searchpicto=$form->showFilterButtons();
print $searchpicto;
print '</td>';
print '</tr>';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"], "f.facnumber", "", $param, '', $sortfield, $sortorder);
@@ -282,27 +304,11 @@ if ($result) {
print_liste_field_titre($langs->trans("VATRate"), $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("AccountAccountingSuggest"), '', '', '', '', 'align="center"');
print_liste_field_titre($langs->trans("IntoAccount"), '', '', '', '', 'align="center"');
print_liste_field_titre('', '', '', '', '', 'align="center"');
$checkpicto='';
if ($massactionbutton) $checkpicto=$form->showCheckAddButtons('checkforselect', 1);
print_liste_field_titre($checkpicto, '', '', '', '', 'align="center"');
print "</tr>\n";
// We add search filter
print '<tr class="liste_titre">';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_invoice" value="' . dol_escape_htmltag($search_invoice) . '"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
//print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidthonsmartphone" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
print '<td class="liste_titre" align="right"><input type="text" class="flat maxwidth50" name="search_amount" value="' . dol_escape_htmltag($search_amount) . '"></td>';
print '<td class="liste_titre" align="right"><input type="text" class="flat maxwidth50" name="search_vat" size="1" value="' . dol_escape_htmltag($search_vat) . '">%</td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td align="right" class="liste_titre">';
$searchpitco=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
print $searchpitco;
print '</td>';
print '</tr>';
$facture_static = new Facture($db);
$product_static = new Product($db);
$form = new Form($db);
@@ -310,7 +316,6 @@ if ($result) {
$var = true;
while ( $i < min($num_lines, $limit) ) {
$objp = $db->fetch_object($result);
$var = ! $var;
$objp->code_sell_l = '';
$objp->code_sell_p = '';
@@ -324,7 +329,7 @@ if ($result) {
$facture_static->ref = $objp->facnumber;
$facture_static->id = $objp->facid;
$facture_static->type = $objp->ftype;
$code_sell_p_notset = '';
$objp->aarowid_suggest = $objp->aarowid;
@@ -344,30 +349,30 @@ if ($result) {
if (! empty($objp->code_sell)) {
$objp->code_sell_p = $objp->code_sell; // Code on product
} else {
$code_sell_p_notset = 'color:orange';
$code_sell_p_notset = 'color:orange';
}
if (empty($objp->code_sell_l) && empty($objp->code_sell_p)) $code_sell_p_notset = 'color:red';
// $objp->code_sell_p is now code of product/service
// $objp->code_sell_l is now default code of product/service
print '<tr '. $bc[$var].'>';
print '<tr class="oddeven">';
// Line id
print '<td>' . $objp->rowid . '</td>';
// Ref Invoice
print '<td>' . $facture_static->getNomUrl(1) . '</td>';
print '<td align="center">' . dol_print_date($db->jdate($objp->datef), 'day') . '</td>';
// Ref Product
print '<td>';
if ($product_static->id)
print $product_static->getNomUrl(1);
if ($objp->product_label) print '<br>'.$objp->product_label;
print '</td>';
print '<td class="tdoverflowonsmartphone">';
$text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->description));
$trunclength = defined('ACCOUNTING_LENGTH_DESCRIPTION') ? ACCOUNTING_LENGTH_DESCRIPTION : 32;
@@ -377,14 +382,14 @@ if ($result) {
print '<td align="right">';
print price($objp->total_ht);
print '</td>';
// Vat rate
if ($objp->vat_tx_l != $objp->vat_tx_p)
$code_vat_differ = 'font-weight:bold; text-decoration:blink; color:red';
print '<td style="' . $code_vat_differ . '" align="right">';
print price($objp->tva_tx_line);
print '</td>';
// Current account
print '<td align="center" style="' . $code_sell_p_notset . '">';
print (($objp->type_l == 1)?$langs->trans("DefaultForService"):$langs->trans("DefaultForProduct")) . ' = ' . ($objp->code_sell_l > 0 ? length_accountg($objp->code_sell_l) : $langs->trans("Unknown"));
@@ -397,10 +402,10 @@ if ($result) {
// Suggested accounting account
print '<td align="center">';
print $formventilation->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'maxwidth300 maxwidthonsmartphone', 'cachewithshowemptyone');
print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'maxwidth300 maxwidthonsmartphone', 'cachewithshowemptyone');
print '</td>';
print '<td align="right">';
print '<td align="center">';
print '<input type="checkbox" class="flat checkforselect" name="toselect[]" value="' . $objp->rowid . "_" . $i . '"' . ($objp->aarowid ? "checked" : "") . '/>';
print '</td>';
print '</tr>';
@@ -408,7 +413,7 @@ if ($result) {
}
print '</table>';
print "</div>";
print '</form>';
} else {
print $db->error();

View File

@@ -30,7 +30,7 @@ require '../../main.inc.php';
// Class
require_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
// Langs
$langs->load("bills");
@@ -85,7 +85,7 @@ if ($cancel == $langs->trans("Cancel")) {
// Create
$form = new Form($db);
$expensereport_static = new ExpenseReport($db);
$formventilation = new FormVentilation($db);
$formaccounting = new FormAccounting($db);
if (! empty($id)) {
$sql = "SELECT er.ref, er.rowid as facid, erd.fk_c_type_fees, erd.comments, erd.rowid, erd.fk_code_ventilation,";
@@ -96,7 +96,7 @@ if (! empty($id)) {
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON erd.fk_code_ventilation = aa.rowid";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "expensereport as er ON er.rowid = erd.fk_expensereport";
$sql .= " WHERE er.fk_statut > 0 AND erd.rowid = " . $id;
$sql .= " AND er.entity IN (" . getEntity("expensereport", 0) . ")"; // We don't share object for accountancy
$sql .= " AND er.entity IN (" . getEntity('expensereport', 0) . ")"; // We don't share object for accountancy
dol_syslog("/accounting/expensereport/card.php sql=" . $sql, LOG_DEBUG);
$result = $db->query($sql);
@@ -135,7 +135,7 @@ if (! empty($id)) {
print '<td>' . ($langs->trans($objp->type_fees_code) == $objp->type_fees_code ? $objp->type_fees_label : $langs->trans(($objp->type_fees_code))) . '</td>';
print '<tr><td>' . $langs->trans("Account") . '</td><td>';
print $formventilation->select_account($objp->fk_code_ventilation, 'codeventil', 1);
print $formaccounting->select_account($objp->fk_code_ventilation, 'codeventil', 1);
print '</td></tr>';
print '</table>';

View File

@@ -55,7 +55,7 @@ if ($year == 0) {
}
// Validate History
$action = GETPOST('action');
$action = GETPOST('action','aZ09');
/*
@@ -134,7 +134,7 @@ if ($action == 'validatehistory') {
$sql1.= " WHERE erd.fk_expensereport IN ( SELECT er.rowid FROM " . MAIN_DB_PREFIX . "expensereport as er";
$sql1.= " WHERE er.date_debut >= '" . $db->idate(dol_get_first_day($year_current, 1, false)) . "'";
$sql1.= " AND er.date_debut <= '" . $db->idate(dol_get_last_day($year_current, 12, false)) . "'";
$sql1.= " AND er.entity IN (" . getEntity("accountancy", 1) . ")";
$sql1.= " AND er.entity IN (" . getEntity('accountancy') . ")";
$sql1.=")";
dol_syslog("htdocs/accountancy/customer/index.php fixaccountancycode", LOG_DEBUG);
@@ -167,7 +167,7 @@ print '<br>';
//print '<div class="inline-block divButAction">';
// TODO Remove this. Should be done always.
if ($conf->global->MAIN_FEATURES_LEVEL > 0) print '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=fixaccountancycode">' . $langs->trans("CleanFixHistory", $year_current) . '</a>';
if ($conf->global->MAIN_FEATURES_LEVEL > 1) print '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=fixaccountancycode">' . $langs->trans("CleanFixHistory", $year_current) . '</a>';
//print '</div>';
@@ -206,7 +206,7 @@ $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid =
$sql .= " WHERE er.date_debut >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
$sql .= " AND er.date_debut <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
$sql .= " AND er.fk_statut > 0 ";
$sql .= " AND er.entity IN (" . getEntity("expensereport", 0) . ")"; // We don't share object for accountancy
$sql .= " AND er.entity IN (" . getEntity('expensereport', 0) . ")"; // We don't share object for accountancy
$sql .= " AND aa.account_number IS NULL";
$sql .= " GROUP BY erd.fk_code_ventilation,aa.account_number,aa.label";
@@ -217,8 +217,7 @@ if ($resql) {
while ( $row = $db->fetch_row($resql)) {
$var = ! $var;
print '<tr ' . $bc[$var] . '><td>' . length_accountg($row[0]) . '</td>';
print '<tr class="oddeven"><td>' . length_accountg($row[0]) . '</td>';
print '<td align="left">' . $row[1] . '</td>';
for($i = 2; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';
@@ -260,7 +259,7 @@ $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid =
$sql .= " WHERE er.date_debut >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
$sql .= " AND er.date_debut <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
$sql .= " AND er.fk_statut > 0 ";
$sql .= " AND er.entity IN (" . getEntity("expensereport", 0) . ")"; // We don't share object for accountancy
$sql .= " AND er.entity IN (" . getEntity('expensereport', 0) . ")"; // We don't share object for accountancy
$sql .= " AND aa.account_number IS NOT NULL";
$sql .= " GROUP BY erd.fk_code_ventilation,aa.account_number,aa.label";
@@ -271,8 +270,7 @@ if ($resql) {
while ( $row = $db->fetch_row($resql)) {
$var = ! $var;
print '<tr ' . $bc[$var] . '><td>' . length_accountg($row[0]) . '</td>';
print '<tr class="oddeven"><td>' . length_accountg($row[0]) . '</td>';
print '<td align="left">' . $row[1] . '</td>';
for($i = 2; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';
@@ -315,7 +313,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
$sql .= " WHERE er.date_debut >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
$sql .= " AND er.date_debut <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
$sql .= " AND er.fk_statut > 0 ";
$sql .= " AND er.entity IN (" . getEntity("expensereport", 0) . ")"; // We don't share object for accountancy
$sql .= " AND er.entity IN (" . getEntity('expensereport', 0) . ")"; // We don't share object for accountancy
dol_syslog('/accountancy/expensereport/index.php:: sql=' . $sql);
$resql = $db->query($sql);

View File

@@ -27,7 +27,7 @@
require '../../main.inc.php';
// Class
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
require_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
@@ -52,7 +52,7 @@ $search_account = GETPOST('search_account', 'alpha');
$search_vat = GETPOST('search_vat', 'alpha');
// Load variable for pagination
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
$limit = GETPOST('limit','int')?GETPOST('limit', 'int'):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
$sortfield = GETPOST('sortfield', 'alpha');
$sortorder = GETPOST('sortorder', 'alpha');
$page = GETPOST('page', 'int');
@@ -74,7 +74,7 @@ if ($user->societe_id > 0)
if (! $user->rights->accounting->bind->write)
accessforbidden();
$formventilation = new FormVentilation($db);
$formaccounting = new FormAccounting($db);
/*
@@ -173,7 +173,7 @@ if (strlen(trim($search_account))) {
if (strlen(trim($search_vat))) {
$sql .= " AND (erd.tva_tx like '" . $search_vat . "%')";
}
$sql .= " AND er.entity IN (" . getEntity("expensereport", 0) . ")"; // We don't share object for accountancy
$sql .= " AND er.entity IN (" . getEntity('expensereport', 0) . ")"; // We don't share object for accountancy
$sql .= $db->order($sortfield, $sortorder);
@@ -219,13 +219,14 @@ if ($result) {
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="page" value="'.$page.'">';
print_barre_liste($langs->trans("ExpenseReportLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
print $langs->trans("DescVentilDoneExpenseReport") . '<br>';
print '<br><div class="inline-block divButAction">' . $langs->trans("ChangeAccount") . '<br>';
print $formventilation->select_account(GETPOST('account_parent'), 'account_parent', 1);
print $formaccounting->select_account(GETPOST('account_parent'), 'account_parent', 1);
print '<input type="submit" class="button valignmiddle" value="' . $langs->trans("ChangeBinding") . '" /></div>';
$moreforfilter = '';
@@ -233,6 +234,22 @@ if ($result) {
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre_filter">';
print '<td class="liste_titre"></td>';
print '<td><input type="text" class="flat maxwidth50" name="search_expensereport" value="' . dol_escape_htmltag($search_expensereport) . '"></td>';
print '<td class="liste_titre" align="right"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
print '<td class="liste_titre" align="right"><input type="text" class="flat maxwidth50" name="search_amount" value="' . dol_escape_htmltag($search_amount) . '"></td>';
print '<td class="liste_titre" align="center"><input type="text" class="right flat maxwidth50" name="search_vat" size="1" placeholder="%" value="' . dol_escape_htmltag($search_vat) . '"></td>';
print '<td class="liste_titre" align="center"><input type="text" class="right flat maxwidth50" name="search_account" value="' . dol_escape_htmltag($search_account) . '"></td>';
print '<td class="liste_titre" align="right"></td>';
print '<td class="liste_titre" align="right">';
$searchpicto=$form->showFilterButtons();
print $searchpicto;
print '</td>';
print "</tr>\n";
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "erd.rowid", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("ExpenseReport"), $_SERVER["PHP_SELF"], "er.ref", "", $param, '', $sortfield, $sortorder);
@@ -243,23 +260,8 @@ if ($result) {
print_liste_field_titre($langs->trans("VATRate"), $_SERVER["PHP_SELF"], "erd.tva_tx", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Account"), $_SERVER["PHP_SELF"], "aa.account_number", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre('');
print_liste_field_titre('', '', '', '', '', 'align="center"');
print "</tr>\n";
print '<tr class="liste_titre">';
print '<td class="liste_titre"></td>';
print '<td><input type="text" class="flat maxwidth50" name="search_expensereport" value="' . dol_escape_htmltag($search_expensereport) . '"></td>';
print '<td class="liste_titre" align="right"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
print '<td class="liste_titre" align="right"><input type="text" class="flat maxwidth50" name="search_amount" value="' . dol_escape_htmltag($search_amount) . '"></td>';
print '<td class="liste_titre" align="center"><input type="text" class="flat maxwidth50" name="search_vat" size="1" value="' . dol_escape_htmltag($search_vat) . '"></td>';
print '<td class="liste_titre" align="center"><input type="text" class="flat maxwidth50" name="search_account" value="' . dol_escape_htmltag($search_account) . '"></td>';
print '<td class="liste_titre" align="right"></td>';
print '<td class="liste_titre" align="right">';
$searchpicto=$form->showFilterAndCheckAddButtons(1);
print $searchpicto;
print '</td>';
$checkpicto=$form->showCheckAddButtons();
print_liste_field_titre($checkpicto, '', '', '', '', 'align="center"');
print "</tr>\n";
$expensereport_static = new ExpenseReport($db);
@@ -267,13 +269,12 @@ if ($result) {
$var = True;
while ( $i < min($num_lines, $limit) ) {
$objp = $db->fetch_object($result);
$var = ! $var;
$codeCompta = length_accountg($objp->account_number) . ' - ' . $objp->label;
$expensereport_static->ref = $objp->ref;
$expensereport_static->id = $objp->erid;
print '<tr '. $bc[$var].'>';
print '<tr class="oddeven">';
print '<td>' . $objp->rowid . '</td>';
@@ -300,7 +301,7 @@ if ($result) {
print img_edit();
print '</a></td>';
print '<td align="right"><input type="checkbox" class="checkforaction" name="changeaccount[]" value="' . $objp->rowid . '"/></td>';
print '<td class="center"><input type="checkbox" class="checkforaction" name="changeaccount[]" value="' . $objp->rowid . '"/></td>';
print "</tr>";
$i ++;

View File

@@ -29,7 +29,7 @@ require '../../main.inc.php';
// Class
require_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
@@ -61,7 +61,7 @@ $search_vat = GETPOST('search_vat', 'alpha');
$btn_ventil = GETPOST('ventil', 'alpha');
// Load variable for pagination
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
$limit = GETPOST('limit','int')?GETPOST('limit', 'int'):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
$sortfield = GETPOST('sortfield', 'alpha');
$sortorder = GETPOST('sortorder', 'alpha');
$page = GETPOST('page','int');
@@ -83,7 +83,7 @@ if ($user->societe_id > 0)
if (! $user->rights->accounting->bind->write)
accessforbidden();
$formventilation = new FormVentilation($db);
$formaccounting = new FormAccounting($db);
$accounting = new AccountingAccount($db);
@@ -203,7 +203,7 @@ if (strlen(trim($search_account))) {
if (strlen(trim($search_vat))) {
$sql .= natural_search("erd.tva_tx",$search_vat,1);
}
$sql .= " AND er.entity IN (" . getEntity("expensereport", 0) . ")"; // We don't share object for accountancy
$sql .= " AND er.entity IN (" . getEntity('expensereport', 0) . ")"; // We don't share object for accountancy
$sql .= $db->order($sortfield, $sortorder);
@@ -246,9 +246,8 @@ if ($result) {
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
//$center='<div class="center"><input type="submit" class="butAction" value="' . $langs->trans("Ventilate") . '" name="ventil"></div>';
print '<input type="hidden" name="page" value="'.$page.'">';
print_barre_liste($langs->trans("ExpenseReportLines"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
print $langs->trans("DescVentilTodoExpenseReport") . '</br><br>';
@@ -259,6 +258,24 @@ if ($result) {
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
// We add search filter
print '<tr class="liste_titre_filter">';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_expensereport" value="' . dol_escape_htmltag($search_expensereport) . '"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidthonsmartphone" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
print '<td class="liste_titre" align="right"><input type="text" class="right flat maxwidth50" name="search_amount" value="' . dol_escape_htmltag($search_amount) . '"></td>';
print '<td class="liste_titre" align="right"><input type="text" class="right flat maxwidth50" name="search_vat" placeholder="%" size="1" value="' . dol_escape_htmltag($search_vat) . '"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td align="center" class="liste_titre">';
$searchpicto=$form->showFilterButtons();
print $searchpicto;
print '</td>';
print '</tr>';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "erd.rowid", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("ExpenseReport"), $_SERVER["PHP_SELF"], "er.ref", "", $param, '', $sortfield, $sortorder);
@@ -269,33 +286,18 @@ if ($result) {
print_liste_field_titre($langs->trans("VATRate"), $_SERVER["PHP_SELF"], "erd.tva_tx", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("AccountAccountingSuggest"), '', '', '', '', 'align="center"');
print_liste_field_titre($langs->trans("IntoAccount"), '', '', '', '', 'align="center"');
print_liste_field_titre('', '', '', '', '', 'align="center"');
$checkpicto='';
if ($massactionbutton) $checkpicto=$form->showCheckAddButtons('checkforselect', 1);
print_liste_field_titre($checkpicto, '', '', '', '', 'align="center"');
print "</tr>\n";
// We add search filter
print '<tr class="liste_titre">';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_expensereport" value="' . dol_escape_htmltag($search_expensereport) . '"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidthonsmartphone" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
print '<td class="liste_titre" align="right"><input type="text" class="flat maxwidth50" name="search_amount" value="' . dol_escape_htmltag($search_amount) . '"></td>';
print '<td class="liste_titre" align="right"><input type="text" class="flat maxwidth50" name="search_vat" size="1" value="' . dol_escape_htmltag($search_vat) . '"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td align="right" class="liste_titre">';
$searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
print $searchpicto;
print '</td>';
print '</tr>';
$expensereport_static = new ExpenseReport($db);
$form = new Form($db);
$var = true;
while ( $i < min($num_lines, $limit) ) {
$objp = $db->fetch_object($result);
$var = ! $var;
$objp->aarowid_suggest = '';
$objp->aarowid_suggest = $objp->aarowid;
@@ -303,7 +305,7 @@ if ($result) {
$expensereport_static->ref = $objp->ref;
$expensereport_static->id = $objp->erid;
print '<tr '. $bc[$var].'>';
print '<tr class="oddeven">';
// Line id
print '<td>' . $objp->rowid . '</td>';
@@ -341,10 +343,10 @@ if ($result) {
// Suggested accounting account
print '<td align="center">';
print $formventilation->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'maxwidth300 maxwidthonsmartphone', 'cachewithshowemptyone');
print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'maxwidth300 maxwidthonsmartphone', 'cachewithshowemptyone');
print '</td>';
print '<td align="right">';
print '<td align="center">';
print '<input type="checkbox" class="flat checkforselect" name="toselect[]" value="' . $objp->rowid . "_" . $i . '"' . ($objp->aarowid ? "checked" : "") . '/>';
print '</td>';

View File

@@ -45,10 +45,13 @@ $langs->load("compta");
$langs->load("banks");
$langs->load("loans");
/*
* Actions
*/
// None
/*
* View
@@ -71,33 +74,33 @@ print "<br>\n";
// STEPS
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("Pcg_version").'</strong>');
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescJournalSetup", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("AccountingJournals").'</strong>');
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("Pcg_version").'</strong>');
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("Chartofaccounts").'</strong>');
print "<br>\n";
print "<br>\n";
print "<br>\n";
print $langs->trans("AccountancyAreaDescActionOnceBis");
print "<br>\n";
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescMisc", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>')."<br>\n";
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescMisc", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>')."\n";
print "<br>\n";
$step++;
$textlink = '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup").'-'.$langs->transnoentitiesnoconv("MenuVatAccounts").'</strong>';
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step, $textlink);
print "<br>\n";
print "<br>\n";
if (! empty($conf->tax->enabled))
{
$textlink = '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup").'-'.$langs->transnoentitiesnoconv("MenuTaxAccounts").'</strong>';
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step, $textlink);
print "<br>\n";
print "<br>\n";
}
/*if (! empty($conf->salaries->enabled))
{
@@ -112,7 +115,6 @@ if (! empty($conf->expensereport->enabled)) // TODO Move this in the default ac
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").'</strong>');
print "<br>\n";
print "<br>\n";
}
/*
if (! empty($conf->loan->enabled))
@@ -120,49 +122,50 @@ if (! empty($conf->loan->enabled))
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescLoan", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuSpecialExpenses").'-'.$langs->transnoentitiesnoconv("Loans").'</strong> '.$langs->transnoentitiesnoconv("or").' <strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
print "<br>\n";
print "<br>\n";
}
if (! empty($conf->don->enabled))
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDonation", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDonationAccounts").'</strong>');
print "<br>\n";
print "<br>\n";
}*/
$step++;
$textlink='<strong>'.$langs->transnoentitiesnoconv("Home").'-'.$langs->transnoentitiesnoconv("MenuBankCash").'</strong>';
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, $textlink);
print "<br>\n";
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("ProductsBinding").'</strong>');
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("ProductsBinding").'</strong>')."<br>\n";
$textlink='<strong>'.$langs->transnoentitiesnoconv("MenuBankCash").'</strong>';
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, $textlink);
print "<br>\n";
print "<br>\n";
print_fiche_titre($langs->trans("AccountancyAreaDescActionFreq"), '', 'object_calendarweek');
print '<hr>';
print "<br>\n";
$step = 0;
$langs->loadLangs(array('bills', 'trips'));
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescCustomer", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy")."-".$langs->transnoentitiesnoconv("CustomersVentilation").'</strong>')."<br>\n";
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64+$step), $langs->transnoentitiesnoconv("BillsCustomers"), '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy")."-".$langs->transnoentitiesnoconv("CustomersVentilation").'</strong>')."\n";
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSupplier", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy")."-".$langs->transnoentitiesnoconv("SuppliersVentilation").'</strong>')."<br>\n";
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64+$step), $langs->transnoentitiesnoconv("BillsSuppliers"), '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy")."-".$langs->transnoentitiesnoconv("SuppliersVentilation").'</strong>')."\n";
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy")."-".$langs->transnoentitiesnoconv("ExpenseReportsVentilation").'</strong>')."<br>\n";
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64+$step), $langs->transnoentitiesnoconv("ExpenseReports"), '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy")."-".$langs->transnoentitiesnoconv("ExpenseReportsVentilation").'</strong>')."\n";
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescWriteRecords", $step)."<br>\n";
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescWriteRecords", chr(64+$step), $langs->transnoentitiesnoconv("Journalization"), $langs->transnoentitiesnoconv("WriteBookKeeping"))."\n";
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescAnalyze", $step)."<br>\n";
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescAnalyze", chr(64+$step))."<br>\n";
print "<br>\n";
llxFooter();

View File

@@ -28,17 +28,17 @@
* \brief Page with bank journal
*/
require '../../main.inc.php';
// Class
require_once DOL_DOCUMENT_ROOT . '/core/lib/report.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/bank.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php';
require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
require_once DOL_DOCUMENT_ROOT . '/user/class/user.class.php';
require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php';
require_once DOL_DOCUMENT_ROOT . '/compta/sociales/class/chargesociales.class.php';
require_once DOL_DOCUMENT_ROOT . '/compta/paiement/class/paiement.class.php';
require_once DOL_DOCUMENT_ROOT . '/don/class/don.class.php';
require_once DOL_DOCUMENT_ROOT . '/don/class/paymentdonation.class.php';
require_once DOL_DOCUMENT_ROOT . '/compta/tva/class/tva.class.php';
require_once DOL_DOCUMENT_ROOT . '/compta/salaries/class/paymentsalary.class.php';
@@ -51,8 +51,6 @@ require_once DOL_DOCUMENT_ROOT . '/societe/class/client.class.php';
require_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php';
require_once DOL_DOCUMENT_ROOT . '/expensereport/class/paymentexpensereport.class.php';
// Langs
$langs->load("companies");
$langs->load("other");
$langs->load("compta");
@@ -61,9 +59,10 @@ $langs->load('bills');
$langs->load('donations');
$langs->load("accountancy");
$langs->load("trips");
$langs->load("hrm");
$langs->load("salaries");
$id_bank_account = GETPOST('id_account', 'int');
// Multi journal
$id_journal = GETPOST('id_journal', 'int');
$date_startmonth = GETPOST('date_startmonth');
$date_startday = GETPOST('date_startday');
@@ -71,21 +70,22 @@ $date_startyear = GETPOST('date_startyear');
$date_endmonth = GETPOST('date_endmonth');
$date_endday = GETPOST('date_endday');
$date_endyear = GETPOST('date_endyear');
$action = GETPOST('action');
$action = GETPOST('action','aZ09');
$now = dol_now();
$action = GETPOST('action','aZ09');
// Security check
if ($user->societe_id > 0 && empty($id_bank_account))
if ($user->societe_id > 0 && empty($id_journal))
accessforbidden();
/*
* Actions
*/
$error = 0;
$year_current = strftime("%Y", dol_now());
$pastmonth = strftime("%m", dol_now()) - 1;
$pastmonthyear = $year_current;
@@ -106,18 +106,18 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end
$p = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY);
$idpays = $p[0];
$sql = "SELECT b.rowid , b.dateo as do, b.datev as dv, b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type,";
$sql .= " ba.courant, ba.ref as baref, ba.account_number,";
$sql = "SELECT b.rowid, b.dateo as do, b.datev as dv, b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type,";
$sql .= " ba.courant, ba.ref as baref, ba.account_number, ba.fk_accountancy_journal,";
$sql .= " soc.code_compta, soc.code_compta_fournisseur, soc.rowid as socid, soc.nom as name, bu1.type as typeop,";
$sql .= " u.accountancy_code, u.rowid as userid, u.lastname as name, u.firstname as firstname, bu2.type as typeop";
$sql .= " u.accountancy_code, u.rowid as userid, u.lastname as lastname, u.firstname as firstname, bu2.type as typeop";
$sql .= " FROM " . MAIN_DB_PREFIX . "bank as b";
$sql .= " JOIN " . MAIN_DB_PREFIX . "bank_account as ba on b.fk_account=ba.rowid";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "bank_url as bu1 ON bu1.fk_bank = b.rowid AND bu1.type='company'";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "bank_url as bu2 ON bu2.fk_bank = b.rowid AND bu2.type='user'";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe as soc on bu1.url_id=soc.rowid";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "user as u on bu2.url_id=u.rowid";
$sql .= " WHERE ba.rowid=" . $id_bank_account;
$sql .= ' AND ba.entity IN ('.getEntity('bank_account', 0).')'; // We don't share object for accountancy
$sql .= " WHERE ba.fk_accountancy_journal=" . $id_journal;
$sql .= ' AND ba.entity IN ('.getEntity('bank_account', 0).')'; // We don't share object for accountancy
if ($date_start && $date_end)
$sql .= " AND b.dateo >= '" . $db->idate($date_start) . "' AND b.dateo <= '" . $db->idate($date_end) . "'";
$sql .= " ORDER BY b.datev";
@@ -134,9 +134,10 @@ $paymentsalstatic = new PaymentSalary($db);
$paymentexpensereportstatic = new PaymentExpenseReport($db);
// Get code of finance journal
$bank_code_journal = new Account($db);
$result = $bank_code_journal->fetch($id_bank_account);
$journal = $bank_code_journal->accountancy_journal;
$accountingjournalstatic = new AccountingJournal($db);
$accountingjournalstatic->fetch($id_journal);
$journal = $accountingjournalstatic->code;
$journal_label = $accountingjournalstatic->label;
dol_syslog("accountancy/journal/bankjournal.php", LOG_DEBUG);
$result = $db->query($sql);
@@ -163,7 +164,7 @@ if ($result) {
// one line for bank jounral = tabbq
// one line for thirdparty journal = tabtp
$i = 0;
while ( $i < $num )
while ( $i < $num )
{
$obj = $db->fetch_object($result);
@@ -177,16 +178,17 @@ if ($result) {
$tabcompany[$obj->rowid] = array (
'id' => $obj->socid,
'name' => $obj->name,
'code_compta' => $compta_soc,
'code_compta' => $compta_soc,
);
$compta_user = (! empty($obj->accountancy_code) ? $obj->accountancy_code : $account_employee);
$tabuser[$obj->rowid] = array (
'id' => $obj->userid,
'name' => dolGetFirstLastname($obj->firstname, $obj->lastname),
'lastname' => $obj->lastname,
'firstname' => $obj->firstname,
'accountancy_code' => $compta_user,
'accountancy_code' => $compta_user,
);
// Variable bookkeeping
@@ -203,14 +205,14 @@ if ($result) {
// get_url may return -1 which is not traversable
if (is_array($links)) {
// Now loop on each link of record in bank.
// Now loop on each link of record in bank.
foreach ( $links as $key => $val ) {
if (in_array($links[$key]['type'], array('sc', 'payment_sc', 'payment', 'payment_supplier', 'payment_vat', 'payment_expensereport'))) // So we excluded 'company' here
{
// We save tabtype for a future use, to remember what kind of payment it is
$tabtype[$obj->rowid] = $links[$key]['type'];
}
if (in_array($links[$key]['type'], array('sc', 'payment_sc', 'payment', 'payment_supplier', 'payment_vat', 'payment_expensereport', 'banktransfert', 'payment_donation', 'payment_salary'))) // So we excluded 'company' here
{
// We save tabtype for a future use, to remember what kind of payment it is
$tabtype[$obj->rowid] = $links[$key]['type'];
}
if ($links[$key]['type'] == 'payment') {
$paymentstatic->id = $links[$key]['url_id'];
@@ -262,20 +264,22 @@ if ($result) {
} else if ($links[$key]['type'] == 'payment_donation') {
$paymentdonstatic->id = $links[$key]['url_id'];
$paymentdonstatic->fk_donation = $links[$key]['url_id'];
$tabpay[$obj->rowid]["lib"] .= ' ' . $langs->trans("PaymentDonation");
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentdonstatic->getNomUrl(2);
$tabpay[$obj->rowid]["paymentdonationid"] = $paymentdonstatic->id;
$tabtp[$obj->rowid][$account_pay_donation] += $obj->amount;
} else if ($links[$key]['type'] == 'payment_vat') {
$paymentvatstatic->id = $links[$key]['url_id'];
$paymentvatstatic->ref = $links[$key]['url_id'];
$paymentvatstatic->label = $links[$key]['label'];
$tabpay[$obj->rowid]["lib"] .= ' ' . $langs->trans("PaymentVat");
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
$tabpay[$obj->rowid]["paymentvatid"] = $paymentvatstatic->id;
$tabtp[$obj->rowid][$account_pay_vat] += $obj->amount;
} else if ($links[$key]['type'] == 'payment_salary') {
$paymentsalstatic->id = $links[$key]['url_id'];
$paymentsalstatic->ref = $links[$key]['url_id'];
$paymentsalstatic->label = $links[$key]['label'];
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2);
// $tabtp[$obj->rowid][$account_employee] += $obj->amount;
$tabpay[$obj->rowid]["paymentsalid"] = $paymentsalstatic->id;
} else if ($links[$key]['type'] == 'payment_expensereport') {
$paymentexpensereportstatic->id = $links[$key]['url_id'];
$paymentexpensereportstatic->fk_expensereport = $links[$key]['url_id'];
@@ -290,26 +294,26 @@ if ($result) {
$tabbq[$obj->rowid][$compta_bank] += $obj->amount;
// Check account number is ok
/*if ($action == 'writebookkeeping') // Make test now in such a case
/*if ($action == 'writebookkeeping') // Make test now in such a case
{
reset($tabbq[$obj->rowid]);
$first_key_tabbq = key($tabbq[$obj->rowid]);
if (empty($first_key_tabbq))
{
$error++;
setEventMessages($langs->trans('ErrorAccountancyCodeOnBankAccountNotDefined', $obj->baref), null, 'errors');
}
reset($tabtp[$obj->rowid]);
$first_key_tabtp = key($tabtp[$obj->rowid]);
if (empty($first_key_tabtp))
{
$error++;
setEventMessages($langs->trans('ErrorAccountancyCodeOnThirdPartyNotDefined'), null, 'errors');
}
reset($tabbq[$obj->rowid]);
$first_key_tabbq = key($tabbq[$obj->rowid]);
if (empty($first_key_tabbq))
{
$error++;
setEventMessages($langs->trans('ErrorAccountancyCodeOnBankAccountNotDefined', $obj->baref), null, 'errors');
}
reset($tabtp[$obj->rowid]);
$first_key_tabtp = key($tabtp[$obj->rowid]);
if (empty($first_key_tabtp))
{
$error++;
setEventMessages($langs->trans('ErrorAccountancyCodeOnThirdPartyNotDefined'), null, 'errors');
}
}*/
// if($obj->socid)$tabtp[$obj->rowid][$compta_soc] += $obj->amount;
$i ++;
@@ -329,189 +333,230 @@ if (! $error && $action == 'writebookkeeping') {
$now = dol_now();
$error = 0;
foreach ( $tabpay as $key => $val ) { // $key is rowid into llx_bank
$errorforline = 0;
$db->begin();
foreach ( $tabpay as $key => $val ) { // $key is rowid into llx_bank
$errorforline = 0;
$db->begin();
// Bank
if (! $errorforline)
{
// Line into bank account
foreach ( $tabbq[$key] as $k => $mt )
{
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->doc_ref = $val["ref"];
$bookkeeping->doc_type = 'bank';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = $val["fk_bank"];
$bookkeeping->numero_compte = $k;
$bookkeeping->label_compte = $compte->label;
$bookkeeping->montant = ($mt < 0 ? - $mt : $mt);
$bookkeeping->sens = ($mt >= 0) ? 'D' : 'C';
$bookkeeping->debit = ($mt >= 0 ? $mt : 0);
$bookkeeping->credit = ($mt < 0 ? - $mt : 0);
$bookkeeping->code_journal = $journal;
$bookkeeping->fk_user_author = $user->id;
$bookkeeping->date_create = $now;
if ($tabtype[$key] == 'payment') {
$bookkeeping->code_tiers = $tabcompany[$key]['code_compta'];
// Line into bank account
foreach ( $tabbq[$key] as $k => $mt )
{
if ($mt) {
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->doc_ref = $val["ref"];
$bookkeeping->doc_type = 'bank';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = $val["fk_bank"];
$bookkeeping->numero_compte = $k;
$bookkeeping->label_compte = $compte->label;
$bookkeeping->montant = ($mt < 0 ? - $mt : $mt);
$bookkeeping->sens = ($mt >= 0) ? 'D' : 'C';
$bookkeeping->debit = ($mt >= 0 ? $mt : 0);
$bookkeeping->credit = ($mt < 0 ? - $mt : 0);
$bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label;
$bookkeeping->fk_user_author = $user->id;
$bookkeeping->date_create = $now;
$sqlmid = 'SELECT fac.facnumber';
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "facture fac";
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiement_facture as payfac ON payfac.fk_facture=fac.rowid";
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiement as pay ON payfac.fk_paiement=pay.rowid";
$sqlmid .= " WHERE pay.fk_bank=" . $key;
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
$resultmid = $db->query($sqlmid);
if ($resultmid) {
$objmid = $db->fetch_object($resultmid);
$bookkeeping->doc_ref = $objmid->facnumber; // Ref of invoice
}
} else if ($tabtype[$key] == 'payment_supplier') {
$bookkeeping->code_tiers = $tabcompany[$key]['code_compta'];
if ($tabtype[$key] == 'payment') {
$bookkeeping->code_tiers = $tabcompany[$key]['code_compta'];
$sqlmid = 'SELECT facf.ref_supplier, facf.ref';
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "facture_fourn facf";
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementfourn_facturefourn as payfacf ON payfacf.fk_facturefourn=facf.rowid";
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementfourn as payf ON payfacf.fk_paiementfourn=payf.rowid";
$sqlmid .= " WHERE payf.fk_bank=" . $key;
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
$resultmid = $db->query($sqlmid);
if ($resultmid) {
$objmid = $db->fetch_object($resultmid);
$bookkeeping->doc_ref = $objmid->ref_supplier . ' (' . $objmid->ref . ')'; // Ref on invoice
}
} else if ($tabtype[$key] == 'payment_expensereport') {
$bookkeeping->code_tiers = $tabuser[$key]['accountancy_code'];
$sqlmid = 'SELECT fac.facnumber';
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "facture fac";
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiement_facture as payfac ON payfac.fk_facture=fac.rowid";
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiement as pay ON payfac.fk_paiement=pay.rowid";
$sqlmid .= " WHERE pay.fk_bank=" . $key;
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
$resultmid = $db->query($sqlmid);
if ($resultmid) {
$objmid = $db->fetch_object($resultmid);
$bookkeeping->doc_ref = $objmid->facnumber; // Ref of invoice
}
} else if ($tabtype[$key] == 'payment_supplier') {
$bookkeeping->code_tiers = $tabcompany[$key]['code_compta'];
$sqlmid = 'SELECT e.ref';
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "expensereport as e";
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "payment_expensereport as payer ON payer.fk_expensereport=e.rowid";
$sqlmid .= " WHERE payer.fk_expensereport=" . $val["fk_expensereport"];
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
$resultmid = $db->query($sqlmid);
if ($resultmid) {
$objmid = $db->fetch_object($resultmid);
$bookkeeping->doc_ref = $objmid->ref; // Ref of expensereport
}
}
$result = $bookkeeping->create($user);
if ($result < 0) {
if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists
{
$error++;
$errorforline++;
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->doc_ref.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
}
else
{
$error++;
$errorforline++;
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
}
$sqlmid = 'SELECT facf.ref_supplier, facf.ref';
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "facture_fourn facf";
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementfourn_facturefourn as payfacf ON payfacf.fk_facturefourn=facf.rowid";
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementfourn as payf ON payfacf.fk_paiementfourn=payf.rowid";
$sqlmid .= " WHERE payf.fk_bank=" . $key;
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
$resultmid = $db->query($sqlmid);
if ($resultmid) {
$objmid = $db->fetch_object($resultmid);
$bookkeeping->doc_ref = $objmid->ref_supplier . ' (' . $objmid->ref . ')'; // Ref on invoice
}
} else if ($tabtype[$key] == 'payment_expensereport') {
$bookkeeping->code_tiers = $tabuser[$key]['accountancy_code'];
$sqlmid = 'SELECT e.ref';
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "expensereport as e";
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "payment_expensereport as payer ON payer.fk_expensereport=e.rowid";
$sqlmid .= " WHERE payer.fk_expensereport=" . $val["fk_expensereport"];
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
$resultmid = $db->query($sqlmid);
if ($resultmid) {
$objmid = $db->fetch_object($resultmid);
$bookkeeping->doc_ref = $objmid->ref; // Ref of expensereport
}
} else if ($tabtype[$key] == 'payment_vat') {
$bookkeeping->code_tiers = '';
$bookkeeping->doc_ref = $langs->trans("PaymentVat") . ' (' . $val["paymentvatid"] . ')'; // Rowid of vat payment
} else if ($tabtype[$key] == 'payment_donation') {
$bookkeeping->code_tiers = '';
$bookkeeping->doc_ref = $langs->trans("Donation") . ' (' . $val["paymentdonationid"] . ')'; // Rowid of donation
} else if ($tabtype[$key] == 'payment_salary') {
$bookkeeping->code_tiers = '';
$bookkeeping->label_compte = $tabuser[$key]['name'];
$bookkeeping->doc_ref = $langs->trans("SalaryPayment") . ' (' . $val["paymentsalid"] . ')'; // Ref of salary payment
}
$result = $bookkeeping->create($user);
if ($result < 0) {
if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists
{
$error++;
$errorforline++;
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->doc_ref.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
}
else
{
$error++;
$errorforline++;
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
}
}
}
// Third party
if (! $errorforline)
{
// Line into thirdparty account
foreach ( $tabtp[$key] as $k => $mt ) {
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->doc_ref = $val["ref"];
$bookkeeping->doc_type = 'bank';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = $val["fk_bank"];
$bookkeeping->label_compte = $tabcompany[$key]['name'];
$bookkeeping->montant = ($mt < 0 ? - $mt : $mt);
$bookkeeping->sens = ($mt < 0) ? 'D' : 'C';
$bookkeeping->debit = ($mt < 0 ? - $mt : 0);
$bookkeeping->credit = ($mt >= 0) ? $mt : 0;
$bookkeeping->code_journal = $journal;
$bookkeeping->fk_user_author = $user->id;
$bookkeeping->date_create = $now;
if (in_array($tabtype[$key], array('sc', 'payment_sc'))) { // If payment is payment of social contribution
$bookkeeping->code_tiers = '';
$bookkeeping->numero_compte = $k;
} else if ($tabtype[$key] == 'payment') { // If payment is payment of customer invoice, we get ref of invoice
$sqlmid = 'SELECT fac.facnumber';
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "facture fac ";
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiement_facture as payfac ON payfac.fk_facture=fac.rowid";
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiement as pay ON payfac.fk_paiement=pay.rowid";
$sqlmid .= " WHERE pay.fk_bank=" . $key;
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
$resultmid = $db->query($sqlmid);
if ($resultmid) {
$objmid = $db->fetch_object($resultmid);
$bookkeeping->doc_ref = $objmid->facnumber;
}
$bookkeeping->code_tiers = $tabcompany[$key]['code_compta'];
$bookkeeping->numero_compte = $k;
} else if ($tabtype[$key] == 'payment_supplier') { // If payment is payment of supplier invoice, we get ref of invoice
$sqlmid = 'SELECT facf.ref_supplier,facf.ref';
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "facture_fourn facf ";
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementfourn_facturefourn as payfacf ON payfacf.fk_facturefourn=facf.rowid";
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementfourn as payf ON payfacf.fk_paiementfourn=payf.rowid";
$sqlmid .= " WHERE payf.fk_bank=" . $key;
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
$resultmid = $db->query($sqlmid);
if ($resultmid) {
$objmid = $db->fetch_object($resultmid);
$bookkeeping->doc_ref = $objmid->ref_supplier . ' (' . $objmid->ref . ')';
}
$bookkeeping->code_tiers = $tabcompany[$key]['code_compta'];
$bookkeeping->numero_compte = $k;
} else {
// FIXME Should be a temporary account ???
$bookkeeping->doc_ref = $k;
//$bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER;
$bookkeeping->numero_compte = 'CodeNotDef';
}
$result = $bookkeeping->create($user);
if ($result < 0) {
$error++;
$errorforline++;
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
// Line into thirdparty account
foreach ( $tabtp[$key] as $k => $mt ) {
if ($mt) {
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->doc_ref = $val["ref"];
$bookkeeping->doc_type = 'bank';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = $val["fk_bank"];
$bookkeeping->label_compte = $tabcompany[$key]['name'];
$bookkeeping->montant = ($mt < 0 ? - $mt : $mt);
$bookkeeping->sens = ($mt < 0) ? 'D' : 'C';
$bookkeeping->debit = ($mt < 0 ? - $mt : 0);
$bookkeeping->credit = ($mt >= 0) ? $mt : 0;
$bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label;
$bookkeeping->fk_user_author = $user->id;
$bookkeeping->date_create = $now;
if (in_array($tabtype[$key], array('sc', 'payment_sc'))) { // If payment is payment of social contribution
$bookkeeping->code_tiers = '';
$bookkeeping->numero_compte = $k;
} else if ($tabtype[$key] == 'payment') { // If payment is payment of customer invoice, we get ref of invoice
$sqlmid = 'SELECT fac.facnumber';
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "facture fac ";
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiement_facture as payfac ON payfac.fk_facture=fac.rowid";
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiement as pay ON payfac.fk_paiement=pay.rowid";
$sqlmid .= " WHERE pay.fk_bank=" . $key;
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
$resultmid = $db->query($sqlmid);
if ($resultmid) {
$objmid = $db->fetch_object($resultmid);
$bookkeeping->doc_ref = $objmid->facnumber;
}
$bookkeeping->code_tiers = $tabcompany[$key]['code_compta'];
$bookkeeping->numero_compte = $k;
} else if ($tabtype[$key] == 'payment_supplier') { // If payment is payment of supplier invoice, we get ref of invoice
$sqlmid = 'SELECT facf.ref_supplier,facf.ref';
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "facture_fourn facf ";
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementfourn_facturefourn as payfacf ON payfacf.fk_facturefourn=facf.rowid";
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementfourn as payf ON payfacf.fk_paiementfourn=payf.rowid";
$sqlmid .= " WHERE payf.fk_bank=" . $key;
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
$resultmid = $db->query($sqlmid);
if ($resultmid) {
$objmid = $db->fetch_object($resultmid);
$bookkeeping->doc_ref = $objmid->ref_supplier . ' (' . $objmid->ref . ')';
}
$bookkeeping->code_tiers = $tabcompany[$key]['code_compta'];
$bookkeeping->numero_compte = $k;
} else if ($tabtype[$key] == 'payment_vat') {
$bookkeeping->code_tiers = '';
$bookkeeping->numero_compte = $k;
$bookkeeping->doc_ref = $langs->trans("PaymentVat") . ' (' . $val["paymentvatid"] . ')'; // Rowid of vat
} else if ($tabtype[$key] == 'payment_donation') {
$bookkeeping->code_tiers = '';
$bookkeeping->numero_compte = $k;
$bookkeeping->doc_ref = $langs->trans("Donation") . ' (' . $val["paymentdonationid"] . ')'; // Rowid of donation
} else if ($tabtype[$key] == 'payment_salary') {
$bookkeeping->code_tiers = $tabuser[$key]['accountancy_code'];
$bookkeeping->numero_compte = $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT;
$bookkeeping->label_compte = $tabuser[$key]['name'];
$bookkeeping->doc_ref = $langs->trans("SalaryPayment") . ' (' . $val["paymentsalid"] . ')'; // Rowid of salary payment
} else if ($tabtype[$key] == 'banktransfert') {
$bookkeeping->code_tiers = '';
$bookkeeping->numero_compte = $k;
} else {
// FIXME Should be a temporary account ???
$bookkeeping->doc_ref = $k;
//$bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER;
$bookkeeping->numero_compte = 'CodeNotDef';
}
$result = $bookkeeping->create($user);
if ($result < 0) {
if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists
{
$error++;
$errorforline++;
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->doc_ref.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
}
else
{
$error++;
$errorforline++;
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
}
}
}
if (! $errorforline)
{
$db->commit();
$db->commit();
}
else
{
$db->rollback();
$db->rollback();
}
}
if (empty($error)) {
setEventMessages($langs->trans("GeneralLedgerIsWritten"), null, 'mesgs');
setEventMessages($langs->trans("GeneralLedgerIsWritten"), null, 'mesgs');
}
elseif (count($tabpay) == $error)
{
setEventMessages($langs->trans("NoNewRecordSaved"), null, 'warnings');
setEventMessages($langs->trans("NoNewRecordSaved"), null, 'warnings');
}
else
{
setEventMessages($langs->trans("GeneralLedgerSomeRecordWasNotRecorded"), null, 'warnings');
setEventMessages($langs->trans("GeneralLedgerSomeRecordWasNotRecorded"), null, 'warnings');
}
$action = '';
}
// Export
/*
if ($action == 'export_csv') {
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
@@ -547,7 +592,7 @@ if ($action == 'export_csv') {
if ($reflabel == '(ExpenseReportPayment)') {
$reflabel = $langs->trans('Employee');
}
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
@@ -678,8 +723,7 @@ if ($action == 'export_csv') {
}
}
}
*/
/*
@@ -692,49 +736,53 @@ if (empty($action) || $action == 'view') {
$invoicestatic = new Facture($db);
$invoicesupplierstatic = new FactureFournisseur($db);
$expensereportstatic = new ExpenseReport($db);
$vatstatic = new Tva($db);
$donationstatic = new Don($db);
$salarystatic = new PaymentSalary($db);
llxHeader('', $langs->trans("FinanceJournal"));
$nom = $langs->trans("FinanceJournal") . ' - ' . $bank_code_journal->getNomUrl(1);
$nom = $langs->trans("FinanceJournal") . ' - ' . $accountingjournalstatic->getNomUrl(1);
$builddate = time();
//$description = $langs->trans("DescFinanceJournal") . '<br>';
$description.= $langs->trans("DescJournalOnlyBindedVisible").'<br>';
$period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
$varlink = 'id_account=' . $id_bank_account;
report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array (
'action' => ''
), '', $varlink);
$varlink = 'id_journal=' . $id_journal;
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV != 1 && $conf->global->ACCOUNTING_EXPORT_MODELCSV != 2) {
journalHead($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''), '', $varlink);
/*if ($conf->global->ACCOUNTING_EXPORT_MODELCSV != 1 && $conf->global->ACCOUNTING_EXPORT_MODELCSV != 2) {
print '<input type="button" class="butActionRefused" style="float: right;" value="' . $langs->trans('Export') . '" disabled="disabled" title="' . $langs->trans('ExportNotSupported') . '"/>';
} else {
print '<input type="button" class="butAction" style="float: right;" value="' . $langs->trans("Export") . '" onclick="launch_export();" />';
}
}*/
print '<div class="tabsAction">';
print '<input type="button" class="butAction" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
print '</div>';
// TODO Avoid using js. We can use a direct link with $param
print '
<script type="text/javascript">
function launch_export() {
console.log("Set value into form and submit");
$("div.fiche div.tabBar form input[name=\"action\"]").val("export_csv");
console.log("Set value into form and submit");
$("div.fiche div.tabBar form input[name=\"action\"]").val("export_csv");
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
}
function writebookkeeping() {
console.log("Set value into form and submit");
$("div.fiche div.tabBar form input[name=\"action\"]").val("writebookkeeping");
console.log("Set value into form and submit");
$("div.fiche div.tabBar form input[name=\"action\"]").val("writebookkeeping");
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
}
</script>';
/*
* Show result array
*/
print '<br><br>';
print '<br>';
$i = 0;
print "<table class=\"noborder\" width=\"100%\">";
@@ -749,10 +797,9 @@ if (empty($action) || $action == 'view') {
print "<td align='right'>" . $langs->trans("Credit") . "</td>";
print "</tr>\n";
$var = true;
$r = '';
foreach ( $tabpay as $key => $val ) { // $key is rowid in llx_bank
foreach ( $tabpay as $key => $val ) { // $key is rowid in llx_bank
$date = dol_print_date($db->jdate($val["date"]), 'day');
$reflabel = $val["ref"];
@@ -761,7 +808,7 @@ if (empty($action) || $action == 'view') {
}
if ($reflabel == '(CustomerInvoicePayment)') {
$reflabel = $langs->trans('Customer');
}
}
if ($reflabel == '(SocialContributionPayment)') {
$reflabel = $langs->trans('SocialContribution');
}
@@ -774,49 +821,91 @@ if (empty($action) || $action == 'view') {
if ($reflabel == '(ExpenseReportPayment)') {
$reflabel = $langs->trans('Employee');
}
$ref=$reflabel;
if ($tabtype[$key] == 'payment')
{
$sqlmid = 'SELECT payfac.fk_facture as id';
$sqlmid .= " FROM ".MAIN_DB_PREFIX."paiement_facture as payfac";
$sqlmid .= " WHERE payfac.fk_paiement=" . $val["paymentid"];
dol_syslog("accountancy/journal/bankjournal.php::sqlmid=" . $sqlmid, LOG_DEBUG);
$resultmid = $db->query($sqlmid);
if ($resultmid) {
$objmid = $db->fetch_object($resultmid);
$invoicestatic->fetch($objmid->id);
$ref=$langs->trans("Invoice").' '.$invoicestatic->getNomUrl(1);
}
else dol_print_error($db);
$sqlmid = 'SELECT payfac.fk_facture as id';
$sqlmid .= " FROM ".MAIN_DB_PREFIX."paiement_facture as payfac";
$sqlmid .= " WHERE payfac.fk_paiement=" . $val["paymentid"];
dol_syslog("accountancy/journal/bankjournal.php::sqlmid=" . $sqlmid, LOG_DEBUG);
$resultmid = $db->query($sqlmid);
if ($resultmid) {
$objmid = $db->fetch_object($resultmid);
$invoicestatic->fetch($objmid->id);
$ref=$langs->trans("Invoice").' '.$invoicestatic->getNomUrl(1);
}
else dol_print_error($db);
}
elseif ($tabtype[$key] == 'payment_supplier')
{
$sqlmid = 'SELECT payfac.fk_facturefourn as id';
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "paiementfourn_facturefourn as payfac";
$sqlmid .= " WHERE payfac.fk_paiementfourn=" . $val["paymentsupplierid"];
dol_syslog("accountancy/journal/bankjournal.php::sqlmid=" . $sqlmid, LOG_DEBUG);
$resultmid = $db->query($sqlmid);
if ($resultmid) {
$objmid = $db->fetch_object($resultmid);
$invoicesupplierstatic->fetch($objmid->id);
$ref=$langs->trans("SupplierInvoice").' '.$invoicesupplierstatic->getNomUrl(1);
}
else dol_print_error($db);
$sqlmid = 'SELECT payfac.fk_facturefourn as id';
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "paiementfourn_facturefourn as payfac";
$sqlmid .= " WHERE payfac.fk_paiementfourn=" . $val["paymentsupplierid"];
dol_syslog("accountancy/journal/bankjournal.php::sqlmid=" . $sqlmid, LOG_DEBUG);
$resultmid = $db->query($sqlmid);
if ($resultmid) {
$objmid = $db->fetch_object($resultmid);
$invoicesupplierstatic->fetch($objmid->id);
$ref=$langs->trans("SupplierInvoice").' '.$invoicesupplierstatic->getNomUrl(1);
}
else dol_print_error($db);
}
elseif ($tabtype[$key] == 'payment_expensereport')
{
$sqlmid = 'SELECT payer.fk_expensereport as id';
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "payment_expensereport as payer";
$sqlmid .= " WHERE payer.fk_expensereport=" . $val["fk_expensereport"];
dol_syslog("accountancy/journal/bankjournal.php::sqlmid=" . $sqlmid, LOG_DEBUG);
$resultmid = $db->query($sqlmid);
if ($resultmid) {
$objmid = $db->fetch_object($resultmid);
$expensereportstatic->fetch($objmid->id);
$ref=$langs->trans("ExpenseReport").' '.$expensereportstatic->getNomUrl(1);
}
else dol_print_error($db);
$sqlmid = 'SELECT payer.fk_expensereport as id';
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "payment_expensereport as payer";
$sqlmid .= " WHERE payer.fk_expensereport=" . $val["fk_expensereport"];
dol_syslog("accountancy/journal/bankjournal.php::sqlmid=" . $sqlmid, LOG_DEBUG);
$resultmid = $db->query($sqlmid);
if ($resultmid) {
$objmid = $db->fetch_object($resultmid);
$expensereportstatic->fetch($objmid->id);
$ref=$langs->trans("ExpenseReport").' '.$expensereportstatic->getNomUrl(1);
}
else dol_print_error($db);
}
elseif ($tabtype[$key] == 'payment_vat')
{
$sqlmid = 'SELECT v.rowid as id';
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "tva as v";
$sqlmid .= " WHERE v.rowid=" . $val["paymentvatid"];
dol_syslog("accountancy/journal/bankjournal.php::sqlmid=" . $sqlmid, LOG_DEBUG);
$resultmid = $db->query($sqlmid);
if ($resultmid) {
$objmid = $db->fetch_object($resultmid);
$vatstatic->fetch($objmid->id);
$ref=$langs->trans("PaymentVat").' '.$vatstatic->getNomUrl(1);
}
else dol_print_error($db);
}
elseif ($tabtype[$key] == 'payment_donation')
{
$sqlmid = 'SELECT payd.fk_donation as id';
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "payment_donation as payd";
$sqlmid .= " WHERE payd.fk_donation=" . $val["paymentdonationid"];
dol_syslog("accountancy/journal/bankjournal.php::sqlmid=" . $sqlmid, LOG_DEBUG);
$resultmid = $db->query($sqlmid);
if ($resultmid) {
$objmid = $db->fetch_object($resultmid);
$donationstatic->fetch($objmid->id);
$ref=$langs->trans("Donation").' '.$donationstatic->getNomUrl(1);
}
else dol_print_error($db);
}
elseif ($tabtype[$key] == 'payment_salary')
{
$sqlmid = 'SELECT s.rowid as id';
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "payment_salary as s";
$sqlmid .= " WHERE s.rowid=" . $val["paymentsalid"];
dol_syslog("accountancy/journal/bankjournal.php::sqlmid=" . $sqlmid, LOG_DEBUG);
$resultmid = $db->query($sqlmid);
if ($resultmid) {
$objmid = $db->fetch_object($resultmid);
$salarystatic->fetch($objmid->id);
$ref=$langs->trans("SalaryPayment").' '.$salarystatic->getNomUrl(1);
}
else dol_print_error($db);
}
@@ -824,24 +913,24 @@ if (empty($action) || $action == 'view') {
$invoicestatic->ref = $val["ref"];
$invoicestatic->type = $val["type"];*/
// Bank
foreach ( $tabbq[$key] as $k => $mt )
foreach ( $tabbq[$key] as $k => $mt )
{
print "<tr " . $bc[$var] . ">";
print "<td><!-- Bank bank.rowid=".$key."--></td>";
print "<td>" . $date . "</td>";
print '<tr class="oddeven">';
print "<td><!-- Bank bank.rowid=".$key."--></td>";
print "<td>" . $date . "</td>";
print "<td>" . $ref . "</td>";
print "<td>";
$accountoshow = length_accountg($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("BankAccountNotDefined").'</span>';
print '<span class="error">'.$langs->trans("BankAccountNotDefined").'</span>';
}
else print $accountoshow;
print "</td>";
if ($val['soclib'] == '') {
print "<td>" . $bank_code_journal->label . " - " . $val["ref"] . "</td>";
print "<td>" . $bankstatic->label . " - " . $reflabel . "</td>";
} else {
print "<td>" . $bank_code_journal->label . " - " . $val['soclib'] . "</td>";
print "<td>" . $bankstatic->label . " - " . $val['soclib'] . "</td>";
}
print "<td>" . $val["type_payment"] . "</td>";
print "<td align='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
@@ -853,17 +942,17 @@ if (empty($action) || $action == 'view') {
if (is_array($tabtp[$key])) {
foreach ( $tabtp[$key] as $k => $mt ) {
if ($k != 'type') {
print "<tr " . $bc[$var] . ">";
print '<tr class="oddeven">';
print "<td><!-- Thirdparty bank.rowid=".$key." --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $ref . "</td>";
print "<td>";
$accountoshow = length_accounta($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
}
else print $accountoshow;
$accountoshow = length_accounta($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
}
else print $accountoshow;
print "</td>";
print "<td>" . $reflabel . ' ' . $val['soclib'] . "</td>";
print "<td>" . $val["type_payment"] . "</td>";
@@ -874,16 +963,16 @@ if (empty($action) || $action == 'view') {
}
} else {
foreach ( $tabbq[$key] as $k => $mt ) {
print "<tr " . $bc[$var] . ">";
print '<tr class="oddeven">';
print "<td><!-- Wait bank.rowid=".$key." --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $ref . "</td>";
print "<td>";
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("WaitAccountNotDefined").'</span>';
}
else print length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("WaitAccountNotDefined").'</span>';
}
else print length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE);
print "</td>";
print "<td>" . $reflabel . "</td>";
print "<td>&nbsp;</td>";
@@ -892,7 +981,6 @@ if (empty($action) || $action == 'view') {
print "</tr>";
}
}
$var = ! $var;
}
print "</table>";

View File

@@ -3,7 +3,7 @@
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
*
@@ -22,22 +22,20 @@
*/
/**
* \file htdocs/accountancy/journal/expensereportsjournal.php
* \ingroup Advanced accountancy
* \brief Page with expense reports journal
* \file htdocs/accountancy/journal/expensereportsjournal.php
* \ingroup Advanced accountancy
* \brief Page with expense reports journal
*/
require '../../main.inc.php';
// Class
require_once DOL_DOCUMENT_ROOT . '/core/lib/report.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
require_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php';
require_once DOL_DOCUMENT_ROOT . '/user/class/user.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
// Langs
$langs->load("compta");
$langs->load("bills");
$langs->load("other");
@@ -45,6 +43,9 @@ $langs->load("main");
$langs->load("accountancy");
$langs->load("trips");
$id_journal = GETPOST('id_journal', 'int');
$action = GETPOST('action','aZ09');
$date_startmonth = GETPOST('date_startmonth');
$date_startday = GETPOST('date_startday');
$date_startyear = GETPOST('date_startyear');
@@ -58,12 +59,15 @@ $now = dol_now();
if ($user->societe_id > 0)
accessforbidden();
$action = GETPOST('action');
/*
* Actions
*/
// Get informations of journal
$accountingjournalstatic = new AccountingJournal($db);
$accountingjournalstatic->fetch($id_journal);
$journal = $accountingjournalstatic->code;
$journal_label = $accountingjournalstatic->label;
$year_current = strftime("%Y", dol_now());
$pastmonth = strftime("%m", dol_now()) - 1;
@@ -97,7 +101,7 @@ $sql .= " JOIN " . MAIN_DB_PREFIX . "expensereport as er ON er.rowid = erd.fk_ex
$sql .= " JOIN " . MAIN_DB_PREFIX . "user as u ON u.rowid = er.fk_user_author";
$sql .= " WHERE er.fk_statut > 0 ";
$sql .= " AND erd.fk_code_ventilation > 0 ";
$sql .= " AND er.entity IN (" . getEntity("expensereport", 0) . ")"; // We don't share object for accountancy
$sql .= " AND er.entity IN (" . getEntity('expensereport', 0) . ")"; // We don't share object for accountancy
if ($date_start && $date_end)
$sql .= " AND er.date_debut >= '" . $db->idate($date_start) . "' AND er.date_debut <= '" . $db->idate($date_end) . "'";
$sql .= " ORDER BY er.date_debut";
@@ -157,42 +161,105 @@ if ($action == 'writebookkeeping') {
{
$errorforline = 0;
foreach ( $tabttc[$key] as $k => $mt ) {
// get compte id and label
$db->begin();
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->doc_ref = $val["ref"];
$bookkeeping->date_create = $now;
$bookkeeping->doc_type = 'expense_report';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = $val["fk_expensereportdet"];
$bookkeeping->code_tiers = $tabuser[$key]['user_accountancy_code'];
$bookkeeping->label_compte = $tabuser[$key]['name'];
$bookkeeping->numero_compte = $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT;
$bookkeeping->montant = $mt;
$bookkeeping->sens = ($mt >= 0) ? 'C' : 'D';
$bookkeeping->debit = ($mt <= 0) ? $mt : 0;
$bookkeeping->credit = ($mt > 0) ? $mt : 0;
$bookkeeping->code_journal = $conf->global->ACCOUNTING_EXPENSEREPORT_JOURNAL;
$bookkeeping->fk_user_author = $user->id;
if (! $errorforline)
{
foreach ( $tabttc[$key] as $k => $mt ) {
if ($mt) {
// get compte id and label
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->doc_ref = $val["ref"];
$bookkeeping->date_create = $now;
$bookkeeping->doc_type = 'expense_report';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = $val["fk_expensereportdet"];
$bookkeeping->code_tiers = $tabuser[$key]['user_accountancy_code'];
$bookkeeping->label_compte = $tabuser[$key]['name'];
$bookkeeping->numero_compte = $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT;
$bookkeeping->montant = $mt;
$bookkeeping->sens = ($mt >= 0) ? 'C' : 'D';
$bookkeeping->debit = ($mt <= 0) ? $mt : 0;
$bookkeeping->credit = ($mt > 0) ? $mt : 0;
$bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label;
$bookkeeping->fk_user_author = $user->id;
$result = $bookkeeping->create($user);
if ($result < 0) {
$error++;
$errorforline++;
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
$result = $bookkeeping->create($user);
if ($result < 0) {
if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists
{
$error++;
$errorforline++;
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->doc_ref.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
}
else
{
$error++;
$errorforline++;
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
}
}
}
// Fees
foreach ( $tabht[$key] as $k => $mt ) {
$accountingaccount = new AccountingAccount($db);
$accountingaccount->fetch(null, $k, true);
if ($mt) {
// get compte id and label
if (! $errorforline)
{
// Fees
foreach ( $tabht[$key] as $k => $mt ) {
$accountingaccount = new AccountingAccount($db);
if ($accountingaccount->fetch(null, $k, true)) {
$accountingaccount->fetch(null, $k, true);
if ($mt) {
// get compte id and label
$accountingaccount = new AccountingAccount($db);
if ($accountingaccount->fetch(null, $k, true)) {
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->doc_ref = $val["ref"];
$bookkeeping->date_create = $now;
$bookkeeping->doc_type = 'expense_report';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = $val["fk_expensereportdet"];
$bookkeeping->code_tiers = '';
$bookkeeping->label_compte = $accountingaccount->label;
$bookkeeping->numero_compte = $k;
$bookkeeping->montant = $mt;
$bookkeeping->sens = ($mt < 0) ? 'C' : 'D';
$bookkeeping->debit = ($mt > 0) ? $mt : 0;
$bookkeeping->credit = ($mt <= 0) ? $mt : 0;
$bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label;
$bookkeeping->fk_user_author = $user->id;
$result = $bookkeeping->create($user);
if ($result < 0) {
if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists
{
$error++;
$errorforline++;
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->doc_ref.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
}
else
{
$error++;
$errorforline++;
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
}
}
}
}
if (! $errorforline)
{
// VAT
// var_dump($tabtva);
foreach ( $tabtva[$key] as $k => $mt ) {
if ($mt) {
// get compte id and label
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->doc_ref = $val["ref"];
@@ -201,77 +268,55 @@ if ($action == 'writebookkeeping') {
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = $val["fk_expensereportdet"];
$bookkeeping->code_tiers = '';
$bookkeeping->label_compte = $accountingaccount->label;
$bookkeeping->label_compte = $langs->trans("VAT"). ' '.$def_tva[$key];
$bookkeeping->numero_compte = $k;
$bookkeeping->montant = $mt;
$bookkeeping->sens = ($mt < 0) ? 'C' : 'D';
$bookkeeping->debit = ($mt > 0) ? $mt : 0;
$bookkeeping->credit = ($mt <= 0) ? $mt : 0;
$bookkeeping->code_journal = $conf->global->ACCOUNTING_EXPENSEREPORT_JOURNAL;
$bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label;
$bookkeeping->fk_user_author = $user->id;
$result = $bookkeeping->create($user);
if ($result < 0) {
$error++;
$errorforline++;
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists
{
$error++;
$errorforline++;
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->doc_ref.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
}
else
{
$error++;
$errorforline++;
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
}
}
}
// VAT
// var_dump($tabtva);
foreach ( $tabtva[$key] as $k => $mt ) {
if ($mt) {
// get compte id and label
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->doc_ref = $val["ref"];
$bookkeeping->date_create = $now;
$bookkeeping->doc_type = 'expense_report';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = $val["fk_expensereportdet"];
$bookkeeping->code_tiers = '';
$bookkeeping->label_compte = $langs->trans("VAT"). ' '.$def_tva[$key];
$bookkeeping->numero_compte = $k;
$bookkeeping->montant = $mt;
$bookkeeping->sens = ($mt < 0) ? 'C' : 'D';
$bookkeeping->debit = ($mt > 0) ? $mt : 0;
$bookkeeping->credit = ($mt <= 0) ? $mt : 0;
$bookkeeping->code_journal = $conf->global->ACCOUNTING_EXPENSEREPORT_JOURNAL;
$bookkeeping->fk_user_author = $user->id;
$result = $bookkeeping->create($user);
if ($result < 0) {
$error++;
$errorforline++;
setEventMessages($object->error, $object->errors, 'errors');
}
}
}
if (! $errorforline)
{
$db->commit();
$db->commit();
}
else
{
$db->rollback();
$db->rollback();
}
}
if (empty($error) && count($tabpay)) {
setEventMessages($langs->trans("GeneralLedgerIsWritten"), null, 'mesgs');
setEventMessages($langs->trans("GeneralLedgerIsWritten"), null, 'mesgs');
}
elseif (count($tabpay) == $error)
{
setEventMessages($langs->trans("NoNewRecordSaved"), null, 'warnings');
setEventMessages($langs->trans("NoNewRecordSaved"), null, 'warnings');
}
else
{
setEventMessages($langs->trans("GeneralLedgerSomeRecordWasNotRecorded"), null, 'warnings');
setEventMessages($langs->trans("GeneralLedgerSomeRecordWasNotRecorded"), null, 'warnings');
}
$action='';
@@ -286,9 +331,8 @@ $form = new Form($db);
$userstatic = new User($db);
// Export
if ($action == 'export_csv') {
/*if ($action == 'export_csv') {
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
$journal = $conf->global->ACCOUNTING_EXPENSEREPORT_JOURNAL;
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
@@ -393,12 +437,13 @@ if ($action == 'export_csv') {
}
}
}
*/
if (empty($action) || $action == 'view') {
llxHeader('', $langs->trans("ExpenseReportsJournal"));
$nom = $langs->trans("ExpenseReportsJournal");
$nom = $langs->trans("ExpenseReportsJournal") . ' - ' . $accountingjournalstatic->getNomUrl(1);
$nomlink = '';
$periodlink = '';
$exportlink = '';
@@ -406,17 +451,20 @@ if (empty($action) || $action == 'view') {
$description.= $langs->trans("DescJournalOnlyBindedVisible").'<br>';
$period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array (
'action' => ''
));
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV != 1 && $conf->global->ACCOUNTING_EXPORT_MODELCSV != 2) {
$varlink = 'id_journal=' . $id_journal;
journalHead($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''), '', $varlink);
/*if ($conf->global->ACCOUNTING_EXPORT_MODELCSV != 1 && $conf->global->ACCOUNTING_EXPORT_MODELCSV != 2) {
print '<input type="button" class="butActionRefused" style="float: right;" value="' . $langs->trans("Export") . '" disabled="disabled" title="' . $langs->trans('ExportNotSupported') . '"/>';
} else {
print '<input type="button" class="butAction" style="float: right;" value="' . $langs->trans("Export") . '" onclick="launch_export();" />';
}
}*/
print '<div class="tabsAction">';
print '<input type="button" class="butAction" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
print '</div>';
print '
<script type="text/javascript">
@@ -435,7 +483,7 @@ if (empty($action) || $action == 'view') {
/*
* Show result array
*/
print '<br><br>';
print '<br>';
$i = 0;
print "<table class=\"noborder\" width=\"100%\">";
@@ -449,7 +497,6 @@ if (empty($action) || $action == 'view') {
print "<td align='right'>" . $langs->trans("Credit") . "</td>";
print "</tr>\n";
$var = true;
$r = '';
$expensereportstatic = new ExpenseReport($db);
@@ -468,7 +515,7 @@ if (empty($action) || $action == 'view') {
$accountingaccount->fetch(null, $k, true);
if ($mt) {
print "<tr " . $bc[$var] . " >";
print '<tr class="oddeven">';
print "<td><!-- Fees --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $expensereportstatic->getNomUrl(1) . "</td>";
@@ -494,7 +541,7 @@ if (empty($action) || $action == 'view') {
// VAT
foreach ( $tabtva[$key] as $k => $mt ) {
if ($mt) {
print "<tr " . $bc[$var] . " >";
print '<tr class="oddeven">';
print "<td><!-- VAT --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $expensereportstatic->getNomUrl(1) . "</td>";
@@ -512,12 +559,12 @@ if (empty($action) || $action == 'view') {
print "</tr>";
}
}
print "<tr " . $bc[$var] . ">";
// Third party
foreach ( $tabttc[$key] as $k => $mt ) {
print '<tr class="oddeven">';
print "<td><!-- Thirdparty --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $date . "</td>";
print "<td>" . $expensereportstatic->getNomUrl(1) . "</td>";
$userstatic->id = $tabuser[$key]['id'];
$userstatic->name = $tabuser[$key]['name'];
@@ -525,17 +572,15 @@ if (empty($action) || $action == 'view') {
$accountoshow = length_accounta($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
}
else print $accountoshow;
print "</td>";
print "<td>" . $userstatic->getNomUrl(0, 'user', 16) . ' - ' . $langs->trans("Code_tiers") . "</td>";
print '<td align="right">' . ($mt < 0 ? - price(- $mt) : '') . "</td>";
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print "</tr>";
}
print "</tr>";
$var = ! $var;
}
print "</table>";

View File

@@ -1,11 +1,11 @@
<?php
/* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
/* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,28 +22,29 @@
*/
/**
* \file htdocs/accountancy/journal/purchasesjournal.php
* \ingroup Advanced accountancy
* \brief Page with purchases journal
* \file htdocs/accountancy/journal/purchasesjournal.php
* \ingroup Advanced accountancy
* \brief Page with purchases journal
*/
require '../../main.inc.php';
// Class
require_once DOL_DOCUMENT_ROOT . '/core/lib/report.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
// Langs
$langs->load("compta");
$langs->load("bills");
$langs->load("other");
$langs->load("main");
$langs->load("accountancy");
$id_journal = GETPOST('id_journal', 'int');
$action = GETPOST('action','aZ09');
$date_startmonth = GETPOST('date_startmonth');
$date_startday = GETPOST('date_startday');
$date_startyear = GETPOST('date_startyear');
@@ -57,13 +58,16 @@ $now = dol_now();
if ($user->societe_id > 0)
accessforbidden();
$action = GETPOST('action');
/*
* Actions
*/
// Get informations of journal
$accountingjournalstatic = new AccountingJournal($db);
$accountingjournalstatic->fetch($id_journal);
$journal = $accountingjournalstatic->code;
$journal_label = $accountingjournalstatic->label;
$year_current = strftime("%Y", dol_now());
$pastmonth = strftime("%m", dol_now()) - 1;
$pastmonthyear = $year_current;
@@ -96,7 +100,7 @@ $sql .= " JOIN " . MAIN_DB_PREFIX . "facture_fourn as f ON f.rowid = fd.fk_factu
$sql .= " JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc";
$sql .= " WHERE f.fk_statut > 0 ";
$sql .= " AND fd.fk_code_ventilation > 0 ";
$sql .= " AND f.entity IN (" . getEntity("facture_fourn", 0) . ")"; // We don't share object for accountancy
$sql .= " AND f.entity IN (" . getEntity('facture_fourn', 0) . ")"; // We don't share object for accountancy
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS))
$sql .= " AND f.type IN (0,1,2)";
else
@@ -109,6 +113,7 @@ dol_syslog('accountancy/journal/purchasesjournal.php:: $sql=' . $sql);
$result = $db->query($sql);
if ($result) {
$num = $db->num_rows($result);
// les variables
$cptfour = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER)) ? $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER : $langs->trans("CodeNotDef");
$cpttva = (! empty($conf->global->ACCOUNTING_VAT_BUY_ACCOUNT)) ? $conf->global->ACCOUNTING_VAT_BUY_ACCOUNT : $langs->trans("CodeNotDef");
@@ -123,8 +128,10 @@ if ($result) {
$i = 0;
while ( $i < $num ) {
$obj = $db->fetch_object($result);
// contrôles
$compta_soc = (! empty($obj->code_compta_fournisseur)) ? $obj->code_compta_fournisseur : $cptfour;
$compta_prod = $obj->compte;
if (empty($compta_prod)) {
if ($obj->product_type == 0)
@@ -144,14 +151,21 @@ if ($result) {
$tabfac[$obj->rowid]["type"] = $obj->type;
$tabfac[$obj->rowid]["description"] = $obj->description;
$tabfac[$obj->rowid]["fk_facturefourndet"] = $obj->fdid;
//$tabfac[$obj->rowid]["fk_facturefourndet"] = $obj->fdid;
// Avoid warnings
if (! isset($tabttc[$obj->rowid][$compta_soc])) $tabttc[$obj->rowid][$compta_soc] = 0;
if (! isset($tabht[$obj->rowid][$compta_prod])) $tabht[$obj->rowid][$compta_prod] = 0;
if (! isset($tabtva[$obj->rowid][$compta_tva])) $tabtva[$obj->rowid][$compta_tva] = 0;
$tabttc[$obj->rowid][$compta_soc] += $obj->total_ttc;
$tabht[$obj->rowid][$compta_prod] += $obj->total_ht;
$tabtva[$obj->rowid][$compta_tva] += $obj->total_tva;
$tabcompany[$obj->rowid] = array (
'id' => $obj->socid,
'name' => $obj->name,
'code_fournisseur' => $obj->code_compta_fournisseur
'code_fournisseur' => $obj->code_fournisseur,
'code_compta_fournisseur' => $compta_soc
);
$i ++;
@@ -165,12 +179,12 @@ if ($action == 'writebookkeeping') {
$now = dol_now();
$error = 0;
foreach ($tabfac as $key => $val)
foreach ($tabfac as $key => $val) // Loop on each invoice
{
$errorforline = 0;
$db->begin();
$errorforline = 0;
$db->begin();
$companystatic = new Societe($db);
$invoicestatic = new FactureFournisseur($db);
@@ -188,64 +202,91 @@ if ($action == 'writebookkeeping') {
$companystatic->code_fournisseur = $tabcompany[$key]['code_fournisseur'];
$companystatic->client = $tabcompany[$key]['code_client'];
foreach ( $tabttc[$key] as $k => $mt ) {
// get compte id and label
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->doc_ref = $val["ref"];
$bookkeeping->date_create = $now;
$bookkeeping->doc_type = 'supplier_invoice';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = $val["fk_facturefourndet"];
$bookkeeping->code_tiers = $tabcompany[$key]['code_fournisseur'];
$bookkeeping->label_compte = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("Code_tiers");
$bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER;
$bookkeeping->montant = $mt;
$bookkeeping->sens = ($mt >= 0) ? 'C' : 'D';
$bookkeeping->debit = ($mt <= 0) ? $mt : 0;
$bookkeeping->credit = ($mt > 0) ? $mt : 0;
$bookkeeping->code_journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL;
$bookkeeping->fk_user_author = $user->id;
$result = $bookkeeping->create($user);
if ($result < 0) {
$error++;
$errorforline++;
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
// Product / Service
foreach ( $tabht[$key] as $k => $mt ) {
$accountingaccount = new AccountingAccount($db);
$accountingaccount->fetch(null, $k, true);
if ($mt) {
if (! $errorforline)
{
foreach ( $tabttc[$key] as $k => $mt ) {
// get compte id and label
$accountingaccount = new AccountingAccount($db);
if ($accountingaccount->fetch(null, $k, true)) {
if ($mt) {
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->doc_ref = $val["ref"];
$bookkeeping->date_create = $now;
$bookkeeping->doc_type = 'supplier_invoice';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = $val["fk_facturefourndet"];
$bookkeeping->code_tiers = '';
$bookkeeping->label_compte = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $accountingaccount->label;
$bookkeeping->numero_compte = $k;
$bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add
$bookkeeping->code_tiers = $tabcompany[$key]['code_fournisseur'];
$bookkeeping->label_compte = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("Code_tiers");
$bookkeeping->numero_compte = $tabcompany[$key]['code_compta_fournisseur'];
$bookkeeping->montant = $mt;
$bookkeeping->sens = ($mt < 0) ? 'C' : 'D';
$bookkeeping->debit = ($mt > 0) ? $mt : 0;
$bookkeeping->credit = ($mt <= 0) ? $mt : 0;
$bookkeeping->code_journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL;
$bookkeeping->sens = ($mt >= 0) ? 'C' : 'D';
$bookkeeping->debit = ($mt <= 0) ? $mt : 0;
$bookkeeping->credit = ($mt > 0) ? $mt : 0;
$bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label;
$bookkeeping->fk_user_author = $user->id;
$result = $bookkeeping->create($user);
if ($result < 0) {
$error++;
$errorforline++;
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists
{
$error++;
$errorforline++;
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->doc_ref.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
}
else
{
$error++;
$errorforline++;
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
}
}
}
// Product / Service
if (! $errorforline)
{
foreach ( $tabht[$key] as $k => $mt ) {
$accountingaccount = new AccountingAccount($db);
$accountingaccount->fetch(null, $k, true);
if ($mt) {
// get compte id and label
$accountingaccount = new AccountingAccount($db);
if ($accountingaccount->fetch(null, $k, true)) {
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->doc_ref = $val["ref"];
$bookkeeping->date_create = $now;
$bookkeeping->doc_type = 'supplier_invoice';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add
$bookkeeping->code_tiers = '';
$bookkeeping->label_compte = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $accountingaccount->label;
$bookkeeping->numero_compte = $k;
$bookkeeping->montant = $mt;
$bookkeeping->sens = ($mt < 0) ? 'C' : 'D';
$bookkeeping->debit = ($mt > 0) ? $mt : 0;
$bookkeeping->credit = ($mt <= 0) ? $mt : 0;
$bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label;
$bookkeeping->fk_user_author = $user->id;
$result = $bookkeeping->create($user);
if ($result < 0) {
if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists
{
$error++;
$errorforline++;
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->doc_ref.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
}
else
{
$error++;
$errorforline++;
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
}
}
}
@@ -253,60 +294,69 @@ if ($action == 'writebookkeeping') {
// VAT
// var_dump($tabtva);
foreach ( $tabtva[$key] as $k => $mt ) {
if ($mt) {
// get compte id and label
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->doc_ref = $val["ref"];
$bookkeeping->date_create = $now;
$bookkeeping->doc_type = 'supplier_invoice';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = $val["fk_facturefourndet"];
$bookkeeping->code_tiers = '';
$bookkeeping->label_compte = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("VAT"). ' '.$def_tva[$key];
$bookkeeping->numero_compte = $k;
$bookkeeping->montant = $mt;
$bookkeeping->sens = ($mt < 0) ? 'C' : 'D';
$bookkeeping->debit = ($mt > 0) ? $mt : 0;
$bookkeeping->credit = ($mt <= 0) ? $mt : 0;
$bookkeeping->code_journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL;
$bookkeeping->fk_user_author = $user->id;
if (! $errorforline)
{
foreach ( $tabtva[$key] as $k => $mt ) {
if ($mt) {
// get compte id and label
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->doc_ref = $val["ref"];
$bookkeeping->date_create = $now;
$bookkeeping->doc_type = 'supplier_invoice';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add
$bookkeeping->code_tiers = '';
$bookkeeping->label_compte = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("VAT"). ' '.$def_tva[$key];
$bookkeeping->numero_compte = $k;
$bookkeeping->montant = $mt;
$bookkeeping->sens = ($mt < 0) ? 'C' : 'D';
$bookkeeping->debit = ($mt > 0) ? $mt : 0;
$bookkeeping->credit = ($mt <= 0) ? $mt : 0;
$bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label;
$bookkeeping->fk_user_author = $user->id;
$result = $bookkeeping->create($user);
if ($result < 0) {
$error++;
$errorforline++;
setEventMessages($object->error, $object->errors, 'errors');
$result = $bookkeeping->create($user);
if ($result < 0) {
if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists
{
$error++;
$errorforline++;
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->doc_ref.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
}
else
{
$error++;
$errorforline++;
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
}
}
}
if (! $errorforline)
{
$db->commit();
$db->commit();
}
else
{
$db->rollback();
$db->rollback();
}
}
if (empty($error) && count($tabpay)) {
setEventMessages($langs->trans("GeneralLedgerIsWritten"), null, 'mesgs');
setEventMessages($langs->trans("GeneralLedgerIsWritten"), null, 'mesgs');
}
elseif (count($tabpay) == $error)
{
setEventMessages($langs->trans("NoNewRecordSaved"), null, 'warnings');
setEventMessages($langs->trans("NoNewRecordSaved"), null, 'warnings');
}
else
{
setEventMessages($langs->trans("GeneralLedgerSomeRecordWasNotRecorded"), null, 'warnings');
setEventMessages($langs->trans("GeneralLedgerSomeRecordWasNotRecorded"), null, 'warnings');
}
$action='';
}
@@ -319,7 +369,7 @@ $form = new Form($db);
$companystatic = new Fournisseur($db);
// Export
if ($action == 'export_csv') {
/*if ($action == 'export_csv') {
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
$journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL;
@@ -437,12 +487,13 @@ if ($action == 'export_csv') {
}
}
}
*/
if (empty($action) || $action == 'view') {
llxHeader('', $langs->trans("PurchasesJournal"));
$nom = $langs->trans("PurchasesJournal");
$nom = $langs->trans("PurchasesJournal") . ' - ' . $accountingjournalstatic->getNomUrl(1);
$nomlink = '';
$periodlink = '';
$exportlink = '';
@@ -456,49 +507,52 @@ if (empty($action) || $action == 'view') {
}
$period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array (
'action' => ''
));
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV != 1 && $conf->global->ACCOUNTING_EXPORT_MODELCSV != 2) {
$varlink = 'id_journal=' . $id_journal;
journalHead($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''), '', $varlink);
/*if ($conf->global->ACCOUNTING_EXPORT_MODELCSV != 1 && $conf->global->ACCOUNTING_EXPORT_MODELCSV != 2) {
print '<input type="button" class="butActionRefused" style="float: right;" value="' . $langs->trans("Export") . '" disabled="disabled" title="' . $langs->trans('ExportNotSupported') . '"/>';
} else {
print '<input type="button" class="butAction" style="float: right;" value="' . $langs->trans("Export") . '" onclick="launch_export();" />';
}
}*/
print '<div class="tabsAction">';
print '<input type="button" class="butAction" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
print '</div>';
print '
<script type="text/javascript">
function launch_export() {
$("div.fiche div.tabBar form input[name=\"action\"]").val("export_csv");
$("div.fiche div.tabBar form input[name=\"action\"]").val("export_csv");
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
}
function writebookkeeping() {
$("div.fiche div.tabBar form input[name=\"action\"]").val("writebookkeeping");
$("div.fiche div.tabBar form input[name=\"action\"]").val("writebookkeeping");
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
}
</script>';
/*
* Show result array
*/
print '<br><br>';
print '<br>';
$i = 0;
print "<table class=\"noborder\" width=\"100%\">";
print "<tr class=\"liste_titre\">";
// /print "<td>".$langs->trans("JournalNum")."</td>";
print "<td></td>";
print "<td>" . $langs->trans("Date") . "</td>";
print "<td>" . $langs->trans("Piece") . ' (' . $langs->trans("InvoiceRef") . ")</td>";
print "<td>" . $langs->trans("AccountAccounting") . "</td>";
print "<t><td>" . $langs->trans("Type") . "</td><td align='right'>" . $langs->trans("Debit") . "</td><td align='right'>" . $langs->trans("Credit") . "</td>";
print "<td>" . $langs->trans("Type") . "</td>";
print "<td align='right'>" . $langs->trans("Debit") . "</td>";
print "<td align='right'>" . $langs->trans("Credit") . "</td>";
print "</tr>\n";
$var = true;
$r = '';
$invoicestatic = new FactureFournisseur($db);
@@ -521,17 +575,17 @@ if (empty($action) || $action == 'view') {
$accountingaccount->fetch(null, $k, true);
if ($mt) {
print "<tr " . $bc[$var] . " >";
print '<tr class="oddeven">';
print "<td><!-- Product --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
print "<td>";
$accountoshow = length_accountg($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("ProductAccountNotDefined").'</span>';
}
else print $accountoshow;
$accountoshow = length_accountg($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("ProductAccountNotDefined").'</span>';
}
else print $accountoshow;
print "</td>";
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
@@ -542,20 +596,21 @@ if (empty($action) || $action == 'view') {
print "</tr>";
}
}
// VAT
foreach ( $tabtva[$key] as $k => $mt ) {
if ($mt) {
print "<tr " . $bc[$var] . " >";
print '<tr class="oddeven">';
print "<td><!-- VAT --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
print "<td>";
$accountoshow = length_accountg($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("VatAccountNotDefined").'</span>';
}
else print $accountoshow;
$accountoshow = length_accountg($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("VatAccountNotDefined").'</span>';
}
else print $accountoshow;
print "</td>";
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("VAT"). ' '.$def_tva[$key]. "</td>";
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
@@ -563,12 +618,12 @@ if (empty($action) || $action == 'view') {
print "</tr>";
}
}
print "<tr " . $bc[$var] . ">";
// Third party
foreach ( $tabttc[$key] as $k => $mt ) {
print '<tr class="oddeven">';
print "<td><!-- Thirdparty --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
@@ -576,20 +631,18 @@ if (empty($action) || $action == 'view') {
$accountoshow = length_accounta($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
}
else print $accountoshow;
print "</td>";
print "</td>";
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("Code_tiers") . "</td>";
// print "</td><td>" . $langs->trans("ThirdParty");
// print ' (' . $companystatic->getNomUrl(0, 'supplier', 16) . ')';
// print "</td>";
print '<td align="right">' . ($mt < 0 ? - price(- $mt) : '') . "</td>";
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print "</tr>";
}
print "</tr>";
$var = ! $var;
}
print "</table>";

View File

@@ -1,13 +1,13 @@
<?php
/* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
/* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -29,17 +29,15 @@
* \brief Page with sells journal
*/
require '../../main.inc.php';
// Class
require_once DOL_DOCUMENT_ROOT . '/core/lib/report.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
require_once DOL_DOCUMENT_ROOT . '/societe/class/client.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
// Langs
$langs->load("commercial");
$langs->load("compta");
$langs->load("bills");
@@ -47,6 +45,9 @@ $langs->load("other");
$langs->load("main");
$langs->load("accountancy");
$id_journal = GETPOST('id_journal', 'int');
$action = GETPOST('action','aZ09');
$date_startmonth = GETPOST('date_startmonth');
$date_startday = GETPOST('date_startday');
$date_startyear = GETPOST('date_startyear');
@@ -60,19 +61,23 @@ $now = dol_now();
if ($user->societe_id > 0)
accessforbidden();
$action = GETPOST('action');
/*
* Actions
*/
// Get informations of journal
$accountingjournalstatic = new AccountingJournal($db);
$accountingjournalstatic->fetch($id_journal);
$journal = $accountingjournalstatic->code;
$journal_label = $accountingjournalstatic->label;
$year_current = strftime("%Y", dol_now());
$pastmonth = strftime("%m", dol_now()) - 1;
$pastmonthyear = $year_current;
if ($pastmonth == 0) {
$pastmonth = 12;
$pastmonthyear --;
$pastmonth = 12;
$pastmonthyear --;
}
$date_start = dol_mktime(0, 0, 0, $date_startmonth, $date_startday, $date_startyear);
@@ -80,8 +85,8 @@ $date_end = dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear);
if (empty($date_start) || empty($date_end)) // We define date_start and date_end
{
$date_start = dol_get_first_day($pastmonthyear, $pastmonth, false);
$date_end = dol_get_last_day($pastmonthyear, $pastmonth, false);
$date_start = dol_get_first_day($pastmonthyear, $pastmonth, false);
$date_end = dol_get_last_day($pastmonthyear, $pastmonth, false);
}
$p = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY);
@@ -99,233 +104,277 @@ $sql .= " JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
$sql .= " JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_tva as ct ON fd.tva_tx = ct.taux AND ct.fk_pays = '" . $idpays . "'";
$sql .= " WHERE fd.fk_code_ventilation > 0";
$sql .= " AND f.entity IN (".getEntity('facture', 0).')'; // We don't share object for accountancy
$sql .= " AND f.fk_statut > 0";
$sql .= " AND f.entity IN (".getEntity('facture', 0).')'; // We don't share object for accountancy
$sql .= " AND f.fk_statut > 0"; // TODO Facture annulée ?
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
} else {
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_STANDARD . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_STANDARD . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
}
$sql .= " AND fd.product_type IN (0,1)";
if ($date_start && $date_end)
$sql .= " AND f.datef >= '" . $db->idate($date_start) . "' AND f.datef <= '" . $db->idate($date_end) . "'";
$sql .= " AND f.datef >= '" . $db->idate($date_start) . "' AND f.datef <= '" . $db->idate($date_end) . "'";
$sql .= " ORDER BY f.datef";
dol_syslog('accountancy/journal/sellsjournal.php', LOG_DEBUG);
$result = $db->query($sql);
if ($result) {
$tabfac = array ();
$tabht = array ();
$tabtva = array ();
$def_tva = array ();
$tabttc = array ();
$tabcompany = array ();
$tabfac = array ();
$tabht = array ();
$tabtva = array ();
$def_tva = array ();
$tabttc = array ();
$tabcompany = array ();
$num = $db->num_rows($result);
$i = 0;
$num = $db->num_rows($result);
$i = 0;
while ( $i < $num ) {
$obj = $db->fetch_object($result);
// les variables
$cptcli = (! empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER)) ? $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef");
$compta_soc = (! empty($obj->code_compta)) ? $obj->code_compta : $cptcli;
$cptcli = (! empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER)) ? $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef");
$compta_prod = $obj->compte;
if (empty($compta_prod)) {
if ($obj->product_type == 0)
$compta_prod = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT)) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef");
else
$compta_prod = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT)) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef");
}
$cpttva = (! empty($conf->global->ACCOUNTING_VAT_SOLD_ACCOUNT)) ? $conf->global->ACCOUNTING_VAT_SOLD_ACCOUNT : $langs->trans("CodeNotDef");
$compta_tva = (! empty($obj->account_tva) ? $obj->account_tva : $cpttva);
while ( $i < $num ) {
$obj = $db->fetch_object($result);
// les variables
$compta_soc = (! empty($obj->code_compta)) ? $obj->code_compta : $cptcli;
$compta_prod = $obj->compte;
if (empty($compta_prod)) {
if ($obj->product_type == 0)
$compta_prod = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT)) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef");
else
$compta_prod = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT)) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef");
}
$cpttva = (! empty($conf->global->ACCOUNTING_VAT_SOLD_ACCOUNT)) ? $conf->global->ACCOUNTING_VAT_SOLD_ACCOUNT : $langs->trans("CodeNotDef");
$compta_tva = (! empty($obj->account_tva) ? $obj->account_tva : $cpttva);
//Define array for display vat tx
$def_tva[$obj->rowid]=price($obj->tva_tx);
//Define array for display vat tx
$def_tva[$obj->rowid]=price($obj->tva_tx);
// Situation invoices handling
$line = new FactureLigne($db);
$line->fetch($obj->fdid);
$prev_progress = $line->get_prev_progress($obj->fdid);
if ($obj->type == Facture::TYPE_SITUATION) {
// Avoid divide by 0
if ($obj->situation_percent == 0) {
$situation_ratio = 0;
} else {
$situation_ratio = ($obj->situation_percent - $prev_progress) / $obj->situation_percent;
}
} else {
$situation_ratio = 1;
}
// Situation invoices handling
$line = new FactureLigne($db);
$line->fetch($obj->fdid);
$prev_progress = $line->get_prev_progress($obj->fdid);
if ($obj->type == Facture::TYPE_SITUATION) {
// Avoid divide by 0
if ($obj->situation_percent == 0) {
$situation_ratio = 0;
} else {
$situation_ratio = ($obj->situation_percent - $prev_progress) / $obj->situation_percent;
}
} else {
$situation_ratio = 1;
}
// Invoice lines
$tabfac[$obj->rowid]["date"] = $db->jdate($obj->df);
$tabfac[$obj->rowid]["ref"] = $obj->facnumber;
$tabfac[$obj->rowid]["type"] = $obj->type;
$tabfac[$obj->rowid]["description"] = $obj->label_compte;
$tabfac[$obj->rowid]["fk_facturedet"] = $obj->fdid;
if (! isset($tabttc[$obj->rowid][$compta_soc]))
$tabttc[$obj->rowid][$compta_soc] = 0;
if (! isset($tabht[$obj->rowid][$compta_prod]))
$tabht[$obj->rowid][$compta_prod] = 0;
if (! isset($tabtva[$obj->rowid][$compta_tva]))
$tabtva[$obj->rowid][$compta_tva] = 0;
$tabttc[$obj->rowid][$compta_soc] += $obj->total_ttc * $situation_ratio;
$tabht[$obj->rowid][$compta_prod] += $obj->total_ht * $situation_ratio;
$tabtva[$obj->rowid][$compta_tva] += $obj->total_tva * $situation_ratio;
$tabcompany[$obj->rowid] = array (
'id' => $obj->socid,
'name' => $obj->name,
'code_client' => $obj->code_compta
);
// Invoice lines
$tabfac[$obj->rowid]["date"] = $db->jdate($obj->df);
$tabfac[$obj->rowid]["ref"] = $obj->facnumber;
$tabfac[$obj->rowid]["type"] = $obj->type;
$tabfac[$obj->rowid]["description"] = $obj->label_compte;
//$tabfac[$obj->rowid]["fk_facturedet"] = $obj->fdid;
$i ++;
}
// Avoid warnings
if (! isset($tabttc[$obj->rowid][$compta_soc])) $tabttc[$obj->rowid][$compta_soc] = 0;
if (! isset($tabht[$obj->rowid][$compta_prod])) $tabht[$obj->rowid][$compta_prod] = 0;
if (! isset($tabtva[$obj->rowid][$compta_tva])) $tabtva[$obj->rowid][$compta_tva] = 0;
$tabttc[$obj->rowid][$compta_soc] += $obj->total_ttc * $situation_ratio;
$tabht[$obj->rowid][$compta_prod] += $obj->total_ht * $situation_ratio;
$tabtva[$obj->rowid][$compta_tva] += $obj->total_tva * $situation_ratio;
$tabcompany[$obj->rowid] = array (
'id' => $obj->socid,
'name' => $obj->name,
'code_client' => $obj->code_client,
'code_compta' => $compta_soc
);
$i ++;
}
} else {
dol_print_error($db);
dol_print_error($db);
}
// Bookkeeping Write
if ($action == 'writebookkeeping') {
$now = dol_now();
$error = 0;
$now = dol_now();
$error = 0;
foreach ( $tabfac as $key => $val ) {
$errorforline = 0;
foreach ( $tabfac as $key => $val ) { // Loop on each invoice
$db->begin();
$errorforline = 0;
$companystatic = new Societe($db);
$invoicestatic = new Facture($db);
$db->begin();
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
$companystatic = new Societe($db);
$invoicestatic = new Facture($db);
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
$companystatic->code_compta = $tabcompany[$key]['code_compta'];
$companystatic->code_compta_fournisseur = $tabcompany[$key]['code_compta_fournisseur'];
$companystatic->code_client = $tabcompany[$key]['code_client'];
$companystatic->code_fournisseur = $tabcompany[$key]['code_fournisseur'];
$companystatic->client = $tabcompany[$key]['code_client'];
$companystatic->client = $tabcompany[$key]['code_client'];
$invoicestatic->id = $key;
$invoicestatic->ref = (string) $val["ref"];
$invoicestatic->id = $key;
$invoicestatic->ref = (string) $val["ref"];
foreach ( $tabttc[$key] as $k => $mt ) {
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->doc_ref = $val["ref"];
$bookkeeping->date_create = $now;
$bookkeeping->doc_type = 'customer_invoice';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = $val["fk_facturedet"];
$bookkeeping->code_tiers = $tabcompany[$key]['code_client'];
$bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER;
// $bookkeeping->label_compte = $tabcompany[$key]['name'];
$bookkeeping->label_compte = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("Code_tiers");
$bookkeeping->montant = $mt;
$bookkeeping->sens = ($mt >= 0) ? 'D' : 'C';
$bookkeeping->debit = ($mt >= 0) ? $mt : 0;
$bookkeeping->credit = ($mt < 0) ? $mt : 0;
$bookkeeping->code_journal = $conf->global->ACCOUNTING_SELL_JOURNAL;
$bookkeeping->fk_user_author = $user->id;
// Thirdparty
if (! $errorforline)
{
foreach ( $tabttc[$key] as $k => $mt ) {
if ($mt) {
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->doc_ref = $val["ref"];
$bookkeeping->date_create = $now;
$bookkeeping->doc_type = 'customer_invoice';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add
$bookkeeping->code_tiers = $tabcompany[$key]['code_client'];
$bookkeeping->numero_compte = $tabcompany[$key]['code_compta'];
// $bookkeeping->label_compte = $tabcompany[$key]['name'];
$bookkeeping->label_compte = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("Code_tiers");
$bookkeeping->montant = $mt;
$bookkeeping->sens = ($mt >= 0) ? 'D' : 'C';
$bookkeeping->debit = ($mt >= 0) ? $mt : 0;
$bookkeeping->credit = ($mt < 0) ? $mt : 0;
$bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label;
$bookkeeping->fk_user_author = $user->id;
$result = $bookkeeping->create($user);
if ($result < 0) {
$error++;
$errorforline++;
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
$result = $bookkeeping->create($user);
if ($result < 0) {
if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists
{
$error++;
$errorforline++;
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->doc_ref.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
}
else
{
$error++;
$errorforline++;
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
}
}
}
// Product / Service
foreach ( $tabht[$key] as $k => $mt ) {
if ($mt) {
// get compte id and label
$accountingaccount = new AccountingAccount($db);
if ($accountingaccount->fetch(null, $k, true)) {
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->doc_ref = $val["ref"];
$bookkeeping->date_create = $now;
$bookkeeping->doc_type = 'customer_invoice';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = $val["fk_facturedet"];
$bookkeeping->code_tiers = '';
$bookkeeping->numero_compte = $k;
$bookkeeping->label_compte = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $accountingaccount->label;
$bookkeeping->montant = $mt;
$bookkeeping->sens = ($mt < 0) ? 'D' : 'C';
$bookkeeping->debit = ($mt < 0) ? $mt : 0;
$bookkeeping->credit = ($mt >= 0) ? $mt : 0;
$bookkeeping->code_journal = $conf->global->ACCOUNTING_SELL_JOURNAL;
$bookkeeping->fk_user_author = $user->id;
// Product / Service
if (! $errorforline)
{
foreach ( $tabht[$key] as $k => $mt ) {
if ($mt) {
// get compte id and label
$accountingaccount = new AccountingAccount($db);
if ($accountingaccount->fetch(null, $k, true)) {
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->doc_ref = $val["ref"];
$bookkeeping->date_create = $now;
$bookkeeping->doc_type = 'customer_invoice';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add;
$bookkeeping->code_tiers = '';
$bookkeeping->numero_compte = $k;
$bookkeeping->label_compte = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $accountingaccount->label;
$bookkeeping->montant = $mt;
$bookkeeping->sens = ($mt < 0) ? 'D' : 'C';
$bookkeeping->debit = ($mt < 0) ? $mt : 0;
$bookkeeping->credit = ($mt >= 0) ? $mt : 0;
$bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label;
$bookkeeping->fk_user_author = $user->id;
$result = $bookkeeping->create($user);
if ($result < 0) {
$error++;
$errorforline++;
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
}
}
$result = $bookkeeping->create($user);
if ($result < 0) {
if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists
{
$error++;
$errorforline++;
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->doc_ref.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
}
else
{
$error++;
$errorforline++;
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
}
}
}
}
// VAT
// var_dump($tabtva);
foreach ( $tabtva[$key] as $k => $mt ) {
if ($mt) {
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->doc_ref = $val["ref"];
$bookkeeping->date_create = $now;
$bookkeeping->doc_type = 'customer_invoice';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = $val["fk_facturedet"];
$bookkeeping->code_tiers = '';
$bookkeeping->numero_compte = $k;
$bookkeeping->label_compte = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT").' '.$def_tva[$key];
$bookkeeping->montant = $mt;
$bookkeeping->sens = ($mt < 0) ? 'D' : 'C';
$bookkeeping->debit = ($mt < 0) ? $mt : 0;
$bookkeeping->credit = ($mt >= 0) ? $mt : 0;
$bookkeeping->code_journal = $conf->global->ACCOUNTING_SELL_JOURNAL;
$bookkeeping->fk_user_author = $user->id;
// VAT
// var_dump($tabtva);
if (! $errorforline)
{
foreach ( $tabtva[$key] as $k => $mt ) {
if ($mt) {
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->doc_ref = $val["ref"];
$bookkeeping->date_create = $now;
$bookkeeping->doc_type = 'customer_invoice';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add
$bookkeeping->code_tiers = '';
$bookkeeping->numero_compte = $k;
$bookkeeping->label_compte = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT").' '.$def_tva[$key];
$bookkeeping->montant = $mt;
$bookkeeping->sens = ($mt < 0) ? 'D' : 'C';
$bookkeeping->debit = ($mt < 0) ? $mt : 0;
$bookkeeping->credit = ($mt >= 0) ? $mt : 0;
$bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label;
$bookkeeping->fk_user_author = $user->id;
$result = $bookkeeping->create($user);
if ($result < 0) {
$error++;
$errorforline++;
setEventMessages($object->error, $object->errors, 'errors');
}
}
}
$result = $bookkeeping->create($user);
if ($result < 0) {
if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists
{
$error++;
$errorforline++;
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->doc_ref.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
}
else
{
$error++;
$errorforline++;
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
}
}
}
if (! $errorforline)
{
$db->commit();
}
else
{
$db->rollback();
}
if (! $errorforline)
{
$db->commit();
}
else
{
$db->rollback();
}
}
}
if (empty($error) && count($tabpay) > 0) {
setEventMessages($langs->trans("GeneralLedgerIsWritten"), null, 'mesgs');
}
elseif (count($tabpay) == $error)
{
setEventMessages($langs->trans("NoNewRecordSaved"), null, 'warnings');
}
else
{
setEventMessages($langs->trans("GeneralLedgerSomeRecordWasNotRecorded"), null, 'warnings');
}
$action='';
if (empty($error) && count($tabpay) > 0) {
setEventMessages($langs->trans("GeneralLedgerIsWritten"), null, 'mesgs');
}
elseif (count($tabpay) == $error)
{
setEventMessages($langs->trans("NoNewRecordSaved"), null, 'warnings');
}
else
{
setEventMessages($langs->trans("GeneralLedgerSomeRecordWasNotRecorded"), null, 'warnings');
}
$action='';
}
@@ -337,132 +386,134 @@ if ($action == 'writebookkeeping') {
$form = new Form($db);
// Export
if ($action == 'export_csv') {
/*if ($action == 'export_csv') {
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
$sell_journal = $conf->global->ACCOUNTING_SELL_JOURNAL;
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
$sell_journal = $conf->global->ACCOUNTING_SELL_JOURNAL;
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
$companystatic = new Client($db);
$companystatic = new Client($db);
// Model Cegid Expert Export
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) {
$sep = ";";
// Model Cegid Expert Export
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) {
$sep = ";";
foreach ( $tabfac as $key => $val ) {
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
$companystatic->client = $tabcompany[$key]['code_client'];
foreach ( $tabfac as $key => $val ) {
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
$companystatic->client = $tabcompany[$key]['code_client'];
$invoicestatic->id = $key;
$invoicestatic->ref = $val["ref"];
$invoicestatic->id = $key;
$invoicestatic->ref = $val["ref"];
$date = dol_print_date($val["date"], '%d%m%Y');
$date = dol_print_date($val["date"], '%d%m%Y');
foreach ( $tabttc[$key] as $k => $mt ) {
print $date . $sep;
print $sell_journal . $sep;
print length_accountg($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) . $sep;
print length_accounta(html_entity_decode($k)) . $sep;
print ($mt < 0 ? 'C' : 'D') . $sep;
print ($mt <= 0 ? price(- $mt) : $mt) . $sep;
print dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("Code_tiers") . $sep;
print $val["ref"];
print "\n";
}
foreach ( $tabttc[$key] as $k => $mt ) {
print $date . $sep;
print $sell_journal . $sep;
print length_accountg($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) . $sep;
print length_accounta(html_entity_decode($k)) . $sep;
print ($mt < 0 ? 'C' : 'D') . $sep;
print ($mt <= 0 ? price(- $mt) : $mt) . $sep;
print dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("Code_tiers") . $sep;
print $val["ref"];
print "\n";
}
// Product / Service
foreach ( $tabht[$key] as $k => $mt ) {
$accountingaccount_static = new AccountingAccount($db);
if ($accountingaccount_static->fetch(null, $k, true)) {
print $date . $sep;
print $sell_journal . $sep;
print length_accountg(html_entity_decode($k)) . $sep;
print $sep;
print ($mt < 0 ? 'D' : 'C') . $sep;
print ($mt <= 0 ? price(- $mt) : $mt) . $sep;
print dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $accountingaccount_static->label . $sep;
print $val["ref"];
print "\n";
}
}
// Product / Service
foreach ( $tabht[$key] as $k => $mt ) {
$accountingaccount_static = new AccountingAccount($db);
if ($accountingaccount_static->fetch(null, $k, true)) {
print $date . $sep;
print $sell_journal . $sep;
print length_accountg(html_entity_decode($k)) . $sep;
print $sep;
print ($mt < 0 ? 'D' : 'C') . $sep;
print ($mt <= 0 ? price(- $mt) : $mt) . $sep;
print dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $accountingaccount_static->label . $sep;
print $val["ref"];
print "\n";
}
}
// TVA
foreach ( $tabtva[$key] as $k => $mt ) {
if ($mt) {
print $date . $sep;
print $sell_journal . $sep;
print length_accountg(html_entity_decode($k)) . $sep;
print $sep;
print ($mt < 0 ? 'D' : 'C') . $sep;
print ($mt <= 0 ? price(- $mt) : $mt) . $sep;
print dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT") . $sep;
// print $langs->trans("VAT") . $sep;
print $val["ref"];
print "\n";
}
}
}
} elseif ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 1) {
// Model Classic Export
foreach ( $tabfac as $key => $val ) {
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
$companystatic->client = $tabcompany[$key]['code_client'];
// TVA
foreach ( $tabtva[$key] as $k => $mt ) {
if ($mt) {
print $date . $sep;
print $sell_journal . $sep;
print length_accountg(html_entity_decode($k)) . $sep;
print $sep;
print ($mt < 0 ? 'D' : 'C') . $sep;
print ($mt <= 0 ? price(- $mt) : $mt) . $sep;
print dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT") . $sep;
// print $langs->trans("VAT") . $sep;
print $val["ref"];
print "\n";
}
}
}
} elseif ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 1) {
// Model Classic Export
foreach ( $tabfac as $key => $val ) {
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
$companystatic->client = $tabcompany[$key]['code_client'];
$invoicestatic->id = $key;
$invoicestatic->ref = $val["ref"];
$invoicestatic->id = $key;
$invoicestatic->ref = $val["ref"];
$date = dol_print_date($val["date"], 'day');
$date = dol_print_date($val["date"], 'day');
foreach ( $tabttc[$key] as $k => $mt ) {
print '"' . $date . '"' . $sep;
print '"' . $val["ref"] . '"' . $sep;
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
print '"' . dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("Code_tiers") . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"';
print "\n";
}
foreach ( $tabttc[$key] as $k => $mt ) {
print '"' . $date . '"' . $sep;
print '"' . $val["ref"] . '"' . $sep;
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
print '"' . dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("Code_tiers") . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"';
print "\n";
}
// Product / Service
foreach ( $tabht[$key] as $k => $mt ) {
$accountingaccount = new AccountingAccount($db);
$accountingaccount->fetch(null, $k, true);
// Product / Service
foreach ( $tabht[$key] as $k => $mt ) {
$accountingaccount = new AccountingAccount($db);
$accountingaccount->fetch(null, $k, true);
if ($mt) {
print '"' . $date . '"' . $sep;
print '"' . $val["ref"] . '"' . $sep;
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
print '"' . dol_trunc($companystatic->name, 16) . ' - ' . dol_trunc($accountingaccount->label, 32) . '"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"';
print "\n";
}
}
if ($mt) {
print '"' . $date . '"' . $sep;
print '"' . $val["ref"] . '"' . $sep;
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
print '"' . dol_trunc($companystatic->name, 16) . ' - ' . dol_trunc($accountingaccount->label, 32) . '"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"';
print "\n";
}
}
// VAT
foreach ( $tabtva[$key] as $k => $mt ) {
if ($mt) {
print '"' . $date . '"' . $sep;
print '"' . $val["ref"] . '"' . $sep;
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
print '"' . dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT") . '"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"';
print "\n";
}
}
}
}
// VAT
foreach ( $tabtva[$key] as $k => $mt ) {
if ($mt) {
print '"' . $date . '"' . $sep;
print '"' . $val["ref"] . '"' . $sep;
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
print '"' . dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT") . '"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"';
print "\n";
}
}
}
}
}
*/
if (empty($action) || $action == 'view') {
llxHeader('', $langs->trans("SellsJournal"));
$nom = $langs->trans("SellsJournal");
$nom = $langs->trans("SellsJournal") . ' - ' . $accountingjournalstatic->getNomUrl(1);
$nomlink = '';
$periodlink = '';
$exportlink = '';
@@ -474,36 +525,38 @@ if (empty($action) || $action == 'view') {
else
$description .= $langs->trans("DepositsAreIncluded");
$period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array (
'action' => ''
));
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV != 1 && $conf->global->ACCOUNTING_EXPORT_MODELCSV != 2) {
$varlink = 'id_journal=' . $id_journal;
journalHead($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''), '', $varlink);
/*if ($conf->global->ACCOUNTING_EXPORT_MODELCSV != 1 && $conf->global->ACCOUNTING_EXPORT_MODELCSV != 2) {
print '<input type="button" class="butActionRefused" style="float: right;" value="' . $langs->trans("Export") . '" disabled="disabled" title="' . $langs->trans('ExportNotSupported') . '"/>';
} else {
print '<input type="button" class="butAction" style="float: right;" value="' . $langs->trans("Export") . '" onclick="launch_export();" />';
}
}*/
print '<div class="tabsAction">';
print '<input type="button" class="butAction" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
print '</div>';
print '
<script type="text/javascript">
function launch_export() {
$("div.fiche div.tabBar form input[name=\"action\"]").val("export_csv");
$("div.fiche div.tabBar form input[name=\"action\"]").val("export_csv");
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
}
function writebookkeeping() {
$("div.fiche div.tabBar form input[name=\"action\"]").val("writebookkeeping");
$("div.fiche div.tabBar form input[name=\"action\"]").val("writebookkeeping");
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
}
</script>';
/*
* Show result array
*/
print '<br><br>';
print '<br>';
$i = 0;
print "<table class=\"noborder\" width=\"100%\">";
@@ -517,7 +570,6 @@ if (empty($action) || $action == 'view') {
print "<td align='right'>" . $langs->trans("Credit") . "</td>";
print "</tr>\n";
$var = true;
$r = '';
$invoicestatic = new Facture($db);
@@ -532,7 +584,7 @@ if (empty($action) || $action == 'view') {
// Third party
foreach ( $tabttc[$key] as $k => $mt ) {
print "<tr " . $bc[$var] . ">";
print '<tr class="oddeven">';
print "<td><!-- Thirdparty --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
@@ -544,17 +596,17 @@ if (empty($action) || $action == 'view') {
$accountoshow = length_accounta($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
}
else print $accountoshow;
// print "</td><td>" . $langs->trans("ThirdParty");
// print ' (' . $companystatic->getNomUrl(0, 'customer', 16) . ')';
print '</td>';
print "<td>" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("Code_tiers") . "</td>";
print "</td><td align='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
print "<td align='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
print "<td align='right'>" . ($mt < 0 ? price(- $mt) : '') . "</td>";
print "</tr>";
}
print "</tr>";
// Product / Service
foreach ( $tabht[$key] as $k => $mt ) {
@@ -562,17 +614,17 @@ if (empty($action) || $action == 'view') {
$accountingaccount->fetch(null, $k, true);
if ($mt) {
print "<tr " . $bc[$var] . ">";
print '<tr class="oddeven">';
print "<td><!-- Product --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
print "<td>";
$accountoshow = length_accountg($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("ProductNotDefined").'</span>';
}
else print $accountoshow;
$accountoshow = length_accountg($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("ProductNotDefined").'</span>';
}
else print $accountoshow;
print "</td>";
// print "<td>" . $accountingaccount->label . "</td>";
print "<td>" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $accountingaccount->label . "</td>";
@@ -585,17 +637,17 @@ if (empty($action) || $action == 'view') {
// VAT
foreach ( $tabtva[$key] as $k => $mt ) {
if ($mt) {
print "<tr " . $bc[$var] . ">";
print '<tr class="oddeven">';
print "<td><!-- VAT --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
print "<td>";
$accountoshow = length_accountg($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("VATAccountNotDefined").'</span>';
}
else print $accountoshow;
$accountoshow = length_accountg($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("VATAccountNotDefined").'</span>';
}
else print $accountoshow;
print "</td>";
print "<td>" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT") . ' '.$def_tva[$key]. "</td>";
// print "<td>" . $langs->trans("VAT") . "</td>";
@@ -604,8 +656,6 @@ if (empty($action) || $action == 'view') {
print "</tr>";
}
}
$var = ! $var;
}
print "</table>";

View File

@@ -35,7 +35,7 @@ $langs->load("accountancy");
$langs->load("compta");
$mesg = '';
$action = GETPOST('action');
$action = GETPOST('action','aZ09');
$cat_id = GETPOST('account_category');
$selectcpt = GETPOST('cpt_bk');
$id = GETPOST('id', 'int');
@@ -127,7 +127,6 @@ if (!empty($cats))
$position = -1;
$code = -1;
foreach($cpts as $i => $cpt){
$var = ! $var;
$position = $cpt['position'];
$code = $cpt['code'];
@@ -149,7 +148,7 @@ if (!empty($cats))
}
$sommes[$code]['NP'] += $resultNP;
$sommes[$code]['N'] += $resultN;
print '<tr'. $bc[$var].'>';
print '<tr class="oddeven">';
print '<td>' . $cpt['account_number'] . '</td>';
print '<td>' . $cpt['name_cpt'] . '</td>';
print '<td>' . price($resultNP) . '</td>';

View File

@@ -1,11 +1,11 @@
<?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ require '../../main.inc.php';
// Class
require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
// Langs
$langs->load("bills");
@@ -52,11 +52,11 @@ if ($user->societe_id > 0)
if ($action == 'ventil' && $user->rights->accounting->bind->write) {
if (! GETPOST('cancel', 'alpha')) {
if ($codeventil < 0) $codeventil = 0;
$sql = " UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det";
$sql .= " SET fk_code_ventilation = " . $codeventil;
$sql .= " WHERE rowid = " . $id;
$resql = $db->query($sql);
if (! $resql) {
setEventMessages($db->lasterror(), null, 'errors');
@@ -85,7 +85,7 @@ if ($cancel == $langs->trans("Cancel")) {
// Create
$form = new Form($db);
$facturefournisseur_static = new FactureFournisseur($db);
$formventilation = new FormVentilation($db);
$formaccounting = new FormAccounting($db);
if (! empty($id)) {
$sql = "SELECT f.ref as facnumber, f.rowid as facid, l.fk_product, l.description, l.rowid, l.fk_code_ventilation, ";
@@ -96,7 +96,7 @@ if (! empty($id)) {
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON l.fk_code_ventilation = aa.rowid";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn as f ON f.rowid = l.fk_facture_fourn ";
$sql .= " WHERE f.fk_statut > 0 AND l.rowid = " . $id;
$sql .= " AND f.entity IN (" . getEntity("facture_fourn", 0) . ")"; // We don't share object for accountancy
$sql .= " AND f.entity IN (" . getEntity('facture_fourn', 0) . ")"; // We don't share object for accountancy
dol_syslog("/accounting/supplier/card.php sql=" . $sql, LOG_DEBUG);
$result = $db->query($sql);
@@ -107,41 +107,41 @@ if (! empty($id)) {
if ($num_lines) {
$objp = $db->fetch_object($result);
print '<form action="' . $_SERVER["PHP_SELF"] . '?id=' . $id . '" method="post">' . "\n";
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="ventil">';
print load_fiche_titre($langs->trans('SuppliersVentilation'), '', 'title_setup');
dol_fiche_head();
print '<table class="border" width="100%">';
// ref invoice
print '<tr><td>' . $langs->trans("BillsSuppliers") . '</td>';
$facturefournisseur_static->ref = $objp->facnumber;
$facturefournisseur_static->id = $objp->facid;
print '<td>' . $facturefournisseur_static->getNomUrl(1) . '</td>';
print '</tr>';
print '<tr><td width="20%">' . $langs->trans("Line") . '</td>';
print '<td>' . stripslashes(nl2br($objp->description)) . '</td></tr>';
print '<tr><td width="20%">' . $langs->trans("ProductLabel") . '</td>';
print '<td>' . dol_trunc($objp->product_label, 24) . '</td>';
print '<tr><td width="20%">' . $langs->trans("Account") . '</td><td>';
print $formventilation->select_account($objp->fk_code_ventilation, 'codeventil', 1);
print $formaccounting->select_account($objp->fk_code_ventilation, 'codeventil', 1);
print '</td></tr>';
print '</table>';
dol_fiche_end();
print '<div class="center">';
print '<input class="button" type="submit" value="' . $langs->trans("Save") . '">';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input class="button" type="submit" name="cancel" value="' . $langs->trans("Cancel") . '">';
print '</div>';
print '</form>';
} else {
print "Error";

View File

@@ -134,7 +134,7 @@ if ($action == 'validatehistory') {
$sql1.= " WHERE fd.fk_facture_fourn IN ( SELECT f.rowid FROM " . MAIN_DB_PREFIX . "facture_fourn as f";
$sql1.= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($year_current, 1, false)) . "'";
$sql1.= " AND f.datef <= '" . $db->idate(dol_get_last_day($year_current, 12, false)) . "'";
$sql1.= " AND f.entity IN (" . getEntity("accountancy", 1) . ")";
$sql1.= " AND f.entity IN (" . getEntity('accountancy') . ")";
$sql1.= ")";
dol_syslog("htdocs/accountancy/customer/index.php fixaccountancycode", LOG_DEBUG);
@@ -204,7 +204,7 @@ $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid
$sql .= " WHERE ff.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
$sql .= " AND ff.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
$sql .= " AND ff.fk_statut > 0 ";
$sql .= " AND ff.entity IN (" . getEntity("facture_fourn", 0) . ")"; // We don't share object for accountancy
$sql .= " AND ff.entity IN (" . getEntity('facture_fourn', 0) . ")"; // We don't share object for accountancy
$sql .= " AND aa.account_number IS NULL";
$sql .= " GROUP BY ffd.fk_code_ventilation,aa.account_number,aa.label";
@@ -215,8 +215,7 @@ if ($resql) {
while ( $row = $db->fetch_row($resql)) {
$var = ! $var;
print '<tr ' . $bc[$var] . '><td>' . length_accountg($row[0]) . '</td>';
print '<tr class="oddeven"><td>' . length_accountg($row[0]) . '</td>';
print '<td align="left">' . $row[1] . '</td>';
for($i = 2; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';
@@ -259,7 +258,7 @@ $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid
$sql .= " WHERE ff.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
$sql .= " AND ff.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
$sql .= " AND ff.fk_statut > 0 ";
$sql .= " AND ff.entity IN (" . getEntity("facture_fourn", 0) . ")"; // We don't share object for accountancy
$sql .= " AND ff.entity IN (" . getEntity('facture_fourn', 0) . ")"; // We don't share object for accountancy
$sql .= " AND aa.account_number IS NOT NULL";
$sql .= " GROUP BY ffd.fk_code_ventilation,aa.account_number,aa.label";
@@ -270,8 +269,7 @@ if ($resql) {
while ( $row = $db->fetch_row($resql)) {
$var = ! $var;
print '<tr ' . $bc[$var] . '><td>' . length_accountg($row[0]) . '</td>';
print '<tr class="oddeven"><td>' . length_accountg($row[0]) . '</td>';
print '<td align="left">' . $row[1] . '</td>';
for($i = 2; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';
@@ -314,7 +312,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
$sql .= " WHERE ff.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
$sql .= " AND ff.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
$sql .= " AND ff.fk_statut > 0 ";
$sql .= " AND ff.entity IN (" . getEntity("facture_fourn", 0) . ")"; // We don't share object for accountancy
$sql .= " AND ff.entity IN (" . getEntity('facture_fourn', 0) . ")"; // We don't share object for accountancy
dol_syslog('/accountancy/supplier/index.php:: sql=' . $sql);
$resql = $db->query($sql);

View File

@@ -1,9 +1,9 @@
<?php
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@
require '../../main.inc.php';
// Class
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
@@ -44,6 +44,7 @@ $langs->load("productbatch");
$account_parent = GETPOST('account_parent');
$changeaccount = GETPOST('changeaccount');
// Search Getpost
$search_lineid = GETPOST('search_lineid', 'int');
$search_ref = GETPOST('search_ref', 'alpha');
$search_invoice = GETPOST('search_invoice', 'alpha');
$search_label = GETPOST('search_label', 'alpha');
@@ -53,7 +54,7 @@ $search_account = GETPOST('search_account', 'alpha');
$search_vat = GETPOST('search_vat', 'alpha');
// Load variable for pagination
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
$limit = GETPOST('limit','int')?GETPOST('limit', 'int'):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
$sortfield = GETPOST('sortfield', 'alpha');
$sortorder = GETPOST('sortorder', 'alpha');
$page = GETPOST('page', 'int');
@@ -75,7 +76,7 @@ if ($user->societe_id > 0)
if (! $user->rights->accounting->bind->write)
accessforbidden();
$formventilation = new FormVentilation($db);
$formaccounting = new FormAccounting($db);
/*
@@ -85,6 +86,7 @@ $formventilation = new FormVentilation($db);
// Purge search criteria
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers
{
$search_lineid = '';
$search_ref = '';
$search_invoice = '';
$search_label = '';
@@ -148,7 +150,7 @@ print '<script type="text/javascript">
* Supplier Invoice lines
*/
$sql = "SELECT f.rowid as facid, f.ref as facnumber, f.ref_supplier, f.libelle as invoice_label, f.datef,";
$sql.= " l.fk_product, l.description, l.total_ht , l.qty, l.rowid, l.tva_tx, aa.label, aa.account_number, ";
$sql.= " l.rowid, l.fk_product, l.description, l.total_ht , l.qty, l.tva_tx, aa.label, aa.account_number, ";
$sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type";
$sql.= " FROM " . MAIN_DB_PREFIX . "facture_fourn as f";
$sql.= " , " . MAIN_DB_PREFIX . "accounting_account as aa";
@@ -156,6 +158,9 @@ $sql.= " , " . MAIN_DB_PREFIX . "facture_fourn_det as l";
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
$sql.= " WHERE f.rowid = l.fk_facture_fourn and f.fk_statut >= 1 AND l.fk_code_ventilation <> 0 ";
$sql.= " AND aa.rowid = l.fk_code_ventilation";
if ($search_lineid) {
$sql .= natural_search("l.rowid", $search_lineid, 1);
}
if (strlen(trim($search_invoice))) {
$sql .= natural_search("f.ref", $search_invoice);
}
@@ -177,7 +182,7 @@ if (strlen(trim($search_account))) {
if (strlen(trim($search_vat))) {
$sql .= natural_search("l.tva_tx", $search_vat, 1);
}
$sql .= " AND f.entity IN (" . getEntity("facture_fourn", 0) . ")"; // We don't share object for accountancy
$sql .= " AND f.entity IN (" . getEntity('facture_fourn', 0) . ")"; // We don't share object for accountancy
$sql .= $db->order($sortfield, $sortorder);
@@ -225,13 +230,14 @@ if ($result) {
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="page" value="'.$page.'">';
print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
print $langs->trans("DescVentilDoneSupplier") . '<br>';
print '<br><div class="inline-block divButAction">' . $langs->trans("ChangeAccount") . '<br>';
print $formventilation->select_account(GETPOST('account_parent'), 'account_parent', 1);
print $formaccounting->select_account(GETPOST('account_parent'), 'account_parent', 1);
print '<input type="submit" class="button valignmiddle" value="' . $langs->trans("ChangeBinding") . '" /></div>';
$moreforfilter = '';
@@ -239,6 +245,23 @@ if ($result) {
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre_filter">';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_lineid" value="' . dol_escape_htmltag($search_lineid) . '""></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_invoice" value="' . dol_escape_htmltag($search_invoice) . '"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
//print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
print '<td class="liste_titre" align="right"><input type="text" class="right flat maxwidth50" name="search_amount" value="' . dol_escape_htmltag($search_amount) . '"></td>';
print '<td class="liste_titre" align="center"><input type="text" class="right flat maxwidth50" name="search_vat" placeholder="%" size="1" value="' . dol_escape_htmltag($search_vat) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_account" value="' . dol_escape_htmltag($search_account) . '"></td>';
print '<td class="liste_titre" align="center">';
$searchpicto=$form->showFilterButtons();
print $searchpicto;
print '</td>';
print "</tr>\n";
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
@@ -250,33 +273,16 @@ if ($result) {
print_liste_field_titre($langs->trans("Amount"), $_SERVER["PHP_SELF"], "l.total_ht", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("VATRate"), $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Account"), $_SERVER["PHP_SELF"], "aa.account_number", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre('', '', '', '', '', 'align="center"');
print "</tr>\n";
print '<tr class="liste_titre">';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_invoice" value="' . dol_escape_htmltag($search_invoice) . '"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
//print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
print '<td class="liste_titre" align="right"><input type="text" class="flat maxwidth50" name="search_amount" value="' . dol_escape_htmltag($search_amount) . '"></td>';
print '<td class="liste_titre" align="center"><input type="text" class="flat maxwidth50" name="search_vat" size="1" value="' . dol_escape_htmltag($search_vat) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_account" value="' . dol_escape_htmltag($search_account) . '"></td>';
print '<td class="liste_titre" align="center">';
$searchpitco=$form->showFilterAndCheckAddButtons(1);
print $searchpitco;
print '</td>';
$checkpicto=$form->showCheckAddButtons();
print_liste_field_titre($checkpicto, '', '', '', '', 'align="center"');
print "</tr>\n";
$facturefournisseur_static = new FactureFournisseur($db);
$product_static = new Product($db);
$var = True;
while ( $i < min($num_lines, $limit) ) {
while ($i < min($num_lines, $limit)) {
$objp = $db->fetch_object($result);
$var = ! $var;
$codecompta = length_accountg($objp->account_number) . ' - ' . $objp->label;
$facturefournisseur_static->ref = $objp->facnumber;
@@ -287,7 +293,7 @@ if ($result) {
$product_static->type = $objp->type;
$product_static->label = $objp->product_label;
print '<tr '. $bc[$var].'>';
print '<tr class="oddeven">';
print '<td>' . $objp->rowid . '</td>';
@@ -320,7 +326,7 @@ if ($result) {
print img_edit();
print '</a></td>';
print '<td align="right"><input type="checkbox" class="checkforaction" name="changeaccount[]" value="' . $objp->rowid . '"/></td>';
print '<td class="center"><input type="checkbox" class="checkforaction" name="changeaccount[]" value="' . $objp->rowid . '"/></td>';
print "</tr>";
$i ++;

View File

@@ -1,10 +1,10 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>s
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ require '../../main.inc.php';
// Class
require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.product.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
@@ -52,6 +52,7 @@ $toselect = GETPOST('toselect', 'array');
$mesCasesCochees = GETPOST('toselect', 'array');
// Search Getpost
$search_lineid = GETPOST('search_lineid', 'int');
$search_invoice = GETPOST('search_invoice', 'alpha');
$search_ref = GETPOST('search_ref', 'alpha');
$search_label = GETPOST('search_label', 'alpha');
@@ -62,7 +63,7 @@ $search_vat = GETPOST('search_vat', 'alpha');
$btn_ventil = GETPOST('ventil', 'alpha');
// Load variable for pagination
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
$limit = GETPOST('limit','int')?GETPOST('limit', 'int'):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
$sortfield = GETPOST('sortfield', 'alpha');
$sortorder = GETPOST('sortorder', 'alpha');
$page = GETPOST('page','int');
@@ -84,7 +85,7 @@ if ($user->societe_id > 0)
if (! $user->rights->accounting->bind->write)
accessforbidden();
$formventilation = new FormVentilation($db);
$formaccounting = new FormAccounting($db);
$accounting = new AccountingAccount($db);
// TODO: we should need to check if result is a really exist accountaccount rowid.....
$aarowid_s = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT, 1);
@@ -101,6 +102,7 @@ if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction !=
// Purge search criteria
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
{
$search_lineid = '';
$search_ref = '';
$search_invoice = '';
$search_label = '';
@@ -179,7 +181,7 @@ llxHeader('', $langs->trans("SuppliersVentilation"));
// Supplier Invoice Lines
$sql = "SELECT f.rowid as facid, f.ref, f.ref_supplier, f.libelle as invoice_label, f.datef,";
$sql.= " l.fk_product, l.description, l.total_ht as price, l.rowid, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, ";
$sql.= " l.rowid, l.fk_product, l.description, l.total_ht as price, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, ";
$sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_buy as code_buy, p.tva_tx as tva_tx_prod,";
$sql.= " aa.rowid as aarowid";
$sql.= " FROM " . MAIN_DB_PREFIX . "facture_fourn as f";
@@ -191,6 +193,9 @@ $sql.= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0";
$sql.= " AND product_type <= 2";
$sql.= " AND (accsys.rowid='" . $conf->global->CHARTOFACCOUNTS . "' OR p.accountancy_code_buy IS NULL OR p.accountancy_code_buy ='')";
// Add search filter like
if ($search_lineid) {
$sql .= natural_search("l.rowid", $search_lineid, 1);
}
if (strlen(trim($search_invoice))) {
$sql .= natural_search("f.ref",$search_invoice);
}
@@ -212,7 +217,7 @@ if (strlen(trim($search_account))) {
if (strlen(trim($search_vat))) {
$sql .= natural_search("l.tva_tx",$search_vat,1);
}
$sql .= " AND f.entity IN (" . getEntity("facture_fourn", 0) . ")"; // We don't share object for accountancy
$sql .= " AND f.entity IN (" . getEntity('facture_fourn', 0) . ")"; // We don't share object for accountancy
$sql .= $db->order($sortfield, $sortorder);
@@ -233,11 +238,11 @@ if ($result) {
$i = 0;
$arrayofselected=is_array($toselect)?$toselect:array();
$param='';
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
$arrayofmassactions = array(
'ventil'=>$langs->trans("Ventilate")
//'presend'=>$langs->trans("SendByMail"),
@@ -246,8 +251,7 @@ if ($result) {
//if ($user->rights->mymodule->supprimer) $arrayofmassactions['delete']=$langs->trans("Delete");
//if ($massaction == 'presend') $arrayofmassactions=array();
$massactionbutton=$form->selectMassAction('ventil', $arrayofmassactions, 1);
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">' . "\n";
print '<input type="hidden" name="action" value="ventil">';
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
@@ -255,19 +259,39 @@ if ($result) {
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
//$center='<div align="center"><input type="submit" class="butAction" value="' . $langs->trans("Ventilate") . '" name="ventil"></div>';
print '<input type="hidden" name="page" value="'.$page.'">';
print_barre_liste($langs->trans("InvoiceLines"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
print $langs->trans("DescVentilTodoCustomer") . '</br><br>';
if ($msg) print $msg.'<br>';
$moreforfilter = '';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
// We add search filter
print '<tr class="liste_titre_filter">';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_lineid" value="' . dol_escape_htmltag($search_lineid) . '""></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_invoice" value="' . dol_escape_htmltag($search_invoice) . '"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
//print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidthonsmartphone" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
print '<td class="liste_titre" align="right"><input type="text" class="right flat maxwidth50" name="search_amount" value="' . dol_escape_htmltag($search_amount) . '"></td>';
print '<td class="liste_titre" align="right"><input type="text" class="right flat maxwidth50" name="search_vat" placeholder="%" size="1" value="' . dol_escape_htmltag($search_vat) . '"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td align="center" class="liste_titre">';
$searchpicto=$form->showFilterButtons();
print $searchpicto;
print '</td>';
print '</tr>';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("LineId"), $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
@@ -280,28 +304,11 @@ if ($result) {
print_liste_field_titre($langs->trans("VATRate"), $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("AccountAccountingSuggest"), '', '', '', '', 'align="center"');
print_liste_field_titre($langs->trans("IntoAccount"), '', '', '', '', 'align="center"');
print_liste_field_titre('', '', '', '', '', 'align="center"');
$checkpicto='';
if ($massactionbutton) $checkpicto=$form->showCheckAddButtons('checkforselect', 1);
print_liste_field_titre($checkpicto, '', '', '', '', 'align="center"');
print "</tr>\n";
// We add search filter
print '<tr class="liste_titre">';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_invoice" value="' . dol_escape_htmltag($search_invoice) . '"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
//print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidthonsmartphone" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
print '<td class="liste_titre" align="right"><input type="text" class="flat maxwidth50" name="search_amount" value="' . dol_escape_htmltag($search_amount) . '"></td>';
print '<td class="liste_titre" align="right"><input type="text" class="flat maxwidth50" name="search_vat" size="1" value="' . dol_escape_htmltag($search_vat) . '"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td align="right" class="liste_titre">';
$searchpitco=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
print $searchpitco;
print '</td>';
print '</tr>';
$facturefourn_static = new FactureFournisseur($db);
$productfourn_static = new ProductFournisseur($db);
$form = new Form($db);
@@ -309,7 +316,6 @@ if ($result) {
$var = true;
while ( $i < min($num_lines, $limit) ) {
$objp = $db->fetch_object($result);
$var = ! $var;
// product_type: 0 = service ? 1 = product
// if product does not exist we use the value of product_type provided in facturedet to define if this is a product or service
@@ -322,7 +328,7 @@ if ($result) {
$productfourn_static->id = $objp->product_id;
$productfourn_static->type = $objp->type;
$productfourn_static->label = $objp->product_label;
$facturefourn_static->ref = $objp->ref;
$facturefourn_static->id = $objp->facid;
$facturefourn_static->type = $objp->type;
@@ -340,38 +346,38 @@ if ($result) {
$objp->aarowid_suggest = $aarowid_p;
}
if ($objp->code_buy_l == -1) $objp->code_buy_l='';
if (! empty($objp->code_buy)) {
$objp->code_buy_p = $objp->code_buy; // Code on product
} else {
$code_buy_p_notset = 'color:orange';
}
if (empty($objp->code_buy_l) && empty($objp->code_buy_p)) $code_buy_p_notset = 'color:red';
// $objp->code_buy_p is now code of product/service
// $objp->code_buy_l is now default code of product/service
print '<tr '. $bc[$var].'>';
print '<tr class="oddeven">';
// Line id
print '<td>' . $objp->rowid . '</td>';
// Ref Invoice
print '<td>' . $facturefourn_static->getNomUrl(1) . '</td>';
print '<td class="tdoverflowonsmartphone">';
print $objp->invoice_label;
print '</td>';
print '<td align="center">' . dol_print_date($db->jdate($objp->datef), 'day') . '</td>';
// Ref product
print '<td>';
if ($productfourn_static->id)
print $productfourn_static->getNomUrl(1);
if ($objp->product_label) print '<br>'.$objp->product_label;
print '</td>';
// Description
print '<td>';
$text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->description));
@@ -402,11 +408,11 @@ if ($result) {
// Suggested accounting account
print '<td align="center">';
print $formventilation->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'maxwidth300 maxwidthonsmartphone', 'cachewithshowemptyone');
print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'maxwidth300 maxwidthonsmartphone', 'cachewithshowemptyone');
print '</td>';
// Colonne choix ligne a ventiler
print '<td align="right">';
print '<td align="center">';
print '<input type="checkbox" class="flat checkforselect" name="toselect[]" value="' . $objp->rowid . "_" . $i . '"' . ($objp->aarowid ? "checked" : "") . '/>';
print '</td>';

View File

@@ -48,6 +48,37 @@ $action = GETPOST('action','alpha');
* Actions
*/
//
if ($action == 'updateall')
{
$db->begin();
$res1=$res2=$res3=$res4=$res5=$res6=0;
$res1=dolibarr_set_const($db, 'ADHERENT_LOGIN_NOT_REQUIRED', GETPOST('ADHERENT_LOGIN_NOT_REQUIRED', 'alpha'), 'chaine', 0, '', $conf->entity);
$res2=dolibarr_set_const($db, 'ADHERENT_MAIL_REQUIRED', GETPOST('ADHERENT_MAIL_REQUIRED', 'alpha'), 'chaine', 0, '', $conf->entity);
$res3=dolibarr_set_const($db, 'ADHERENT_DEFAULT_SENDINFOBYMAIL', GETPOST('ADHERENT_DEFAULT_SENDINFOBYMAIL', 'alpha'), 'chaine', 0, '', $conf->entity);
$res4=dolibarr_set_const($db, 'ADHERENT_BANK_USE', GETPOST('ADHERENT_BANK_USE', 'alpha'), 'chaine', 0, '', $conf->entity);
// Use vat for invoice creation
if ($conf->facture->enabled)
{
$res4=dolibarr_set_const($db, 'ADHERENT_VAT_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_VAT_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
$res5=dolibarr_set_const($db, 'ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
{
$res6=dolibarr_set_const($db, 'ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
}
}
if ($res1 < 0 || $res2 < 0 || $res3 < 0 || $res4 < 0 || $res5 < 0 || $res6 < 0)
{
setEventMessages('ErrorFailedToSaveDate', null, 'errors');
$db->rollback();
}
else
{
setEventMessages('RecordModifiedSuccessfully', null, 'mesgs');
$db->commit();
}
}
// Action mise a jour ou ajout d'une constante
if ($action == 'update' || $action == 'add')
{
@@ -116,120 +147,81 @@ print load_fiche_titre($langs->trans("MembersSetup"),$linkback,'title_setup');
$head = member_admin_prepare_head();
dol_fiche_head($head, 'general', $langs->trans("Members"), 0, 'user');
dol_fiche_head($head, 'general', $langs->trans("Members"), -1, 'user');
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="updateall">';
print load_fiche_titre($langs->trans("MemberMainOptions"),'','');
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Description").'</td>';
print '<td>'.$langs->trans("Value").'</td>';
print '<td align="center">'.$langs->trans("Action").'</td>';
print "</tr>\n";
$var=true;
// Login/Pass required for members
$var=!$var;
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="constname" value="ADHERENT_LOGIN_NOT_REQUIRED">';
print '<tr '.$bc[$var].'><td>'.$langs->trans("AdherentLoginRequired").'</td><td>';
print $form->selectyesno('constvalue',(! empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)?0:1),1);
print '</td><td align="center" width="80">';
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
print '<tr class="oddeven"><td>'.$langs->trans("AdherentLoginRequired").'</td><td>';
print $form->selectyesno('ADHERENT_LOGIN_NOT_REQUIRED',(! empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)?0:1),1);
print "</td></tr>\n";
print '</form>';
// Mail required for members
$var=!$var;
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="constname" value="ADHERENT_MAIL_REQUIRED">';
print '<tr '.$bc[$var].'><td>'.$langs->trans("AdherentMailRequired").'</td><td>';
print $form->selectyesno('constvalue',(! empty($conf->global->ADHERENT_MAIL_REQUIRED)?$conf->global->ADHERENT_MAIL_REQUIRED:0),1);
print '</td><td align="center" width="80">';
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
print '<tr class="oddeven"><td>'.$langs->trans("AdherentMailRequired").'</td><td>';
print $form->selectyesno('ADHERENT_MAIL_REQUIRED',(! empty($conf->global->ADHERENT_MAIL_REQUIRED)?$conf->global->ADHERENT_MAIL_REQUIRED:0),1);
print "</td></tr>\n";
print '</form>';
// Send mail information is on by default
$var=!$var;
print '<form action="adherent.php" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="constname" value="ADHERENT_DEFAULT_SENDINFOBYMAIL">';
print '<tr '.$bc[$var].'><td>'.$langs->trans("MemberSendInformationByMailByDefault").'</td><td>';
print $form->selectyesno('constvalue',(! empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL)?$conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL:0),1);
print '</td><td align="center" width="80">';
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
print '<tr class="oddeven"><td>'.$langs->trans("MemberSendInformationByMailByDefault").'</td><td>';
print $form->selectyesno('ADHERENT_DEFAULT_SENDINFOBYMAIL',(! empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL)?$conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL:0),1);
print "</td></tr>\n";
print '</form>';
// Insert subscription into bank account
$var=!$var;
print '<form action="adherent.php" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="constname" value="ADHERENT_BANK_USE">';
print '<tr '.$bc[$var].'><td>'.$langs->trans("MoreActionsOnSubscription").'</td>';
print '<tr class="oddeven"><td>'.$langs->trans("MoreActionsOnSubscription").'</td>';
$arraychoices=array('0'=>$langs->trans("None"));
if (! empty($conf->banque->enabled)) $arraychoices['bankdirect']=$langs->trans("MoreActionBankDirect");
if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $arraychoices['invoiceonly']=$langs->trans("MoreActionInvoiceOnly");
if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $arraychoices['bankviainvoice']=$langs->trans("MoreActionBankViaInvoice");
print '<td>';
print $form->selectarray('constvalue',$arraychoices,$conf->global->ADHERENT_BANK_USE,0);
print '</td><td align="center" width="80">';
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
print $form->selectarray('ADHERENT_BANK_USE',$arraychoices,$conf->global->ADHERENT_BANK_USE,0);
print '</td>';
print "</tr>\n";
print '</form>';
// Use vat for invoice creation
if ($conf->facture->enabled)
{
$var=!$var;
print '<form action="adherent.php" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="constname" value="ADHERENT_VAT_FOR_SUBSCRIPTIONS">';
print '<tr '.$bc[$var].'><td>'.$langs->trans("VATToUseForSubscriptions").'</td>';
print '<tr class="oddeven"><td>'.$langs->trans("VATToUseForSubscriptions").'</td>';
if (! empty($conf->banque->enabled))
{
print '<td>';
print $form->selectarray('constvalue', array('0'=>$langs->trans("NoVatOnSubscription"),'defaultforfoundationcountry'=>$langs->trans("Default")), (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS)?'0':$conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS), 0);
print '</td><td align="center" width="80">';
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
print $form->selectarray('ADHERENT_VAT_FOR_SUBSCRIPTIONS', array('0'=>$langs->trans("NoVatOnSubscription"),'defaultforfoundationcountry'=>$langs->trans("Default")), (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS)?'0':$conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS), 0);
print '</td>';
}
else
{
print '<td align="right" colspan="2">';
print '<td align="right">';
print $langs->trans("WarningModuleNotActive",$langs->transnoentities("Module85Name"));
print '</td>';
}
print "</tr>\n";
print '</form>';
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
{
$var=!$var;
print '<form action="adherent.php" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="constname" value="ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS">';
print '<tr '.$bc[$var].'><td>'.$langs->trans("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS").'</td>';
print '<tr class="oddeven"><td>'.$langs->trans("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS").'</td>';
print '<td>';
$form->select_produits($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS, 'constvalue_ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS');
print '</td><td align="center" width="80">';
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
$form->select_produits($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS, 'ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS');
print '</td>';
}
print "</tr>\n";
print '</form>';
}
print '</table>';
print '<center>';
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
print '</center>';
print '</form>';
print '<br>';
@@ -247,13 +239,12 @@ $constantes=array(
print load_fiche_titre($langs->trans("MembersCards"),'','');
form_constantes($constantes);
$helptext='*'.$langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
$helptext.='%DOL_MAIN_URL_ROOT%, %ID%, %FIRSTNAME%, %LASTNAME%, %FULLNAME%, %LOGIN%, %PASSWORD%, ';
$helptext.='%COMPANY%, %ADDRESS%, %ZIP%, %TOWN%, %COUNTRY%, %EMAIL%, %BIRTH%, %PHOTO%, %TYPE%, ';
$helptext.='%YEAR%, %MONTH%, %DAY%';
print '*'.$langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
print '%DOL_MAIN_URL_ROOT%, %ID%, %FIRSTNAME%, %LASTNAME%, %FULLNAME%, %LOGIN%, %PASSWORD%, ';
print '%COMPANY%, %ADDRESS%, %ZIP%, %TOWN%, %COUNTRY%, %EMAIL%, %BIRTH%, %PHOTO%, %TYPE%, ';
print '%YEAR%, %MONTH%, %DAY%';
print '<br>';
form_constantes($constantes, 0, $helptext);
print '<br>';
@@ -265,13 +256,12 @@ $constantes=array('ADHERENT_ETIQUETTE_TYPE','ADHERENT_ETIQUETTE_TEXT');
print load_fiche_titre($langs->trans("MembersTickets"),'','');
form_constantes($constantes);
$helptext='*'.$langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
$helptext.='%DOL_MAIN_URL_ROOT%, %ID%, %FIRSTNAME%, %LASTNAME%, %FULLNAME%, %LOGIN%, %PASSWORD%, ';
$helptext.='%COMPANY%, %ADDRESS%, %ZIP%, %TOWN%, %COUNTRY%, %EMAIL%, %BIRTH%, %PHOTO%, %TYPE%, ';
$helptext.='%YEAR%, %MONTH%, %DAY%';
print '*'.$langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
print '%DOL_MAIN_URL_ROOT%, %ID%, %FIRSTNAME%, %LASTNAME%, %FULLNAME%, %LOGIN%, %PASSWORD%, ';
print '%COMPANY%, %ADDRESS%, %ZIP%, %TOWN%, %COUNTRY%, %EMAIL%, %BIRTH%, %PHOTO%, %TYPE%, ';
print '%YEAR%, %MONTH%, %DAY%';
print '<br>';
form_constantes($constantes, 0, $helptext);
print '<br>';
@@ -295,13 +285,17 @@ $constantes=array(
print load_fiche_titre($langs->trans("Other"),'','');
form_constantes($constantes);
$helptext='*'.$langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
$helptext.='%DOL_MAIN_URL_ROOT%, %ID%, %FIRSTNAME%, %LASTNAME%, %FULLNAME%, %LOGIN%, %PASSWORD%, ';
$helptext.='%COMPANY%, %ADDRESS%, %ZIP%, %TOWN%, %COUNTRY%, %EMAIL%, %BIRTH%, %PHOTO%, %TYPE%, ';
$helptext.='%YEAR%, %MONTH%, %DAY%';
print '*'.$langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
print '%DOL_MAIN_URL_ROOT%, %ID%, %FIRSTNAME%, %LASTNAME%, %FULLNAME%, %LOGIN%, %PASSWORD%, ';
print '%COMPANY%, %ADDRESS%, %ZIP%, %TOWN%, %COUNTRY%, %EMAIL%, %BIRTH%, %PHOTO%, %TYPE%, ';
//print '%YEAR%, %MONTH%, %DAY%'; // Not supported
print '<br>';
$helptext='*'.$langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
$helptext.='%DOL_MAIN_URL_ROOT%, %ID%, %FIRSTNAME%, %LASTNAME%, %FULLNAME%, %LOGIN%, %PASSWORD%, ';
$helptext.='%COMPANY%, %ADDRESS%, %ZIP%, %TOWN%, %COUNTRY%, %EMAIL%, %BIRTH%, %PHOTO%, %TYPE%, ';
//$helptext.='%YEAR%, %MONTH%, %DAY%'; // Not supported
form_constantes($constantes, 0, $helptext);
dol_fiche_end();

View File

@@ -70,7 +70,7 @@ print load_fiche_titre($langs->trans("MembersSetup"),$linkback,'title_setup');
$head = member_admin_prepare_head();
dol_fiche_head($head, 'attributes', $langs->trans("Members"), 0, 'user');
dol_fiche_head($head, 'attributes', $langs->trans("Members"), -1, 'user');
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';

View File

@@ -73,7 +73,7 @@ print load_fiche_titre($langs->trans("MembersSetup"),$linkback,'title_setup');
$head = member_admin_prepare_head();
dol_fiche_head($head, 'attributes_type', $langs->trans("Members"), 0, 'user');
dol_fiche_head($head, 'attributes_type', $langs->trans("Members"), -1, 'user');
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';

View File

@@ -29,6 +29,7 @@ require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
$langs->load("members");
$langs->load("admin");
@@ -49,12 +50,15 @@ if ($action == 'update')
$editamount=GETPOST('MEMBER_NEWFORM_EDITAMOUNT');
$payonline=GETPOST('MEMBER_NEWFORM_PAYONLINE');
$email=GETPOST('MEMBER_PAYONLINE_SENDEMAIL');
$forcetype=GETPOST('MEMBER_NEWFORM_FORCETYPE');
$res=dolibarr_set_const($db, "MEMBER_ENABLE_PUBLIC",$public,'chaine',0,'',$conf->entity);
$res=dolibarr_set_const($db, "MEMBER_NEWFORM_AMOUNT",$amount,'chaine',0,'',$conf->entity);
$res=dolibarr_set_const($db, "MEMBER_NEWFORM_EDITAMOUNT",$editamount,'chaine',0,'',$conf->entity);
$res=dolibarr_set_const($db, "MEMBER_NEWFORM_PAYONLINE",$payonline,'chaine',0,'',$conf->entity);
$res=dolibarr_set_const($db, "MEMBER_PAYONLINE_SENDEMAIL",$email,'chaine',0,'',$conf->entity);
if ($forcetype < 0) $res=dolibarr_del_const($db, "MEMBER_NEWFORM_FORCETYPE",$conf->entity);
else $res=dolibarr_set_const($db, "MEMBER_NEWFORM_FORCETYPE",$forcetype,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
@@ -88,8 +92,9 @@ $head = member_admin_prepare_head();
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
dol_fiche_head($head, 'public', $langs->trans("Members"), 0, 'user');
dol_fiche_head($head, 'public', $langs->trans("Members"), -1, 'user');
if ($conf->use_javascript_ajax)
{
@@ -110,16 +115,11 @@ if ($conf->use_javascript_ajax)
{
if (jQuery("#MEMBER_ENABLE_PUBLIC").val()==\'0\')
{
jQuery("#tramount").hide();
jQuery("#tredit").hide();
jQuery("#trpayment").hide();
jQuery("#tremail").hide();
jQuery("#trforcetype, #tramount, #tredit, #trpayment, #tremail").hide();
}
if (jQuery("#MEMBER_ENABLE_PUBLIC").val()==\'1\')
{
jQuery("#tramount").show();
jQuery("#tredit").show();
jQuery("#trpayment").show();
jQuery("#trforcetype, #tramount, #tredit, #trpayment").show();
if (jQuery("#MEMBER_NEWFORM_PAYONLINE").val()==\'-1\') jQuery("#tremail").hide();
else jQuery("#tremail").show();
}
@@ -141,63 +141,57 @@ print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameter").'</td>';
print '<td align="right">'.$langs->trans("Value").'</td>';
print "</tr>\n";
$var=true;
// Allow public form
$var=! $var;
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr '.$bc[$var].'><td>';
print '<tr class="oddeven"><td>';
print $langs->trans("EnablePublicSubscriptionForm");
print '</td><td align="right">';
print $form->selectyesno("MEMBER_ENABLE_PUBLIC",(! empty($conf->global->MEMBER_ENABLE_PUBLIC)?$conf->global->MEMBER_ENABLE_PUBLIC:0),1);
print "</td></tr>\n";
// Type
/*$var=! $var;
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr '.$bc[$var].' class="drag"><td>';
print $langs->trans("EnablePublicSubscriptionForm");
print '</td><td width="60" align="center">';
print $form->selectyesno("forcedate",$conf->global->MEMBER_NEWFORM_FORCETYPE,1);
print "</td></tr>\n"; */
// Force Type
$adht = new AdherentType($db);
print '<tr class="oddeven drag" id="trforcetype"><td>';
print $langs->trans("ForceMemberType");
print '</td><td width="60" align="right">';
$listofval = array(-1 => $langs->trans("Undefined"));
$listofval += $adht->liste_array();
$forcetype = $conf->global->MEMBER_NEWFORM_FORCETYPE ?: -1;
print $form->selectarray("MEMBER_NEWFORM_FORCETYPE", $listofval, $forcetype, count($listetype)>1?1:0);
print "</td></tr>\n";
// Amount
$var=! $var;
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr '.$bc[$var].' id="tramount"><td>';
print '<tr class="oddeven" id="tramount"><td>';
print $langs->trans("DefaultAmount");
print '</td><td align="right">';
print '<input type="text" id="MEMBER_NEWFORM_AMOUNT" name="MEMBER_NEWFORM_AMOUNT" size="5" value="'.(! empty($conf->global->MEMBER_NEWFORM_AMOUNT)?$conf->global->MEMBER_NEWFORM_AMOUNT:'').'">';
print "</td></tr>\n";
// Can edit
$var=! $var;
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr '.$bc[$var].' id="tredit"><td>';
print '<tr class="oddeven" id="tredit"><td>';
print $langs->trans("CanEditAmount");
print '</td><td align="right">';
print $form->selectyesno("MEMBER_NEWFORM_EDITAMOUNT",(! empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)?$conf->global->MEMBER_NEWFORM_EDITAMOUNT:0),1);
print "</td></tr>\n";
if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled))
if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled) || ! empty($conf->stripe->enabled))
{
// Jump to an online payment page
$var=! $var;
print '<tr '.$bc[$var].' id="trpayment"><td>';
print '<tr class="oddeven" id="trpayment"><td>';
print $langs->trans("MEMBER_NEWFORM_PAYONLINE");
print '</td><td align="right">';
$listofval=array();
if (! empty($conf->paybox->enabled)) $listofval['paybox']='Paybox';
if (! empty($conf->paypal->enabled)) $listofval['paypal']='PayPal';
if (! empty($conf->stripe->enabled)) $listofval['stripe']='Stripe';
print $form->selectarray("MEMBER_NEWFORM_PAYONLINE",$listofval,(! empty($conf->global->MEMBER_NEWFORM_PAYONLINE)?$conf->global->MEMBER_NEWFORM_PAYONLINE:''),1);
print "</td></tr>\n";
}
if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled))
if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled) || ! empty($conf->stripe->enabled))
{
// Jump to an online payment page
$var=! $var;
print '<tr '.$bc[$var].' id="tremail"><td>';
print '<tr class="oddeven" id="tremail"><td>';
print $langs->trans("MEMBER_PAYONLINE_SENDEMAIL");
print '</td><td align="right">';
print '<input type="text" id="MEMBER_PAYONLINE_SENDEMAIL" name="MEMBER_PAYONLINE_SENDEMAIL" size="24" value="'.(! empty($conf->global->MEMBER_PAYONLINE_SENDEMAIL)?$conf->global->MEMBER_PAYONLINE_SENDEMAIL:'').'">';

View File

@@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
$langs->load("companies");
$langs->load("members");
$id = GETPOST('id','int');
$id = GETPOST('id','int')?GETPOST('id','int'):GETPOST('rowid','int');
// Security check
$result=restrictedArea($user,'adherent',$id);
@@ -85,50 +85,20 @@ if ($object->id > 0)
if (! empty($conf->notification->enabled)) $langs->load("mails");
$head = member_prepare_head($object);
dol_fiche_head($head, 'agenda', $langs->trans("Member"),0,'user');
dol_fiche_head($head, 'agenda', $langs->trans("Member"), -1, 'user');
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'rowid', $linkback);
print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent">';
// Login
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
{
print '<tr><td class="titlefield">'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.'&nbsp;</td></tr>';
}
// Type
print '<tr><td class="titlefield">'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
// Morphy
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
/*print '<td rowspan="'.$rowspan.'" align="center" valign="middle" width="25%">';
print $form->showphoto('memberphoto',$member);
print '</td>';*/
print '</tr>';
// Company
print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.$object->societe.'</td></tr>';
// Civility
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$object->getCivilityLabel().'&nbsp;</td>';
print '</tr>';
print '</table>';
print '<div class="fichecenter">';
print '<br>';
print '<div class="underbanner clearboth"></div>';
$object->info($id);
print dol_print_object_info($object, 1);
print '</div>';
print '</div>';
dol_fiche_end();
@@ -146,30 +116,11 @@ if ($object->id > 0)
print '</div>';
print '<br>';
$out='';
/*$objthirdparty=$object->thirdparty;
$objcon=new stdClass();
$permok=$user->rights->agenda->myactions->create;
if ((! empty($objthirdparty->id) || ! empty($objcon->id)) && $permok)
{
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create';
if (get_class($objthirdparty) == 'Societe') $out.='&amp;socid='.$objthirdparty->id;
$out.=(! empty($objcon->id)?'&amp;contactid='.$objcon->id:'').'&amp;backtopage=1&amp;percentage=-1">';
$out.=$langs->trans("AddAnAction").' ';
$out.=img_picto($langs->trans("AddAnAction"),'filenew');
$out.="</a>";
}*/
print load_fiche_titre($langs->trans("ActionsOnMember"),$out,'');
// List of todo actions
//show_actions_todo($conf,$langs,$db,$object);
// List of done actions
// List of actions
show_actions_done($conf,$langs,$db,$object,null,0,'','');
}

View File

@@ -182,7 +182,7 @@ abstract class ActionsAdherentCardCommon
$this->object->old_name = $_POST["old_name"];
$this->object->old_firstname = $_POST["old_firstname"];
$result = $this->object->delete();
$result = $this->object->delete(0, $user, 0);
if ($result > 0)
{
header("Location: list.php");
@@ -424,7 +424,7 @@ abstract class ActionsAdherentCardCommon
if ($resql)
{
$obj = $this->db->fetch_object($resql);
$this->object->country_code = $obj->code;
$this->object->country = $langs->trans("Country".$obj->code)?$langs->trans("Country".$obj->code):$obj->libelle;
}

View File

@@ -96,7 +96,7 @@ if ($id > 0)
// Define variables to know what current user can do on properties of user linked to edited member
if ($object->user_id)
{
// $ User is the user who edits, $ object->user_id is the id of the related user in the edited member
// $ User is the user who edits, $ object->user_id is the id of the related user in the edited member
$caneditfielduser=((($user->id == $object->user_id) && $user->rights->user->self->creer)
|| (($user->id != $object->user_id) && $user->rights->user->user->creer));
$caneditpassworduser=((($user->id == $object->user_id) && $user->rights->user->self->password)
@@ -213,7 +213,7 @@ if (empty($reshook))
{
if ($result > 0)
{
// User creation
// User creation
$company = new Societe($db);
$result=$company->create_from_member($object,GETPOST('companyname'));
@@ -307,7 +307,7 @@ if (empty($reshook))
$object->phone = trim($_POST["phone"]);
$object->phone_perso = trim($_POST["phone_perso"]);
$object->phone_mobile= trim($_POST["phone_mobile"]);
$object->email = trim($_POST["email"]);
$object->email = trim($_POST["member_email"]);
$object->skype = trim($_POST["skype"]);
$object->birth = $birthdate;
@@ -585,7 +585,7 @@ if (empty($reshook))
if ($user->rights->adherent->supprimer && $action == 'confirm_delete' && $confirm == 'yes')
{
$result=$object->delete($id);
$result=$object->delete($id, $user);
if ($result > 0)
{
if (! empty($backtopage))
@@ -714,7 +714,7 @@ if (empty($reshook))
}
}
}
// Actions to build doc
$upload_dir = $conf->adherent->dir_output;
$permissioncreate=$user->rights->adherent->creer;
@@ -825,6 +825,16 @@ else
print '<tr><td><span class="fieldrequired">'.$langs->trans("Login").' / '.$langs->trans("Id").'</span></td><td><input type="text" name="member_login" class="maxwidth200" value="'.(isset($_POST["member_login"])?GETPOST("member_login", 'alpha', 2):$object->login).'"></td></tr>';
}
// Password
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
{
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
$generated_password=getRandomPassword(false);
print '<tr><td><span class="fieldrequired">'.$langs->trans("Password").'</span></td><td>';
print '<input size="30" maxsize="32" type="text" name="password" value="'.$generated_password.'">';
print '</td></tr>';
}
// Type
print '<tr><td class="fieldrequired">'.$langs->trans("MemberType").'</td><td>';
$listetype=$adht->liste_array();
@@ -862,16 +872,6 @@ else
// EMail
print '<tr><td>'.($conf->global->ADHERENT_MAIL_REQUIRED?'<span class="fieldrequired">':'').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED?'</span>':'').'</td><td><input type="text" name="member_email" size="40" value="'.(GETPOST('member_email','alpha')?GETPOST('member_email','alpha'):$object->email).'"></td></tr>';
// Password
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
{
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
$generated_password=getRandomPassword(false);
print '<tr><td><span class="fieldrequired">'.$langs->trans("Password").'</span></td><td>';
print '<input size="30" maxsize="32" type="text" name="password" value="'.$generated_password.'">';
print '</td></tr>';
}
// Address
print '<tr><td class="tdtop">'.$langs->trans("Address").'</td><td>';
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="2">'.(GETPOST('address','alpha')?GETPOST('address','alpha'):$object->address).'</textarea>';
@@ -948,20 +948,6 @@ else
print $object->showOptionals($extrafields,'edit');
}
/*
// Third party Dolibarr
if (! empty($conf->societe->enabled))
{
print '<tr><td>'.$langs->trans("LinkedToDolibarrThirdParty").'</td><td class="valeur">';
print $form->select_company($object->fk_soc,'socid','',1);
print '</td></tr>';
}
// Login Dolibarr
print '<tr><td>'.$langs->trans("LinkedToDolibarrUser").'</td><td class="valeur">';
print $form->select_dolusers($object->user_id, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
print '</td></tr>';
*/
print '<tbody>';
print "</table>\n";
@@ -1061,14 +1047,19 @@ else
print '<table class="border" width="100%">';
// Ref
print '<tr><td class="titlefieldcreate">'.$langs->trans("Ref").'</td><td class="valeur" colspan="2">'.$object->id.'</td></tr>';
print '<tr><td class="titlefieldcreate">'.$langs->trans("Ref").'</td><td class="valeur">'.$object->id.'</td></tr>';
// Login
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
{
print '<tr><td><span class="fieldrequired">'.$langs->trans("Login").' / '.$langs->trans("Id").'</span></td><td colspan="2"><input type="text" name="login" class="maxwidth200" value="'.(isset($_POST["login"])?GETPOST("login",'alpha',2):$object->login).'"></td></tr>';
print '<tr><td><span class="fieldrequired">'.$langs->trans("Login").' / '.$langs->trans("Id").'</span></td><td><input type="text" name="login" class="maxwidth200" value="'.(isset($_POST["login"])?GETPOST("login",'alpha',2):$object->login).'"></td></tr>';
}
// Password
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
{
print '<tr><td class="fieldrequired">'.$langs->trans("Password").'</td><td><input type="password" name="pass" class="maxwdith200" value="'.(isset($_POST["pass"])?GETPOST("pass",'',2):$object->pass).'"></td></tr>';
}
// Morphy
$morphys["phy"] = $langs->trans("Physical");
$morphys["mor"] = $langs->trans("Morale");
@@ -1090,7 +1081,7 @@ else
print "</td></tr>";
// Company
print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td><input type="text" name="societe" size="40" value="'.(isset($_POST["societe"])?GETPOST("societe",'',2):$object->societe).'"></td></tr>';
print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td><input type="text" name="societe" class="minwidth100" value="'.(isset($_POST["societe"])?GETPOST("societe",'',2):$object->societe).'"></td></tr>';
// Civility
print '<tr><td>'.$langs->trans("UserTitle").'</td><td>';
@@ -1099,11 +1090,11 @@ else
print '</tr>';
// Lastname
print '<tr><td id="tdlastname">'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" size="40" value="'.(isset($_POST["lastname"])?GETPOST("lastname",'',2):$object->lastname).'"></td>';
print '<tr><td id="tdlastname">'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" class="minwidth100" value="'.(isset($_POST["lastname"])?GETPOST("lastname",'',2):$object->lastname).'"></td>';
print '</tr>';
// Firstname
print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" size="40" value="'.(isset($_POST["firstname"])?GETPOST("firstname",'',3):$object->firstname).'"></td>';
print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" class="minwidth100" value="'.(isset($_POST["firstname"])?GETPOST("firstname",'',3):$object->firstname).'"></td>';
print '</tr>';
// Photo
@@ -1122,17 +1113,11 @@ else
print '</td></tr>';
// EMail
print '<tr><td>'.($conf->global->ADHERENT_MAIL_REQUIRED?'<span class="fieldrequired">':'').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED?'</span>':'').'</td><td><input type="text" name="email" size="40" value="'.(isset($_POST["email"])?GETPOST("email",'',2):$object->email).'"></td></tr>';
// Password
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
{
print '<tr><td class="fieldrequired">'.$langs->trans("Password").'</td><td><input type="password" name="pass" class="maxwdith200" value="'.(isset($_POST["pass"])?GETPOST("pass",'',2):$object->pass).'"></td></tr>';
}
print '<tr><td>'.($conf->global->ADHERENT_MAIL_REQUIRED?'<span class="fieldrequired">':'').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED?'</span>':'').'</td><td><input type="text" name="member_email" size="40" value="'.(isset($_POST["member_email"])?GETPOST("member_email",'',2):$object->email).'"></td></tr>';
// Address
print '<tr><td>'.$langs->trans("Address").'</td><td>';
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="2">'.(isset($_POST["address"])?GETPOST("address",'',2):$object->address).'</textarea>';
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_2.'">'.(isset($_POST["address"])?GETPOST("address",'',2):$object->address).'</textarea>';
print '</td></tr>';
// Zip / Town
@@ -1144,7 +1129,7 @@ else
// Country
//$object->country_id=$object->country_id?$object->country_id:$mysoc->country_id; // In edit mode we don't force to company country if not defined
print '<tr><td width="25%">'.$langs->trans('Country').'</td><td>';
print '<tr><td>'.$langs->trans('Country').'</td><td>';
print $form->select_country(isset($_POST["country_id"])?$_POST["country_id"]:$object->country_id,'country_id');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
print '</td></tr>';
@@ -1169,7 +1154,7 @@ else
// Skype
if (! empty($conf->skype->enabled))
{
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="skype" size="40" value="'.(isset($_POST["skype"])?GETPOST("skype"):$object->skype).'"></td></tr>';
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="skype" class="minwidth100" value="'.(isset($_POST["skype"])?GETPOST("skype"):$object->skype).'"></td></tr>';
}
// Birthday
@@ -1186,7 +1171,7 @@ else
if (! empty( $conf->categorie->enabled ) && !empty( $user->rights->categorie->lire ))
{
print '<tr><td>' . fieldLabel('Categories', 'memcats') . '</td>';
print '<td colspan="2">';
print '<td>';
$cate_arbo = $form->select_all_categories(Categorie::TYPE_MEMBER, null, null, null, null, 1);
$c = new Categorie($db);
$cats = $c->containing($object->id, Categorie::TYPE_MEMBER);
@@ -1198,7 +1183,7 @@ else
}
// Other attributes
$parameters=array("colspan"=>2);
$parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
if (empty($reshook) && ! empty($extrafields->attribute_label))
{
@@ -1274,7 +1259,7 @@ else
*/
$head = member_prepare_head($object);
dol_fiche_head($head, 'general', $langs->trans("Member"), 0, 'user');
dol_fiche_head($head, 'general', $langs->trans("Member"), -1, 'user');
// Confirm create user
if ($action == 'create_user')
@@ -1417,12 +1402,12 @@ else
if (! empty($conf->societe->enabled)) $rowspan++;
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'rowid', $linkback);
print '<div class="fichecenter">';
print '<div class="fichehalfleft">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent">';
@@ -1464,15 +1449,15 @@ else
}
print '</td></tr>';
}
print '</table>';
print '</div>';
print '<div class="fichehalfright"><div class="ficheaddleft">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">';
// Birthday
print '<tr><td class="titlefield">'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';
@@ -1488,13 +1473,8 @@ else
print '</td></tr>';
}
// Other attributes
$parameters=array('colspan'=>2);
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
if (empty($reshook) && ! empty($extrafields->attribute_label))
{
print $object->showOptionals($extrafields, 'view', $parameters);
}
// Other attributes
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
// Date end subscription
print '<tr><td>'.$langs->trans("SubscriptionEndDate").'</td><td class="valeur">';
@@ -1519,7 +1499,7 @@ else
}
}
print '</td></tr>';
// Third party Dolibarr
if (! empty($conf->societe->enabled))
{
@@ -1596,12 +1576,12 @@ else
print '<div style="clear:both"></div>';
dol_fiche_end();
/*
* Hotbar
*/
print '<div class="tabsAction">';
$parameters = array();
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been
@@ -1617,7 +1597,7 @@ else
{
print '<div class="inline-block divButAction"><font class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Modify").'</font></div>';
}
// Validate
if ($object->statut == -1)
{
@@ -1630,7 +1610,7 @@ else
print '<div class="inline-block divButAction"><font class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Validate").'</font></div>';
}
}
// Reactivate
if ($object->statut == 0)
{
@@ -1643,7 +1623,7 @@ else
print '<div class="inline-block divButAction"><font class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Reenable")."</font></div>";
}
}
// Send card by email
if ($user->rights->adherent->creer)
{
@@ -1661,7 +1641,7 @@ else
{
print '<div class="inline-block divButAction"><font class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("SendCardByMail")."</font></div>";
}
// Terminate
if ($object->statut >= 1)
{
@@ -1674,7 +1654,7 @@ else
print '<div class="inline-block divButAction"><font class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Resiliate")."</font></div>";
}
}
// Create third party
if (! empty($conf->societe->enabled) && ! $object->fk_soc)
{
@@ -1688,7 +1668,7 @@ else
print '<div class="inline-block divButAction"><font class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("CreateDolibarrThirdParty")."</font></div>";
}
}
// Create user
if (! $user->societe_id && ! $object->user_id)
{
@@ -1702,7 +1682,7 @@ else
print '<div class="inline-block divButAction"><font class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("CreateDolibarrLogin")."</font></div>";
}
}
// Delete
if ($user->rights->adherent->supprimer)
{
@@ -1712,12 +1692,12 @@ else
{
print '<div class="inline-block divButAction"><font class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Delete")."</font></div>";
}
// Action SPIP
if (! empty($conf->mailmanspip->enabled) && ! empty($conf->global->ADHERENT_USE_SPIP))
{
$isinspip = $mailmanspip->is_in_spip($object);
if ($isinspip == 1)
{
print '<div class="inline-block divButAction"><a class="butAction" href="card.php?rowid='.$object->id.'&action=del_spip">'.$langs->trans("DeleteIntoSpip")."</a></div>\n";
@@ -1727,7 +1707,7 @@ else
print '<div class="inline-block divButAction"><a class="butAction" href="card.php?rowid='.$object->id.'&action=add_spip">'.$langs->trans("AddIntoSpip")."</a></div>\n";
}
}
}
}
print '</div>';
@@ -1737,11 +1717,11 @@ else
print '<br><br><font class="error">'.$langs->trans('SPIPConnectionFailed').': '.$mailmanspip->error.'</font>';
}
print '<div class="fichecenter"><div class="fichehalfleft">';
print '<a name="builddoc"></a>'; // ancre
// Documents generes
$filename = dol_sanitizeFileName($object->ref);
//$filename = 'tmp_cards.php';
@@ -1753,15 +1733,15 @@ else
print $formfile->showdocuments('member', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $object->default_lang, '', $object);
$somethingshown = $formfile->numoffiles;
// Show links to link elements
//$linktoelem = $form->showLinkToObjectBlock($object, null, array('subscription'));
//$somethingshown = $form->showLinkedObjectBlock($object, '');
// Show links to link elements
/*$linktoelem = $form->showLinkToObjectBlock($object,array('order'));
if ($linktoelem) print ($somethingshown?'':'<br>').$linktoelem;
// Link for paypal payment
/*
if (! empty($conf->paypal->enabled) && $object->statut != 0) {
@@ -1770,15 +1750,15 @@ else
}
*/
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
// List of actions on element
/* Already in tab Agenda/Events
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
$somethingshown = $formactions->showactions($object, 'member', $socid);
*/
print '</div></div></div>';
print '</div></div></div>';
}
}

View File

@@ -209,6 +209,23 @@ class Adherent extends CommonObject
// Substitutions
$substitutionarray=array(
'__DOL_MAIN_URL_ROOT__'=>DOL_MAIN_URL_ROOT,
'__ID__'=>$msgishtml?dol_htmlentitiesbr($this->id):$this->id,
'__CIVILITY__'=>$this->getCivilityLabel(),
'__FIRSTNAME__'=>$msgishtml?dol_htmlentitiesbr($this->firstname):$this->firstname,
'__LASTNAME__'=>$msgishtml?dol_htmlentitiesbr($this->lastname):$this->lastname,
'__FULLNAME__'=>$msgishtml?dol_htmlentitiesbr($this->getFullName($langs)):$this->getFullName($langs),
'__COMPANY__'=>$msgishtml?dol_htmlentitiesbr($this->societe):$this->societe,
'__ADDRESS__'=>$msgishtml?dol_htmlentitiesbr($this->address):$this->address,
'__ZIP__'=>$msgishtml?dol_htmlentitiesbr($this->zip):$this->zip,
'__TOWN_'=>$msgishtml?dol_htmlentitiesbr($this->town):$this->town,
'__COUNTRY__'=>$msgishtml?dol_htmlentitiesbr($this->country):$this->country,
'__EMAIL__'=>$msgishtml?dol_htmlentitiesbr($this->email):$this->email,
'__BIRTH__'=>$msgishtml?dol_htmlentitiesbr($birthday):$birthday,
'__PHOTO__'=>$msgishtml?dol_htmlentitiesbr($this->photo):$this->photo,
'__LOGIN__'=>$msgishtml?dol_htmlentitiesbr($this->login):$this->login,
'__PASSWORD__'=>$msgishtml?dol_htmlentitiesbr($this->pass):$this->pass,
// For backward compatibility
'%DOL_MAIN_URL_ROOT%'=>DOL_MAIN_URL_ROOT,
'%ID%'=>$msgishtml?dol_htmlentitiesbr($this->id):$this->id,
'%CIVILITY%'=>$this->getCivilityLabel(),
@@ -225,7 +242,6 @@ class Adherent extends CommonObject
'%PHOTO%'=>$msgishtml?dol_htmlentitiesbr($this->photo):$this->photo,
'%LOGIN%'=>$msgishtml?dol_htmlentitiesbr($this->login):$this->login,
'%PASSWORD%'=>$msgishtml?dol_htmlentitiesbr($this->pass):$this->pass,
// For backward compatibility
'%INFOS%'=>$msgishtml?dol_htmlentitiesbr($infos):$infos,
'%SOCIETE%'=>$msgishtml?dol_htmlentitiesbr($this->societe):$this->societe,
'%PRENOM%'=>$msgishtml?dol_htmlentitiesbr($this->firstname):$this->firstname,
@@ -234,16 +250,10 @@ class Adherent extends CommonObject
'%VILLE%'=>$msgishtml?dol_htmlentitiesbr($this->town):$this->town,
'%PAYS%'=>$msgishtml?dol_htmlentitiesbr($this->country):$this->country,
);
// Add extrafields as substitution key %EXTRA_XXX%
foreach($this->array_options as $key => $val)
{
$keyshort=preg_replace('/^(options|extra)_/','',$key);
$substitutionarray['%EXTRA_'.$keyshort.'%']=$val;
}
complete_substitutions_array($substitutionarray, $langs);
complete_substitutions_array($substitutionarray, $langs, $this);
return make_substitutions($text,$substitutionarray);
return make_substitutions($text, $substitutionarray, $langs);
}
@@ -335,7 +345,7 @@ class Adherent extends CommonObject
{
// Add link to user
$sql = "UPDATE ".MAIN_DB_PREFIX."user SET";
$sql.= " fk_member = '".$this->id."'";
$sql.= " fk_member = ".$this->id;
$sql.= " WHERE rowid = ".$this->user_id;
dol_syslog(get_class($this)."::create", LOG_DEBUG);
$resql = $this->db->query($sql);
@@ -439,18 +449,18 @@ class Adherent extends CommonObject
$sql.= ", town=" .($this->town?"'".$this->db->escape($this->town)."'":"null");
$sql.= ", country=".($this->country_id>0?"'".$this->country_id."'":"null");
$sql.= ", state_id=".($this->state_id>0?"'".$this->state_id."'":"null");
$sql.= ", email='".$this->email."'";
$sql.= ", skype='".$this->skype."'";
$sql.= ", email='".$this->db->escape($this->email)."'";
$sql.= ", skype='".$this->db->escape($this->skype)."'";
$sql.= ", phone=" .($this->phone?"'".$this->db->escape($this->phone)."'":"null");
$sql.= ", phone_perso=" .($this->phone_perso?"'".$this->db->escape($this->phone_perso)."'":"null");
$sql.= ", phone_mobile=" .($this->phone_mobile?"'".$this->db->escape($this->phone_mobile)."'":"null");
$sql.= ", note_private=" .($this->note_private?"'".$this->db->escape($this->note_private)."'":"null");
$sql.= ", note_public=" .($this->note_public?"'".$this->db->escape($this->note_public)."'":"null");
$sql.= ", photo=" .($this->photo?"'".$this->photo."'":"null");
$sql.= ", public='".$this->public."'";
$sql.= ", public='".$this->db->escape($this->public)."'";
$sql.= ", statut=" .$this->statut;
$sql.= ", fk_adherent_type=".$this->typeid;
$sql.= ", morphy='".$this->morphy."'";
$sql.= ", morphy='".$this->db->escape($this->morphy)."'";
$sql.= ", birth=" .($this->birth?"'".$this->db->idate($this->birth)."'":"null");
if ($this->datefin) $sql.= ", datefin='".$this->db->idate($this->datefin)."'"; // Must be modified only when deleting a subscription
if ($this->datevalid) $sql.= ", datevalid='".$this->db->idate($this->datevalid)."'"; // Must be modified only when validating a member
@@ -649,7 +659,7 @@ class Adherent extends CommonObject
// Search for last subscription id and end date
$sql = "SELECT rowid, datec as dateop, dateadh as datedeb, datef as datefin";
$sql.= " FROM ".MAIN_DB_PREFIX."subscription";
$sql.= " WHERE fk_adherent='".$this->id."'";
$sql.= " WHERE fk_adherent=".$this->id;
$sql.= " ORDER by dateadh DESC"; // Sort by start subscription date
dol_syslog(get_class($this)."::update_end_date", LOG_DEBUG);
@@ -695,11 +705,13 @@ class Adherent extends CommonObject
* Fonction qui supprime l'adherent et les donnees associees
*
* @param int $rowid Id of member to delete
* @param User $user User object
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, 0=nothing to do, >0 if OK
*/
function delete($rowid)
function delete($rowid, $user, $notrigger=0)
{
global $conf, $langs, $user;
global $conf, $langs;
$result = 0;
$error=0;
@@ -710,6 +722,14 @@ class Adherent extends CommonObject
$this->db->begin();
if (! $error && ! $notrigger)
{
// Call trigger
$result=$this->call_trigger('MEMBER_DELETE',$user);
if ($result < 0) $error++;
// End call triggers
}
// Remove category
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_member WHERE fk_member = ".$rowid;
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
@@ -777,16 +797,6 @@ class Adherent extends CommonObject
}
}
if (! $error)
{
// Call trigger
$result=$this->call_trigger('MEMBER_DELETE',$user);
if ($result < 0) { $error++; }
// End call triggers
}
if (! $error)
{
$this->db->commit();
@@ -1089,7 +1099,7 @@ class Adherent extends CommonObject
elseif ($ref || $fk_soc) {
$sql.= " AND d.entity IN (".getEntity().")";
if ($ref) $sql.= " AND d.rowid='".$this->db->escape($ref)."'";
elseif ($fk_soc) $sql.= " AND d.fk_soc='".$fk_soc."'";
elseif ($fk_soc > 0) $sql.= " AND d.fk_soc=".$fk_soc;
}
elseif ($ref_ext)
{
@@ -1570,40 +1580,85 @@ class Adherent extends CommonObject
/**
* Return clicable name (with picto eventually)
*
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
* @param int $maxlen length max libelle
* @param string $option Page lien
* @param int $withpictoimg 0=No picto, 1=Include picto into link, 2=Only picto, -1=Include photo into link, -2=Only picto photo, -3=Only photo very small)
* @param int $maxlen length max label
* @param string $option Page for link
* @param string $mode ''=Show firstname and lastname, 'firstname'=Show only firstname, 'login'=Show login, 'ref'=Show ref
* @param string $morecss Add more css on link
* @return string Chaine avec URL
*/
function getNomUrl($withpicto=0,$maxlen=0,$option='card')
function getNomUrl($withpictoimg=0,$maxlen=0,$option='card',$mode='',$morecss='')
{
global $langs;
global $conf, $langs;
$result='';
$label = '<u>' . $langs->trans("ShowMember") . '</u>';
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $withpictoimg) $withpictoimg=0;
$result=''; $label='';
$link=''; $linkstart=''; $linkend='';
if (! empty($this->photo))
{
$label.= '<div class="photointooltip">';
$label.= Form::showphoto('memberphoto', $this, 80, 0, 0, 'photowithmargin photologintooltip', 'small', 0, 1);
$label.= '</div><div style="clear: both;"></div>';
}
$label.= '<div class="centpercent">';
$label.= '<u>' . $langs->trans("Member") . '</u>';
if (! empty($this->ref))
$label.= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
if (! empty($this->firstname) || ! empty($this->lastname))
$label.= '<br><b>' . $langs->trans('Name') . ':</b> ' . $this->getFullName($langs);
$linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
$label.='</div>';
$link=''; $linkend='';
if ($option == 'card' || $option == 'category')
{
$link = '<a href="'.DOL_URL_ROOT.'/adherents/card.php?rowid='.$this->id.$linkclose;
$linkend='</a>';
$link = '<a href="'.DOL_URL_ROOT.'/adherents/card.php?rowid='.$this->id.'"';
}
if ($option == 'subscription')
{
$link = '<a href="'.DOL_URL_ROOT.'/adherents/subscription.php?rowid='.$this->id.$linkclose;
$linkend='</a>';
$link = '<a href="'.DOL_URL_ROOT.'/adherents/subscription.php?rowid='.$this->id.'"';
}
$picto='user';
$linkclose="";
if (empty($notooltip))
{
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
{
$langs->load("users");
$label=$langs->trans("ShowUser");
$linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"';
}
$linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
$linkclose.= ' class="classfortooltip'.($morecss?' '.$morecss:'').'"';
}
$link.=$linkclose.'>';
$linkend='</a>';
//if ($withpictoimg == -1) $result.='<div class="nowrap">';
$result.=$link;
if ($withpictoimg)
{
$paddafterimage='';
if (abs($withpictoimg) == 1) $paddafterimage='style="margin-right: 3px;"';
// Only picto
if ($withpictoimg > 0) $picto='<div class="inline-block nopadding valignmiddle'.($morecss?' userimg'.$morecss:'').'">'.img_object('', 'user', $paddafterimage.' '.($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).'</div>';
// Picto must be a photo
else $picto='<div class="inline-block nopadding valignmiddle'.($morecss?' userimg'.$morecss:'').'"'.($paddafterimage?' '.$paddafterimage:'').'>'.Form::showphoto('memberphoto', $this, 0, 0, 0, 'userphoto'.($withpictoimg==-3?'small':''), 'mini', 0, 1).'</div>';
$result.=$picto;
}
if ($withpictoimg > -2 && $withpictoimg != 2)
{
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result.='<div class="inline-block nopadding valignmiddle'.((! isset($this->statut) || $this->statut)?'':' strikefordisabled').($morecss?' usertext'.$morecss:'').'">';
if ($mode == 'login') $result.=dol_trunc($this->login, $maxlen);
elseif ($mode == 'ref') $result.=$this->id;
else $result.=$this->getFullName($langs,'',($mode == 'firstname' ? 2 : -1),$maxlen);
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result.='</div>';
}
$result.=$linkend;
//if ($withpictoimg == -1) $result.='</div>';
if ($withpicto) $result.=($link.img_object('', $picto, 'class="classfortooltip"').$linkend);
if ($withpicto && $withpicto != 2) $result.=' ';
$result.=$link.(($withpicto != 2) ? ($maxlen?dol_trunc($this->ref,$maxlen):$this->ref) : '').$linkend;
return $result;
}
@@ -1725,7 +1780,7 @@ class Adherent extends CommonObject
$sql = "SELECT count(a.rowid) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a";
$sql.= " WHERE a.statut > 0";
$sql.= " AND a.entity IN (".getEntity('adherent', 1).")";
$sql.= " AND a.entity IN (".getEntity('adherent').")";
$resql=$this->db->query($sql);
if ($resql)
@@ -1763,7 +1818,7 @@ class Adherent extends CommonObject
$sql = "SELECT a.rowid, a.datefin, a.statut";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a";
$sql.= " WHERE a.statut = 1";
$sql.= " AND a.entity IN (".getEntity('adherent', 1).")";
$sql.= " AND a.entity IN (".getEntity('adherent').")";
$sql.= " AND (a.datefin IS NULL or a.datefin < '".$this->db->idate($now)."')";
$resql=$this->db->query($sql);
@@ -1775,7 +1830,7 @@ class Adherent extends CommonObject
$response->warning_delay=$conf->adherent->subscription->warning_delay/60/60/24;
$response->label=$langs->trans("MembersWithSubscriptionToReceive");
$response->url=DOL_URL_ROOT.'/adherents/list.php?mainmenu=members&amp;statut=1&amp;filter=outofdate';
$response->img=img_object($langs->trans("Members"),"user");
$response->img=img_object('',"user");
$adherentstatic = new Adherent($this->db);
@@ -1818,18 +1873,16 @@ class Adherent extends CommonObject
$langs->load("orders");
// Positionne le modele sur le nom du modele a utiliser
if (! dol_strlen($modele))
{
if (! empty($conf->global->ADHERENT_ADDON_PDF))
{
$modele = $conf->global->ADHERENT_ADDON_PDF;
}
else
{
$modele = 'standard';
}
}
if (! dol_strlen($modele)) {
$modele = 'standard';
if ($this->modelpdf) {
$modele = $this->modelpdf;
} elseif (! empty($conf->global->ADHERENT_ADDON_PDF)) {
$modele = $conf->global->ADHERENT_ADDON_PDF;
}
}
$modelpath = "core/modules/member/doc/";

View File

@@ -1,8 +1,8 @@
<?php
/* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
/* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009-2017 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -36,7 +36,13 @@ class AdherentType extends CommonObject
public $table_element = 'adherent_type';
public $element = 'adherent_type';
public $picto = 'group';
/**
* @var string
* @deprecated Use label
* @see label
*/
public $libelle;
/** @var string Label */
public $label;
/**
@@ -81,12 +87,13 @@ class AdherentType extends CommonObject
global $conf;
$this->statut=(int) $this->statut;
$this->label=(!empty($this->libelle)?trim($this->libelle):trim($this->label));
$sql = "INSERT INTO ".MAIN_DB_PREFIX."adherent_type (";
$sql.= "libelle";
$sql.= ", entity";
$sql.= ") VALUES (";
$sql.= "'".$this->db->escape($this->libelle)."'";
$sql.= "'".$this->db->escape($this->label)."'";
$sql.= ", ".$conf->entity;
$sql.= ")";
@@ -117,15 +124,15 @@ class AdherentType extends CommonObject
$error=0;
$this->libelle=trim($this->libelle);
$this->label=(!empty($this->libelle)?trim($this->libelle):trim($this->label));
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent_type ";
$sql.= "SET ";
$sql.= "statut = ".$this->statut.",";
$sql.= "libelle = '".$this->db->escape($this->libelle) ."',";
$sql.= "subscription = '".$this->subscription."',";
$sql.= "libelle = '".$this->db->escape($this->label) ."',";
$sql.= "subscription = '".$this->db->escape($this->subscription)."',";
$sql.= "note = '".$this->db->escape($this->note)."',";
$sql.= "vote = '".$this->vote."',";
$sql.= "vote = '".$this->db->escape($this->vote)."',";
$sql.= "mail_valid = '".$this->db->escape($this->mail_valid)."'";
$sql .= " WHERE rowid =".$this->id;
@@ -307,7 +314,7 @@ class AdherentType extends CommonObject
{
return '';
}
/**
* getMailOnValid
*

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