2
0
forked from Wavyzz/dolibarr

Compare commits

...

3032 Commits
5.0.7 ... 6.0.6

Author SHA1 Message Date
Laurent Destailleur
5efb94b06f Prepare 5.0.6 2018-03-22 14:13:58 +01:00
Laurent Destailleur
ed2d9f179b Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/contrat/card.php
2018-03-22 14:12:37 +01:00
Laurent Destailleur
7d5c3a5c4f Merge pull request #8426 from atm-ph/fix_5.0_files_lost_on_contract
Fix documents are lost if we rename contrat ref
2018-03-21 20:40:23 +01:00
atm-ph
2094c48b7f Fix missing folder with multientity 2018-03-21 12:14:04 +01:00
atm-ph
cad7bdc74b Fix documents are lost if we rename contrat ref 2018-03-21 11:54:25 +01:00
Laurent Destailleur
04199c2b4b Fix according to mail of Olivier Geffroy the 21th of march 2018-03-21 10:59:13 +01:00
Laurent Destailleur
f371f80de3 Merge pull request #8400 from atm-arnaud/6.0_fix_societe_banner_status
FIX show status on societe banner
2018-03-18 12:46:19 +01:00
arnaud
32ce42610a FIX show status on societe banner 2018-03-16 11:18:00 +01:00
Laurent Destailleur
f3be6045f9 Merge pull request #8385 from ATM-Nicolas/fix_project_delete_task
FIX : Delete tasks on project delete will now trigger TASK_DELETE
2018-03-15 00:39:18 +01:00
ATM-Nicolas
e801b5a431 FIX : Delete tasks on project delete will now trigger TASK_DELETE 2018-03-14 11:38:42 +01:00
Laurent Destailleur
6b2490f4e4 Merge pull request #8375 from atm-quentin/6.0
FIX reverse field to have object loaded in doaction
2018-03-13 17:56:06 +01:00
atm-quentin
af09a3714b FIX reverse field to have object loaded in doaction 2018-03-13 17:12:03 +01:00
Laurent Destailleur
f82bedb36c Merge pull request #8367 from atm-quentin/6.0
FIX check shipping on delete order
2018-03-13 09:53:57 +01:00
Laurent Destailleur
dcd3387a30 Update commande.class.php 2018-03-13 09:53:21 +01:00
Laurent Destailleur
51229a602f Update commande.class.php 2018-03-13 09:51:45 +01:00
atm-quentin
6c7a5cebdf FIX check verif exped on delete order 2018-03-13 09:34:50 +01:00
Laurent Destailleur
d045dca003 Fix financial commitment 2018-03-12 20:04:25 +01:00
Laurent Destailleur
95e7062ca3 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-03-11 19:29:01 +01:00
Laurent Destailleur
d5d6939fd9 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/core/class/commonobject.class.php
2018-03-11 19:28:39 +01:00
Laurent Destailleur
f98ca2e31a Merge pull request #8335 from inoveaconseil/patch-1
Fix #8092
2018-03-11 00:06:28 +01:00
Laurent Destailleur
03f7df88c6 Update card.php 2018-03-11 00:05:32 +01:00
Laurent Destailleur
c755d5f58d Merge pull request #8333 from atm-maxime/fix_advtargetemailin
Fix #8057
2018-03-10 23:54:34 +01:00
Inovea Conseil
c2397fad60 Fix #8092 2018-03-10 23:49:43 +01:00
Maxime Kohlhaas
c008853842 Fix #8057 2018-03-10 23:05:33 +01:00
Laurent Destailleur
faef7a2e0c Merge pull request #8324 from atm-maxime/fix_unit_replen
Fix unit in replenish #7225
2018-03-10 12:58:16 +01:00
Maxime Kohlhaas
fd36ade61a Fix unit in replenish #7225 2018-03-10 11:20:32 +01:00
Laurent Destailleur
1d571c4159 Merge pull request #8315 from tuxgasy/5.0_invoice_supplier_multicurrency
Fix bug when updating multi currency rate on invoice supplier
2018-03-09 22:49:50 +01:00
TuxGasy
9eeb80151e Fix bug when updating multi currency rate on invoice supplier 2018-03-09 21:13:54 +01:00
Laurent Destailleur
6d0c4deb6e Merge pull request #8295 from ATM-Marc/FIX_product_photo_ecm
FIX: warning when adding ECM files using old photo path
2018-03-08 16:24:42 +01:00
Marc de Lima Lucio
884b74a6bb FIX: warning when adding ECM files using old photo path 2018-03-07 17:12:59 +01:00
Laurent Destailleur
8b9041b93e Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-03-07 13:02:18 +01:00
Laurent Destailleur
4caefbe926 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2018-03-07 12:59:52 +01:00
Laurent Destailleur
94de6efa4b Merge pull request #8291 from ATM-Marc/FIX_order_export_date_livraison
FIX: add planned delivery to order exports
2018-03-07 12:59:32 +01:00
Laurent Destailleur
3284ebdcf1 Merge pull request #8290 from atm-alexis/6.0_fix_natural_search_double_space
FIX natural search double quote
2018-03-07 12:56:37 +01:00
Marc de Lima Lucio
dd208348c4 FIX: add planned delivery to order exports 2018-03-07 12:18:08 +01:00
alexis Algoud
cb27eb98e1 FIX natural search double quote 2018-03-07 11:42:47 +01:00
Laurent Destailleur
f9f37c52de Merge pull request #8275 from ATM-Nicolas/fix_order_line_fk_multicurrency
Fix order line fk multicurrency
2018-03-05 20:50:14 +01:00
ATM-Nicolas
60f8ca1283 Merge branch '6.0' of github.com:Dolibarr/dolibarr into fix_order_line_fk_multicurrency 2018-03-05 09:03:20 +01:00
Laurent Destailleur
57d6417095 Merge pull request #8264 from atm-alexis/FIX_migrate_script_product_photo
FIX migration script for product photo
2018-03-02 18:12:18 +01:00
Laurent Destailleur
6bb91dd5d2 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-03-02 17:54:42 +01:00
Laurent Destailleur
aab0a33f40 Merge pull request #8251 from atm-gauthier/5.0_fix_last_situation
FIX : if we make a mistake with situation_percent, now we can correct…
2018-03-02 17:54:20 +01:00
alexis Algoud
ce2fc28d80 FIX migration script for product photo 2018-03-02 16:12:58 +01:00
Laurent Destailleur
ee4fcba4f2 Fix class not found 2018-02-27 22:11:11 +01:00
gauthier
4d05bff780 FIX : if we make a mistake with situation_percent, now we can correct it. before situation_final was always set to 1 and no way to go back 2018-02-27 12:27:25 +01:00
ATM-Nicolas
27100df927 FIX : Avoid empty value to fk_multicurrency attribute 2018-02-27 11:06:11 +01:00
Laurent Destailleur
64dd6439e7 Merge pull request #8223 from atm-florian/6.0
fix bad link invoice URL into acoutantcy customer affectation
2018-02-25 12:42:03 +01:00
Laurent Destailleur
286d62edb8 Merge pull request #8221 from ATM-Marc/FIX_usercard_columns
FIX: solve column mismatch in user card with multicompany transverse mode + code cleanup
2018-02-25 12:35:05 +01:00
Laurent Destailleur
c698558d9e Merge pull request #8212 from simnandez/6.0
Fix: Not showing link to ad event if module is disabled
2018-02-25 12:28:06 +01:00
Laurent Destailleur
b20ae45265 Merge pull request #8210 from atm-john/fix_sql_entity
Fix sql entity for sub query
2018-02-25 12:27:35 +01:00
Laurent Destailleur
2d252e85e6 FIX Import process must stop after ending line nb to import 2018-02-25 12:15:36 +01:00
florian HENRY
b4b185abe0 fix bad link invoice URL into acoutantcy customer affectation 2018-02-23 14:42:52 +01:00
Marc de Lima Lucio
36cc1c6ca9 FIX: solve column mismatch in user card's usergroup list + code cleanup 2018-02-23 11:59:22 +01:00
Juanjo Menent
1d6baf5f2b Fix: Not showing link to ad event if module is disabled 2018-02-22 10:16:53 +01:00
John
b276a8186e Fix sql entity for sub query 2018-02-21 10:03:04 +01:00
Laurent Destailleur
7f419a29e7 Merge pull request #8072 from laudeco/hotfix/8028_replacement_bill
fix the bill replacement with discounts #8028
2018-02-20 15:19:19 +01:00
Laurent Destailleur
01c2971f4f Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-02-20 15:08:17 +01:00
Laurent Destailleur
9690e68bfb Merge pull request #8206 from fmarcet/5.0
Fix: Barcode type on massive init
2018-02-20 15:07:53 +01:00
Laurent Destailleur
b8736f5103 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-02-20 14:59:40 +01:00
Laurent Destailleur
a698ba0b56 Merge pull request #8205 from steschuser/5.0
FIX: #8139 User search does not work if MAIN_USE_OLD_SEARCH_FORM, missing list.php
2018-02-20 14:59:20 +01:00
Laurent Destailleur
85e5ac678f Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-02-20 14:56:17 +01:00
Laurent Destailleur
6c8e7494f0 Merge pull request #8200 from atm-maxime/fix_contact_tooltiip
Fix contact tooltip
2018-02-20 14:56:06 +01:00
Laurent Destailleur
276f2dce77 FIX #8200 2018-02-20 14:55:23 +01:00
Laurent Destailleur
67ee443b34 Fix can set holiday remaining to 0 2018-02-20 14:53:19 +01:00
Laurent Destailleur
4056b87a74 Fix syntax error 2018-02-20 12:36:03 +01:00
Laurent Destailleur
7321829732 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-02-20 12:34:15 +01:00
Laurent Destailleur
ea071b7680 Fix can't delete holiday refused 2018-02-20 12:31:26 +01:00
Ferran Marcet
671b4a399d Fix: Barcode type 2018-02-19 17:47:24 +01:00
Ferran Marcet
2e1727e323 Fix: Barcode type 2018-02-19 17:45:19 +01:00
Ferran Marcet
5535daf84a Merge branch '5.0up' into 5.0 2018-02-19 17:43:14 +01:00
sschwebel
7c583227fb FIX: #8139 2018-02-19 10:58:05 +01:00
Laurent Destailleur
033b898106 Merge pull request #8202 from atm-john/6.0_fix_invoice_extrafield_transmition_to_credit
fix invoice extrafield transmition to credit
2018-02-15 17:31:23 +01:00
John
49bad95d31 fix method exist test 2018-02-15 17:04:27 +01:00
John
63987fa32e fix invoice extrafield transmition to credit 2018-02-15 16:39:47 +01:00
Maxime Kohlhaas
bfd46f62ea Fix : contact and user getnomurl needs all info to display tooltip correctly 2018-02-15 15:18:25 +01:00
Maxime Kohlhaas
6fe69d4a60 Wrong field in thirdparty getnomurl 2018-02-15 15:17:59 +01:00
Laurent Destailleur
15ab37b46e Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-02-14 21:51:55 +01:00
Laurent Destailleur
b21feca9d7 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-02-14 21:51:35 +01:00
Laurent Destailleur
147b35d62e Merge pull request #8194 from hregis/6.0_multicompany
Fix: Update entity field in llx_user_rights and llx_usergroup_rights
2018-02-14 21:31:02 +01:00
Laurent Destailleur
cf5c972c65 Merge pull request #8193 from atm-ph/fix_6.0_multicurrency_situation_invoice
Fix apply global progress don't update multicurrency values
2018-02-14 21:27:52 +01:00
Laurent Destailleur
483bfb096b Merge pull request #8188 from atm-quentin/6.0_develop
NEW Add sale representative einstein_pdf_modules
2018-02-14 21:27:24 +01:00
Laurent Destailleur
c28d87252b Merge pull request #8184 from laudeco/hotfix/8183_welcome_email_adherent
Fix 8183 - adherent welcome e-mail edition always put 1 instead of keeping the e-mail
2018-02-14 20:51:57 +01:00
Laurent Destailleur
d0fdf700d7 Update type.php 2018-02-14 20:51:33 +01:00
Laurent Destailleur
0d00c51c2a Update type.php 2018-02-14 20:51:05 +01:00
Laurent Destailleur
94a76a1393 Merge pull request #8180 from atm-maxime/fix_service_list
Fix : contract service list context was mixing up with service list from product/service module
2018-02-14 20:43:03 +01:00
Laurent Destailleur
27c55635f3 Merge pull request #8164 from hregis/6.0_bug
Fix: nocheck for "fournisseur", already check with "societe"
2018-02-14 20:36:22 +01:00
Laurent Destailleur
23ee6748f7 Update fournisseurs.php 2018-02-14 20:36:13 +01:00
Regis Houssin
fa2fddcdc1 Fix: Update entity field in llx_user_rights and llx_usergroup_rights 2018-02-14 14:30:39 +01:00
atm-ph
c690dfb258 Fix apply global progress don't update multicurrency values 2018-02-14 10:15:38 +01:00
atm-quentin
144c13998a NEW_einstein_pdf_modules 2018-02-13 09:51:33 +01:00
De Coninck Laurent
1052213c97 Fix 8183 - adherent welcome e-mail
Fix the adherent welcome e-mail.

[see: #8183]
2018-02-12 18:12:43 +01:00
Maxime Kohlhaas
ef05171641 Fix : contract service list context was mixing up with service list from product/service module 2018-02-12 13:48:43 +01:00
Regis Houssin
24cc687724 Fix: you can't check "fournisseur" with checkUserAccessToObject without
object ID
2018-02-12 09:28:41 +01:00
Regis Houssin
448fcae02f Fix: move "fournisseur" in $checksoc 2018-02-12 09:03:53 +01:00
Regis Houssin
abb7e651d1 Merge branch '6.0' of https://github.com/Dolibarr/dolibarr.git into 6.0_bug 2018-02-12 09:02:12 +01:00
Laurent Destailleur
4d6f87e544 Merge pull request #8168 from simnandez/6.0
Fix: Contracts not show price
2018-02-12 03:13:31 +01:00
Laurent Destailleur
d731857fd0 Update linkedobjectblock.tpl.php 2018-02-12 03:13:12 +01:00
Laurent Destailleur
12f1e4c04b Merge pull request #8167 from atm-john/fix_contract_line_extrafields_on_save
Fix Missing insert of extrafields on contract add line
2018-02-12 02:56:19 +01:00
Laurent Destailleur
d3d3bcaca5 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-02-12 02:53:21 +01:00
Laurent Destailleur
f88874c1f7 Code comment 2018-02-12 02:53:08 +01:00
Laurent Destailleur
5c59f5c63b Merge pull request #8159 from atm-ph/fix_6.0_cant_update_nblignes_on_pdf_creation
Fix can't update $nblignes on beforePDFCreation if we update $object->lines
2018-02-12 02:34:52 +01:00
Juanjo Menent
67ce71bc48 Fix: Contracts not show price 2018-02-09 18:23:11 +01:00
John
2817ace0d2 Fix contract line extrafields save on add line 2018-02-09 15:47:18 +01:00
Regis Houssin
a5814ce779 Fix: nocheck for "fournisseur", already check with "societe" 2018-02-09 11:00:43 +01:00
atm-ph
b074f580db Fix can't update $nblignes on beforePDFCreation if we update $object->lines 2018-02-08 16:59:17 +01:00
Laurent Destailleur
39cd63e2d4 Merge pull request #8143 from simnandez/6.0
FIX: Withdrawals lines not filter by company name and not respect dropdown limit lines by page
2018-02-08 14:07:14 +01:00
Laurent Destailleur
371b168db1 Merge pull request #8133 from atm-quentin/6.0
FIX unset categorie
2018-02-08 13:09:52 +01:00
Laurent Destailleur
3f17c92aa3 Update card.php 2018-02-08 13:09:21 +01:00
Laurent Destailleur
c988d3f1cc Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/compta/facture.php
2018-02-08 12:53:26 +01:00
Laurent Destailleur
2e3bb4a585 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-02-08 12:48:48 +01:00
Laurent Destailleur
414093f94f Merge pull request #8155 from atm-ph/fix_6.0_pdf_writelinkedobjects_position
Fix position if module use pdf hook "linkedobjects"
2018-02-08 12:48:37 +01:00
Laurent Destailleur
8156374005 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-02-08 12:45:30 +01:00
Laurent Destailleur
a26bb2d884 FIX #8151 2018-02-08 12:41:31 +01:00
atm-ph
6254e20c67 Fix position if module use pdf hook "linkedobjects" 2018-02-07 15:41:39 +01:00
Juanjo Menent
9b56555962 FIX: Withdrawals lines not filter by company name and not respect dropdown limit lines by page 2018-02-06 18:49:29 +01:00
atm-quentin
d989483d2b Merge branch '60test' into 6.0 2018-02-05 16:10:40 +01:00
atm-quentin
783dc18cd0 Merge 2018-02-05 16:10:19 +01:00
atm-quentin
2081aefc84 FIX creer into lire 2018-02-05 16:07:08 +01:00
atm-quentin
bb93b98260 NEW field commerciaux and categ export CustomersInvoicesAndPayments 2018-02-05 15:25:49 +01:00
Laurent Destailleur
2d4624a1be Merge pull request #8134 from hregis/6.0_multicompany
Fix: avoid error -1
2018-02-05 15:13:31 +01:00
Regis Houssin
839de65012 Fix: avoid error -1 2018-02-05 11:30:31 +01:00
atm-quentin
ae9c7ad6b6 FIX unset categorie 2018-02-05 10:40:52 +01:00
Laurent Destailleur
906a9eaa5a Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-02-04 23:12:57 +01:00
Laurent Destailleur
dbe45d03d3 Fix: amount into form must be numeric without format 2018-02-04 23:12:19 +01:00
Laurent Destailleur
e5cb2be618 Merge pull request #8129 from hregis/6.0_bug
Fix: remove lines with special code when convert to reduc
2018-02-04 12:18:20 +01:00
Laurent Destailleur
c4277c1e54 Merge pull request #8128 from hregis/5.0_bug
Fix: remove lines with special code when convert to reduc
2018-02-04 12:17:54 +01:00
Laurent Destailleur
f3700b66c6 Fix size of columns when using PRODUCT_USE_UNIT 2018-02-04 11:17:45 +01:00
Laurent Destailleur
fd8f89c708 FIX a discount is a percent, not an amount, so we use vatrate not price 2018-02-04 11:13:47 +01:00
Regis Houssin
8ee1186492 Fix: wrong test 2018-02-04 09:05:35 +01:00
Regis Houssin
d5b7184c8d Fix: wrong test 2018-02-04 09:04:15 +01:00
Regis Houssin
a161ca37ff Fix: use product_type instead special_code 2018-02-04 08:58:31 +01:00
Regis Houssin
c1e6d88442 Fix: use product_type instead special_code 2018-02-04 08:55:51 +01:00
Laurent Destailleur
2114e6ba4e Merge pull request #8101 from simnandez/6.0
FIX: #7974 Contract - Invalid reference on the document
2018-02-03 16:57:22 +01:00
Laurent Destailleur
c9e7e6d925 Merge pull request #8130 from hregis/6.0_bug2
Fix: compatibility with multicompany sharing
2018-02-03 16:45:16 +01:00
Juanjo Menent
c434136ba5 Merge remote-tracking branch 'upstream/6.0' into 6.0 2018-02-02 23:44:54 +01:00
Juanjo Menent
464ee6f9d6 Revert 2018-02-02 17:46:25 +01:00
Regis Houssin
13106d34a6 Fix: compatibility with multicompany sharing 2018-02-02 12:36:47 +01:00
Regis Houssin
38d735341c Fix: remove lines with special code when convert to reduc 2018-02-02 10:24:16 +01:00
Regis Houssin
2147bd23e6 Fix: remove lines with special code when convert to reduc 2018-02-02 10:22:47 +01:00
Laurent Destailleur
cba0447cf1 Merge pull request #8117 from atm-quentin/6.0
FIX update_extras on fourn card
2018-02-01 15:51:36 +01:00
atm-quentin
c80fa48225 FIX update_extras on fourn card 2018-02-01 09:31:04 +01:00
Laurent Destailleur
bdfbe462df Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-01-29 21:04:49 +01:00
Laurent Destailleur
8102883356 Fix error when email list contains ', ,'
Fix output dir of notification
2018-01-29 20:36:40 +01:00
Laurent Destailleur
d2b81c23c0 Merge pull request #8105 from kadogo/fichinter-api-cannot-grab-the-good-informations
FIX: Global on $user parameter reset the variable
2018-01-29 19:48:52 +01:00
Juanjo Menent
3c281ccefa FIX: Bad localtaxes assignment in cashdesk 2018-01-29 17:50:00 +01:00
kadogo
ba58578d60 FIX: Global on $user parameter reset the variable
When we use the fichinter API with global, the $user object is reset
If global is not applied on $user we can retrieve the informations from it
2018-01-27 19:31:48 +01:00
Juanjo Menent
cdb63bada3 FIX: #7974 Contract - Invalid reference on the document 2018-01-26 18:13:55 +01:00
Laurent Destailleur
1834be79a0 Fix supplier suggested when creating order from project overview 2018-01-26 11:31:34 +01:00
Laurent Destailleur
5b917c039e Prepare 6.0.6 2018-01-26 11:08:08 +01:00
Laurent Destailleur
92cace6747 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-01-26 01:40:55 +01:00
Laurent Destailleur
40b63be4b9 Fix package 2018-01-26 01:40:32 +01:00
Laurent Destailleur
47d0b6583e Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2018-01-26 01:40:04 +01:00
Laurent Destailleur
c0e719e3d8 Fix package scripts 2018-01-26 01:39:42 +01:00
Laurent Destailleur
d3c0414b4f Update changelog 2018-01-26 01:16:36 +01:00
Laurent Destailleur
2c0eeaf8de FIX #8093 2018-01-25 20:57:51 +01:00
Laurent Destailleur
1da7b154c1 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-01-24 11:48:31 +01:00
Laurent Destailleur
54fb59d8db Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/compta/paiement.php
2018-01-24 11:45:43 +01:00
Laurent Destailleur
e66b266432 Merge pull request #8090 from atm-arnaud/FIX_sepa_mail_encode
FIX email sent was not in HTML
2018-01-24 11:17:16 +01:00
Laurent Destailleur
f339719ae9 Merge pull request #8088 from atm-john/fix_sql_check_margin
Fix SQL error when multiple entities are used
2018-01-24 11:16:00 +01:00
Laurent Destailleur
adb70e0456 Merge pull request #8086 from atm-ph/fix_5.0_align_payment_total
Fix each total isn't aligned on payment card
2018-01-24 11:14:43 +01:00
De Coninck Laurent
53ac13c792 check on type replacement #8028 2018-01-23 18:03:29 +01:00
arnaud
c0481be8d8 FIX subject mail sepa 2018-01-23 17:01:03 +01:00
arnaud
19c616756a FIX email sent was not in HTML 2018-01-23 12:14:22 +01:00
John
f2ae3ee41d Fix get entity if multiple 2018-01-23 09:49:21 +01:00
atm-ph
054d98a2ba Fix each total isn't aligned on payment card 2018-01-22 17:09:17 +01:00
Laurent Destailleur
1420149b95 Merge pull request #8069 from atm-maxime/fix_contrat_validate
Fix validate contrat was not using force_number parameter
2018-01-20 12:33:50 +01:00
De Coninck Laurent
4874d08062 fix the bill replacement with discounts #8028 2018-01-19 09:01:37 +01:00
Maxime Kohlhaas
4c0dc21ca0 Fix validate contrat was not using force_number parameter 2018-01-18 14:07:32 +01:00
Laurent Destailleur
bc7bd77cea Fix permission to open supplier order 2018-01-17 15:54:27 +01:00
Laurent Destailleur
5d4eda68e0 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-01-16 19:53:02 +01:00
Laurent Destailleur
94b1d59f2b Fix missing check on object entity 2018-01-16 19:52:14 +01:00
Laurent Destailleur
f307fecaf6 Merge pull request #8064 from atm-quentin/6.0
FIX missing hook invoice index
2018-01-16 12:15:06 +01:00
atm-quentin
6feacab4f5 FIX missing hook invoice index 2018-01-15 14:24:19 +01:00
Laurent Destailleur
4c8af0ff50 Fix name alias on list 2018-01-15 12:24:56 +01:00
Laurent Destailleur
b154357683 Merge pull request #7982 from simnandez/6.0
FIX: Bad name alias showing in name of third column
2018-01-15 12:22:40 +01:00
Laurent Destailleur
3b9aee7d4c Update list.php 2018-01-15 12:22:21 +01:00
Laurent Destailleur
9f6118ed52 Code comments 2018-01-14 03:12:22 +01:00
Laurent Destailleur
c947502efa Fix typo 2018-01-13 17:22:59 +01:00
Laurent Destailleur
dbb9caa196 Prepare 6.0.5 2018-01-11 09:53:47 +01:00
Laurent Destailleur
764646634d Merge pull request #8051 from atm-florian/6.0
fix: search translation into external module files also
2018-01-11 01:12:53 +01:00
Laurent Destailleur
0ae02d76a3 Merge pull request #8049 from fmarcet/6.0
Fix: Still using property ->client instead of ->thirdparty.
2018-01-11 01:03:47 +01:00
Laurent Destailleur
e9bf6ed4ce Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-01-11 00:56:01 +01:00
Laurent Destailleur
54228b4f98 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-01-11 00:55:51 +01:00
Laurent Destailleur
58589b8454 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2018-01-11 00:55:10 +01:00
Laurent Destailleur
387dd967e2 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2018-01-11 00:55:00 +01:00
Laurent Destailleur
5adeaf9d76 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2018-01-11 00:54:30 +01:00
Laurent Destailleur
205e715b7f Merge pull request #8046 from hregis/6.0_bug
Fix: avoid Warning: A non-numeric value encountered
2018-01-11 00:53:07 +01:00
Laurent Destailleur
79562f8d5b Merge pull request #8036 from atm-ph/fix_6.0_model_pdf_invoice_payment
Fix wrong address used into PDF model of supplier payment
2018-01-11 00:37:37 +01:00
Laurent Destailleur
b5fe953a64 Merge pull request #8035 from pdermody/6.0
Fix #8034 - Surface and volume units are calculated incorrectly
2018-01-11 00:36:00 +01:00
Laurent Destailleur
df22a311c2 Merge pull request #8030 from steschuser/5.0
FIX #8029 Unable to make leave request in holyday module
2018-01-11 00:32:45 +01:00
Laurent Destailleur
9253fed754 Revert "Code comment"
This reverts commit 8000777864.
2018-01-11 00:17:32 +01:00
florian HENRY
c8c550cd33 Merge branch '6.0' of https://github.com/Dolibarr/dolibarr.git into 6.0 2018-01-10 20:49:48 +01:00
Laurent Destailleur
8000777864 Code comment 2018-01-10 20:43:56 +01:00
florian HENRY
0bd45dc64b fix: search translation into external module files also 2018-01-10 20:34:32 +01:00
Ferran Marcet
d99535d9da Fix: Still using property ->client instead of ->thirdparty. 2018-01-10 16:40:43 +01:00
Ferran Marcet
7ce7c0d5e5 Merge branch '5.0up' into 5.0 2018-01-10 16:12:53 +01:00
Regis Houssin
0f51aa15d8 Fix: avoid Warning: A non-numeric value encountered 2018-01-10 10:52:30 +01:00
atm-ph
22d92c0540 Fix wrong address used into PDF model of supplier payment 2018-01-08 15:25:18 +01:00
Paul Dermody
a1ac285a25 Fixed automated computation of surface and volume to use correct units. It was failing for inches and feet. 2018-01-07 12:42:14 -06:00
sschwebel
7e8fda2d71 FIX #8029 Unable to make leave request in holyday module
wrong variable name in card.php
2018-01-05 12:09:45 +01:00
Laurent Destailleur
301f509611 Merge pull request #8019 from atm-gauthier/6.0_fix_vat_mass_update
FIX : $oldvatrateclean & $newvatrateclean must be set if preg_match === false
2018-01-04 21:03:20 +01:00
Laurent Destailleur
550fc37e62 Merge pull request #8017 from atm-florian/6.0
fix : linked object (new format  of linked_object atribut on 6.0)
2018-01-04 21:02:31 +01:00
Laurent Destailleur
a14a3db2e9 Merge pull request #8013 from atm-john/FIX_invoice_filter_type
fix filter for TYPE_SITUATION invoice
2018-01-04 20:59:32 +01:00
Laurent Destailleur
e4d37c3e23 Merge pull request #8012 from ATM-Nicolas/fix_product_best_price
Fix product best price
2018-01-04 20:58:59 +01:00
Laurent Destailleur
b2feac9d90 CVE-2017-17971 2018-01-04 19:25:52 +01:00
Juanjo Menent
762ab74940 FIX: Cashdesk should not sell to inactive third parties 2018-01-04 18:09:25 +01:00
Juanjo Menent
9471495dca Merge remote-tracking branch 'upstream/6.0' into 6.0 2018-01-04 18:05:55 +01:00
gauthier
58470e0913 FIX : $oldvatrateclean & $newvatrateclean must be set if preg_match === false 2018-01-04 12:01:21 +01:00
Laurent Destailleur
f6ff6610e4 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-01-03 20:13:56 +01:00
Laurent Destailleur
c7798d11ce Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-01-03 20:13:17 +01:00
florian HENRY
25390e5f73 fix : linked object (new format of linked_object atribut on 6.0) 2018-01-03 17:03:00 +01:00
ATM-Nicolas
2e6c036ad8 Merge branch '6.0' of github.com:Dolibarr/dolibarr into fix_product_best_price 2018-01-02 17:22:53 +01:00
ATM-Nicolas
61efda4cbd FIX : product best price on product list 2018-01-02 17:21:04 +01:00
John
1331e8add7 fix filter for TYPE_SITUATION invoice 2018-01-02 17:19:42 +01:00
Laurent Destailleur
0abe19c30d Merge pull request #7998 from hregis/6.0_bug
Fix: avoid warning
2017-12-28 12:53:04 +01:00
Laurent Destailleur
bbcf70cf4e Remove spaces 2017-12-28 09:48:41 +01:00
Laurent Destailleur
70e75753f8 Merge pull request #7994 from fmarcet/6.0
Fix: Missing include for Project class
2017-12-28 08:48:41 +01:00
Laurent Destailleur
3ac413084f Merge branch '6.0' into 6.0 2017-12-28 08:46:22 +01:00
Laurent Destailleur
3d4e6c9169 Merge pull request #7987 from atm-arnaud/FIX_trans_product_stats
FIX stats trad for customerinvoice
2017-12-28 07:10:14 +01:00
Laurent Destailleur
56bc0dbd25 Merge pull request #7986 from atm-arnaud/FIX_contractline_trans_unactivate
FIX trans unactivate on contractline
2017-12-28 07:09:28 +01:00
Laurent Destailleur
31b5d9df52 Merge pull request #7985 from atm-arnaud/FIX_search_contact_list
FIX search on contact list
2017-12-28 07:07:47 +01:00
Laurent Destailleur
de305cb3b2 Merge pull request #7980 from hregis/6.0_bug2
Fix: avoid php warning
2017-12-28 06:53:09 +01:00
Regis Houssin
59a89b250d Fix: avoid warning (https://github.com/Dolibarr/dolibarr/issues/7993) 2017-12-27 11:56:58 +01:00
Ferran Marcet
1c7b99d3dc Fix: Missing include for Project class 2017-12-26 12:13:35 +01:00
Juanjo Menent
b650ba21c4 Merge remote-tracking branch 'upstream/6.0' into 6.0 2017-12-26 10:52:46 +01:00
Laurent Destailleur
b70dd36ffa Better js comment 2017-12-24 12:16:48 +01:00
Laurent Destailleur
6a62e13960 FIX security vulnerability reported by ADLab of Venustech 2017-12-21 13:32:16 +01:00
Laurent Destailleur
62f895e2ec Fix: avoid infinite loop 2017-12-21 13:31:39 +01:00
Laurent Destailleur
4a5988accb FIX security vulnerability reported by ADLab of Venustech 2017-12-21 12:52:19 +01:00
arnaud
b1ce3fc5c8 FIX stats trad for customerinvoice 2017-12-21 12:12:50 +01:00
arnaud
4ba039d229 FIX trans unactivate on contractline 2017-12-21 12:07:29 +01:00
arnaud
ae7f8c3fe4 FIX search on contact list 2017-12-21 12:01:30 +01:00
Juanjo Menent
dc930dd6c5 FIX: Bad name alias showing in name of third column 2017-12-20 16:46:49 +01:00
Laurent Destailleur
3f6b3b51ca Fix css 2017-12-20 15:09:58 +01:00
Laurent Destailleur
6900771c70 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-12-20 13:17:39 +01:00
Laurent Destailleur
ca8ae3c723 Fix option MAIN_USE_JQUERY_JEDITABLE 2017-12-20 13:17:21 +01:00
Laurent Destailleur
b1f98b5903 Fix inline edit 2017-12-20 12:45:38 +01:00
Regis Houssin
2821459894 Fix: avoid php warning 2017-12-20 11:36:51 +01:00
Laurent Destailleur
a020dbf3d7 Merge pull request #7953 from atm-ph/fix_6.0_checkbox_credit_note
Fix since jquery 3 we can check all checkbox of credit note options
2017-12-16 01:13:55 +01:00
Laurent Destailleur
aaadc6e001 Merge pull request #7954 from atm-ph/fix_6.0_wrong_char_in_url_param
Fix wrong or missing char for url
2017-12-16 01:10:37 +01:00
Laurent Destailleur
0db03cfbcc Merge pull request #7957 from frederic34/patch-1
Update product.php
2017-12-16 01:08:30 +01:00
Frédéric FRANCE
ab558ee5fa Update product.php 2017-12-14 09:49:55 +01:00
atm-ph
a2f4afbf88 Fix wrong or missing char for url 2017-12-13 16:17:22 +01:00
atm-ph
46770178d2 Fix since jquery 3 we can check all checkbox of credit note options 2017-12-13 15:24:09 +01:00
Laurent Destailleur
ef9468f78a Fix missing field label 2017-12-12 11:48:51 +01:00
Laurent Destailleur
48499fb506 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-12-11 15:21:22 +01:00
Laurent Destailleur
f2e429e28f Fix file integrity checker (exclude files excluded from package) 2017-12-11 15:03:34 +01:00
Laurent Destailleur
4017d09613 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-12-10 21:28:36 +01:00
Laurent Destailleur
fd85088a6c Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-12-10 21:27:03 +01:00
Laurent Destailleur
1d9d8980a9 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-12-10 21:16:49 +01:00
Laurent Destailleur
d3150ede42 Merge pull request #7942 from delcroip/fixDeleteSalaries
fix: unable to remove salaries, plus correct default rights management
2017-12-10 21:09:15 +01:00
Laurent Destailleur
f18edd5787 Update security.lib.php 2017-12-10 21:08:13 +01:00
Laurent Destailleur
7e69a31dd6 Merge pull request #7941 from atm-maxime/fix_errmsg_stockneg
Fix display error message when stock not enough on invoice validation #7846
2017-12-10 21:05:23 +01:00
Laurent Destailleur
3a181a5d28 Merge pull request #7936 from atm-maxime/5.0
Fix event late alert on third event list #7912
2017-12-10 20:58:32 +01:00
Laurent Destailleur
59aa49076c Merge pull request #7934 from aspangaro/6.0
FIX : Edit accountancy account and warning message on loan
2017-12-10 20:56:34 +01:00
Laurent Destailleur
e4725f4248 FIX #7933 2017-12-10 20:55:51 +01:00
patrick Delcroix
033016da7f fix: unable to remove salaries, plus correct default rights management 2017-12-10 20:02:26 +01:00
Maxime Kohlhaas
12d0928244 Fix display error message when stock not enough on invoice validation 2017-12-10 19:59:56 +01:00
Maxime Kohlhaas
3db4d10fc0 Fix event late alert on third event list #7912 2017-12-10 08:12:49 +01:00
Alexandre SPANGARO
60fc500fa8 FIX : Edit accountancy account and warning message on loan 2017-12-10 07:00:46 +01:00
Laurent Destailleur
3ddc582edd Merge pull request #7913 from atm-ph/fix_6.0_var_name
Fix $boad instead of $board
2017-12-08 16:55:28 +01:00
Laurent Destailleur
5128ad6e24 Merge pull request #7926 from atm-florian/6.0
fix MAIN_COPY_FILE_IN_EVENT_AUTO
2017-12-08 16:55:12 +01:00
florian HENRY
eb03f8f08e fix MAIN_COPY_FILE_IN_EVENT_AUTO 2017-12-08 15:03:42 +01:00
Laurent Destailleur
b671edb116 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-12-08 13:10:30 +01:00
Laurent Destailleur
09d3db145b Merge 2017-12-08 13:10:13 +01:00
Laurent Destailleur
8dc3d7323d Merge pull request #7923 from fmarcet/6.0
FIX #7379: Compatibility with PRODUCT_USE_OLD_PATH_FOR_PHOTO varieable
2017-12-08 13:02:07 +01:00
Laurent Destailleur
9b9b5adf66 Fix must be compatible with old and new storage location 2017-12-08 13:01:45 +01:00
Laurent Destailleur
08abb1490a Remove code using not defined var 2017-12-08 12:54:08 +01:00
Laurent Destailleur
8a5c53550b Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-12-08 12:43:53 +01:00
Laurent Destailleur
049a038f56 Merge pull request #7925 from hregis/5.0_bug
Fix: wrong translation if multilang activated
2017-12-08 12:43:37 +01:00
Laurent Destailleur
e526162e8e Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-12-08 12:42:22 +01:00
Regis Houssin
1b16eb731d Fix: missing load product translation file 2017-12-08 11:00:23 +01:00
Regis Houssin
1bdffa961f Fix: wrong translation if multilang activated 2017-12-08 10:41:14 +01:00
Laurent Destailleur
6de3a40546 Merge pull request #7916 from atm-ph/fix_4.0_require_class
Fix include class WorkboardResponse
2017-12-08 10:40:26 +01:00
Laurent Destailleur
5f71165020 Merge pull request #7924 from hregis/6.0_bug2
Fix: Avoid warning "A non-numeric value encountered"
2017-12-08 10:34:54 +01:00
Regis Houssin
04327189f7 Fix: access error when user not right to view all customers 2017-12-08 09:41:33 +01:00
Regis Houssin
c4b2c3e697 FIXME $accounts[$bid] is a label ! 2017-12-08 09:17:12 +01:00
Regis Houssin
8e1a9064cb Fix: avoid warning again 2017-12-08 09:00:05 +01:00
Regis Houssin
95fa183fac Fix: Avoid warning "A non-numeric value encountered" 2017-12-08 08:49:03 +01:00
Ferran Marcet
bfc476a118 FIX #7379: Compatibility with PRODUCT_USE_OLD_PATH_FOR_PHOTO varieable 2017-12-07 18:44:33 +01:00
atm-ph
c90ece1188 Fix include class WorkboardResponse 2017-12-06 14:22:37 +01:00
atm-ph
c70dff89dd Fix $boad instead of $board 2017-12-06 12:13:15 +01:00
Laurent Destailleur
340287f073 FIX #7903
Conflicts:
	htdocs/holiday/class/holiday.class.php
2017-12-05 11:56:32 +01:00
Laurent Destailleur
365639a6c0 Prepare 6.0.5 2017-12-05 11:54:26 +01:00
Laurent Destailleur
44e5566ee5 Update changelog 2017-12-02 14:17:49 +01:00
Laurent Destailleur
38be224665 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-12-02 14:14:26 +01:00
Laurent Destailleur
29568287ef Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-12-02 14:13:44 +01:00
Laurent Destailleur
5fae19b4d6 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-12-02 14:13:29 +01:00
Laurent Destailleur
c7d0e917fb Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-12-02 14:12:43 +01:00
Laurent Destailleur
9cafb08759 Merge pull request #7853 from atm-ph/fix_5.0_invoice_updateline_calcul_price_total
Fix product type is ignored and can generate a diffrent result with s…
2017-12-02 14:06:25 +01:00
Laurent Destailleur
03fd69c3b9 Fix missing lang 2017-12-01 16:48:43 +01:00
Laurent Destailleur
a832bbb348 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/compta/facture/stats/index.php
2017-12-01 16:18:03 +01:00
Laurent Destailleur
5308acdcde Merge pull request #7895 from atm-alexis/FIX_add_line_bad_price_and_ref
FIX add line bad price and ref
2017-12-01 16:03:21 +01:00
Alexis ALGOUD
b2effa7cc8 fix travis 2017-11-30 11:36:35 +01:00
root
b7f26ea788 FIX add line bad price and ref 2017-11-30 11:10:01 +01:00
Laurent Destailleur
d2135fd139 Merge pull request #7888 from atm-gauthier/5.0_fix_where_fk_status
FIX : test for filter fk_status
2017-11-29 15:32:51 +01:00
Laurent Destailleur
acd2d0121d Merge pull request #7886 from ptibogxiv/patch-8
Fix for multicompany
2017-11-29 15:31:21 +01:00
Laurent Destailleur
9fa6bfd1a5 Fix edit external user or not 2017-11-29 15:30:41 +01:00
Laurent Destailleur
359e82fd3e Merge pull request #7884 from jfefe/patch-15
FIX : external user cannot be set as internal
2017-11-29 15:07:18 +01:00
Laurent Destailleur
dbde97f25f Update card.php 2017-11-29 15:07:09 +01:00
gauthier
f04af6c1b3 FIX : test for filter fk_status 2017-11-29 11:06:33 +01:00
ptibogxiv
c194538609 Update fraise.modules.php 2017-11-29 10:45:16 +01:00
ptibogxiv
883c9dbf99 Fix for multicompany
last fix for multicompany compliance
2017-11-29 09:28:03 +01:00
jfefe
d0ab117488 FIX : external user cannot be set as internal 2017-11-28 15:06:23 +01:00
Laurent Destailleur
3071796bc3 Merge pull request #7876 from ptibogxiv/patch-6
fix for multicompany
2017-11-28 12:12:50 +01:00
Laurent Destailleur
fa1bb9d672 Merge pull request #7874 from ptibogxiv/patch-4
Fix stat  don in multicompany
2017-11-28 12:10:35 +01:00
ptibogxiv
a9e4fcfdca Update fraise.modules.php 2017-11-27 15:49:28 +01:00
ptibogxiv
780e8ce470 fix for multicompany 2017-11-27 15:13:14 +01:00
ptibogxiv
2e9952439e Fix stat don in multicompany 2017-11-27 15:03:34 +01:00
atm-ph
5fef6478a5 Fix wrong calcul_price_total() update 2017-11-27 11:26:41 +01:00
Laurent Destailleur
61798d1af0 FIX list of module not complete when module mb_strlen not available
Conflicts:
	dev/dolibarr_changes.txt
2017-11-25 02:34:24 +01:00
Laurent Destailleur
4cbcf5189a FIX #7806 2017-11-25 01:24:24 +01:00
Laurent Destailleur
38c770ffb3 FIX #7806 2017-11-25 01:16:12 +01:00
Laurent Destailleur
07cd1fb3c2 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-11-24 16:54:38 +01:00
Laurent Destailleur
2493c2468d Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/core/class/conf.class.php
	htdocs/core/lib/files.lib.php
2017-11-24 16:51:59 +01:00
Laurent Destailleur
306dcf3600 Merge pull request #7863 from atm-quentin/6.0
FIX too much users on holiday list
2017-11-24 16:39:06 +01:00
Laurent Destailleur
c2f84309db Update holiday.class.php 2017-11-24 16:38:52 +01:00
atm-quentin
314c30f489 FIX too much users on holiday list 2017-11-23 14:26:26 +01:00
Laurent Destailleur
1e4844fd1c Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-11-22 17:25:49 +01:00
Laurent Destailleur
e1344eb97c Fix edit of time spent 2017-11-22 17:25:31 +01:00
atm-ph
219e58d0e4 Fix product type is ignored and can generate a diffrent result with situation invoice 2017-11-22 12:15:02 +01:00
Laurent Destailleur
356f36c5bf Merge pull request #7851 from atm-gauthier/5.0_backport_feature
Fix: some problems with medias in multicompany (backport 6.0 commit 762b4eb876)
2017-11-22 11:58:09 +01:00
Laurent Destailleur
9a75cb466a Merge pull request #7834 from ptibogxiv/patch-2
FIX list of donation not filtered on multicompany
2017-11-22 11:23:13 +01:00
Laurent Destailleur
dc5127e619 Merge pull request #7831 from ptibogxiv/patch-1
FIX createfromorder
2017-11-22 11:17:00 +01:00
Regis Houssin
a9bfe0f48f Fix: some problems with medias in multicompany (backport 6.0 commit 762b4eb876) 2017-11-22 10:12:51 +01:00
ptibogxiv
5d6555b9dd Update list.php 2017-11-19 21:54:14 +01:00
ptibogxiv
3f360601af Fix entity
Fix entity in list.php
2017-11-19 21:52:18 +01:00
ptibogxiv
35182066a8 update createfromorder
lack of 2 fields date_start and date_end not imported from order
2017-11-19 16:25:35 +01:00
Laurent Destailleur
a6e4e4ddb0 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/product/stock/replenishorders.php
2017-11-17 14:17:49 +01:00
Laurent Destailleur
c3c14277e1 Merge 2017-11-17 14:15:07 +01:00
Laurent Destailleur
42b7d80567 FIX #7824
Conflicts:
	htdocs/product/stock/replenishorders.php
2017-11-17 14:12:53 +01:00
Laurent Destailleur
fde33594a2 FIX #7824 2017-11-17 14:06:08 +01:00
Laurent Destailleur
7f28c9fff6 FIX #7824
Conflicts:
	htdocs/product/stock/replenishorders.php
2017-11-17 14:01:21 +01:00
Laurent Destailleur
57a6ada2a3 FIX #7824 2017-11-17 13:57:40 +01:00
Laurent Destailleur
5741d4d67d Merge pull request #7811 from atm-florian/6.0_fixvatcodesupplier
fix : return vat code for supplier price
2017-11-17 13:02:56 +01:00
Laurent Destailleur
4b90510b82 Fix time assigned to wrong user 2017-11-16 22:35:55 +01:00
Laurent Destailleur
924cf871a7 FIX CSS for IE10 2017-11-15 10:40:24 +01:00
Laurent Destailleur
77b6ef7396 Code comment 2017-11-14 19:41:57 +01:00
Laurent Destailleur
388b90a94c Fix repair of utf8 2017-11-14 19:00:52 +01:00
Laurent Destailleur
f789714f14 Fix translation 2017-11-14 18:16:01 +01:00
florian HENRY
e195cf0b95 fix : return vat code for supplier price 2017-11-14 09:53:06 +01:00
Laurent Destailleur
a2c80a704f Code comment 2017-11-13 19:06:58 +01:00
Laurent Destailleur
b5196b7164 FIX A lot of several fix on local taxes and NPR tax 2017-11-13 14:24:40 +01:00
Laurent Destailleur
1a5bbef266 FIX Locatax were not propagated when cloning order or proposal 2017-11-13 13:07:31 +01:00
Laurent Destailleur
05683bbf61 Code comment 2017-11-13 11:41:37 +01:00
Laurent Destailleur
90615a8682 Fix busy tag not set sometimes 2017-11-13 02:44:02 +01:00
Laurent Destailleur
36b4d50cff FIX #7737 2017-11-12 20:41:25 +01:00
Laurent Destailleur
d421b90376 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-11-12 20:18:56 +01:00
Laurent Destailleur
356525730d FIX #7786 2017-11-12 20:12:56 +01:00
Laurent Destailleur
d29233f553 Merge pull request #7801 from atm-maxime/fix_multi_vat_deposit
Fix multi VAT deposit when special lines are in origin document
2017-11-11 18:03:31 +01:00
Laurent Destailleur
5703c704f9 Merge pull request #7792 from atm-ph/fix_6.0_pdf_width_payment_term
Fix width of payment term is to large
2017-11-11 17:45:54 +01:00
Laurent Destailleur
50ed463b9f Merge pull request #7784 from frederic34/patch-3
account number on create bank account
2017-11-11 17:37:29 +01:00
Laurent Destailleur
3889941406 Merge pull request #7783 from frederic34/patch-2
Update card.php
2017-11-11 17:36:51 +01:00
Laurent Destailleur
0d38e154cf Merge pull request #7781 from frederic34/patch-1
Fetch right account
2017-11-11 17:33:26 +01:00
Maxime Kohlhaas
22a3721dda Fix multi VAT deposit when special lines are in origin document 2017-11-11 16:10:06 +01:00
atm-ph
2636c2470b Fix width of payment term is to large 2017-11-10 10:52:58 +01:00
Frédéric FRANCE
1ea6df14d0 Update card.php 2017-11-08 11:35:15 +01:00
Frédéric FRANCE
fe3ce78ae4 Update card.php 2017-11-08 11:24:33 +01:00
Frédéric FRANCE
27ace14fb7 Fetch right account 2017-11-07 16:28:51 +01:00
Ferran Marcet
7f1adc6a6a FIX: Saving wrong localtax on order addline 2017-11-07 09:46:39 +01:00
Laurent Destailleur
6eb2204c2b Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	ChangeLog
	htdocs/filefunc.inc.php
	htdocs/product/list.php
2017-11-06 21:20:06 +01:00
Laurent Destailleur
1d9873e1a9 FIX #7756 Add better error message 2017-11-06 21:17:30 +01:00
Laurent Destailleur
bc9b816719 Fix deletion of files that contains __ 2017-11-06 17:54:18 +01:00
Laurent Destailleur
825ceeaa8d Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-11-06 11:47:20 +01:00
Laurent Destailleur
864af9cc3b Fix error not returned if output directory not writable 2017-11-06 11:47:03 +01:00
Laurent Destailleur
d453961afc Merge pull request #7758 from atm-maxime/fix_search_service
Fix : type was forced to 0 so service are not in the list
2017-11-05 18:30:20 +01:00
Laurent Destailleur
7d4b43f368 Merge pull request #7757 from atm-maxime/fix_search_product
Fix display of product/service list
2017-11-05 18:29:24 +01:00
Laurent Destailleur
d3a0cff30a Merge pull request #7755 from frederic34/currency
default currency on propal create
2017-11-05 18:28:40 +01:00
Laurent Destailleur
52421406ce FIX #7751 2017-11-05 18:25:33 +01:00
Laurent Destailleur
eb4a5f6570 Fix link can't be a htm link in innosetup 2017-11-05 18:21:29 +01:00
Maxime Kohlhaas
e992e4bea5 Fix : type was forced to 0 so service are not in the list 2017-11-03 09:09:07 +01:00
Maxime Kohlhaas
13667e4850 Fix display of product/service list 2017-11-03 08:56:23 +01:00
Frédéric FRANCE
b58df17545 default currency on propal create 2017-11-02 18:14:55 +01:00
Laurent Destailleur
a291919cf7 Merge pull request #7754 from atm-gauthier/6.0_fix_filter_typeactioncomm_with_multiselect
FIX : Wrong alias sql
2017-11-02 16:40:40 +01:00
gauthier
03544f783a FIX : Wrong alias sql 2017-11-02 16:16:29 +01:00
Laurent Destailleur
6ea69f421f Merge pull request #7752 from atm-gauthier/6.0_fix_filter_typeactioncomm_with_multiselect
FIX : Filter type on actioncomm with multiselect doesn't work
2017-11-02 15:51:49 +01:00
Laurent Destailleur
310bf4bde4 Update peruser.php 2017-11-02 15:51:35 +01:00
Laurent Destailleur
ec3a07cd52 Try to restore compatibility when actioncode=CODE1,CODE2,... 2017-11-02 15:50:55 +01:00
Laurent Destailleur
63a363080e Update index.php 2017-11-02 15:48:56 +01:00
Laurent Destailleur
323a0d7d0d Update index.php 2017-11-02 15:48:24 +01:00
gauthier
b7cf434ebd FIX : Filter type on actioncomm with multiselect doesn't work 2017-11-02 14:58:33 +01:00
Laurent Destailleur
555b37411f Merge pull request #7750 from atm-florian/6.0_missinghook
fix : missing hook in accountancy
2017-11-02 13:53:45 +01:00
florian HENRY
bd68b94411 fix : missing hook in accountancy 2017-11-02 13:27:09 +01:00
Laurent Destailleur
141df52dd6 Merge pull request #7741 from frederic34/patch-1
swap llxfooter() and $db->close()
2017-11-02 09:53:06 +01:00
Laurent Destailleur
fb3f1ef667 Code comment 2017-11-02 09:49:41 +01:00
Laurent Destailleur
4755197503 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-11-02 09:42:47 +01:00
Laurent Destailleur
59df957181 Fix return HTTP code 501 if calling a non existing api 2017-11-02 01:43:27 +01:00
Laurent Destailleur
192dc43b87 Fix regression 2017-11-02 01:16:42 +01:00
Laurent Destailleur
91fbb4da41 Fix changelog 2017-11-01 20:12:15 +01:00
Laurent Destailleur
a6879775bb FIX Search into language is ok for file into external modules two. 2017-11-01 20:05:28 +01:00
Frédéric FRANCE
01a3787664 swap llxfooter() and $db->close() 2017-10-31 13:45:13 +01:00
Laurent Destailleur
3db101ffdd Clean packager 2017-10-31 01:06:07 +01:00
Laurent Destailleur
2b966e630b Doc 2017-10-30 19:49:48 +01:00
Laurent Destailleur
892798bf79 Code comment 2017-10-30 12:40:12 +01:00
Laurent Destailleur
007783cf76 FIX Searching translation should not be case sensitive 2017-10-30 01:45:39 +01:00
Laurent Destailleur
0de1b878bd Prepare 6.0.4 2017-10-29 16:17:52 +01:00
Laurent Destailleur
777d2f7027 Prepare 5.0.8 2017-10-29 16:17:36 +01:00
Laurent Destailleur
78645c718f Fix position of quick search 2017-10-29 16:15:54 +01:00
Laurent Destailleur
985a268477 Update doc 2017-10-28 22:10:56 +02:00
Laurent Destailleur
cd5e43483e Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/contrat/card.php
	htdocs/core/lib/project.lib.php
	htdocs/expedition/card.php
	htdocs/projet/class/task.class.php
2017-10-28 22:08:16 +02:00
Laurent Destailleur
5313d61847 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-10-28 20:35:35 +02:00
Laurent Destailleur
92c33b76dc Fix position of search element in quick search 2017-10-28 20:35:21 +02:00
Laurent Destailleur
6b7c59635e Merge pull request #7715 from grandoc/new_branch_26_10_17
Fix : Warning: A non-numeric value encountered in on line 57 58 59
2017-10-27 02:18:26 +02:00
Laurent Destailleur
61909d842d Update document.php 2017-10-27 02:18:11 +02:00
Laurent Destailleur
4c5bb7660c Merge pull request #7713 from atm-gauthier/6.0_fix_hook_on_shipping_card
FIX : hook formObjectOptions() must use $expe and not $object which i…
2017-10-27 02:15:30 +02:00
Laurent Destailleur
bbc13b8ac9 Merge pull request #7712 from atm-florian/6.0
FIX : #7458
2017-10-27 01:58:51 +02:00
Laurent Destailleur
71622b9f86 Merge pull request #7711 from atm-ph/fix_6_0_empty_extrafields
Fix empty extrafields if from origin
2017-10-27 01:56:44 +02:00
Laurent Destailleur
82231b77a2 Fix data for supplier must be not visible if supplier module off 2017-10-27 01:46:54 +02:00
Laurent Destailleur
67208b111d Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/compta/facture.php
	htdocs/expedition/card.php
	htdocs/product/list.php
2017-10-26 17:02:40 +02:00
Philippe GRAND
d9d4b6e06d Fix : Warning: A non-numeric value encountered in on line 57 58 59 2017-10-26 13:03:39 +02:00
florian HENRY
f4a95f89ac Ok, now suppliers payment are correctly logged 2017-10-26 12:26:25 +02:00
florian HENRY
a7655b69e8 agin fix blockedlog on supplier incvoive payument 2017-10-26 12:13:47 +02:00
gauthier
ce6d1d306d FIX : hook formObjectOptions() must use $expe and not $object which is an order here 2017-10-26 11:32:26 +02:00
florian HENRY
5f89b4427f fixagain blocked log supplier 2017-10-26 10:49:11 +02:00
florian HENRY
9427b2f4b1 fix supplier payamnet blockedlog 2017-10-26 10:40:36 +02:00
florian HENRY
1d0c93c0b6 FIX : #7458 2017-10-26 10:31:14 +02:00
atm-ph
08e83983d0 Fix empty extrafields if from origin 2017-10-26 09:40:12 +02:00
Laurent Destailleur
58584d8784 Update fournisseur.commande.class.php 2017-10-24 13:05:12 +02:00
dolibarr95
76aa2df807 Try to fix #7692
`$this->fk_soc` is empty replace by `$this->socid`
2017-10-24 13:05:05 +02:00
Laurent Destailleur
da93081f47 Merge pull request #7688 from atm-florian/6.0
fix accountancy index display
2017-10-24 12:41:39 +02:00
Laurent Destailleur
ba434617dc FIX Missing function getLinesArray 2017-10-23 14:44:06 +02:00
Laurent Destailleur
97b694b59c Fix missing field in migration v6 2017-10-23 10:22:45 +02:00
florian HENRY
c258e229c8 fix accountancy index display 2017-10-23 10:00:22 +02:00
Laurent Destailleur
611f5f638d FIX #7616 2017-10-22 15:07:41 +02:00
Laurent Destailleur
79279caa2e FIX #7619 2017-10-22 14:56:00 +02:00
Laurent Destailleur
745c4625a6 FIX #7619 2017-10-22 14:48:42 +02:00
Laurent Destailleur
be0cd601a9 Fix dead code 2017-10-22 14:07:54 +02:00
Laurent Destailleur
703d4a6aee FIX #7648 2017-10-22 14:02:24 +02:00
Laurent Destailleur
6b0d060289 Merge pull request #7677 from frederic34/stockinvoice
stock on supplier invoice back to draft
2017-10-22 03:33:11 +02:00
Laurent Destailleur
4325363084 Merge pull request #7676 from frederic34/patch-2
FIX #7675
2017-10-22 03:25:22 +02:00
Laurent Destailleur
030cea6a0f Merge pull request #7664 from frederic34/patch-1
keep vat input with multiprices product creation
2017-10-22 02:42:44 +02:00
Laurent Destailleur
16c212c9fd Merge pull request #7662 from atm-florian/6.0
fix displaying accountancy code
2017-10-22 02:32:01 +02:00
Laurent Destailleur
1afbf75cbc Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/index.php
2017-10-22 01:30:25 +02:00
Laurent Destailleur
da8fe06301 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-10-22 01:26:17 +02:00
Laurent Destailleur
cad44ee68a FIX substitution in ODT of thirdparties documents 2017-10-22 01:25:59 +02:00
Frédéric FRANCE
8baad70f6c stock on supplier invoice back to draft 2017-10-21 20:26:32 +02:00
Frédéric FRANCE
735f06fd83 FIX #7675 2017-10-21 16:20:06 +02:00
Laurent Destailleur
a1217d61b6 Merge pull request #7654 from simnandez/6.0
FIX: Bad localtax apply
2017-10-19 19:28:02 +02:00
Laurent Destailleur
efaa0b1e2a Merge pull request #7640 from atm-florian/6.0_fixeventiconstatus
fix : better icon for event status Non applicable
2017-10-19 19:18:56 +02:00
Laurent Destailleur
f7556e7ad2 FIX make of link to other object during creation 2017-10-19 19:06:48 +02:00
Frédéric FRANCE
5afd2695fb keep vat input with multiprices product creation 2017-10-19 18:33:15 +02:00
Laurent Destailleur
d4ade7b935 FIX API to get object does not return data o flinked objects 2017-10-19 17:57:16 +02:00
Laurent Destailleur
d7113a3602 Fix init of environment for a dedicated entity in API 2017-10-19 17:32:23 +02:00
Laurent Destailleur
8da7f789d8 Fix init of environment for a dedicated entity in API 2017-10-19 17:30:08 +02:00
Laurent Destailleur
83440f5bbc FIX #7626 2017-10-19 13:07:33 +02:00
florian HENRY
b0c68ddc61 fix displaying accountancy code 2017-10-19 12:35:59 +02:00
Laurent Destailleur
cb089987ee Fix code comment 2017-10-19 12:35:15 +02:00
Laurent Destailleur
93d16bf4d7 Fix several fixes in APIs 2017-10-19 12:30:36 +02:00
Laurent Destailleur
7ee64fc0d4 Fix css 2017-10-18 19:39:22 +02:00
Laurent Destailleur
3e43e164ae FIX Bad ressource list in popup in gantt view 2017-10-18 19:13:44 +02:00
Laurent Destailleur
74b401b70d Fix bad perm to delete file 2017-10-18 17:40:47 +02:00
Laurent Destailleur
8626d6279a Fix perm to delete files 2017-10-18 17:21:30 +02:00
Juanjo Menent
df53870c01 FIX: Bad localtax apply 2017-10-18 12:13:32 +02:00
Juanjo Menent
4382642099 FIX: Bad localtax apply 2017-10-18 12:10:00 +02:00
Laurent Destailleur
b124c7f16d Clean params 2017-10-18 11:15:54 +02:00
Laurent Destailleur
000c1bddb2 Fix we lose the private not when closing proposal 2017-10-18 11:12:59 +02:00
florian HENRY
50cacfee3d lighter icon 2017-10-17 13:24:38 +02:00
Laurent Destailleur
aa1ff189e1 Fix var not correctly initialized when using api + multicompany 2017-10-17 12:58:26 +02:00
Laurent Destailleur
235817c581 Fix missing default limit 2017-10-17 12:02:58 +02:00
Laurent Destailleur
81e7f45200 FIX Stats on invoices show nothing 2017-10-17 11:08:49 +02:00
Laurent Destailleur
5998f60764 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-10-17 10:51:21 +02:00
Laurent Destailleur
5937fba373 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-10-17 10:51:11 +02:00
Laurent Destailleur
626fea3f7a Merge pull request #7608 from atm-john/fix_supplier_invoice_from_supp_order
Fix extrafields transmition from supplier order to supplier invoice
2017-10-16 20:22:26 +02:00
Laurent Destailleur
a4b4eab2ae Fix API when using an API key for a user in another entity 2017-10-16 16:23:50 +02:00
Laurent Destailleur
bec985a551 Fix error message 2017-10-16 14:56:56 +02:00
Laurent Destailleur
b491d22c16 FIX selection of thirdparty was lost on stats page of invoices 2017-10-14 02:30:33 +02:00
Laurent Destailleur
5a4480bd1d Fix navigation on bank receipts 2017-10-13 21:32:14 +02:00
Laurent Destailleur
807724e0f0 Add link other invoices of third party on supplier card to 2017-10-13 21:32:05 +02:00
Laurent Destailleur
11614af2c2 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-10-13 17:46:40 +02:00
Laurent Destailleur
5f021990b4 Code comment 2017-10-13 17:46:16 +02:00
Laurent Destailleur
5f22afa450 Merge pull request #7621 from atm-ph/fix_distinct_credit_note
Fix distinct credit note select list
2017-10-13 13:32:04 +02:00
atm-ph
647c4036cf Fix simplification of code 2017-10-13 09:21:37 +02:00
Laurent Destailleur
857b59409c FIX sql syntax error because of old field accountancy_journal 2017-10-13 01:50:00 +02:00
Laurent Destailleur
c3ada19892 Fix demo backup 2017-10-13 01:27:49 +02:00
Laurent Destailleur
558f261b60 FIX #7593 2017-10-13 01:03:33 +02:00
Laurent Destailleur
2fd0ffbfec Fix tz for date creation/update 2017-10-12 14:50:25 +02:00
atm-ph
8d3df7ea57 Fix can not distinct which credit note are in select list 2017-10-12 09:59:25 +02:00
Laurent Destailleur
cd814d420b Fix repair utf8 mix collation 2017-10-11 16:54:17 +02:00
Laurent Destailleur
68ec8ef313 Fix lang missing 2017-10-11 12:05:48 +02:00
Laurent Destailleur
e717bfc04b Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-10-11 12:00:52 +02:00
Laurent Destailleur
538c7579ba Merge pull request #7502 from fappels/6.0_fix_dispatch
FIX: #7211 Update qty dispatched on qty change
2017-10-11 11:59:45 +02:00
dolibarr95
220b37133b Wrong test
https://github.com/Dolibarr/dolibarr/issues/7604#issuecomment-335387587
2017-10-11 11:49:46 +02:00
Laurent Destailleur
cfce9f7171 Merge pull request #7611 from hregis/6.0_bug2
Fix: if module is not activated, functionality of module is deactivated!
2017-10-11 11:42:57 +02:00
Laurent Destailleur
d59d7887bb Update subscription.php 2017-10-11 11:42:39 +02:00
Laurent Destailleur
7e999603fc Update list.php 2017-10-11 11:40:19 +02:00
Laurent Destailleur
f8771c2214 Update list.php 2017-10-11 11:39:56 +02:00
Laurent Destailleur
1b04c4beb7 Merge branch '6.0' into 6.0_bug2 2017-10-11 11:37:38 +02:00
Laurent Destailleur
fa7a277d64 Merge pull request #7601 from aspangaro/6.0-4
Fix : missing class AccountingJournal in subscription member page when accountancy not activated
2017-10-11 11:36:48 +02:00
Regis Houssin
f2ad205538 Fix: wrong copy/paste ! 2017-10-11 07:36:02 +02:00
Regis Houssin
6d5c2bf7b2 Fix: check if module bank activated
Conflicts:
	htdocs/adherents/subscription.php
2017-10-11 07:35:44 +02:00
Regis Houssin
913a5d1df2 Fix: if module is not activated, functionality of module is deactivated! 2017-10-11 07:27:27 +02:00
John
b213c7ed24 Fix extrafields transmition from supplier order to supplier invoice 2017-10-10 14:15:06 +02:00
Alexandre SPANGARO
2a76cc6f54 Fix : missing class AccountingJournal in subscription member page when accountancy not activated 2017-10-10 06:34:16 +02:00
Laurent Destailleur
dce71d6e7d Fix loose filter 2017-10-09 18:51:33 +02:00
Laurent Destailleur
19de053054 Fix itf8 mix collation 2017-10-09 17:43:57 +02:00
Laurent Destailleur
ec9c355791 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-10-08 19:46:48 +02:00
Laurent Destailleur
257fe68f13 Prepare 6.0.3 2017-10-08 19:46:24 +02:00
Laurent Destailleur
21bb799e7b Merge pull request #7592 from atm-maxime/fix_advtarget
Fix : missing new target type in advance target selection
2017-10-08 15:06:52 +02:00
Maxime Kohlhaas
8513ddb9b4 Fix : missing new target type in advance target selection 2017-10-08 10:08:49 +02:00
Laurent Destailleur
8104c97f77 Prepare 6.0.2 2017-10-07 11:53:26 +02:00
Laurent Destailleur
7b853d8981 FIX #7567 2017-10-06 15:50:37 +02:00
Laurent Destailleur
d808add499 FIX #7567 2017-10-06 15:48:48 +02:00
Laurent Destailleur
d07ec07896 FIX #7554 2017-10-06 15:22:40 +02:00
Laurent Destailleur
ed467aa74b FIX Only modified values must be modified 2017-10-06 15:01:31 +02:00
Laurent Destailleur
1becbb8805 Fix bad date on time spent view 2017-10-06 14:38:33 +02:00
Laurent Destailleur
afc1938676 FIX #7550 2017-10-06 14:28:01 +02:00
Laurent Destailleur
5411699256 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-10-06 13:57:12 +02:00
Laurent Destailleur
8ce723b4c9 FIX #7514 2017-10-06 13:56:54 +02:00
Laurent Destailleur
19adbaf84b Fix url to explorer no more working 2017-10-06 13:36:29 +02:00
Laurent Destailleur
337d6d9f08 Merge pull request #7565 from tarrsalah/fix_supplier_payment_builddoc
Fix supplier payment builddoc
2017-10-06 01:55:48 +02:00
tarrsalah
7767f03e9c WIP: reuse actions_builddoc to build/remove supplier payment doc. 2017-10-05 10:44:08 +01:00
Laurent Destailleur
711bbe0afb FIX #7546 2017-10-05 11:09:09 +02:00
tarrsalah
76efc31b00 WIP fix supplier payement modelpath. 2017-10-05 09:51:17 +01:00
Laurent Destailleur
69c47aa7d9 Fix sql error 2017-10-04 15:22:55 +02:00
Laurent Destailleur
13cb806436 FIX #7531 #7537 2017-10-04 15:18:15 +02:00
Laurent Destailleur
d28188d19d FIX Generation of invoice from bulk action "Bill Orders"
Conflicts:
	htdocs/fourn/class/fournisseur.facture.class.php
2017-10-04 14:31:52 +02:00
Laurent Destailleur
fef6440ff2 FIX #7541 2017-10-03 16:23:30 +02:00
Laurent Destailleur
0b808fa2aa FIX Bad preview on scroping when special file names 2017-10-03 10:55:45 +02:00
Laurent Destailleur
c4b3dc40c3 Allow : into file names 2017-10-03 10:54:51 +02:00
Laurent Destailleur
888e5ed2c5 Fix sanitize uploaded filename 2017-10-03 10:54:09 +02:00
Laurent Destailleur
90964d25ce Fix css 2017-10-02 17:52:20 +02:00
Laurent Destailleur
26e537e328 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-10-02 01:28:31 +02:00
Laurent Destailleur
7c30b3ca5d Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-10-02 01:28:20 +02:00
Laurent Destailleur
b5bfc3e2c7 Merge pull request #7528 from aspangaro/6.0-agiris2
FIX Accountancy export model for Agiris Isacompta
2017-10-02 00:33:13 +02:00
Laurent Destailleur
17b286ef59 Merge pull request #7508 from atm-arnaud/FIX_replenish_stock_line_0
FIX replenish if line test GETPOST on line 0
2017-10-02 00:10:55 +02:00
Alexandre SPANGARO
6a05645295 Fix : Accountancy export model for Agiris Isacompta 2017-09-30 06:58:31 +02:00
Laurent Destailleur
f510f3062b Clean param type 2017-09-28 17:41:18 +02:00
Laurent Destailleur
30a9e40f4e Fix position of fields 2017-09-28 17:29:37 +02:00
Laurent Destailleur
537a551bb5 Fix vat visiblity on pdf 2017-09-27 21:58:42 +02:00
arnaud
8866683a72 Merge branch '6.0' of github.com:Dolibarr/dolibarr into FIX_replenish_stock_line_0 2017-09-27 10:55:49 +02:00
arnaud
7f807986d7 FIX replenish if line test GETPOST on line 0 2017-09-27 10:53:29 +02:00
Laurent Destailleur
c5f30f0d80 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-09-26 22:07:31 +02:00
Laurent Destailleur
04f4a81736 FIX #7505 2017-09-26 22:06:59 +02:00
Laurent Destailleur
dc790e62ce Merge pull request #7501 from atm-florian/fix_missing_into_service_list
fix : add missing column into service's contract lines
2017-09-26 19:55:57 +02:00
Laurent Destailleur
15c8515d53 Fix default 2017-09-26 19:08:04 +02:00
Laurent Destailleur
0dfbc8d72f doxygen 2017-09-26 16:03:08 +02:00
fappels
d4488cb040 Fix for 'lessone' mode 2017-09-26 15:44:40 +02:00
florian HENRY
eacb221ffe fix : add missing column into service's contract lines 2017-09-26 15:15:39 +02:00
fappels
2fe0736b87 Update qty dispatched on qty change
Store qty dispatched and qty ordered only once per orderline
2017-09-26 12:32:50 +02:00
Laurent Destailleur
76f1dbe16b FIX #7288 2017-09-26 12:25:26 +02:00
Laurent Destailleur
49982b36ac FIX #7490 2017-09-26 11:55:19 +02:00
Laurent Destailleur
1002923dea Fix css 2017-09-26 10:58:24 +02:00
Laurent Destailleur
7f420f3246 Complete vat rates for india 2017-09-26 10:54:07 +02:00
Laurent Destailleur
59571b1ce1 FIX #7473 Mass update of vat rates and other bugs on localtax 2017-09-26 10:29:44 +02:00
Laurent Destailleur
c5287e68b1 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/admin/multicurrency.php
	htdocs/core/modules/modFournisseur.class.php
2017-09-25 19:54:27 +02:00
Laurent Destailleur
919d29fdf7 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-09-25 19:45:40 +02:00
Laurent Destailleur
fe55feb82f FIX #7461 2017-09-25 19:45:01 +02:00
Laurent Destailleur
4c7b39f49e FIX #7486 Empty value for multicurrency rate must be forbidden 2017-09-25 19:22:41 +02:00
Laurent Destailleur
d2c23ebc8d Merge pull request #7484 from inoveaconseil/patch-11
Fix quote in input
2017-09-25 17:19:08 +02:00
Inovea Conseil
35ae0e435d Fix quote in input
Delete a quote in input field
2017-09-25 16:14:14 +02:00
Laurent Destailleur
485b1ba88e Merge pull request #7482 from inoveaconseil/patch-10
FIX Missing space in request
2017-09-25 11:31:22 +02:00
Inovea Conseil
d3d6fca350 Missing space in request
Fix bug in request
2017-09-25 10:49:56 +02:00
Laurent Destailleur
cef7b9c92d FIX #7435 Can't add payment term 2017-09-25 00:08:26 +02:00
Laurent Destailleur
4b92e2a705 Fix localtax 2017-09-24 23:55:44 +02:00
Laurent Destailleur
270aba99fa FIX #7471 2017-09-24 23:28:48 +02:00
Laurent Destailleur
adb3827d1e FIX #7475 2017-09-24 22:55:27 +02:00
Laurent Destailleur
554a640c2b Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-09-24 22:38:43 +02:00
Laurent Destailleur
3a7aea48d7 FIX #7475 2017-09-24 22:38:18 +02:00
Laurent Destailleur
1bb5408d83 FIX #7464 2017-09-24 22:18:10 +02:00
Laurent Destailleur
73494a23df Merge pull request #7457 from atm-florian/6.0
fix on ressrouce list and contract class
2017-09-24 21:55:37 +02:00
Laurent Destailleur
84173f3759 Merge pull request #7455 from fmarcet/6.0
FIX Stripe not working on live mode
2017-09-24 21:53:38 +02:00
Laurent Destailleur
2ca5f2e27e Prepare 6.0.2 2017-09-23 01:52:49 +02:00
Laurent Destailleur
339d1eb124 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-09-23 01:52:27 +02:00
Laurent Destailleur
e1b4788bc2 Update vat rates 2017-09-23 01:52:14 +02:00
florian HENRY
8f19ffd097 Fix contract class for date 2017-09-21 12:22:10 +02:00
Ferran Marcet
76c3fe1260 Fix: Stripe not working on live mode 2017-09-21 12:06:43 +02:00
florian HENRY
cafcbe03e1 agin fix list ressource 2017-09-21 12:02:45 +02:00
florian HENRY
5240217144 fix again resource list 2017-09-21 11:36:50 +02:00
Laurent Destailleur
d68abf8237 Merge pull request #7453 from atm-florian/6.0
fix ressource list
2017-09-21 11:36:26 +02:00
florian HENRY
03ffbe55ce fix ressource list 2017-09-21 11:34:19 +02:00
Laurent Destailleur
a918fd1cf2 Merge pull request #7370 from Oeris/6.0-api
NEW Implementation of a Luracast recommandation for the REST api server
2017-09-21 11:20:23 +02:00
Laurent Destailleur
21959aec8f Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-09-20 17:42:09 +02:00
Laurent Destailleur
68c9d08909 Merge pull request #7438 from fappels/6.0_fix_extrafields_copy
FIX extrafields copy situation invoice, shipment and receipt
2017-09-20 17:36:48 +02:00
tysauron
e61032a313 Bug get socid with old object sosciete 2017-09-20 17:35:11 +02:00
Laurent Destailleur
fc5c9ad2f2 Merge pull request #7436 from fappels/6.0_Fix_expedition_error_handling
Fix batch required for lot product error message.
2017-09-20 17:33:05 +02:00
Laurent Destailleur
1daa0204aa Merge pull request #7434 from atm-quentin/6.0
# Fix #for free line select unit was wrong
2017-09-20 17:32:08 +02:00
Laurent Destailleur
7706020805 Merge pull request #7446 from hregis/6.0_bug3
Fix: wrong supplier product price id
2017-09-20 17:31:10 +02:00
Regis Houssin
77fea1983c Fix: wrong supplier product price id 2017-09-20 16:57:38 +02:00
Laurent Destailleur
5e2cc05047 Prepare 6.0.1 2017-09-20 11:12:47 +02:00
Laurent Destailleur
052e025537 Better detection of log to include merge labels 2017-09-20 11:08:42 +02:00
Laurent Destailleur
6a0ef4b561 Fix info ot total in direct debit page 2017-09-19 19:29:00 +02:00
Laurent Destailleur
f87614e2d3 Fix missing translation 2017-09-19 19:12:54 +02:00
fappels
ddeca6cc06 fix oddeven revert 2017-09-19 18:52:27 +02:00
fappels
cec91ae837 Fix extrafield copy receipt 2017-09-19 18:44:49 +02:00
fappels
13d5471dd0 Fix extrafield copy shipment 2017-09-19 18:43:00 +02:00
fappels
8123562ded Fix extrafield copy next situation invoice 2017-09-19 18:42:29 +02:00
Laurent Destailleur
14e1306b20 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-09-19 17:06:03 +02:00
Laurent Destailleur
f4ddce7274 FIX View of timespent for another user 2017-09-19 17:05:50 +02:00
Neil Orley
cc7aee6c3e FIX Implementation of a Luracast recommandation for the REST api server (#7370) 2017-09-19 16:59:19 +02:00
Neil Orley
d5966f944f FIX Implementation of a Luracast recommandation for the REST api server (#7370) 2017-09-19 16:58:09 +02:00
Neil Orley
caf4ca7451 FIX Implementation of a Luracast recommandation for the REST api server (#7370) 2017-09-19 16:56:27 +02:00
Neil Orley
949eef82f0 Merge branch '6.0' of https://github.com/Dolibarr/dolibarr into 6.0-api 2017-09-19 16:50:55 +02:00
atm-quentin
815d0aff90 FIX for free line select unit was wrong 2017-09-19 15:10:18 +02:00
Laurent Destailleur
848bc0779a Merge pull request #7430 from atm-florian/6.0
fix : rest API URL
2017-09-19 12:19:31 +02:00
florian HENRY
7375afca3e fix : rest API URL 2017-09-19 09:03:25 +02:00
Laurent Destailleur
978702d04b Fix false deprecated warning 2017-09-19 01:41:57 +02:00
Laurent Destailleur
f936b17d68 FIX Protection to avoid to apply credit note discount > remain to pay 2017-09-19 00:24:52 +02:00
Laurent Destailleur
9838199de1 FIX Sign of amount in origin currency on credit note created from lines 2017-09-18 23:53:17 +02:00
Laurent Destailleur
70b11f18b5 FIX #7367 2017-09-18 16:06:58 +02:00
Laurent Destailleur
c11ff4a18c FIX #7368 2017-09-18 15:55:25 +02:00
Laurent Destailleur
aba907d1a8 FIX #7420 2017-09-18 15:49:21 +02:00
Laurent Destailleur
0c01c7ceba Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-09-18 15:48:18 +02:00
Laurent Destailleur
6ac1b6e82e Fix template 2017-09-18 15:48:04 +02:00
Laurent Destailleur
0536d6cbed FIX #7330 2017-09-18 15:46:17 +02:00
Laurent Destailleur
8536d0f6e9 Merge pull request #7421 from atm-florian/6.0
fix : little fix
2017-09-18 15:08:02 +02:00
florian HENRY
31721165b5 Merge branch '6.0' of https://github.com/Dolibarr/dolibarr.git into 6.0 2017-09-18 11:36:45 +02:00
Laurent Destailleur
eaee8ee586 Fix box activity again 2017-09-17 21:30:27 +02:00
Laurent Destailleur
f76b675e09 Fix box activity again 2017-09-17 21:30:15 +02:00
Laurent Destailleur
99149b5cfe Fix box activity again 2017-09-17 21:30:11 +02:00
Laurent Destailleur
196c5c1267 Missing translation 2017-09-17 20:51:06 +02:00
Laurent Destailleur
2c3428a1bf Fix css 2017-09-17 20:48:09 +02:00
Laurent Destailleur
94368accc1 Fix activity box 2017-09-17 20:37:18 +02:00
Laurent Destailleur
ee774f1bf9 FIX Calculation in the activity box 2017-09-17 20:20:48 +02:00
Laurent Destailleur
bb73da4c5e Cherry pick 2017-09-17 20:20:27 +02:00
Laurent Destailleur
39acb46139 Fix multicompany 2017-09-17 19:44:59 +02:00
Laurent Destailleur
9e29ea8011 FIX Must use pdf format page as default for merging PDF. 2017-09-16 18:32:43 +02:00
Laurent Destailleur
97e8974fdf FIX Better protection to no send email when we change limit 2017-09-16 13:29:07 +02:00
Laurent Destailleur
ff7a17eb96 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/compta/facture.php
2017-09-16 12:17:30 +02:00
Laurent Destailleur
058b690e25 FIX menu enty when url is external link 2017-09-16 09:22:52 +02:00
Laurent Destailleur
8986640a10 FIX Responsive 2017-09-16 09:16:05 +02:00
Laurent Destailleur
5e4b500b5d Fix signature was changed during insert 2017-09-16 02:22:55 +02:00
Laurent Destailleur
bb6b3db0ac FIX Position of signature on strato template
Conflicts:
	htdocs/core/modules/contract/doc/pdf_strato.modules.php
2017-09-16 00:50:54 +02:00
Laurent Destailleur
087e22ab94 Fix bad status picto 2017-09-16 00:14:39 +02:00
Laurent Destailleur
48ae76e295 Fix picto on service 2017-09-15 19:13:40 +02:00
Laurent Destailleur
7b8699f54c Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-09-15 18:56:30 +02:00
Laurent Destailleur
59f644a3e2 FIX SEPA recording payment must save one payment in bank per customer 2017-09-15 18:39:10 +02:00
Laurent Destailleur
17eec5f9e9 Fix look and field for direct debit notes 2017-09-15 17:23:41 +02:00
Laurent Destailleur
45b5819b8d Merge pull request #7409 from inoveaconseil/patch-9
Accept the custom folder #7408
2017-09-15 16:04:29 +02:00
Inovea Conseil
9dfd4bb430 Accept the custom folder #7408 2017-09-15 14:40:51 +02:00
florian HENRY
ff7b542bfa fix : Avoid warning 2017-09-15 13:25:54 +02:00
Laurent Destailleur
cce1549f66 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/commande/card.php
	htdocs/core/lib/functions.lib.php
	htdocs/fourn/card.php
	htdocs/public/members/new.php
2017-09-15 11:02:34 +02:00
Laurent Destailleur
affaec2a6f Fix count into loop 2017-09-14 21:35:14 +02:00
Laurent Destailleur
c52e593ea8 Fix this->db 2017-09-14 21:27:14 +02:00
Neil Orley
69f86fc0af Merge branch '6.0' of https://github.com/Dolibarr/dolibarr into 6.0-api 2017-09-14 12:25:01 +02:00
Laurent Destailleur
53c73054f4 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-09-14 12:19:50 +02:00
Laurent Destailleur
b80b7bbcb9 Merge pull request #7384 from atm-ph/fix_6.0_get_class_self
Fix get_class(self) instead of get_class($this)
2017-09-14 12:16:16 +02:00
Laurent Destailleur
225d78c767 Merge pull request #7383 from inoveaconseil/patch-8
add translation publisher
2017-09-14 12:15:32 +02:00
Laurent Destailleur
a38bbdcc05 Merge pull request #7382 from hregis/6.0_bug3
Fix: hide bank account field if module disabled
2017-09-14 12:14:45 +02:00
Laurent Destailleur
047f01888a Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-09-14 12:08:52 +02:00
Laurent Destailleur
f2d092c815 Merge pull request #7377 from hregis/6.0_bug2
Fix: missing select2 combobox
2017-09-14 12:08:28 +02:00
Laurent Destailleur
8392158ee3 Update remisecheque.class.php 2017-09-14 12:06:41 +02:00
Stéphane BERTHELOT
93defa5f59 Fix dates in commande and remisecheque for PostgreSQL (should be treated like strings) 2017-09-14 12:06:25 +02:00
Laurent Destailleur
24436b550d Update time.php 2017-09-14 12:03:36 +02:00
arnaud
ed8e08b78a FIX time.php crashed without project id in param 2017-09-14 12:03:27 +02:00
Laurent Destailleur
2d7916f77d Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/core/lib/json.lib.php
2017-09-14 11:49:02 +02:00
Laurent Destailleur
ed013c1b7e Compatibilty php 7.2 2017-09-14 10:21:04 +02:00
Laurent Destailleur
aafc108260 Remove hhvm 2017-09-14 10:08:49 +02:00
Laurent Destailleur
3b56663e4d Reduce travis load 2017-09-14 09:40:10 +02:00
Laurent Destailleur
d7b84bd35f Fix responsive 2017-09-13 22:56:24 +02:00
Laurent Destailleur
4b8862c1ec Remove useless import 2017-09-13 21:54:16 +02:00
Laurent Destailleur
fed3165b53 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/core/lib/price.lib.php
2017-09-13 21:53:03 +02:00
Laurent Destailleur
f2cd96b9c0 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	ChangeLog
	htdocs/adherents/class/adherent.class.php
	htdocs/core/lib/price.lib.php
	htdocs/filefunc.inc.php
	htdocs/fourn/class/fournisseur.facture.class.php
	htdocs/supplier_proposal/list.php
2017-09-13 20:55:22 +02:00
Laurent Destailleur
38621b622e Fix specimen not complete for multicompany 2017-09-13 20:11:51 +02:00
Laurent Destailleur
a5a08006e9 FIX multicompany better accuracy in rounding and with revenue stamp. 2017-09-13 19:27:21 +02:00
Laurent Destailleur
60078300b8 FIX PDF output was sharing 2 different currencies in same total 2017-09-13 17:57:41 +02:00
Laurent Destailleur
58b49f9a08 Fix position of field to avoid errors 2017-09-13 17:10:23 +02:00
Laurent Destailleur
3deacaa5c4 Fix css pb 2017-09-13 17:10:04 +02:00
Laurent Destailleur
c44a5ede43 FIX Several problem with the last event box on project/tasks
Conflicts:
	htdocs/core/lib/functions2.lib.php
2017-09-13 15:16:06 +02:00
Laurent Destailleur
e11c7a08ea Fix translation 2017-09-13 14:24:03 +02:00
Laurent Destailleur
939d33cce7 Fix bug reported by scrutinizer 2017-09-12 19:12:39 +02:00
Laurent Destailleur
0744b5d91b Fix typo
Conflicts:
	htdocs/public/payment/newpayment.php
2017-09-12 19:06:47 +02:00
Neil Orley
f68d31d7c5 Add of $urlwithroot in the setBaseUrls function, to use Dolibarr external domain name in the configuration file 2017-09-12 17:45:02 +02:00
Laurent Destailleur
6e3174e71a Fix menu to member cards generation page was lost. 2017-09-12 17:36:19 +02:00
Laurent Destailleur
d572e1ddad Fix duration output 2017-09-12 17:30:18 +02:00
atm-ph
30eb03af4c Fix get_class(self) instead of get_class($this) 2017-09-12 16:36:14 +02:00
Inovea Conseil
f0e0df2660 add translation publisher
translation for modulehelp.php
2017-09-12 16:29:06 +02:00
Regis Houssin
cd888a2149 Fix: hide bank account field if module disabled 2017-09-12 15:13:12 +02:00
Regis Houssin
e038e1a2f5 Fix: missing select2 combobox 2017-09-12 09:27:59 +02:00
fappels
681c2a67bd Fix batch required for lot product error message. 2017-09-11 23:22:44 +02:00
Laurent Destailleur
44405e5415 Fix #7335 #7365 Better fix 2017-09-11 15:04:29 +02:00
Laurent Destailleur
e9bc5b719d Complete #7361 2017-09-11 14:50:00 +02:00
reeperbahnause
2fdad0f11d fix #7361 missing generateDocument function
fix #7361  
Function generateDocument was missing for Class Fichinter
2017-09-11 14:46:58 +02:00
Laurent Destailleur
6da5a6b82f FIX #7359
Conflicts:
	htdocs/fichinter/class/fichinter.class.php
2017-09-11 14:43:40 +02:00
Laurent Destailleur
029f1c411f Merge pull request #7357 from hregis/6.0_medias
Fix: some problems with medias in multicompany
2017-09-11 14:13:51 +02:00
Laurent Destailleur
206e44431d Merge pull request #7356 from hregis/6.0_upgrade
Fix: missing salaries upgrade reload module
2017-09-11 14:09:39 +02:00
Laurent Destailleur
31b5ca17f1 Merge pull request #7353 from hregis/6.0_htmlentities
Fix: avoid htmlentities
2017-09-11 14:08:37 +02:00
Laurent Destailleur
5a68d69067 Merge pull request #7350 from hregis/6.0_bug2
Fix: missing parameters for filter and sort (contact list)
2017-09-11 14:07:56 +02:00
Laurent Destailleur
19e780c53f Merge pull request #7346 from hregis/6.0_bug3
Fix: avoid warning
2017-09-11 14:07:38 +02:00
Laurent Destailleur
646e8713f2 Remove duplicated logs 2017-09-11 13:41:40 +02:00
Laurent Destailleur
b87ce172c3 FIX hidden option MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN 2017-09-11 13:40:34 +02:00
Neil Orley
a300a635d8 Merge branch '6.0' of https://github.com/Dolibarr/dolibarr into 6.0-api 2017-09-11 12:14:09 +02:00
Laurent Destailleur
61a0f04bbe FIX dateSelector was not taken into account 2017-09-11 03:30:45 +02:00
Laurent Destailleur
214bad26db Try a fix for dol_time_plus_duree when date is 2017-09-01 00:00 and
timezone > 0
2017-09-11 03:30:10 +02:00
Laurent Destailleur
e9e6a8e5ad Fix center of button 2017-09-11 03:29:36 +02:00
Laurent Destailleur
26385fa10d FIX Clean bad parameters when inserting line of template invoice
Conflicts:
	htdocs/compta/facture/class/facture-rec.class.php
2017-09-11 01:06:48 +02:00
Laurent Destailleur
d13c4b7b84 Better autosize of extrafields 2017-09-11 01:05:55 +02:00
Laurent Destailleur
c315ad7801 Fix missing tables into childtables 2017-09-10 18:04:13 +02:00
Regis Houssin
762b4eb876 Fix: some problems with medias in multicompany 2017-09-09 17:48:04 +02:00
Regis Houssin
67e9b65a2e Fix: use $array_key value instead 2017-09-09 17:07:08 +02:00
Regis Houssin
a8fdf0b5ea Fix: missing salaries upgrade reload module 2017-09-09 16:49:26 +02:00
Regis Houssin
7404a6cf98 Fix: avoid htmlentities 2017-09-09 12:15:59 +02:00
Regis Houssin
db02c32a9f Merge branch '6.0' of https://github.com/Dolibarr/dolibarr.git into 6.0_bug3 2017-09-09 12:14:22 +02:00
Regis Houssin
c1c75208ec Fix: missing parameters for filter and sort (contact list) 2017-09-09 09:46:21 +02:00
Laurent Destailleur
bb53146192 Merge pull request #7348 from hregis/6.0_bug2
Fix: missing parameters for filter and sort
2017-09-08 21:22:01 +02:00
Laurent Destailleur
23c5b0366f Merge pull request #7344 from atm-florian/6.0_fixphotocateg
6.0 fixphotocateg
2017-09-08 21:21:26 +02:00
Regis Houssin
310e912a9d Fix: missing parameters for filter and sort 2017-09-08 19:57:59 +02:00
Laurent Destailleur
c498ce3c41 FIX journalization for bank journal should not rely on a label. 2017-09-08 17:50:39 +02:00
Laurent Destailleur
8b20c5edab FIX Remove warning when using log into syslog 2017-09-08 15:46:06 +02:00
Laurent Destailleur
a6a142753a Fix bad label when account not set 2017-09-08 15:24:27 +02:00
Neil Orley
17da808325 FIX wrong basePath in the swagger view
Behind a reverse proxy the basePath seems to be in http.
Forcing the basePath to DOL_MAIN_URL_ROOT fixes the problem.
2017-09-08 14:35:44 +02:00
Laurent Destailleur
03fe9d4e97 Escape all status 2017-09-08 13:23:12 +02:00
Regis Houssin
d4c20a919d Fix: avoid warning 2017-09-08 12:52:56 +02:00
florian HENRY
1a389b6faf fix upload photo for categ 2017-09-08 10:36:45 +02:00
florian HENRY
34f08ce082 fix travis 2017-09-08 10:36:11 +02:00
florian HENRY
20ed279489 better fix 2017-09-08 10:34:38 +02:00
florian HENRY
da2f971345 fix upload images on category 2017-09-08 10:33:00 +02:00
Laurent Destailleur
835cd43565 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-09-08 10:09:41 +02:00
Laurent Destailleur
7dbd0bd355 FIX Some page of admin were not responsive 2017-09-08 10:09:22 +02:00
Laurent Destailleur
f92eded0a2 Merge pull request #7340 from Oeris/6.0-ficheinter
NEW Adds an option to hide duration in the "intervention" module
2017-09-07 18:07:14 +02:00
Laurent Destailleur
a97b87d2cd Merge pull request #7337 from fmarcet/6.0
Fix: Credit card field showing too small
2017-09-07 18:04:27 +02:00
Laurent Destailleur
faaebbf5e1 Merge pull request #7336 from hregis/6.0_bug3
Fix: avoid "Uncaught Error: [] operator not supported for strings"
2017-09-07 18:04:08 +02:00
Laurent Destailleur
b9af2d6b97 Merge pull request #7331 from simnandez/6.0
FIX: Bad const name
2017-09-07 17:57:33 +02:00
Laurent Destailleur
bde293af22 Fix filter on extrafield with type sellist 2017-09-07 15:34:25 +02:00
Neil Orley
e43b13968e New: Adds an hide hour button in the "intervention" module
Adds a way to set the visibility of hours/mins of the intervention date field from the administration interface of the "intervention" module
2017-09-07 15:31:19 +02:00
Neil Orley
b5c30ea679 New: Adds an hide duration button in intervention module
Adds a way to set the visibility of the intervention time field from the administration interface of the "intervention" module
2017-09-07 11:58:22 +02:00
Laurent Destailleur
451adb077f Fix upgrade 2017-09-06 22:41:29 +02:00
Laurent Destailleur
4bbd42123e Fix mysqldump (missing fields) 2017-09-06 22:02:44 +02:00
Laurent Destailleur
17310da0f8 Fix missing field in some env 2017-09-06 21:39:10 +02:00
Laurent Destailleur
33e2179b65 FIX SQL injection 2017-09-06 18:17:57 +02:00
Laurent Destailleur
032f54dd1a Fix search criteria lost during navigation 2017-09-06 15:36:16 +02:00
Ferran Marcet
9fa85a5831 Fix: Credit card field showing too small 2017-09-06 12:14:42 +02:00
Ferran Marcet
016ed12c11 Fix: Credit card field showing too small 2017-09-06 12:09:07 +02:00
Laurent Destailleur
d26b2a694d FIX Security fixes (filter onload js, less verbose error message in
download and viewimage, show info to encourage dolibarr_main_prod=1)
2017-09-06 11:39:30 +02:00
Regis Houssin
9b35793608 Fix: avoid "Uncaught Error: [] operator not supported for strings" 2017-09-06 11:08:23 +02:00
Laurent Destailleur
9cc344f8cc Fix problem in type and customer code substitution in numbering module 2017-09-06 10:11:07 +02:00
Laurent Destailleur
f5ccd943f1 Fix mix of collation 2017-09-05 20:13:33 +02:00
Juanjo Menent
53f5513476 FIX: Bad const name 2017-09-05 18:10:19 +02:00
Laurent Destailleur
d4ff877fdd Prepare 6.0.1 2017-09-04 12:13:12 +02:00
Laurent Destailleur
c22e8cfc01 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-09-04 10:18:44 +02:00
Laurent Destailleur
03bbb340f8 Fix rpm 2017-09-04 10:11:48 +02:00
Laurent Destailleur
869c8a4ead Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-09-04 09:30:08 +02:00
Laurent Destailleur
f3b1f89bae Fix warning 2017-09-03 15:21:37 +02:00
Laurent Destailleur
3126676ffb FIX inert of extra field must not change extrafield values in memory 2017-09-03 14:27:46 +02:00
Laurent Destailleur
3108f5bf0d Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-09-03 01:00:30 +02:00
Laurent Destailleur
c108f11c01 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	build/makepack-dolibarr.pl
	htdocs/compta/bank/index.php
2017-09-03 00:58:45 +02:00
Laurent Destailleur
09e9254f35 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-09-02 01:29:12 +02:00
Laurent Destailleur
7c722def0f FIX #7312 2017-09-02 01:28:19 +02:00
Laurent Destailleur
227c8a96c8 Merge pull request #7320 from hregis/6.0_bug3
Fix: avoid warning "non-numeric value encountered"
2017-09-02 00:09:24 +02:00
Laurent Destailleur
5ba13a9500 Merge pull request #7317 from hregis/6.0_bug2
Fix: missing $dolibarrdataroot value
2017-09-02 00:05:42 +02:00
Laurent Destailleur
d018bd4892 Merge pull request #7316 from aspangaro/6.0-rc_p4
FIX Missing language key "Events" everywhere
2017-09-02 00:00:10 +02:00
Laurent Destailleur
0d0b7f8af2 Fix email 2017-09-01 17:18:07 +02:00
Laurent Destailleur
4660bc58fc Fix nostop option 2017-09-01 17:08:47 +02:00
Laurent Destailleur
223e1b1cd4 Fix missing the nostop tag 2017-09-01 16:55:09 +02:00
Regis Houssin
0fc8a0f840 Fix: avoid warning "non-numeric value encountered" 2017-09-01 16:54:06 +02:00
Laurent Destailleur
2768878618 FIX Bad condition on sms log debug 2017-09-01 16:39:49 +02:00
Laurent Destailleur
d88a75b666 Fix typo 2017-09-01 13:47:12 +02:00
Regis Houssin
d9008cd302 Fix: missing $dolibarrdataroot value 2017-09-01 08:20:33 +02:00
Alexandre SPANGARO
be63eb8cef Fix : missing language key "Events" everywhere 2017-09-01 07:34:01 +02:00
Laurent Destailleur
2ab12f54ff Fix install error due to too large column with index 2017-08-31 22:42:14 +02:00
Laurent Destailleur
6a3d110d3a Enhance repair for utf8 mix collation 2017-08-31 14:44:32 +02:00
Laurent Destailleur
e71409b7c8 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-08-30 17:15:28 +02:00
Laurent Destailleur
0a67ca53d4 Fix menu auguria 2017-08-30 17:14:54 +02:00
Laurent Destailleur
b65db49868 Merge pull request #7309 from simnandez/6.0
NEW Add detail of all tax rates into pdf column tax sale.
2017-08-30 16:47:42 +02:00
Laurent Destailleur
3e4a7ba97c Update admin.lang 2017-08-30 16:46:50 +02:00
Laurent Destailleur
2c4e8cbb4a Update admin.lang 2017-08-30 16:45:53 +02:00
Laurent Destailleur
a3085cb44a Update objectline_view.tpl.php 2017-08-30 16:43:57 +02:00
Laurent Destailleur
c028771ad0 Merge pull request #7306 from aspangaro/6.0-rc_p2
Fix: Bank index | Accountancy journal, fetch on rowid, not code
2017-08-30 16:39:31 +02:00
Laurent Destailleur
70cbaeb423 Fix mass merging must read only PDF generated for REF. 2017-08-30 16:10:39 +02:00
Juanjo Menent
d5a9d32778 Merge remote-tracking branch 'upstream/6.0' into 6.0 2017-08-30 14:37:43 +02:00
Juanjo Menent
bfc5f01e1e NEW Add detail of all tax rates into pdf column tax sale.
-Can be hidden by pdf setup page
-For know if localtax is applied into line we have to read totaltax line
2017-08-30 14:36:00 +02:00
Laurent Destailleur
d3c95e030b Fix delete file not possible for external user even with permissions 2017-08-30 14:34:36 +02:00
Alexandre SPANGARO
4998eb3061 Fix: Accountancy journal, fetch on rowid, not code 2017-08-29 21:21:59 +02:00
Laurent Destailleur
991a33f7b6 Make different vat rates visible 2017-08-29 20:40:51 +02:00
Laurent Destailleur
2cf924ab74 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-08-29 19:56:03 +02:00
Laurent Destailleur
6c202c5fa1 Fix vat rate to show and not vat amount 2017-08-29 19:55:49 +02:00
Laurent Destailleur
8ca2bbecc6 Merge pull request #7305 from atm-quentin/6.0
FIX createFromCurrent lastvalue
2017-08-29 18:22:24 +02:00
Laurent Destailleur
945fb61e59 Update facture.class.php 2017-08-29 18:22:01 +02:00
Laurent Destailleur
044feab00f Fix duplicate code 2017-08-29 17:52:10 +02:00
Laurent Destailleur
dabd882056 Use a slash 2017-08-29 17:24:49 +02:00
Laurent Destailleur
e862ba9daf NEW Add detail of all tax rates into pdf column tax sale. 2017-08-29 17:22:03 +02:00
Laurent Destailleur
d96a83adac Fix bad total included tax when mutlicurrency is on 2017-08-29 16:37:00 +02:00
Laurent Destailleur
7218a9de0e Fix translation of total VAT 2017-08-29 13:52:24 +02:00
Laurent Destailleur
8f01db10a6 Fix setup for india 2017-08-29 13:41:55 +02:00
Laurent Destailleur
eebaff95cf Fix pb with imagick 2017-08-29 13:41:44 +02:00
Laurent Destailleur
22ca29a51f Fix sql syntax error 2017-08-29 13:32:25 +02:00
Laurent Destailleur
e9cdf85286 Fxi repeair of collation 2017-08-29 12:58:18 +02:00
atm-quentin
07f7db1b6d FIX createFromCurrent lastvalue 2017-08-29 11:22:50 +02:00
Laurent Destailleur
1523b2ef80 FIX #7222 2017-08-28 14:02:08 +02:00
Laurent Destailleur
075a138e14 Fix substitution of __EMAIL__ 2017-08-28 12:49:57 +02:00
Laurent Destailleur
73a799b0ce Merge pull request #7297 from hregis/6.0_bug2
Fix: use resprint instead resarray
2017-08-28 12:27:26 +02:00
Laurent Destailleur
3d5edba574 Merge pull request #7302 from aspangaro/6.0-rc_p1
Fix: Search on supplier payment list doesn't work
2017-08-28 12:24:22 +02:00
Laurent Destailleur
21a7fcb01a Fix substitution when sending emails 2017-08-28 12:18:18 +02:00
Regis Houssin
0ce51fcb87 Fix: add resprint for passwordforgotten 2017-08-28 09:14:50 +02:00
Regis Houssin
570c683b99 Merge branch '6.0' of https://github.com/Dolibarr/dolibarr.git into 6.0_bug2 2017-08-28 09:02:51 +02:00
Laurent Destailleur
1f64f9dfcc Merge pull request #7303 from hregis/6.0_background
Fix: better for responsive background image
2017-08-28 08:58:54 +02:00
Regis Houssin
b3642708b3 Fix: better for responsive background image 2017-08-28 08:28:58 +02:00
Alexandre SPANGARO
f6604f6578 Fix: Search on supplier payment list doesn't work 2017-08-28 06:16:31 +02:00
Laurent Destailleur
c382ca22b8 FIX link in to email and option for tls 2017-08-28 00:09:21 +02:00
Laurent Destailleur
52a2073152 Add demo file for 6.0 2017-08-27 15:51:44 +02:00
Laurent Destailleur
54afb2f1af Add demo file for 6.0 2017-08-27 15:48:26 +02:00
Regis Houssin
80af01c20f Fix: wrong test 2017-08-27 13:57:52 +02:00
Regis Houssin
526ccc870b Fix: add compatibility with old modules 2017-08-27 13:53:08 +02:00
Regis Houssin
1ce1899a46 Fix: add comment 2017-08-27 13:42:46 +02:00
Regis Houssin
896c8b4a78 Fix: comment old code 2017-08-27 13:24:29 +02:00
Regis Houssin
d800d10766 Fix: use resprint instead resarray 2017-08-27 13:19:57 +02:00
Laurent Destailleur
7916a2a648 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	build/generate_filelist_xml.php
	htdocs/filefunc.inc.php
2017-08-27 00:38:46 +02:00
Laurent Destailleur
08da8ef09d Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-08-26 21:58:52 +02:00
Laurent Destailleur
4052e15565 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/comm/action/card.php
2017-08-26 21:58:29 +02:00
Laurent Destailleur
3f806f83e3 Merge pull request #7293 from fappels/6.0_fix_product_list_supplier_prices
FIX product list supplier prices not shown when best buy column hidden
2017-08-26 19:35:01 +02:00
Laurent Destailleur
782b85ba13 Merge pull request #7285 from hregis/6.0_bug
Fix: avoid error "A non-numeric value encountered"
2017-08-26 19:31:16 +02:00
Laurent Destailleur
98f5fbab5d Fix error on contact/address not linked on thirdparty 2017-08-25 13:50:45 +02:00
Laurent Destailleur
da34ea6b11 FIX field entity "edit" and "view" was in hook but not "create". 2017-08-25 13:31:55 +02:00
fappels
533881e620 Fix supplier prices not shown when best buy hidden
only show value if item has supplier
2017-08-25 11:58:34 +02:00
Laurent Destailleur
d8ead2693f Fix field position 2017-08-24 17:59:20 +02:00
Laurent Destailleur
7d9a18a63d Fix sql error 2017-08-24 15:39:23 +02:00
Laurent Destailleur
fbac1cfe1e Fix lang loading 2017-08-24 15:00:53 +02:00
Laurent Destailleur
9684c8b4bc Fix css 2017-08-24 14:54:32 +02:00
Laurent Destailleur
ef31c47c15 Fix clear filter 2017-08-24 14:22:45 +02:00
Laurent Destailleur
2416c387f5 Fix trad 2017-08-24 13:35:52 +02:00
Laurent Destailleur
326d3df63f FIX select of category
FIX pb with extrafield list and key '0'

Conflicts:
	htdocs/core/class/extrafields.class.php
2017-08-24 13:28:56 +02:00
Regis Houssin
ad39c30c21 Fix: change old email 2017-08-23 21:23:18 +02:00
Regis Houssin
7da1b215f3 Fix: avoid error "A non-numeric value encountered" 2017-08-23 21:01:14 +02:00
Laurent Destailleur
ab37794f61 Fix text 2017-08-23 19:34:26 +02:00
Laurent Destailleur
ccb5344d32 Fix links 2017-08-23 18:52:03 +02:00
Laurent Destailleur
9079d2890c Fix ajout du code devise Franc Pacifique 2017-08-23 18:13:42 +02:00
Laurent Destailleur
bf1f60b31e Merge 2017-08-23 17:14:29 +02:00
Laurent Destailleur
f3ef6448d7 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/admin/supplier_payment.php
	htdocs/core/lib/ajax.lib.php
	htdocs/don/admin/donation.php
	htdocs/product/admin/product.php
2017-08-23 16:11:51 +02:00
Laurent Destailleur
e3370b6a98 FIX #7265 2017-08-23 12:47:59 +02:00
Laurent Destailleur
e25a428118 Fix compatibility with Internet Explorer 2017-08-23 12:32:28 +02:00
Laurent Destailleur
aae24c26a3 Some fixes with smartphones 2017-08-22 20:20:34 +02:00
Laurent Destailleur
97dbb40ad6 Fix syntax error 2017-08-22 18:42:35 +02:00
Laurent Destailleur
206d46cbb7 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	scripts/cron/cron_run_jobs.php
2017-08-22 11:18:17 +02:00
Regis Houssin
a17e4434be Fix: wrong app name 2017-08-22 10:46:06 +02:00
Regis Houssin
d2955cb32f Fix: virtualmin script update 2017-08-22 10:46:02 +02:00
BENKE Charlene
7c3640a4c3 Bad ojbject for extrafields
https://www.dolibarr.fr/forum/527-bugs-sur-la-version-stable-courante/59536-extrafields-commande-dans-expedition
2017-08-22 10:37:21 +02:00
Laurent Destailleur
ca3b3b9843 Merge pull request #7270 from atm-florian/6.0_fix
6.0 fix
2017-08-22 10:33:08 +02:00
Laurent Destailleur
9be342bd25 Fix missing $form 2017-08-22 10:02:45 +02:00
Laurent Destailleur
4a310f36d8 Fix help url 2017-08-22 08:12:30 +02:00
Laurent Destailleur
e647b5562b Fix hidden option EXPENSEREPORT_LINES_SORTED_BY_ROWID to restore
compatibility.
2017-08-21 23:41:32 +02:00
Laurent Destailleur
9ffcd9e922 Fix cover background size 2017-08-21 21:18:07 +02:00
Laurent Destailleur
599f6426a5 Fix link http 2017-08-21 20:49:12 +02:00
Laurent Destailleur
e8a2680e31 Sync transifex 2017-08-21 13:26:56 +02:00
Laurent Destailleur
f5993a2507 Better style 2017-08-21 12:51:48 +02:00
Laurent Destailleur
9782937138 Better info style 2017-08-21 12:25:38 +02:00
Laurent Destailleur
7aff424d1c Fix bad position of field 2017-08-21 12:24:58 +02:00
Laurent Destailleur
d7be62b7da Better style 2017-08-21 11:02:24 +02:00
Laurent Destailleur
84d584f607 Missing translation 2017-08-21 01:39:22 +02:00
Laurent Destailleur
68c31c55c5 FIX delete dir when there is symlinks 2017-08-21 01:26:22 +02:00
Laurent Destailleur
5a0641a30e Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/compta/bank/bankentries.php
2017-08-21 00:47:58 +02:00
Laurent Destailleur
ac3a270e17 FIX Do not delete files into sym links
Conflicts:
	htdocs/core/lib/files.lib.php
2017-08-21 00:43:52 +02:00
Laurent Destailleur
aeba02fb22 Fix bad table alignement 2017-08-20 16:21:07 +02:00
Laurent Destailleur
1101a1094f Fix translation and migration 2017-08-20 16:07:38 +02:00
florian HENRY
874d61bb6d Other fix 2017-08-18 11:35:20 +02:00
florian HENRY
c793e847bc fix comondoc generator 2017-08-18 11:30:13 +02:00
Laurent Destailleur
744f0ab198 Merge remote-tracking branch 'origin/5.0' into 6.0 2017-08-17 22:03:26 +02:00
Laurent Destailleur
4d26dffa7d FIX No way to add new line in supplier orders 2017-08-13 23:17:34 +02:00
Laurent Destailleur
9d4d85ca9d Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-08-11 19:58:09 +02:00
Laurent Destailleur
d37d1a033a Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/compta/bank/bankentries.php
	htdocs/core/lib/admin.lib.php
	htdocs/install/mysql/migration/repair.sql
2017-08-11 19:56:17 +02:00
Laurent Destailleur
5c53081007 Merge pull request #7244 from atm-john/new_resource_ref_mask
FIX resource hooks
2017-08-10 13:49:26 +02:00
Laurent Destailleur
f375c41950 Update card.php 2017-08-10 13:47:44 +02:00
Laurent Destailleur
a7c1ff402a Fix picto on support page 2017-08-07 16:06:38 +02:00
John
76bee57553 Fix Add doaction hook 2017-08-07 15:49:17 +02:00
John
d791476708 Fix doaction call 2017-08-07 15:47:55 +02:00
Laurent Destailleur
975fd0a6d3 Fix font size 2017-08-07 15:43:42 +02:00
Laurent Destailleur
c2a89ae58e Code comment 2017-08-04 22:58:52 +02:00
Laurent Destailleur
a3b5caaae0 Prepare rc 2017-08-04 18:41:05 +02:00
Laurent Destailleur
06e35149f7 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-08-04 15:32:40 +02:00
Laurent Destailleur
7c840b8348 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-08-04 15:32:30 +02:00
Laurent Destailleur
c72bed6290 Merge pull request #7236 from atm-john/FIX_contract_edit_btn_if_no_service
Fix contract reopen btn if no contract line
2017-08-04 15:27:36 +02:00
Laurent Destailleur
e62bb89d95 Merge pull request #7235 from atm-john/FIX_service_list_contract_ref_search
Fix ref search
2017-08-04 15:26:19 +02:00
Laurent Destailleur
26896910ee Merge pull request #7229 from aspangaro/6.0-p3
Fix v6: Debug various_payment
2017-08-04 15:21:47 +02:00
Laurent Destailleur
86e4207145 Merge branch '6.0' into 6.0-p3 2017-08-04 15:21:41 +02:00
Laurent Destailleur
56426ad3d9 Merge pull request #7228 from aspangaro/6.0-d2
Fix v6: SQL error in payment list and remove function length_accountg in bank index
2017-08-04 15:18:43 +02:00
Laurent Destailleur
4cb2a0bce2 Update list.php 2017-08-04 15:17:30 +02:00
Laurent Destailleur
8a71b9e95e Avoid creation of dir that is not indexed 2017-08-04 13:51:25 +02:00
Laurent Destailleur
da831d2c8e FIX Bad link in ECM 2017-08-04 13:45:57 +02:00
Laurent Destailleur
3a098ca047 Reduce verbosity 2017-08-04 11:50:30 +02:00
John
bc8b02a990 Merge branch '6.0' of github.com:Dolibarr/dolibarr into FIX_contract_edit_btn_if_no_service 2017-08-04 09:05:13 +02:00
Laurent Destailleur
d1398887e6 Missing picto 2017-08-03 12:02:42 +02:00
Laurent Destailleur
ddd60d1cd2 Fix error counting in cron 2017-08-03 11:23:23 +02:00
Laurent Destailleur
68b19462c3 Fix list of cron jobs 2017-08-03 11:02:07 +02:00
Laurent Destailleur
a8e2f95c39 Better help 2017-08-03 10:47:35 +02:00
Laurent Destailleur
c38d59a4b6 Fix regression 2017-08-02 22:26:01 +02:00
Laurent Destailleur
47ac770d93 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/expedition/card.php
	htdocs/expedition/list.php
2017-08-02 17:51:19 +02:00
Laurent Destailleur
32eb2aba43 Sync transifex 2017-08-02 15:30:46 +02:00
Laurent Destailleur
c8b79214cd Fix translation 2017-08-02 14:53:42 +02:00
Laurent Destailleur
025ecd4ecc Fix default value for inventory code during a stock correction 2017-08-02 14:21:20 +02:00
Laurent Destailleur
2a92ee6008 Fix look and feel v6 2017-08-02 14:10:43 +02:00
John
56e6794151 Fix contract reopen btn if no contract line 2017-08-02 14:10:26 +02:00
Laurent Destailleur
01e1457a09 Fix typo 2017-08-02 13:46:56 +02:00
Laurent Destailleur
5b1f5b0f20 Fix translation done twice into field title of array 2017-08-02 13:31:53 +02:00
John
f130a29739 Fix ref search 2017-08-02 12:14:36 +02:00
Laurent Destailleur
33d6903d3f Fix bad recipient when using mass actions 2017-08-02 11:39:11 +02:00
Laurent Destailleur
71d49f1c6f Fix pb in ecm 2017-08-01 18:44:34 +02:00
Laurent Destailleur
747719b3e8 Code comment 2017-08-01 15:54:28 +02:00
Laurent Destailleur
f9dc628f0b Add tool to fix missing thumbs 2017-08-01 15:53:22 +02:00
Laurent Destailleur
19ba90f577 Fix creation of leave request 2017-08-01 13:17:27 +02:00
Laurent Destailleur
03b3f54c2c Fix class not found 2017-08-01 13:10:15 +02:00
Alexandre SPANGARO
e41543c22e Fix v6: Debug various_payment 2017-08-01 06:44:37 +02:00
Alexandre SPANGARO
3c34add0d6 remove condition 2017-08-01 06:26:35 +02:00
Alexandre SPANGARO
9629a50853 Fix: SQL error in payment list 2017-08-01 06:21:19 +02:00
Alexandre SPANGARO
efd24cc1a2 Fix: function length_accountg has been moved in getNomUrl 2017-08-01 06:16:23 +02:00
Laurent Destailleur
ae444b5781 Fix travis error 2017-08-01 01:28:07 +02:00
Laurent Destailleur
7d6d4adcdb Fix combo for multicompany not visible where there is other hooks by
other modules
2017-07-31 18:16:41 +02:00
Laurent Destailleur
9cf6c43f8a Fix code comment 2017-07-31 15:51:08 +02:00
Laurent Destailleur
7ba5cf5958 Debug view of services lines 2017-07-31 13:48:00 +02:00
Laurent Destailleur
97e694f4d9 Fix look and feel v6 2017-07-31 12:43:07 +02:00
Laurent Destailleur
2f9f9ac80d Fix personal conf was not loaded 2017-07-31 11:56:20 +02:00
Laurent Destailleur
ecb4eebfac Fix filter of project in timespent view 2017-07-31 06:58:55 +02:00
Laurent Destailleur
13cbd597ad Fix filter lost 2017-07-31 06:20:32 +02:00
Laurent Destailleur
612ab65b72 Fix by adding a MULTICOMPANY_BACKWARD_COMPATIBILITY option. 2017-07-31 06:01:05 +02:00
Laurent Destailleur
2f68d446ef Fix on filter on project list 2017-07-31 04:52:27 +02:00
Laurent Destailleur
800aa4d5b6 Fix bad target 2017-07-31 04:49:54 +02:00
Laurent Destailleur
52875c08ff Fix missing translation keys 2017-07-31 04:24:13 +02:00
Laurent Destailleur
cfebbe3cc4 Fix css 2017-07-31 03:16:28 +02:00
Laurent Destailleur
7a69df08c5 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/cron/class/cronjob.class.php
2017-07-31 02:39:42 +02:00
Laurent Destailleur
067e5d81d9 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-07-31 02:36:23 +02:00
Laurent Destailleur
4f0b35874d Merge pull request #7216 from atm-florian/fix_7213
FIX : #7213
2017-07-31 02:29:36 +02:00
Laurent Destailleur
b0adc9cca4 Merge pull request #7207 from atm-quentin/FIX_next_situation_load_extrafields
FIX next situation keep extrafields
2017-07-31 02:24:46 +02:00
Laurent Destailleur
d8121c133e Merge pull request #7205 from atm-quentin/6.0
FIX invoice situation division by zero
2017-07-31 02:23:37 +02:00
Laurent Destailleur
beaa5279ac Merge pull request #7197 from hregis/6.0_cron
Fix: add possibility to force entity id
2017-07-31 02:22:54 +02:00
Laurent Destailleur
eb27f8cfe8 Fix css 2017-07-31 02:18:33 +02:00
Laurent Destailleur
1897e3cbad Some fix for better compatibility 2017-07-30 20:43:18 +02:00
Laurent Destailleur
bb8d458468 Fix menu editor 2017-07-30 19:41:45 +02:00
Laurent Destailleur
837afa0e65 Fix better way to get info for contact/thirdparty on agenda 2017-07-29 04:07:46 +02:00
Laurent Destailleur
2a36166839 Fix error method on non object 2017-07-29 02:11:45 +02:00
Laurent Destailleur
cae21d3937 Fix in agenda output per user/type (reduce memory usage) 2017-07-29 01:59:26 +02:00
Laurent Destailleur
8b82fc3c70 Fix project edition on loan menu
Fix translation on profit view of projects.
2017-07-29 00:28:41 +02:00
Laurent Destailleur
af63dc76c1 Fix flex problems 2017-07-28 23:46:11 +02:00
Laurent Destailleur
5e17c2efb9 Fix into filters of time consumed 2017-07-28 23:32:55 +02:00
Laurent Destailleur
25c5ed8f72 Fix for compatibility 2017-07-28 18:09:38 +02:00
Laurent Destailleur
ef3c002144 Module website not stable enough 2017-07-28 12:37:52 +02:00
Laurent Destailleur
55a2e63c32 Revert "Fix include fails"
This reverts commit bfb904557f.
2017-07-28 12:07:05 +02:00
Laurent Destailleur
bfb904557f Fix include fails 2017-07-28 12:06:12 +02:00
Laurent Destailleur
f9442c1092 Fix box activity 2017-07-28 11:11:20 +02:00
Laurent Destailleur
60493d0a47 Several fixes (permission, missing method or class) in REST APIs 2017-07-28 11:03:30 +02:00
florian HENRY
f5718106a6 FIX : 7213 2017-07-28 09:45:23 +02:00
Laurent Destailleur
bdfb0b7561 FIX pgsql compatibility. Add PHPUnit to avoid using dates without quotes 2017-07-26 21:22:53 +02:00
Laurent Destailleur
7e0a165131 Fix some pb in search using phone 2017-07-26 20:33:25 +02:00
Laurent Destailleur
c6480af217 Enhance the repair script 2017-07-26 18:47:35 +02:00
Laurent Destailleur
7b34859bc8 Fix collation 2017-07-26 16:14:18 +02:00
atm-quentin
09a1118036 FIX extrafields for invoice too 2017-07-26 15:55:50 +02:00
atm-quentin
29a4900d0b FIX_next_situation_keep_extrafields 2017-07-26 15:20:31 +02:00
atm-quentin
8451ba1f14 FIX invoice situation division by zero 2017-07-26 14:43:10 +02:00
Laurent Destailleur
f3ceedfe38 FIX syntax error with pgsql and frequency lost during cron update. 2017-07-26 12:09:15 +02:00
Laurent Destailleur
04b6c30b6d Code comment 2017-07-26 10:12:22 +02:00
Laurent Destailleur
abb346651e Close #6807 2017-07-25 21:27:07 +02:00
Laurent Destailleur
c386a02889 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/langs/en_US/stocks.lang
2017-07-25 21:10:08 +02:00
Laurent Destailleur
6902960d07 Fix sign of amount debit/credit/montant 2017-07-25 21:03:30 +02:00
Laurent Destailleur
eaab34ee6c Fix permission 2017-07-25 13:36:57 +02:00
Laurent Destailleur
6a3add6e57 Merge pull request #7196 from hregis/6.0_bug
Fix: translation error
2017-07-25 13:33:18 +02:00
florian HENRY
d6d454edc8 fix : Various misspelling class (eclipse Oxygen standard PHP control) 2017-07-25 13:32:27 +02:00
Laurent Destailleur
0d5cd5d970 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-07-25 13:31:54 +02:00
Laurent Destailleur
a7c96416ba Merge pull request #7194 from hregis/6.0_bug2
Fix: getEntity $shared param value is now 1 by default
2017-07-25 13:29:42 +02:00
Laurent Destailleur
cfe445ab14 Code comment 2017-07-25 13:28:56 +02:00
Laurent Destailleur
cba898e2b9 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/compta/facture.php
2017-07-25 10:12:28 +02:00
Laurent Destailleur
9043249740 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/commande/list.php
	htdocs/contrat/list.php
	htdocs/contrat/services.php
	htdocs/fourn/facture/list.php
2017-07-25 09:54:17 +02:00
Laurent Destailleur
aff61fad7d Fix new generic classes system 2017-07-25 01:21:20 +02:00
Laurent Destailleur
307b8ef4f6 Debug modulebuilder 2017-07-25 00:32:06 +02:00
Laurent Destailleur
e571616d52 Debug modulebuilder 2017-07-25 00:21:01 +02:00
Laurent Destailleur
bbb4047909 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-07-25 00:07:32 +02:00
Laurent Destailleur
b50236da4c Fix dir created at install 2017-07-25 00:07:17 +02:00
Laurent Destailleur
4ae60284fb Debug modulebuilder 2017-07-25 00:03:29 +02:00
Laurent Destailleur
41c6d9cbfb Debug modulebuilder 2017-07-25 00:00:08 +02:00
Laurent Destailleur
ddbf841514 Fix packager must ignore symbolic links in custom 2017-07-24 23:57:55 +02:00
Laurent Destailleur
8303cee676 Debug modulebuilder 2017-07-24 21:03:35 +02:00
Regis Houssin
566bc555eb Fix: add possibility to force entity id 2017-07-24 15:41:22 +02:00
Laurent Destailleur
dcb79e66cc Debug modulebuilder 2017-07-24 13:55:12 +02:00
Regis Houssin
88968aae22 Fix: translation error 2017-07-24 09:10:59 +02:00
Regis Houssin
48800bc268 Fix: getEntity $shared param value is now 1 by default 2017-07-24 08:52:10 +02:00
Laurent Destailleur
9043cf759b Fix clone function 2017-07-23 20:27:30 +02:00
Laurent Destailleur
25b107defb Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/contrat/list.php
	htdocs/fichinter/list.php
2017-07-23 19:09:00 +02:00
Laurent Destailleur
0aed9ecd7c Fix ckeditor is now ok since there is no more jmobile. 2017-07-23 18:52:30 +02:00
Laurent Destailleur
0963a649b7 Update doc 2017-07-22 23:49:28 +02:00
Laurent Destailleur
7904e994a7 FIX When disconnected, the search box jump to login instead of error. 2017-07-22 23:43:40 +02:00
Laurent Destailleur
583452114b Split editor in 2 (html source and wysiwyg) 2017-07-22 20:19:10 +02:00
Laurent Destailleur
2a133f4a3f Generate table for extrafields 2017-07-22 20:12:00 +02:00
Laurent Destailleur
9e6666e511 Fix translation keys for taxes 2017-07-22 16:40:19 +02:00
Laurent Destailleur
6470b62f56 Fix bad rounding 2017-07-22 16:13:21 +02:00
Laurent Destailleur
340203cc18 Fix vat label for India 2017-07-22 16:05:51 +02:00
Laurent Destailleur
4803f2d29a Fix package v6 2017-07-22 11:26:25 +02:00
Laurent Destailleur
e0f0769405 Fix packager 2017-07-22 02:31:33 +02:00
Laurent Destailleur
a0d9890c99 Fix packager 2017-07-22 02:31:06 +02:00
Laurent Destailleur
e36911360b Update changelog 2017-07-22 02:22:16 +02:00
Laurent Destailleur
5207b84e8b Fix compatibility with indian IGST/CSGST/SGST 2017-07-22 01:56:38 +02:00
Laurent Destailleur
ba43c41ac0 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-07-22 01:21:40 +02:00
Laurent Destailleur
7562412554 Minor fixes 2017-07-22 01:21:28 +02:00
Laurent Destailleur
f64a9968a9 Debug modulebuilder 2017-07-22 01:00:43 +02:00
Laurent Destailleur
83341cc3ed Merge pull request #7181 from atm-john/FIX_extrafield_update_into_contract
Fix extrafield doesnt save on update
2017-07-21 15:02:10 +02:00
Laurent Destailleur
6830fe4f91 Fix generic clone function 2017-07-21 13:39:06 +02:00
Laurent Destailleur
5318e513c1 Debug module website 2017-07-21 02:29:24 +02:00
Laurent Destailleur
fa3ed50f3a Fix sql syntax 2017-07-20 18:23:42 +02:00
Laurent Destailleur
3b8f60f90e Fix pb of recursive include in website module 2017-07-20 16:49:20 +02:00
John
f438097ecb Fix extrafield save on update 2017-07-20 15:06:53 +02:00
Laurent Destailleur
84f621fde3 Fix migration on pgsql 2017-07-19 16:31:15 +02:00
Laurent Destailleur
74db61ce15 Fix translation 2017-07-19 15:50:57 +02:00
Laurent Destailleur
1c5148bb1e Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-07-18 15:13:46 +02:00
Laurent Destailleur
594f08cc6f Merge pull request #7170 from aspangaro/6.0-fix7169
Fix #7169 : Unknown column 'ba.accountancy_journal' in member's subcription
2017-07-18 14:46:42 +02:00
Laurent Destailleur
c59059ad9d Merge pull request #7167 from hregis/6.0_bug
Fix: php 5.6 is ok now (travis)
2017-07-18 14:45:26 +02:00
hguibourgdev
4b0638dd40 Update list.php
FIX copy-paste error (sell versus buy)
2017-07-18 14:43:03 +02:00
Laurent Destailleur
5e1dbdc608 Update index.php 2017-07-18 14:35:11 +02:00
Articoder InfoSec Team
0179160f6c Reason: similar change is present elsewhere in the code
Notes: please review carefully before accepting. patch propagation. manual test run. 
Reviewed By: https://github.com/dchichkov 
Cherry picked from:
===
From 0d62bd704e Mon Sep 17 00:00:00 2001
From: Juanjo Menent <jmenent@2byte.es>
Date: Wed, 22 Jun 2016 18:59:51 +0200
Subject: [PATCH] Fix: Bad column totalizing if MAIN_SHOW_HT_ON_SUMMARY activated
2017-07-18 14:34:57 +02:00
Laurent Destailleur
cfbd47bd78 Fix field null 2017-07-18 14:09:37 +02:00
Laurent Destailleur
5f32c3d34a Work on new india vat system 2017-07-18 12:49:42 +02:00
Laurent Destailleur
e5ec0a785d Fix use command standard @... to mark a change in official code 2017-07-17 20:20:38 +02:00
Laurent Destailleur
4582b54e91 Fix use command standard @... to mark a change in official code 2017-07-17 20:09:19 +02:00
Laurent Destailleur
1ef70b387d Fix bad limit 2017-07-17 16:45:24 +02:00
Laurent Destailleur
b075f7a459 Incomplete translation 2017-07-17 16:32:10 +02:00
Laurent Destailleur
0cf38f7197 Fix log file name not set during install 2017-07-17 16:24:45 +02:00
Laurent Destailleur
4fa04247a9 Finished dev 2017-07-17 11:09:32 +02:00
Laurent Destailleur
d832bfc056 Some fix into dol_compress_dir function. 2017-07-17 11:05:38 +02:00
Laurent Destailleur
330f3af74d Fix pb in recursive dol_dir_list return. 2017-07-17 10:26:36 +02:00
Alexandre SPANGARO
4c84c97bb6 Fix #7169 : Unknown column 'ba.accountancy_journal' in member's subcription 2017-07-17 05:58:27 +02:00
Laurent Destailleur
caaeac35b6 Work on modulebuilder 2017-07-17 00:02:04 +02:00
Laurent Destailleur
4d9ae5bb44 Work on modulebuilder 2017-07-16 14:57:30 +02:00
Laurent Destailleur
816db0e856 Add protection against duplicate moduel with similar names 2017-07-16 13:25:10 +02:00
Laurent Destailleur
7b2a71802b Do some TODO on modulebuilder module. 2017-07-16 13:00:35 +02:00
Regis Houssin
6f1c679d20 Fix: php 5.6 is ok now (travis) 2017-07-16 09:13:45 +02:00
Laurent Destailleur
84d76f26f2 Fix missing picto 2017-07-15 21:55:05 +02:00
Laurent Destailleur
e5513cff91 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/accountancy/journal/bankjournal.php
2017-07-15 21:24:21 +02:00
Laurent Destailleur
3cd21ee659 Fix sort order 2017-07-15 21:19:39 +02:00
Laurent Destailleur
bab963ec07 FIX Pagination on the ledger page. 2017-07-15 19:19:12 +02:00
Laurent Destailleur
d671421b8b Fix journalization of vat payments 2017-07-15 18:29:18 +02:00
Laurent Destailleur
fa00373e56 Fix remove log 2017-07-15 17:52:30 +02:00
Laurent Destailleur
644486b4a0 Fix css 2017-07-15 17:32:36 +02:00
Laurent Destailleur
a20bf05c64 Debug journalization 2017-07-15 17:32:22 +02:00
Laurent Destailleur
c6dcccba18 Fix better warning when record will be saved into a waiting account. 2017-07-15 14:55:04 +02:00
Laurent Destailleur
03d9cbb170 Fix refresh of list when change were done 2017-07-15 13:31:56 +02:00
Laurent Destailleur
248717ccac Fix refresh of list when change were done 2017-07-15 13:31:14 +02:00
Laurent Destailleur
1735a649e9 Fix permission on salary module 2017-07-15 13:02:41 +02:00
Laurent Destailleur
0763d15b4c Debug journalization
Debug edition of user BAN.
2017-07-15 12:37:31 +02:00
Laurent Destailleur
ab6646d16b Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/accountancy/journal/bankjournal.php
	htdocs/compta/bank/bankentries.php
	htdocs/install/mysql/migration/4.0.0-5.0.0.sql
2017-07-15 03:54:50 +02:00
Laurent Destailleur
cb87b314be FIX Maxi debug of journalization of bank journal. 2017-07-15 03:41:07 +02:00
Laurent Destailleur
de66971d93 Fix bad setup 2017-07-14 15:49:33 +02:00
Laurent Destailleur
e551c0a665 Fix autofill of amount on supplier payment page 2017-07-14 15:22:30 +02:00
Laurent Destailleur
1ad7210506 Fix var not initialized 2017-07-14 03:14:21 +02:00
Laurent Destailleur
ccd20d979f Fix template 2017-07-14 03:09:58 +02:00
Laurent Destailleur
15cf15f47f Look and feel v6 2017-07-14 02:07:01 +02:00
Laurent Destailleur
f106ff7e76 Fix var init 2017-07-13 23:52:02 +02:00
Laurent Destailleur
312b153005 Fix phpcs 2017-07-13 23:46:01 +02:00
Laurent Destailleur
652d715fdc Better translation 2017-07-13 18:18:56 +02:00
Laurent Destailleur
3db7bd7624 Fix look and feel v6 2017-07-13 17:44:12 +02:00
Laurent Destailleur
2b77c9b5c7 FIX #7050 2017-07-13 16:56:36 +02:00
Laurent Destailleur
be8e15a777 Prepare fix 2017-07-13 16:25:38 +02:00
Laurent Destailleur
7eb4562432 Code comment 2017-07-13 15:22:07 +02:00
Laurent Destailleur
43f6eab2ea FIX #7146 2017-07-13 15:16:17 +02:00
Laurent Destailleur
c434f72d31 Merge pull request #7146 from hregis/6.0_bug3
Fix: travis error (categorie)
2017-07-13 14:46:41 +02:00
Laurent Destailleur
ae7797ebf2 Look and feel v6 2017-07-13 14:43:41 +02:00
Laurent Destailleur
85d9a2f790 Merge pull request #7145 from hregis/6.0_bug2
Fix: missing group name with dol_banner_tab
2017-07-13 14:36:17 +02:00
Laurent Destailleur
4ee70e496e Merge pull request #7143 from hregis/6.0_bug
Fix: missing entity filter (multicompany)
2017-07-13 14:33:45 +02:00
Laurent Destailleur
74e29a3fdb FIX empty object 2017-07-13 14:32:49 +02:00
Laurent Destailleur
bea3ced763 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-07-13 14:32:03 +02:00
Laurent Destailleur
9ca12c9d11 Merge pull request #7141 from hregis/6.0
Fix: error during upgrade process
2017-07-13 14:28:47 +02:00
Laurent Destailleur
58ce8eaf46 Merge pull request #7138 from atm-florian/6.0_fix_advtargetmailing
Fix AdvtargetEmailing
2017-07-13 14:26:23 +02:00
Laurent Destailleur
13cee53384 Update 5.0.0-6.0.0.sql 2017-07-13 14:26:10 +02:00
Laurent Destailleur
10337b4914 Update llx_mailing_cibles.sql 2017-07-13 14:25:42 +02:00
Laurent Destailleur
f5995cadef Fix detection of payment for credit note 2017-07-13 14:16:26 +02:00
Laurent Destailleur
743de4e586 FIX Option to classify proposal/order in workflow module must not set
source object to billed if amount differs.
2017-07-13 12:42:32 +02:00
Laurent Destailleur
2141cfb282 Fix code of triggers (disabled if module not enabled) 2017-07-13 11:25:25 +02:00
Laurent Destailleur
028f1f5133 Fix default currency in creation form. 2017-07-13 10:16:40 +02:00
Laurent Destailleur
fb0298ff1c Fix template should work if module in root dir 2017-07-13 09:15:37 +02:00
Laurent Destailleur
0b4a1d9b65 Protection to avoid mass action execution when not required 2017-07-13 02:49:40 +02:00
Laurent Destailleur
9127892c71 Fix several minor bugs 2017-07-13 02:33:48 +02:00
Laurent Destailleur
bb828f5c9c Fix vat src code must be visible into bind step 2017-07-13 01:14:27 +02:00
Laurent Destailleur
3fd505d98f Fix error management when making 2017-07-13 01:02:35 +02:00
Laurent Destailleur
3fae3a9eda Fix typo 2017-07-13 00:44:04 +02:00
Laurent Destailleur
2870798d07 Fix remove warnings 2017-07-13 00:35:10 +02:00
Laurent Destailleur
23fbef3dae Fix the delete dir functions does not return real nb of deleted files. 2017-07-13 00:26:05 +02:00
Laurent Destailleur
4b4dcf2e01 Fix overload with a protection for rare case with very high nb of event 2017-07-12 23:05:26 +02:00
Laurent Destailleur
0d4d4516c8 Fix template for css and js 2017-07-12 22:52:56 +02:00
Laurent Destailleur
838958a888 Fix count show 0 if empty 2017-07-12 20:32:49 +02:00
Laurent Destailleur
44b6b8cc65 Fix purge of log files was missing some log files. 2017-07-12 20:27:25 +02:00
Laurent Destailleur
a487492a7a Fix purge of log files was missing some log files. 2017-07-12 20:23:35 +02:00
florian HENRY
816283d1e5 fix SQL 2017-07-12 17:51:32 +02:00
florian HENRY
67664331e3 Merge branch '6.0' of local repository into 6.0_fix_advtargetmailing 2017-07-12 17:49:44 +02:00
Regis Houssin
44a44ab0a2 Fix: travis error 2017-07-12 16:45:32 +02:00
Regis Houssin
d63e15f0c6 Fix: missing group name with dol_banner_tab 2017-07-12 15:52:58 +02:00
Laurent Destailleur
33ceb22b8b Fix error management into modulebuilder 2017-07-12 13:25:18 +02:00
florian HENRY
379a5b9e16 fix : SQL migration in capital letters 2017-07-12 12:35:30 +02:00
Laurent Destailleur
40b3ae2a15 Debug modulebuilder 2017-07-12 11:52:07 +02:00
Regis Houssin
9430952561 Fix: missing entity filter (multicompany) 2017-07-12 11:00:18 +02:00
Laurent Destailleur
11cc1f04c4 Work on modulebuilder 2017-07-12 01:55:07 +02:00
Laurent Destailleur
b016b1ca5f Fix typo 2017-07-11 23:19:47 +02:00
Regis Houssin
f745c87394 Fix: error during upgrade process 2017-07-11 21:27:51 +02:00
Laurent Destailleur
ceeb9d7f1b Debug modulebuilder 2017-07-11 20:47:49 +02:00
Laurent Destailleur
cbde99b419 More complete exemple 2017-07-11 15:50:20 +02:00
Laurent Destailleur
e1d9dfc862 Complete example of template 2017-07-11 15:12:01 +02:00
florian HENRY
c85bf18f0e Fix AdvtargetEmailing 2017-07-11 14:47:37 +02:00
Laurent Destailleur
90dcd3d30d Look and feel v6 2017-07-11 13:26:11 +02:00
Laurent Destailleur
c75db29ff2 Fix warning when module position is not correct 2017-07-11 12:54:49 +02:00
Laurent Destailleur
be09c911ce Debug module websites 2017-07-10 23:44:46 +02:00
AlainRnet
8c287c02ca Update card.php
Limitation of the number of characters that is not limited in the third card as described here: https://www.dolibarr.fr/forum/5-bugs-sur-la-version-cvs-ou-demo/59229-taille-limitee-de-l-adesse-mail-des-contacts
2017-07-10 21:39:25 +02:00
Laurent Destailleur
bdb12678d0 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-07-10 21:38:57 +02:00
Laurent Destailleur
fc76383718 Merge pull request #7134 from defrance/patch-22
if no suppliers selected, no subprice yet
2017-07-10 21:33:42 +02:00
Laurent Destailleur
9ec19958bf Merge pull request #7133 from fappels/6.0_fix_category_navigation
Fix categorie navigation
2017-07-10 21:33:02 +02:00
Laurent Destailleur
baf6533ea4 Merge pull request #7130 from fappels/6.0_fix_delete_product
Fix delete product from product card
2017-07-10 21:26:12 +02:00
BENKE Charlene
1ab3e0c3fa if no suppliers selected, no subprice yet 2017-07-10 14:00:32 +02:00
fappels
f85fcbd216 Fix categorie navigation 2017-07-10 12:47:21 +02:00
Laurent Destailleur
bb2dc59c56 More complete request to clean 2017-07-10 11:29:09 +02:00
Laurent Destailleur
fd89535037 Debug module website 2017-07-09 22:30:19 +02:00
Laurent Destailleur
a92effa622 Fix clean test 2017-07-09 21:16:09 +02:00
Laurent Destailleur
3c576dcf21 Fix bad name of tables 2017-07-09 20:57:45 +02:00
Laurent Destailleur
10cb7b2524 Fix remove warnings 2017-07-09 20:31:27 +02:00
Laurent Destailleur
e3943155f3 Sync transifex 2017-07-09 19:32:35 +02:00
Laurent Destailleur
aa66676b7d Quick hack to solve missing alias name on doc. 2017-07-09 15:15:23 +02:00
Laurent Destailleur
9fc17d8988 Translation 2017-07-09 13:43:23 +02:00
fappels
13d6664ab4 Fix delete product from product card 2017-07-09 12:47:51 +02:00
Laurent Destailleur
b61f7c0179 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2017-07-08 22:17:29 +02:00
Laurent Destailleur
9d0cb07ff9 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/expensereport/payment/payment.php
2017-07-08 21:54:37 +02:00
Laurent Destailleur
45d8fbb19e Fix gravatar 2017-07-08 21:39:48 +02:00
Laurent Destailleur
d223283359 Fix phpcs 2017-07-08 20:59:53 +02:00
Laurent Destailleur
a562e5a919 Maxi debug of accountancy ledger page. 2017-07-08 20:52:53 +02:00
Laurent Destailleur
8a9c38114f Fix bug reported by scrutinizer 2017-07-08 19:05:51 +02:00
Laurent Destailleur
00e1fab1af Fix bad var 2017-07-08 19:01:09 +02:00
Laurent Destailleur
f32b27e8bd Better management of vat with code 2017-07-08 18:50:58 +02:00
Laurent Destailleur
f40afcf023 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts:
	htdocs/accountancy/class/bookkeeping.class.php
	htdocs/compta/facture/list.php
	htdocs/compta/paiement/class/cpaiement.class.php
	htdocs/compta/sociales/card.php
	htdocs/core/lib/functions.lib.php
	htdocs/expensereport/card.php
	htdocs/expensereport/class/expensereport.class.php
	htdocs/product/stats/facture.php
2017-07-08 18:32:34 +02:00
Laurent Destailleur
cf6745b1ae Debug module builder 2017-07-08 17:08:07 +02:00
Laurent Destailleur
8db4e91888 Debug modulebuilder 2017-07-08 15:43:36 +02:00
Laurent Destailleur
4f75b6d656 Fix phpcs 2017-07-08 14:58:19 +02:00
Laurent Destailleur
9f486716c1 Fix phpcs 2017-07-08 14:56:43 +02:00
Laurent Destailleur
49689fc56f Fix bad extension 2017-07-08 14:30:16 +02:00
Laurent Destailleur
2ea7f38d38 Fix migration of version that is not a final version 2017-07-08 12:48:17 +02:00
Laurent Destailleur
a9468ad84a Look and feel v6 2017-07-08 00:42:55 +02:00
Laurent Destailleur
e1ba69eee0 Fix edit of automatic event should keep its type. 2017-07-08 00:19:30 +02:00
Laurent Destailleur
fbca244212 Fix must go back to next version 2017-07-07 23:19:15 +02:00
Laurent Destailleur
eff4282cc2 Clean files 2017-07-07 22:19:01 +02:00
Laurent Destailleur
5ad6d70397 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-07 22:05:01 +02:00
Laurent Destailleur
4bae65bedc Fix travis 2017-07-07 22:04:29 +02:00
Laurent Destailleur
1d35c87c18 Merge pull request #7125 from aspangaro/6.0-fec3
Fix some problems
2017-07-07 20:32:27 +02:00
Laurent Destailleur
34d0c79e32 Merge pull request #7124 from fappels/develop_updateline_notriggerflag
New add trigger disable to updateline functions
2017-07-07 20:30:04 +02:00
Laurent Destailleur
02aa4f7e0c Fix permission to show details of project 2017-07-07 20:28:43 +02:00
Laurent Destailleur
749e5eb7f4 Fix link 2017-07-07 20:24:39 +02:00
Laurent Destailleur
0d8f382ca4 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-07 20:16:04 +02:00
Laurent Destailleur
441c4b9b71 Merge pull request #7115 from atm-florian/dev_fix_accountancy
FIX accountancy right management on setup pages
2017-07-07 20:08:21 +02:00
Laurent Destailleur
3270d141b0 Update index.php 2017-07-07 20:07:28 +02:00
Laurent Destailleur
5eaf49a265 Update journals_list.php 2017-07-07 20:05:32 +02:00
Laurent Destailleur
2dd9cb61a6 Update export.php 2017-07-07 20:04:29 +02:00
Laurent Destailleur
51a9c4fad5 Update defaultaccounts.php 2017-07-07 20:03:57 +02:00
Laurent Destailleur
d880c943ae Update categories_list.php 2017-07-07 20:03:39 +02:00
Laurent Destailleur
0fc6f6920e Update categories.php 2017-07-07 20:03:14 +02:00
Laurent Destailleur
9d1d0bd1f1 Merge pull request #7111 from atm-quentin/develop
SQL Error migration 5.0 to 6.0
2017-07-07 20:00:51 +02:00
Laurent Destailleur
bcbd2a8a91 Merge pull request #7108 from atm-ph/fix_develop_import_update
Fix update row on xlsx import do not work as csv import
2017-07-07 20:00:28 +02:00
Laurent Destailleur
71d360b4a0 Merge pull request #7105 from hregis/develop_bug2
Fix: check if action type is different of 'user' (external module)
2017-07-07 19:57:26 +02:00
Laurent Destailleur
0eb6a25342 Merge pull request #7104 from tuxgasy/develop_shipment_failed_no_error
Fix #7103 : No error message on validate shipment if stock movement failed
2017-07-07 19:55:32 +02:00
Laurent Destailleur
608e9e1c82 Look and feel v6 (no amount symbol into list) 2017-07-07 19:48:35 +02:00
Laurent Destailleur
552031799d Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-07 19:42:37 +02:00
Laurent Destailleur
de24e93cca Merge pull request #7097 from fappels/develop_nbr_suppliers_prod_list
NEW: Add column with nbr suppliers prices and WAP to product list.
2017-07-07 19:42:25 +02:00
Laurent Destailleur
aa4ff464d6 Merge pull request #7096 from fappels/6.0_fix_virtual_stock_read_rights_third_parties
FIX: Ignore third party read rights filter for virtual stock calculation.
2017-07-07 19:34:12 +02:00
Laurent Destailleur
a026e1d701 Close #7095 2017-07-07 19:32:03 +02:00
Laurent Destailleur
c459d3aa7a FIX user that modify not set 2017-07-07 19:23:19 +02:00
Laurent Destailleur
4b11921cb6 Merge pull request #7087 from OPEN-DSI/core_fourn_command_link_now_order_date_and_delivery_date
FIX: In supplier order, show link Now for order date and delivery date
2017-07-07 19:18:25 +02:00
Laurent Destailleur
0a7a092080 FIX Missing ref 2017-07-07 19:17:53 +02:00
Laurent Destailleur
c66f67ee80 Merge pull request #7106 from atm-ph/fix_develop_sql_migration
Fix sql syntax
2017-07-07 19:15:05 +02:00
Laurent Destailleur
be493b78ba Merge pull request #7093 from Darkjeff/Fix-Accoutancy
Fix accoutancy
2017-07-07 19:14:35 +02:00
Laurent Destailleur
47c6a324ac Merge pull request #7086 from OPEN-DSI/core_commande_warning_delay_dashboard
FIX: Function load_board in commande.class.php for warnings delay in dashboard
2017-07-07 18:56:31 +02:00
Laurent Destailleur
451508ba20 Merge pull request #7084 from atm-florian/develop
FIX Transfer between account with different currencies
2017-07-07 18:54:03 +02:00
Laurent Destailleur
640f66f017 Fix SQL syntax 2017-07-07 17:34:56 +02:00
florian HENRY
1c647e2898 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop 2017-07-07 15:59:41 +02:00
Laurent Destailleur
252d8da8fc Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/categories/class/categorie.class.php
	htdocs/core/class/commondocgenerator.class.php
	htdocs/core/lib/functions.lib.php
	htdocs/core/modules/DolibarrModules.class.php
	htdocs/filefunc.inc.php
	htdocs/societe/class/societe.class.php
	htdocs/supplier_proposal/class/supplier_proposal.class.php
2017-07-07 15:11:53 +02:00
Laurent Destailleur
4c0fcb2b9a Fix total with tax does not include local taxes. To solve, i show both
totals.
2017-07-07 14:58:57 +02:00
Laurent Destailleur
8abec461a6 Fix total with tax does not include local taxes. To solve, i show both
totals.
2017-07-07 12:31:00 +02:00
Laurent Destailleur
024c6d2c08 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-07 11:36:24 +02:00
Laurent Destailleur
2be9f402c6 Fix order of tab 2017-07-07 10:58:18 +02:00
Laurent Destailleur
de1a7042d4 Fix filter on list of actions 2017-07-07 10:55:42 +02:00
Laurent Destailleur
9baeee893f Fix multicurrency (tags for odt) 2017-07-07 10:54:54 +02:00
Alexandre SPANGARO
0797323664 Fix: Search broken in holiday list 2017-07-07 06:42:29 +02:00
Alexandre SPANGARO
d5d2b3a2fc Merge remote-tracking branch 'uptream/develop' into 6.0-fec3 2017-07-07 06:10:56 +02:00
Alexandre SPANGARO
0c5febfb4d Fix: Accountancy 2017-07-07 06:09:49 +02:00
fappels
6effcb0829 New add trigger disable to updateline functions 2017-07-06 16:26:15 +02:00
fappels
857e45baf3 Fix comment 2017-07-06 15:34:10 +02:00
Laurent Destailleur
09e9255ff1 Merge pull request #7114 from hregis/develop_bug_restapi
Fix: multiple preg_match $reg confusion !
2017-07-05 22:00:43 +02:00
Regis Houssin
c5442c3553 Fix: module "root" not exists ! (deprecated api) 2017-07-05 12:21:35 +02:00
florian HENRY
a4b1c28696 fix : accountancy right management 2017-07-05 11:33:58 +02:00
florian HENRY
1816b2249e fix class error 2017-07-05 11:24:24 +02:00
Regis Houssin
a2e2149eb2 Fix: multiple preg_match $reg confusion ! 2017-07-05 11:12:48 +02:00
florian HENRY
437b2a7290 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop 2017-07-05 11:01:57 +02:00
Laurent Destailleur
e7e4252244 Fix deletion of category 2017-07-05 01:23:42 +02:00
TuxGasy
5b154946a8 fix missing error on stock mouvment with batch 2017-07-04 21:48:38 +02:00
TuxGasy
9f50882d6d fix incorrect indent 2017-07-04 21:45:38 +02:00
Quentin Vial-Gouteyron
3f6778889b FIX erreur mysql migration 2017-07-04 14:05:03 +02:00
Laurent Destailleur
c1e747fa39 Look and feel v6 2017-07-04 13:05:02 +02:00
Quentin Vial-Gouteyron
b43c8157bd Merge branch 'develop' of github.com:Dolibarr/dolibarr into develop 2017-07-04 12:27:17 +02:00
phf
3892da7606 Fix update row on xlsx import do not work as csv import 2017-07-04 12:09:56 +02:00
Laurent Destailleur
77f5952318 Fix pgsql compatibility 2017-07-04 11:18:48 +02:00
Laurent Destailleur
95cf36c43b Fix use the getUrl function instead of hard coded curl 2017-07-04 10:55:53 +02:00
Laurent Destailleur
0ee93fb00c Fix conflict between option login and logina and logint in agenda export 2017-07-04 10:29:38 +02:00
phf
42183877e8 Fix sql syntax 2017-07-04 09:30:53 +02:00
Regis Houssin
d9d9b748ad Fix: check if action type is different of 'user' (external module) 2017-07-03 19:27:21 +02:00
florian HENRY
7f869b4840 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop

Conflicts:
	htdocs/accountancy/class/accountancycategory.class.php
2017-07-03 14:36:50 +02:00
TuxGasy
c8d039508f Fix missing error message 2017-07-03 14:01:11 +02:00
Laurent Destailleur
cb1c461b69 Work on module builder 2017-07-03 12:28:52 +02:00
Laurent Destailleur
7f6479643f Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-03 12:05:12 +02:00
Laurent Destailleur
8b91f4fb5e Debug module website 2017-07-03 12:04:45 +02:00
Laurent Destailleur
9e26e6b0a3 Fix bad value for ref of old contracts 2017-07-03 11:42:17 +02:00
Laurent Destailleur
db1d97c9ac Fix bad value for ref of old contracts 2017-07-03 02:09:14 +02:00
Laurent Destailleur
8a96260892 Fix amount not filled into email confirmation 2017-07-03 01:57:28 +02:00
Laurent Destailleur
d57fe35efc Add option to fix corrupted database with bad pagecode 2017-07-03 01:36:04 +02:00
Laurent Destailleur
aa1351d483 Fix to be sure database is not created using utf8mb4 (not yet supported) 2017-07-03 01:10:09 +02:00
Laurent Destailleur
efecb32ec9 Fix migration 2017-07-03 00:11:22 +02:00
Laurent Destailleur
565de9bc8d Debug module website 2017-07-02 23:38:19 +02:00
Laurent Destailleur
b95dea3b50 Fix missing ; 2017-07-02 23:37:52 +02:00
Laurent Destailleur
c56ea50251 Currency symbol for peru is before value 2017-07-02 14:30:24 +02:00
Laurent Destailleur
4f72bd35db Fix too much code into the NOREQUIREDB 2017-07-02 13:18:23 +02:00
Laurent Destailleur
53708c138a Add option to be able to debug problem of apache lock page 2017-07-01 16:52:28 +02:00
Laurent Destailleur
c5aed0c333 Fix phpcs 2017-07-01 14:25:46 +02:00
Laurent Destailleur
9a2e945b91 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-01 14:23:34 +02:00
Laurent Destailleur
7ae52d843c Look and feel v6 2017-07-01 14:23:24 +02:00
Laurent Destailleur
8dda0afc07 Look and feel v6 2017-07-01 14:18:09 +02:00
Laurent Destailleur
b186fa8759 Fix pgsql compatibility 2017-07-01 13:31:44 +02:00
Laurent Destailleur
658fe93d8c Fix menu editor (data not aligned) 2017-07-01 12:42:49 +02:00
Laurent Destailleur
b7218c1bcd Fix menu consistency 2017-07-01 03:18:17 +02:00
Laurent Destailleur
31fe8ebcee Debug v6 2017-07-01 02:22:08 +02:00
Laurent Destailleur
2b0b2096f6 Fix test on mandatory field 2017-06-30 22:40:08 +02:00
Laurent Destailleur
727085f3ec Fix missing migration column zip 2017-06-30 19:01:49 +02:00
fappels
78283b6a0b Ignore rights filter for virtual stock calculation. 2017-06-30 17:02:50 +02:00
Darkjeff
180467ba56 add lettering 2017-06-30 11:53:15 +02:00
Darkjeff
32729adfae Journal correct negatif amount 2017-06-30 11:49:03 +02:00
Darkjeff
f978b0795a Fix action in journal 2017-06-30 11:31:24 +02:00
Darkjeff
2c795da664 Fix Binding Supplier 2017-06-30 11:30:20 +02:00
Darkjeff
11cd4e1164 Fix Binding Customer 2017-06-30 11:29:37 +02:00
fappels
989084e4de WAP always 2 decimals 2017-06-30 10:56:05 +02:00
fappels
574590a598 Add minimum qty column 2017-06-30 10:55:45 +02:00
fappels
d0599cd952 Revert "WAP alway decimal 2 digits"
This reverts commit 7d4a093d9e.
2017-06-30 10:54:04 +02:00
fappels
7d4a093d9e WAP alway decimal 2 digits 2017-06-30 10:52:54 +02:00
KHELIFA
62f8aa8b40 Fix: In supplier order, show link Now for order date and delivery date 2017-06-29 16:49:30 +02:00
KHELIFA
7dc4eeddf0 FIX: Function load_board in commande.class.php for warnings delay in dashboard 2017-06-29 16:44:52 +02:00
florian HENRY
7556a604e3 fix travis 2017-06-29 16:30:57 +02:00
Laurent Destailleur
f7ba3ddc07 Fix translation 2017-06-29 15:59:46 +02:00
Laurent Destailleur
e8b33e3dba To provide solution to get thirdparty when name is not unique.
Conflicts:
	htdocs/societe/class/societe.class.php
2017-06-29 15:38:39 +02:00
Laurent Destailleur
ab0a730d4a Fix bad GETPOST on 'action' 2017-06-29 02:54:56 +02:00
Laurent Destailleur
e9f9b5bdf4 Merge pull request #7069 from Darkjeff/develop
Accountancy update
2017-06-29 02:49:35 +02:00
Laurent Destailleur
6983e2ff12 Merge pull request #7074 from defrance/patch-19
Error fields and add date end on rapport pdf
2017-06-29 02:47:23 +02:00
BENKE Charlene
b17937ce0d Error fields and add date end on rapport pdf
percentage instead percent
2017-06-28 21:29:01 +02:00
Laurent Destailleur
05318bb4ec More complete dol_string_nospecial 2017-06-28 19:02:09 +02:00
Laurent Destailleur
b6002bd1f8 Fix bad link 2017-06-28 18:29:57 +02:00
Darkjeff
0955b355e9 update result 2017-06-28 16:50:29 +02:00
Darkjeff
ef5e38b0d3 correct bug result 2017-06-28 16:45:44 +02:00
Darkjeff
97da70e583 bug lines supplier 2017-06-28 16:38:06 +02:00
Darkjeff
8182f5fb2a update journal and supplier lines 2017-06-28 16:35:14 +02:00
Laurent Destailleur
22fabe5a3a Copyright in modulebuilder 2017-06-27 20:14:48 +02:00
Laurent Destailleur
7e6e0ee3a4 Fix link to image of MD files 2017-06-27 20:02:46 +02:00
Laurent Destailleur
2f9cc1c919 Fix avoid errors with postgresql 2017-06-27 18:35:10 +02:00
Laurent Destailleur
d186aed96c Fix: date must be stored into a date field (error with pgsql).
import_key is reserved for "import" process.
2017-06-27 18:26:17 +02:00
Laurent Destailleur
5dd8d1c4ef Rename button to make clear for user that the export is not the real
journal but a temporary situation.
2017-06-27 17:56:45 +02:00
Laurent Destailleur
9c64ba6ad6 Fix closing } 2017-06-27 17:52:50 +02:00
Laurent Destailleur
aa2ea621c3 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-06-27 17:42:19 +02:00
Laurent Destailleur
adf281c4f3 Look and feel v6 2017-06-27 17:42:07 +02:00
Laurent Destailleur
ba30f80a03 Merge pull request #7062 from Darkjeff/develop
Update Accountancy Journals
2017-06-27 17:41:22 +02:00
Laurent Destailleur
5f00fb5df8 Merge pull request #7059 from jfefe/patch-13
Add missing end tag `form` into fichinter setup
2017-06-27 17:36:33 +02:00
Laurent Destailleur
6f82837b0f Fix GETPOST of lang_id 2017-06-27 17:27:01 +02:00
Laurent Destailleur
c213624c14 Fix migration into product_lot 2017-06-27 16:42:37 +02:00
Laurent Destailleur
1a860c42ee Look and feel v6 2017-06-27 16:42:11 +02:00
Laurent Destailleur
50bf1bb21f Fix error in count of qty in other shipments 2017-06-27 16:41:57 +02:00
Laurent Destailleur
77ba5a8c24 Fix reception of product interface 2017-06-27 14:02:01 +02:00
Darkjeff
cb0e7b200e Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-06-27 12:45:56 +02:00
Laurent Destailleur
1fafa4017d Fix test on currency name 2017-06-27 12:33:29 +02:00
Laurent Destailleur
32ff09123d Add more info on phpunit 2017-06-27 12:19:48 +02:00
Darkjeff
8146049b4d update bank journal
add in bookkeeping
add export control
correct some bug with salary
2017-06-27 12:12:25 +02:00
Laurent Destailleur
2f4749a7a2 Revert "Add php unit"
This reverts commit cb93770d6b.
2017-06-27 12:02:22 +02:00
Laurent Destailleur
3b7667292b Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-06-27 11:59:40 +02:00
Darkjeff
618334ac42 update purchase journal
add in bookkeeping
add export control
2017-06-27 11:58:26 +02:00
Darkjeff
2e64db2556 update sells journal
add in bookkeeping
add export control
2017-06-27 11:44:18 +02:00
Laurent Destailleur
10eda66735 Fix alignement 2017-06-27 11:32:52 +02:00
Laurent Destailleur
92287ab18d Fix url suggested for bookmark did not always include params 2017-06-27 11:12:03 +02:00
Laurent Destailleur
08af9bf365 List before 2017-06-27 10:37:00 +02:00
Laurent Destailleur
267170b8d2 Fix mainmenu was not correctly set with auguria menu 2017-06-27 10:34:41 +02:00
Laurent Destailleur
34f3552dc7 Fix missing image of user 2017-06-27 04:31:29 +02:00
Laurent Destailleur
3fdfebf7ef Fix position of top menu does not follow 'position' field. 2017-06-27 04:25:41 +02:00
fappels
e3f7402e07 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop_nbr_suppliers_prod_list 2017-06-26 22:45:18 +02:00
fappels
13e5c8ff7a Create patch
Add Number of supplier prices and wap columns
2017-06-26 22:44:56 +02:00
jfefe
9b951c5d1b Add missing end tag form into fichinter setup
The setup for option `FICHINTER_PRINT_PRODUCTS` was broken.
2017-06-26 21:37:36 +02:00
Laurent Destailleur
75006f9970 Fix data 2017-06-26 13:30:14 +02:00
Laurent Destailleur
cb93770d6b Add php unit 2017-06-26 13:29:43 +02:00
Laurent Destailleur
2be848025f Fix parameter withcode of currency_name function. Add PHPUnit tests 2017-06-26 10:09:22 +02:00
Laurent Destailleur
0b7c768f29 FIX Usage of production mode with REST Api. 2017-06-25 18:18:17 +02:00
Laurent Destailleur
63dcdc3a03 Fix API was loading definition of all APIs at each call. 2017-06-25 17:09:08 +02:00
Laurent Destailleur
025db4ac97 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-06-25 12:26:32 +02:00
Laurent Destailleur
8bfda8d4ee Code comment 2017-06-25 12:26:16 +02:00
Laurent Destailleur
e97a4d953d Merge pull request #7052 from hidupcloud/develop
FIX Fixing pages warning when value is null
2017-06-25 03:03:34 +02:00
Laurent Destailleur
059e361bd8 Merge pull request #7053 from defrance/patch-15
FIX $forceimgscaleheight instead $forceimgscalewidth
2017-06-25 03:01:53 +02:00
Laurent Destailleur
78ebffe4f1 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	ChangeLog
	htdocs/install/fileconf.php
2017-06-25 02:31:38 +02:00
Laurent Destailleur
6298436a1b Clean old lot numbers 2017-06-25 02:26:30 +02:00
Laurent Destailleur
778e581aca Fix: avoid warning on permission if there is only admin users 2017-06-24 22:14:04 +02:00
BENKE Charlene
03cb850442 $forceimgscaleheight instead $forceimgscalewidth 2017-06-24 20:48:11 +02:00
Laurent Destailleur
bd4f91d7eb Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-06-24 16:57:54 +02:00
Laurent Destailleur
fed5999a6c Update doc 2017-06-24 16:57:42 +02:00
Juan Bautista Mesa Roldán
0f5dc90bae Fixing pages warning when value is null 2017-06-24 16:45:45 +02:00
Laurent Destailleur
30e881b03a Merge pull request #7051 from aspangaro/6.0-fec3
Fix : Accountancy v6
2017-06-24 16:34:28 +02:00
Laurent Destailleur
534ec0d44a Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/compta/bank/bankentries.php
2017-06-24 16:26:29 +02:00
Laurent Destailleur
b0c5616ff0 Fix in the way markdown README and ChangeLog are output on module page. 2017-06-24 16:01:18 +02:00
Laurent Destailleur
1eee7297dc Fix typo 2017-06-24 12:56:55 +02:00
Laurent Destailleur
509aad9bce Fix README 2017-06-24 12:52:39 +02:00
Laurent Destailleur
3b2eb97d72 Fix menu position 2017-06-24 10:29:07 +02:00
Laurent Destailleur
59bd4749a8 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/core/menus/init_menu_auguria.sql
	htdocs/core/menus/standard/eldy.lib.php
	htdocs/product/class/product.class.php
2017-06-24 10:27:10 +02:00
Laurent Destailleur
ba82bc39c8 Fix missing alias 2017-06-24 00:25:29 +02:00
Laurent Destailleur
81a473d547 Warning not required for the moment 2017-06-23 23:40:02 +02:00
Laurent Destailleur
d2fd4d6978 Better path to laod main.inc.php 2017-06-23 23:36:25 +02:00
Laurent Destailleur
247803f894 Better templates 2017-06-23 20:03:15 +02:00
Laurent Destailleur
693b2fe3b4 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/compta/facture.php
	htdocs/core/ajax/ajaxdirpreview.php
	htdocs/core/class/conf.class.php
	htdocs/core/class/html.formfile.class.php
	htdocs/core/lib/functions.lib.php
	htdocs/core/tpl/objectline_create.tpl.php
2017-06-23 11:20:29 +02:00
Laurent Destailleur
a05bbd651c Fix translation 2017-06-23 11:09:29 +02:00
Laurent Destailleur
3a400c46ad Fix preselected email not done 2017-06-23 10:15:32 +02:00
Laurent Destailleur
c89e2eb7ea Fix pagination 2017-06-22 15:31:07 +02:00
Laurent Destailleur
5ed8340d0e Fix no record found into lists 2017-06-22 15:22:44 +02:00
Laurent Destailleur
1b96bb4221 Fix usage of constant. No need to have a dedicated setup as it should be
supported by the responsive design architecture.
2017-06-22 14:48:13 +02:00
Laurent Destailleur
0fd1308f93 Add force_disable_of_modules_not_found to clean database and removed
false warning when modules files were removed with disabling it before
2017-06-22 14:06:48 +02:00
Laurent Destailleur
474a2692fa Fix missing /div 2017-06-22 13:54:03 +02:00
Laurent Destailleur
c7a6a67e20 Fix remove warnings 2017-06-22 11:04:29 +02:00
Laurent Destailleur
64eef9f89c Fix compatibility with pgsql 2017-06-22 11:04:15 +02:00
Laurent Destailleur
06c7cb5d8c Fix css 2017-06-22 09:21:32 +02:00
Alexandre SPANGARO
459fac4753 Merge remote-tracking branch 'uptream/develop' into 6.0-fec3
# Conflicts:
#	htdocs/accountancy/customer/index.php
2017-06-22 05:30:21 +02:00
Laurent Destailleur
a6f3eabf4d example of FK definition 2017-06-21 19:26:36 +02:00
Laurent Destailleur
014cb4b004 Fix navigation on security event list 2017-06-21 12:03:49 +02:00
Laurent Destailleur
4102403482 Look and feel v6 2017-06-21 11:37:34 +02:00
Laurent Destailleur
9ec7929753 Look and feel v6 2017-06-21 10:59:39 +02:00
Laurent Destailleur
ce8a024d44 Fix limit on margin pages 2017-06-21 00:34:56 +02:00
Laurent Destailleur
460179a01c Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-06-20 16:54:49 +02:00
Laurent Destailleur
ec9bbe2b52 Help/Need debug of some online instances with the log view 2017-06-20 16:54:37 +02:00
Laurent Destailleur
3873bc7433 Fix bette compatibility with pgsql 2017-06-20 15:06:24 +02:00
Laurent Destailleur
6d87209533 Merge pull request #7045 from hregis/develop_bug2
Fix: force php 5.6.29 for avoid Mysqli problem with php 5.6.30
2017-06-20 13:37:53 +02:00
Laurent Destailleur
302e086f99 Fix pgsql compatibility 2017-06-20 13:33:26 +02:00
Laurent Destailleur
f1701469e0 NEW data files are now also parsed by phpunit for sql syntax 2017-06-20 13:28:34 +02:00
Laurent Destailleur
efe5d79a86 Work on #6958. Only one type of invoice supported for supplier invoices 2017-06-20 12:58:43 +02:00
Laurent Destailleur
4dda771079 FIX #6973 2017-06-20 12:54:26 +02:00
Laurent Destailleur
08a86fa03d Start #6981 2017-06-20 12:17:13 +02:00
Laurent Destailleur
f2a2cfd8c8 Look and feel v6 2017-06-20 11:46:30 +02:00
Laurent Destailleur
095155a58b Enhance sql quality. Refused double quotes into sql content. 2017-06-20 10:06:17 +02:00
Regis Houssin
07a2938b83 Fix: try to force php version 2017-06-20 07:07:12 +02:00
Regis Houssin
3002c28557 Fix: add dist name 2017-06-20 06:57:23 +02:00
Alexandre SPANGARO
c381c213a5 Fix : Accountancy 2017-06-20 06:52:41 +02:00
Laurent Destailleur
74c509eac8 Fix bad var type (must be array) 2017-06-20 02:36:13 +02:00
Laurent Destailleur
658ba50aa8 Standardize picto status 2017-06-20 02:29:29 +02:00
Laurent Destailleur
8d23ffd6d2 Fix show vat rates 2017-06-20 02:05:42 +02:00
Laurent Destailleur
fcdc7b1a0d Fix pgsql compatibility 2017-06-20 01:53:34 +02:00
Laurent Destailleur
d78d5d60c4 Fix pgsql
Fix missing vat rate info.
2017-06-20 01:45:44 +02:00
Laurent Destailleur
ef4a527ff0 Merge pull request #7044 from aspangaro/6.0-fec3
Fix : Accountancy - Debug
2017-06-20 01:18:45 +02:00
Laurent Destailleur
eef5df583e Fix php 7.2 2017-06-20 00:50:30 +02:00
Laurent Destailleur
3717a01641 Fix lang 2017-06-19 23:15:47 +02:00
Laurent Destailleur
8dffc38cd5 Fix separator 2017-06-19 21:46:38 +02:00
Alexandre SPANGARO
95573e8608 Fix : Accountancy - Debug 2017-06-19 21:39:43 +02:00
Laurent Destailleur
068460540c Full enable of pgsql in CI 2017-06-19 21:38:33 +02:00
Laurent Destailleur
504d376f84 Sync transifex 2017-06-19 21:34:33 +02:00
Laurent Destailleur
de423e531c Sync nb_NO 2017-06-19 21:24:55 +02:00
Laurent Destailleur
2695cc416e Fix comment 2017-06-19 21:06:16 +02:00
Laurent Destailleur
24f7128742 Fix pb with postgresql 2017-06-19 21:04:46 +02:00
Laurent Destailleur
8064659398 Fix phpunit 2017-06-19 20:49:57 +02:00
Laurent Destailleur
64d8b97afe Fix sql syntax errors 2017-06-19 20:35:14 +02:00
Laurent Destailleur
099ef585b2 Fix pgsql 2017-06-19 20:07:33 +02:00
Laurent Destailleur
22ef8557b8 Fix travis 2017-06-19 19:49:27 +02:00
Laurent Destailleur
bdeddd3617 Fix pgsql migration 2017-06-19 19:48:19 +02:00
Laurent Destailleur
41d82b0ffa Enable pgsql test 2017-06-19 18:52:13 +02:00
Laurent Destailleur
3c73b426d7 Fix migration. Must make reload only on last version step. 2017-06-19 18:32:18 +02:00
Laurent Destailleur
0071632a06 Test 2017-06-19 17:38:52 +02:00
Laurent Destailleur
ec890ff816 Test 2017-06-19 17:31:58 +02:00
Laurent Destailleur
5bb717e319 Test 2017-06-19 17:00:56 +02:00
Laurent Destailleur
758d8cef23 Test 2017-06-19 16:55:15 +02:00
Laurent Destailleur
6fe96b322a Fix PHPCS 2017-06-19 16:18:07 +02:00
Laurent Destailleur
6fdc279fd3 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-06-19 15:38:01 +02:00
Laurent Destailleur
8f6e756249 Fix PHPCS 2017-06-19 15:37:22 +02:00
Laurent Destailleur
3d247abe79 Test #7029 without switching to trustry for the moment. 2017-06-19 15:30:55 +02:00
Laurent Destailleur
c775e2530a Merge pull request #7025 from hregis/develop_bug_restapi
New: add extrafields API REST
2017-06-19 15:21:48 +02:00
Laurent Destailleur
8595cbc16d Merge pull request #7034 from inoveaconseil/patch-6
Add import fields for societe rib
2017-06-19 15:12:53 +02:00
Laurent Destailleur
43b97f02c3 Merge pull request #7033 from hregis/develop_bug2
Fix: for avoid warning
2017-06-19 15:11:49 +02:00
Laurent Destailleur
c8b4ab87cb Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-06-19 15:08:10 +02:00
Laurent Destailleur
241ec01adf FIX #7031 missing change column "state_id" since dolibarr 3.5 !! 2017-06-19 15:07:55 +02:00
Laurent Destailleur
cffb368bbd Merge pull request #7030 from aspangaro/6.0-fec3
Fix : Accountancy - Debug and add information in database
2017-06-19 15:02:30 +02:00
Laurent Destailleur
bb2d27280b Fix sort link must be disabled for computed field 2017-06-19 14:31:08 +02:00
Laurent Destailleur
287e727e71 Fix detection of relative URL 2017-06-19 13:47:25 +02:00
Laurent Destailleur
a2ca6d5ef9 Add warning in log if conf file setup not correct 2017-06-19 12:50:13 +02:00
Inovea Conseil
85efe6ef74 Add import fields for societe rib
Add import fields for rib account, this fields are used in a new external module bankwire for supplier invoice.

But we must copy the translation of banks.lang in bills.lang are there an other solution  ?
2017-06-19 11:32:11 +02:00
Laurent Destailleur
5f187f851f Fix doc 2017-06-19 10:34:22 +02:00
Regis Houssin
d2371946ba Fix: for avoid warning 2017-06-19 09:50:13 +02:00
Laurent Destailleur
f0df9b8d23 Update package file 2017-06-19 05:06:50 +02:00
Laurent Destailleur
4ba6dc86cc Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-06-19 04:15:46 +02:00
Laurent Destailleur
caf48f32c4 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-06-19 03:01:01 +02:00
Laurent Destailleur
b331176bf7 Fix bad data 2017-06-19 02:58:09 +02:00
Laurent Destailleur
52eeeebac9 Fix bad data in sql dump 2017-06-19 02:57:49 +02:00
Laurent Destailleur
8d84277e8c Complete repair script 2017-06-19 02:18:04 +02:00
Laurent Destailleur
a1f08be479 Fix phpcs 2017-06-18 22:21:42 +02:00
Alexandre SPANGARO
e9b6afd2aa Add last session coding - Add temporaly ledger 2017-06-18 22:17:32 +02:00
Laurent Destailleur
996ec4926b Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/comm/propal/list.php
	htdocs/core/lib/files.lib.php
	htdocs/don/card.php
2017-06-18 22:16:34 +02:00
Alexandre SPANGARO
a4de12dd8d Merge remote-tracking branch 'uptream/develop' into 6.0-fec3 2017-06-18 22:15:36 +02:00
Laurent Destailleur
819656bd89 Fix security: Check _SERVER["QUERY_STRING"] is escaped. 2017-06-18 21:27:49 +02:00
Laurent Destailleur
86a6a83647 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	ChangeLog
	htdocs/admin/tools/index.php
	htdocs/bookmarks/bookmarks.lib.php
	htdocs/compta/facture.php
	htdocs/core/tpl/passwordforgotten.tpl.php
	htdocs/fourn/ajax/getSupplierPrices.php
	htdocs/main.inc.php
	htdocs/product/stats/card.php
	htdocs/public/paypal/paymentko.php
2017-06-18 21:13:48 +02:00
Laurent Destailleur
cde0da6e12 Fix responsive 2017-06-18 12:48:58 +02:00
Laurent Destailleur
787d6946b2 Continue work started on module builder 2017-06-18 12:30:18 +02:00
Laurent Destailleur
862b12abfd Fix responsive 2017-06-17 21:28:29 +02:00
Laurent Destailleur
69b26dcb4e Work on modulebuilder 2017-06-17 21:23:52 +02:00
Laurent Destailleur
a6b4b15e07 Work on modulebuilder 2017-06-17 19:40:48 +02:00
Regis Houssin
fd9c30fd11 Revert "Fix: wrong array format"
This reverts commit 48866f0732.
2017-06-17 18:30:11 +02:00
Regis Houssin
88df5b6857 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_bug_restapi 2017-06-17 18:29:38 +02:00
Laurent Destailleur
9a04208150 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-06-17 18:04:04 +02:00
Laurent Destailleur
0482137620 Fix warning 2017-06-17 18:03:53 +02:00
Laurent Destailleur
b73228899a Merge pull request #7024 from defrance/patch-14
Introduce weight conversion lb & oz
2017-06-17 17:52:20 +02:00
Laurent Destailleur
af3e505587 Merge pull request #7022 from hregis/develop_mc
Fix: missing hookmanager init
2017-06-17 17:49:46 +02:00
Laurent Destailleur
60b278ac39 Merge pull request #7021 from Dolibarr/revert-7020-7.0-1
Revert "Fix SPEC #7013 : use database type "numeric" to store monetary values"
2017-06-17 17:48:37 +02:00
BENKE Charlene
fcdf68db6a Update commonobject.class.php 2017-06-17 16:31:54 +02:00
BENKE Charlene
db17363267 Update other.lang 2017-06-17 16:30:37 +02:00
BENKE Charlene
12cab2dfe0 Once to Ounce 2017-06-17 16:30:03 +02:00
Regis Houssin
48866f0732 Fix: wrong array format 2017-06-17 14:44:56 +02:00
Regis Houssin
240e9637fa New: add extrafields API REST 2017-06-17 14:43:15 +02:00
Regis Houssin
d1b003f3c4 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_mc 2017-06-17 12:01:14 +02:00
Laurent Destailleur
8a1de52f3c Fix translation 2017-06-17 12:00:33 +02:00
Laurent Destailleur
a4f34539ea Fix translation 2017-06-17 11:46:45 +02:00
Laurent Destailleur
7c41c9a3e4 Fix activation of dependency for a dedicated country.
BlockedLog depends now on CashDesk only.
2017-06-17 11:43:00 +02:00
Laurent Destailleur
bebe7baa80 Fix images into medias not reabable into send emails 2017-06-17 10:44:08 +02:00
Regis Houssin
49e8af7cc9 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_mc 2017-06-17 10:34:50 +02:00
BENKE Charlene
f0bc72cda4 WeightUnitonce translation 2017-06-17 10:27:00 +02:00
BENKE Charlene
17247c64f0 add WeightUnitonce 2017-06-17 10:26:01 +02:00
BENKE Charlene
e98bc90489 introduce OZ : once weight 2017-06-17 10:18:59 +02:00
Laurent Destailleur
5b7a8e9c90 Fix missing signature when sending email from user card 2017-06-17 10:17:36 +02:00
BENKE Charlene
5320ebc051 getTotalWeightVolume : add conversion Lb & oz to KG
New conversion value : Oz once
Little az a wizzard...
2017-06-17 10:16:52 +02:00
Alexandre SPANGARO
b240f536b5 Fix : Accountancy - Debug and add information in database 2017-06-17 07:54:35 +02:00
Laurent Destailleur
1d91ce90d3 FIX image from medias directory into PDF free text 2017-06-17 00:16:22 +02:00
Regis Houssin
f0e234eef2 Fix: missing hookmanager init 2017-06-16 17:01:43 +02:00
Laurent Destailleur
b228fe6a2a Fix auto focus on module page 2017-06-16 16:06:20 +02:00
Laurent Destailleur
81f1a34112 Revert "Fix SPEC #7013 : use database type "numeric" to store monetary values" 2017-06-16 13:06:35 +02:00
Laurent Destailleur
549bb2c55f Merge pull request #7020 from aspangaro/7.0-1
Fix SPEC #7013 : use database type "numeric" to store monetary values
2017-06-16 12:59:52 +02:00
Laurent Destailleur
e813fd2dfa Fix missing key import_key and extraparams 2017-06-16 12:57:30 +02:00
Laurent Destailleur
5a477bdd6d Merge pull request #7018 from hregis/develop_bug_restapi
Fix: missing _cleanObjectDatas function
2017-06-16 12:53:11 +02:00
Laurent Destailleur
492ee135ba Merge pull request #7011 from hregis/develop_bug3
Fix: error when the project module not enabled
2017-06-16 12:51:28 +02:00
Laurent Destailleur
1c8daf9700 Standardize and debug code of module BlockedLog 2017-06-16 12:46:15 +02:00
Laurent Destailleur
26e80045a6 Merge pull request #7001 from atm-alexis/NEW_blocklog_develop_refactor
NEW log download or preview event on a validate bill
2017-06-16 11:06:27 +02:00
Regis Houssin
c2901ae8cd Fix: add/remove unset unsused fields 2017-06-16 11:01:58 +02:00
Regis Houssin
c656856ec2 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_bug_restapi 2017-06-16 10:52:43 +02:00
Alexandre SPANGARO
f424f96589 Fix SPEC #7013 : use database type "numeric" to store monetary values 2017-06-16 05:15:00 +02:00
Laurent Destailleur
b416b22bcc Fix phpcs 2017-06-16 01:27:28 +02:00
Laurent Destailleur
b1945daf6c Fix alignement 2017-06-16 01:07:44 +02:00
Laurent Destailleur
07b676792a Fix do not show localtax info if not used. 2017-06-16 01:02:53 +02:00
Laurent Destailleur
343e8d8498 Debug accounting module with new structure v6
Make accounting module compatible with the new vat code to identify 2
vat code with same rate.
2017-06-16 00:49:52 +02:00
Laurent Destailleur
ac708a8ee9 Debug accounting module with new structure v6
Make accounting module compatible with the new vat code to identify 2
vat code with same rate.
2017-06-15 23:58:56 +02:00
Laurent Destailleur
8149bf62a8 Fix ajaxcombo broken on accouting account edition on vat dictionary. 2017-06-15 23:47:19 +02:00
Regis Houssin
9410466d72 Fix: better check and security 2017-06-15 21:51:31 +02:00
Laurent Destailleur
8b7ca1f280 Fix missing vat_src_code into table of expense report 2017-06-15 21:27:20 +02:00
Regis Houssin
78d5520741 Fix: missing _cleanObjectDatas function 2017-06-15 21:23:35 +02:00
Laurent Destailleur
f39fb5187a Fix component to select journal 2017-06-15 20:27:40 +02:00
Laurent Destailleur
097be322a6 Modify code to match new v6 structure. 2017-06-15 19:29:00 +02:00
Laurent Destailleur
4009b1837c Fix permissions 2017-06-15 11:17:02 +02:00
Laurent Destailleur
71c0be20b9 Change data structure for bookkeeping v6 2017-06-15 10:30:32 +02:00
Laurent Destailleur
73977639ac Update doc 2017-06-14 18:34:39 +02:00
Regis Houssin
8eb3f3bc06 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_bug3 2017-06-14 12:13:23 +02:00
Laurent Destailleur
0b6d7a5b57 Modulebuilder 2017-06-14 12:05:47 +02:00
Laurent Destailleur
ce9e1dfb98 Fix tag non closed 2017-06-14 11:37:04 +02:00
Laurent Destailleur
faabdd3f99 Missing filter field 2017-06-14 11:34:35 +02:00
Laurent Destailleur
1b56e4a01c Fix look and feel v6 2017-06-14 11:28:42 +02:00
Laurent Destailleur
00bf4bba13 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/user/index.php
2017-06-14 10:54:34 +02:00
Laurent Destailleur
b8dd7fb958 Fix phpcs 2017-06-14 10:53:04 +02:00
Laurent Destailleur
2d571bf097 Fix bad merge 2017-06-14 10:50:43 +02:00
Laurent Destailleur
b889db997a Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/compta/facture.php
	htdocs/core/datepicker.php
	htdocs/core/get_menudiv.php
	htdocs/core/menus/standard/auguria.lib.php
	htdocs/core/menus/standard/eldy.lib.php
	htdocs/core/search_page.php
	htdocs/main.inc.php
	htdocs/master.inc.php
	htdocs/product/list.php
	htdocs/theme/eldy/style.css.php
	htdocs/theme/md/style.css.php
	htdocs/user/card.php
	htdocs/user/index.php
2017-06-14 10:48:34 +02:00
Regis Houssin
50aa40da3b Fix: error when the project module not enabled 2017-06-14 07:40:11 +02:00
Laurent Destailleur
a88bafe198 Fix responsive 2017-06-13 20:07:28 +02:00
Laurent Destailleur
fc5dfcda65 Fix error management in POS. 2017-06-13 19:46:27 +02:00
Laurent Destailleur
c088ccea32 Fix better management of export of extrafield computed. 2017-06-13 18:50:31 +02:00
alexis Algoud
ef0907d89e NEW log download or preview event on a validate bill 2017-06-13 15:55:22 +02:00
Laurent Destailleur
c8856182a6 Fix look and feel v6 2017-06-13 15:34:18 +02:00
Laurent Destailleur
9f3e35ef85 Merge pull request #6995 from atm-ph/fix_develop_search_product
Fix ajax search product is broken
2017-06-13 15:01:18 +02:00
Laurent Destailleur
1519d0eb95 Merge pull request #6994 from atm-alexis/NEW_blocklog_develop_refactor
NEW blocklog view, export and fix
2017-06-13 15:00:47 +02:00
Laurent Destailleur
c0f46834cb Fix demo links 2017-06-13 13:22:05 +02:00
Laurent Destailleur
225c17d047 Fix permission on menu entry 2017-06-13 11:06:57 +02:00
phf
b67a14c7d6 Fix ajax search product is broken 2017-06-13 10:20:26 +02:00
alexis Algoud
4c424bb760 fix current element compare amount 2017-06-13 10:09:53 +02:00
alexis Algoud
f780af305a NEW blocklog other things
fix minor
add view only for error
add download log as csv
add record event on bill send by mail event
2017-06-13 10:04:05 +02:00
Laurent Destailleur
3f064769ac Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-06-12 18:23:06 +02:00
Laurent Destailleur
ba3a74576c Merge 5.0 2017-06-12 18:22:51 +02:00
Laurent Destailleur
ecf29332f3 Merge pull request #6989 from atm-alexis/NEW_blocklog_develop_refactor
NEW Blokedlog stuff
2017-06-12 17:44:27 +02:00
Laurent Destailleur
b52971d0a2 Fix template 2017-06-12 16:00:38 +02:00
Laurent Destailleur
8f383e3fa1 Fix template 2017-06-12 14:12:40 +02:00
Laurent Destailleur
98708acf57 Fix bad name of css file 2017-06-12 12:00:11 +02:00
Alexis Algoud
0312d2479d add block info popin, translation, hidden authority feature 2017-06-12 10:26:24 +02:00
Laurent Destailleur
277dde5d61 Fix dol_banner 2017-06-12 10:25:28 +02:00
Laurent Destailleur
b80ee49032 Add missing currency for bengladesh 2017-06-11 19:27:21 +02:00
Laurent Destailleur
58c4144123 Fix sort of dictionnary 2017-06-11 19:27:07 +02:00
Laurent Destailleur
ca324346e4 Update doc 2017-06-11 19:08:40 +02:00
Laurent Destailleur
248c5acff2 Fix remove a FIXME tag. 2017-06-11 16:18:21 +02:00
Laurent Destailleur
5471170a97 Merge pull request #6969 from atm-alexis/NEW_blocklog_develop_refactor
NEW blockedlog hash and authority
2017-06-11 15:54:47 +02:00
Laurent Destailleur
a96362e2f9 Fix #formmailbeforetitle not supported everywhere 2017-06-11 11:40:01 +02:00
Laurent Destailleur
965e3e5140 Update doc 2017-06-11 11:21:17 +02:00
Laurent Destailleur
57f99ba7a1 Update README 2017-06-11 11:09:05 +02:00
Laurent Destailleur
bb091c3b8b FIX The hook formObjectOptions was not implemented correctly in previous
version. Sometimes, you had to return output 
content by doing a print into function, sometimes by returning content
into "resprint". This has been fixed to follow
hook specifications so you must return output into "resprint".
2017-06-11 10:45:45 +02:00
Laurent Destailleur
961594afad Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-06-11 10:38:09 +02:00
Laurent Destailleur
e93cefbbf0 FIX #6985 2017-06-11 10:37:58 +02:00
Laurent Destailleur
4274d9910c Merge pull request #6976 from atm-ph/fix_6910
Fix 6910 if conf PROJECT_USE_SEARCH_TO_SELECT is used we got BadFirst…
2017-06-11 00:36:51 +02:00
Laurent Destailleur
074c43920a Create projects.php 2017-06-11 00:35:03 +02:00
Laurent Destailleur
43eb080242 Merge pull request #6970 from atm-ph/fix_6944
Fix 6944 compatibility PHP7 and missing parameter to call delete func…
2017-06-11 00:32:43 +02:00
Laurent Destailleur
b19e0e3cae Create card.php 2017-06-11 00:31:58 +02:00
Alexis Algoud
11d2a5538b fix entity default value and add link to download blockchain 2017-06-11 00:03:01 +02:00
Laurent Destailleur
3f9c7db4c1 Fix duplicate tabs 2017-06-10 23:56:43 +02:00
Laurent Destailleur
542a72c684 NEW custom dir is enabled dy default on first install.
Fix modulebuilder when custom dir not defined.
2017-06-10 23:50:46 +02:00
Laurent Destailleur
a74d008ff2 Fix missing translation 2017-06-10 22:57:25 +02:00
Laurent Destailleur
4683ef41be Fix hide search label on computed field into lists 2017-06-10 22:49:16 +02:00
Laurent Destailleur
acfaec684d FIX CVE-2017-7888 2017-06-10 22:31:22 +02:00
Laurent Destailleur
36b18f0300 Save MAIN_VERSION_FIRST_INSTALL that is not erased. 2017-06-10 22:11:12 +02:00
Laurent Destailleur
b62da4bb7a Fix a parameter is required to know what we share. 2017-06-10 20:04:24 +02:00
Laurent Destailleur
890ac81e4d Fix menu entried must be greyed, sub menus not visible fi not allowed on
parent.
2017-06-10 19:16:42 +02:00
Laurent Destailleur
75452e6d19 Fix compatibility php 5.5- 2017-06-10 16:29:25 +02:00
Laurent Destailleur
ce470b8dd5 Fix css fot liste_total lines 2017-06-10 16:23:24 +02:00
atm-ph
039130c694 Fix travis 2017-06-10 16:19:33 +02:00
Laurent Destailleur
20f1bb76cb Fix memu under disabled entries, when using smartphone 2017-06-10 16:13:37 +02:00
atm-ph
6b4e22ec3c Fix 6910 if conf PROJECT_USE_SEARCH_TO_SELECT is used we got BadFirstParameterForGETPOST 2017-06-10 16:07:56 +02:00
Laurent Destailleur
b6af1f7e6e Fix responsive design 2017-06-10 15:21:49 +02:00
Laurent Destailleur
6ab47a845e Fix look and feel v6 2017-06-10 13:54:43 +02:00
Laurent Destailleur
a8e16910c0 Fix look and feel v6 2017-06-10 13:44:20 +02:00
atm-ph
5dfb988cb1 Fix 6944 compatibility PHP7 and missing parameter to call delete function 2017-06-10 13:34:28 +02:00
Laurent Destailleur
7c0de18ac1 Fix code comment 2017-06-10 12:56:28 +02:00
Alexis Algoud
3cae54c296 fix travis 2017-06-10 10:10:34 +02:00
Alexis Algoud
4fd24f6d8c fix travis 2017-06-10 09:58:07 +02:00
Alexis Algoud
63b3010c2e fix sql 2017-06-10 09:28:07 +02:00
Alexis Algoud
3d5899edf3 final blockedlog init 2017-06-10 09:25:32 +02:00
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
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
b92980c6ff Fix statistics on products 2017-06-09 10:38:06 +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
alexis Algoud
9b3b2e600f init blockedlog trigger and hash store 2017-06-08 17:52:02 +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
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
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
Regis Houssin
b66da3d148 New: big refactorization of multicompany transverse mode 2017-06-06 10:23:33 +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
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
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
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
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
b4f1df03de Update doc 2017-06-01 19:18:57 +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
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
77df19009d Removed duplicated code 2017-06-01 12:11:45 +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
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
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
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
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
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
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
f1e24bc3e5 Merge branch 'develop' of github.com:Dolibarr/dolibarr into develop 2017-05-29 16:50:21 +02:00
fappels
dfed5bf2c7 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-05-29 15:45:39 +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
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
fappels
f3cf06a219 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-05-29 11:57:10 +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
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
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
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
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
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
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
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
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
6d4c5e4b4a Code comment 2017-05-24 11:37:44 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
245ef7a188 Add screenshot 2017-05-12 13:05:03 +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
Laurent Destailleur
d3917b6065 FIX Bad return code of dolCpyDir 2017-05-11 12:25:53 +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
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
2da0a129d1 Multiple file upload on by default on desktop. 2017-05-10 23:41:43 +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
cf361e1ed2 Fix html syntax 2017-05-10 23:10:09 +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
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
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
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
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
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
8e25155fc9 Better escaping of error message. 2017-05-10 12:02:41 +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
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
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
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 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
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 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
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
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
a8292ce990 Code comment 2017-05-05 17:27:16 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
ff0f40ab37 Look and feel v6 2017-04-29 16:07:34 +02:00
Laurent Destailleur
afc5ab0242 Fix label 2017-04-29 15:10:24 +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
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
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
508109d5b1 Translation 2017-04-27 00:21:00 +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
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
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
Laurent Destailleur
10e2b128d1 Fix warning during install 2017-04-24 05:20:45 +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
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
50210d0dd6 NEW Add tooltip help on shipment weight and volume calculation 2017-04-18 17:04:56 +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
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
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
fappels
cbfd18be24 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-04-16 11:31:11 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Laurent Destailleur
b054ca8267 NEW Introduce mass action on product list ('delete' for the moment) 2017-04-09 15:02:55 +02:00
Laurent Destailleur
0a47245ba5 NEW Add mass actions (pdf merge and delete) for interventions 2017-04-09 14:31:56 +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
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
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
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
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
e2ea5945dd Work on look and feel v6 2017-04-06 21:48:28 +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
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
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
13333ffd73 Add multipart text version into html emails. 2017-04-05 00:39:32 +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
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
4902df7e3f Work on look and feel v6 2017-04-02 19:28:38 +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
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
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
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
ca3a39b71e Merge pull request #6588 from defrance/patch-100
Bad parasite caracters
2017-03-26 01:51:04 +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
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
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
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
917ef1e01e Uniformize code 2017-03-22 20:34:01 +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
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
4987 changed files with 206043 additions and 159955 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

@@ -2,35 +2,43 @@
# from Dolibarr GitHub repository.
# For syntax, see http://about.travis-ci.org/docs/user/languages/php/
# We use dist: precise to have php 5.3 available
dist: precise
sudo: required
language: php
php:
- '5.3'
- '5.4'
- '5.5'
- '5.6.29'
- '7.0'
- '7.1'
- nightly
# Start on every boot
services:
- memcached
addons:
mariadb: '10.0'
# FIXME: find a way to import a MySQL dump into PostgreSQL
#postgresql: '9.3'
postgresql: '9.3'
apt:
sources:
# To use the last version of pgloader, we add repo of postgresql
- postgresql
- sourceline: 'deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main'
- key_url: 'https://www.postgresql.org/media/keys/ACCC4CF8.asc'
packages:
# We need a webserver to test the webservices
# Let's install Apache with.
- apache2
# mod_php is not supported by Travis. Add fcgi. We install FPM later on.
- libapache2-mod-fastcgi
# We need pgloader for import mysql database into pgsql
- pgloader
# Start on every boot
services:
- memcached
php:
- '5.3'
- '5.4'
- '5.5'
- '5.6'
- '7.0'
- '7.1'
#- hhvm only with dist: trusty
- nightly
env:
global:
@@ -40,8 +48,7 @@ env:
# MariaDB overrides MySQL installation so it's not possible to test both yet
#- DB=mysql
- DB=mariadb
# FIXME: find a way to import a MySQL dump into PostgreSQL
#- DB=postgresql
- DB=postgresql
# TODO
#- DB=sqlite
# See https://docs.travis-ci.com/user/languages/php/#Apache-%2B-PHP
@@ -52,12 +59,22 @@ env:
matrix:
fast_finish: true
allow_failures:
- php: 7.1
- php: hhvm
- php: nightly
# FIXME
#- env: DB=postgresql
# TODO
#- env: DB=sqlite
# We exclude some combinations not usefull to save Travis CPU
exclude:
- php: '5.4'
env: DB=postgresql
- php: '5.5'
env: DB=postgresql
- php: '5.6'
env: DB=postgresql
- php: '7.0'
env: DB=postgresql
- php: hhvm
env: DB=postgresql
- php: nightly
env: DB=postgresql
notifications:
email:
@@ -78,6 +95,13 @@ before_install:
phpenv config-rm xdebug.ini
echo
- |
if [ "$DB" = 'postgresql' ]; then
echo "Check pgloader version"
pgloader --version
echo
fi
install:
- |
echo "Updating Composer"
@@ -133,10 +157,10 @@ before_script:
echo "Set timezone"
echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
if [ "$TRAVIS_PHP_VERSION" = '5.3' ] || [ "$TRAVIS_PHP_VERSION" = '5.4' ]; then
echo
echo "Enabling APC for PHP <= 5.4"
#echo
#echo "Enabling APC for PHP <= 5.4"
# Documentation says it should be available for PHP <= 5.6 but it's not for 5.5 and 5.6!
echo 'extension = apc.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
#echo 'extension = apc.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
echo
echo "Enabling Memcached for PHP <= 5.4"
# Documentation says it should be available for all PHP versions but it's not for 5.5 and 5.6, 7.0, 7.1 and nightly!
@@ -165,16 +189,19 @@ before_script:
- |
echo "Setting up database"
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ] || [ "$DB" = 'postgresql' ]; then
echo "MySQL"
mysql -e 'DROP DATABASE IF EXISTS travis;'
mysql -e 'CREATE DATABASE IF NOT EXISTS travis;'
mysql -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
mysql -e 'FLUSH PRIVILEGES;'
mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
fi
# FIXME: find a way to import a MySQL dump into PostgreSQL
#if [ "$DB" = 'postgresql' ]; then
# pgsql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
#fi
if [ "$DB" = 'postgresql' ]; then
#pgsql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
#pgloader mysql://root:pass@127.0.0.1/base postgresql://dolibarrowner@127.0.0.1/dolibarr
pgloader mysql://root@127.0.0.1/travis postgresql:///travis
fi
# TODO: SQLite
echo
@@ -191,10 +218,9 @@ before_script:
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then
echo '$'dolibarr_main_db_type=\'mysqli\'';' >> $CONF_FILE
fi
# FIXME
#if [ "$DB" = 'postgresql' ]; then
# echo '$'dolibarr_main_db_type=\'pgsql\'';' >> $CONF_FILE
#fi
if [ "$DB" = 'postgresql' ]; then
echo '$'dolibarr_main_db_type=\'pgsql\'';' >> $CONF_FILE
fi
# TODO: SQLite
echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> $CONF_FILE
cat $CONF_FILE
@@ -253,8 +279,6 @@ script:
set +e
echo
# TODO: dev/* checks
- |
echo "Checking coding style"
# Ensure we catch errors
@@ -268,8 +292,6 @@ script:
# TODO: Check CSS (csslint?)
# TODO: check SQL syntax (pgsanity?)
- |
echo "Upgrading Dolibarr"
# Ensure we catch errors
@@ -293,6 +315,12 @@ 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
php upgrade.php 6.0.0 7.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade600700.log
php upgrade2.php 6.0.0 7.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade600700-2.log
php step5.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-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

333
ChangeLog
View File

@@ -2,6 +2,337 @@
English Dolibarr ChangeLog
--------------------------------------------------------------
***** ChangeLog for 6.0.6 compared to 6.0.6 *****
FIX: #7974 Contract - Invalid reference on the document
FIX: #8139
FIX: #8139 User search does not work if MAIN_USE_OLD_SEARCH_FORM, missing list.php
FIX: #8151
FIX: #8200
FIX: add planned delivery to order exports
FIX: a discount is a percent, not an amount, so we use vatrate not price
FIX: Avoid empty value to fk_multicurrency attribute
FIX: Bad localtaxes assignment in cashdesk
FIX: check shipping on delete order
FIX: check verif exped on delete order
FIX: creer into lire
FIX: Delete tasks on project delete will now trigger TASK_DELETE
FIX: Global on $user parameter reset the variable
FIX: if we make a mistake with situation_percent, now we can correct…
FIX: if we make a mistake with situation_percent, now we can correct it. before situation_final was always set to 1 and no way to go back
FIX: Import process must stop after ending line nb to import
FIX: migration script for product photo
FIX: natural search double quote
FIX: reverse field to have object loaded in doaction
FIX: Saving wrong localtax on order addline
FIX: show status on societe banner
FIX: solve column mismatch in user card's usergroup list + code cleanup
FIX: solve column mismatch in user card with multicompany transverse mode + code cleanup
FIX: unset categorie
FIX: update_extras on fourn card
FIX: warning when adding ECM files using old photo path
FIX: Withdrawals lines not filter by company name and not respect dropdown limit lines by page
NEW: Add sale representative einstein_pdf_modules
NEW_einstein_pdf_modules
NEW: field commerciaux and categ export CustomersInvoicesAndPayments
***** ChangeLog for 6.0.5 compared to 6.0.4 *****
FIX: security vulnerability reported by ADLab of Venustech
CVE-2017-17897, CVE-2017-17898, CVE-2017-17899, CVE-2017-17900
FIX: #7379: Compatibility with PRODUCT_USE_OLD_PATH_FOR_PHOTO variable
FIX: #7903
FIX: #7933
FIX: #8029 Unable to make leave request in holyday module
FIX: #8093
FIX: Bad name alias showing in name of third column
FIX: Cashdesk should not sell to inactive third parties
FIX: Edit accountancy account and warning message on loan
FIX: $accounts[$bid] is a label !
FIX: $oldvatrateclean & $newvatrateclean must be set if preg_match === false
FIX: product best price on product list
FIX: search on contact list
FIX: stats trad for customerinvoice
FIX: translate unactivate on contractline
FIX: email sent was not in HTML
FIX: missing hook invoice index
FIX: subject mail sepa
***** ChangeLog for 6.0.4 compared to 6.0.3 *****
FIX: #7737
FIX: #7751
FIX: #7756 Add better error message
FIX: #7786
FIX: #7806
FIX: #7824
FIX: add line bad price and ref
FIX: A lot of several fix on local taxes and NPR tax
FIX: createfromorder
FIX: CSS for IE10
FIX: external user cannot be set as internal
FIX: Filter type on actioncomm with multiselect doesn't work
FIX: list of donation not filtered on multicompany
FIX: list of module not complete when module mb_strlen not available
FIX: Locatax were not propagated when cloning order or proposal
FIX: Searching translation should not be case sensitive
FIX: Search into language is ok for file into external modules two.
FIX: test for filter fk_status
FIX: too much users on holiday list
FIX: Wrong alias sql
***** ChangeLog for 6.0.3 compared to 6.0.2 *****
FIX: #7211 Update qty dispatched on qty change
FIX: #7458
FIX: #7593
FIX: #7616
FIX: #7619
FIX: #7626
FIX: #7648
FIX: #7675
FIX: Agenda events are not exported in the ICAL, VCAL if begin exactly with the same $datestart
FIX: API to get object does not return data of linked objects
FIX: Bad localtax apply
FIX: Bad ressource list in popup in gantt view
FIX: bankentries search conciliated if val 0
FIX: hook formObjectOptions() must use $expe and not $object
FIX: make of link to other object during creation
FIX: Missing function getLinesArray
FIX: old batch not shown in multi shipping
FIX: paid supplier invoices are shown as abandoned
FIX: selection of thirdparty was lost on stats page of invoices
FIX: sql syntax error because of old field accountancy_journal
FIX: Stats on invoices show nothing
FIX: substitution in ODT of thirdparties documents
FIX: wrong key in selectarray
FIX: wrong personnal project time spent
***** ChangeLog for 6.0.2 compared to 6.0.1 *****
FIX: #7148
FIX: #7288
FIX: #7366 renaming table with pgsql
FIX: #7435 Can't add payment term
FIX: #7461
FIX: #7464
FIX: #7471
FIX: #7473 Mass update of vat rates and other bugs on localtax
FIX: #7475
FIX: #7486 Empty value for multicurrency rate must be forbidden
FIX: #7490
FIX: #7505
FIX: #7510 Bug: extrafield content disappear when generate pdf within intervention
FIX: #7514
FIX: #7531 #7537
FIX: #7541
FIX: #7546
FIX: #7550
FIX: #7554
FIX: #7567
FIX: Accountancy export model for Agiris Isacompta
FIX: Allow create shipping if STOCK_SUPPORTS_SERVICES option is enabled
FIX: Bad preview on scroping when special file names
FIX: Generation of invoice from bulk action "Bill Orders"
FIX: Implementation of a Luracast recommandation for the REST api server (#7370)
FIX: Missing space in request
FIX: Only modified values must be modified
FIX: replenish if line test GETPOST on line 0
FIX: Stripe not working on live mode
FIX: wrong basePath in the swagger view
FIX: Implementation of a Luracast recommandation for the REST api server
***** ChangeLog for 6.0.1 compared to 6.0.* *****
FIX: #7000 Dashboard link for late pending payment supplier invoices do not work
FIX: #7325 Default VAT rate when editing template invoices is 0%
FIX: #7330
FIX: #7359
FIX: #7367
FIX: #7368
FIX: #7391
FIX: #7420
FIX: Add some missing attributes in Adherent:makeSubstitution (type, phone…
FIX: Bad const name
FIX: Bad link to unpayed suppliers invoices
FIX: Better protection to no send email when we change limit
FIX: Calculation in the activity box
FIX: Clean bad parameters when inserting line of template invoice
FIX: dateSelector was not taken into account
FIX: hidden option MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN
FIX: journalization for bank journal should not rely on a label.
FIX: menu enty when url is external link
FIX: missing supplier qty and supplier discount in available fields for product export.
FIX: multicompany better accuracy in rounding and with revenue stamp.
FIX: Must use pdf format page as default for merging PDF.
FIX: PDF output was sharing 2 different currencies in same total
FIX: Position of signature on strato template
FIX: Protection to avoid to apply credit note discount > remain to pay
FIX: Remove warning when using log into syslog
FIX: Responsive
FIX: Security fixes (filter onload js, less verbose error message in
FIX: SEPA recording payment must save one payment in bank per customer
FIX: Several problem with the last event box on project/tasks
FIX: Sign of amount in origin currency on credit note created from lines
FIX: Some page of admin were not responsive
FIX: SQL injection
FIX: time.php crashed without project id in param
FIX: transfer of line extrafields from order to invoice
FIX: Upgrade missing on field
FIX: View of timespent for another user
FIX: ODT generation
FIX: CVE-2017-9840, CVE-2017-14238, CVE-2017-14239, CVE-2017-14240, CVE-2017-14241,
CVE-2017-14242
***** ChangeLog for 6.0.0 compared to 5.0.* *****
NEW: Add experimental BlockeLog module (to log business events in a non reversible log file).
NEW: Add a payment module for Stripe.
NEW: Add module "Product variant" (like red, blue for the product shoes)
NEW: Accountancy - Activate multi-journal & Add journal_label to database (FEC)
NEW: Add a tracking id into mass emailing.
NEW: Tax system more compatible with the new tax rollout in India (IGST / CGST / SGST).
NEW: Add calculation function for Loan schedule
NEW: Add "depends on" and "required by" into module informations
NEW: Add hidden option THIRDPARTY_INCLUDE_PARENT_IN_LINKTO
NEW: Add key __USERID__ and __ENTITYID__ as key for dynamic filters.
NEW: Add last activation author and ip of modules
NEW: Add mass actions (pdf merge and delete) for interventions
NEW: Add module resources import/export
NEW: Add option PROJECT_THIRDPARTY_REQUIRED
NEW: Add page statistics for project tasks
NEW: add property to show warnings when activating modules
NEW: add rapport file for supplier paiement
NEW: Add statistics on supplier tab.
NEW: Add tooltip help on shipment weight and volume calculation
NEW: An external module can hook and add mass actions.
NEW: Better reponsive design
NEW: Bookmarks are into a combo list.
NEW: Bulk actions available on supplier orders
NEW: Can add a background image on login page
NEW: Can change customer from POS
NEW: Can clone expense report on another user
NEW: Can control constants values into file integrity checker
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.
NEW: Can deploy an external module from the module setup area.
NEW: Can disable all overwrote translations in one click.
NEW: Can edit background color for odd and even lines in tables
NEW: Can filter on code in dictionnaries
NEW: Can filter on year and product tags on the product statistic page
NEW: Can import users
NEW: Can read time spent of others (hierarchy only or all if granted)
NEW: Can send an email to a user from its card.
NEW: Can send email to multiple destinaries from the mailform combo list.
NEW: Can set margins of PDFs
NEW: Can set number of dump to keep with job "local database backup"
NEW: Can sort customer balance summary on date.
NEW: Can sort thumbs visible on product card.
NEW: Can use a credit note into a "down payment/deposit".
NEW: Can use dol_fiche_end without showing bottom border.
NEW: Can use translations into all substitutions (watermark, freetext...)
NEW: Change to allow a specific numbering rule for invoice with POS module.
NEW: convert exceiss received to reduc
NEW: custom dir is enabled dy default on first install.
NEW: Description of feature of a module visible into a dedicated popup.
NEW: Direct open of card after a search if one record only found.
NEW: download button
NEW: Enable bulk actions delete on supplier invoices.
NEW: Extrafields support formulas to be computed using PHP expressions.
NEW: Feature to crop/resize images available on user and expense reports.
NEW: Filechecker can include custom dir and report added files.
NEW: fix listview class and add a demo for product list
NEW: [FP17] Accountancy - Add select field in list of accounts
NEW: get amount base on hourly rate for ficheinter
NEW: hidden Easter egg to display commitstrip strip on login page
NEW: Include an hourglass icon when we click on online payment button
NEW: Index upload files into database.
NEW: Introduce mass action on product list ('delete' for the moment)
NEW: Introduce mass actions on contacts
NEW: Introduce option MAIN_HTTP_CONTENT_SECURITY_POLICY
NEW: It's easier to switch between sandbox and live for paypal
NEW: Mass action delete available on project and tasks
NEW: Move login information on home page into a widget
NEW: new demo entry page
NEW: No external check of version without explicit click in about page.
NEW: ODT docs for USER USERGROUP CONTRACT and PRODUCT class
NEW: odt usergroup
NEW: On invoices generated by template, we save if invoice come from a source template.
NEW: option to copy into attachement files of events, files send by mail (with auto event creation)
NEW: PDF with numbertoword
NEW: Permit multiple file upload in linked documents
NEW: PHP 7.1 compatibility
NEW: Reduce memory usage by removing deprecated constant loading.
NEW: Report page and menu for suppliers paiements
NEW: Show by default README.md file found into root dir of ext module.
NEW: Show company into combo list of projects
NEW: show files in the bank statement + download
NEW: Show local taxes in facture list
NEW: Show local taxes in supplier facture list
NEW: Small PDF template for products
NEW: Option SUPPLIER_ORDER_EDIT_BUYINGPRICE_DURING_RECEIPT
NEW: The substitution keys available for emailing edition are now visible into a popup.
NEW: Uniformize behaviour: Action to make order is an action button.
NEW: Use autocompletion on the "Add widget list".
NEW: Use html5 type "number" on select field for year and duration.
NEW: Can 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
NEW: Default theme of v6 is cleaner.
NEW: When down payment is entered, discount to reuse into final invoice is automatically created. This save one click into invoice workflow.
NEW: Add UI to configure MEMBER_NEWFORM_FORCETYPE
NEW: #2763 Go to document block after clicking in Generate document button
NEW: #6280: Generate PDF after creating an invoice from a customer order
NEW: #6915 Simplest change.
NEW: Uniformize the look and feel with v6 new look.
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.
NEW: Add font-awesome css.
NEW: Add function ajax_autoselect
NEW: Add function dolMd2Html
NEW: Add hook doUpgrade2
NEW: Add hook "formatNotificationMessage"
NEW: Add index and constraints keys on supplier proposal detail table
NEW: Add phpunit to check the engine is defined into sql create files.
NEW: Add project and Hook to Loan
NEW: Add REST API to push a file.
NEW: Allow extrafields list select to be dependands on other standard list and not only other extrafields list
NEW: Architecture to manage search criteria persistance (using save_lastsearch_values=1 on exit links and restore_lastsearch_values=1 in entry links)
NEW: data files are now also parsed by phpunit for sql syntax
NEW: Hook to allow inserting custom product head #6001
NEW: Introduce fields that can be computed during export in export profiles.
NEW: Introduce function dol_compress_dir
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
NEW: tooltip can be on hover or on click with textwithpicto function.
NEW: Upgrade jquery to 3.3.1 and jquery-ui to 1.12
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. So, if you set var
$multicompany_transverse_mode to 1 into your conf file, you must remove this line and a new key into
the Home - setup - other admin page.
* If you use Multicompany transverse mode, it will be necessary to check the activation of the modules in the children
entities and to review completely the rights of the groups and the users.
* Use getEntity('xxx') instead getEntity('xxx', 1) and use getEntity('xxx', 0) instead getEntity('xxx')
* Some other change were done in the way we read permission of a user when module multicompany is enabled. You can
retreive the old behavior by adding constant MULTICOMPANY_BACKWARD_COMPATIBILITY to 1.
* The hook formObjectOptions was not implemented correctly in previous version. Sometimes, you had to return output
content by doing a print into function, sometimes by returning content into "resprint". This has been fixed to follow
hook specifications so you must return output into "resprint".
***** ChangeLog for 5.0.7 compared to 5.0.6 *****
FIX: #7000 Dashboard link for late pending payment supplier invoices do not work
FIX: #7148
@@ -20,7 +351,7 @@ FIX: wrong personnal project time spent
***** ChangeLog for 5.0.6 compared to 5.0.5 *****
FIX: Removed a bad symbolic link into custom directory.
FIX: Renaming a resouce ref rename also the directory of attached files.
FIX: Renaming a resource ref rename also the directory of attached files.
***** ChangeLog for 5.0.5 compared to 5.0.4 *****
FIX: #7075 : bad path for document

View File

@@ -98,34 +98,58 @@ Voir fichier ChangeLog.
- Rapports
- Imports/Exports des données
- Connectivité LDAP
- De nombreuses autres fonctionnalités issues de modules officiels ou non (AWStats, Bittorrent, Gravatar, Google, Webcalendar...)
- Intégratn de ClickToDial
- Intégration RSS
- Intégation Skype
- Intégration de système de paiements (Paypal, Strip, Paybox...)
-
### Divers:
- Application multi-utilisateurs avec différents niveaux de permissions par module.
- Multi-langue.
- Multi-utilisateurs avec différents niveaux de permissions par module.
- Multi-devise.
- Peux être multi-société par ajout du module externe multi-société.
- Peux-être multi-devise par ajout du module externe multi-devise.
- Plusieurs gestionnaires de menus (possibilité de différencier les menus pour les utilisateurs internes ou externes comme les clients ou fournisseurs).
- Application simple à utiliser.
- Plusieurs thèmes visuels.
- Code simple et facilement personnalisable.
- Requiert PHP et MariaDb, Mysql ou Postgresql (Voir versions exactes sur http://wiki.dolibarr.org/index.php/Prérequis).
- Application simple à utiliser.
- Requiert PHP et MariaDb, Mysql ou Postgresql (Voir versions exactes sur https://wiki.dolibarr.org/index.php/Prérequis).
- Compatible avec toutes les offres Cloud du marché respectant les prérequis de base de données et PHP.
- Export PDF de tous les éléments (factures, propositions commerciales, commandes, bons expéditions, etc...)
- Code simple et facilement personnalisable (pas de framework lourd; mécanisme de hook et triggers).
- APIs.
- Génération PDF et ODT des éléments (factures, propositions commerciales, commandes, bons expéditions, etc...)
-
### Extension
Dolibarr peut aussi être étendu à volonté avec l'ajout de module/applications externes développées par des développeus tiers, disponible sur [DoliStore](https://www.dolistore.com).
## CE QUE DOLIBARR NE PEUT PAS FAIRE (TACHES A FAIRE)
## CE QUE DOLIBARR NE PEUT PAS (ENCORE) FAIRE
Voici un liste de fonctionnalites pas encore gérées par Dolibarr:
- Pas encore de compta analytique double-partie (uniquement gestion de trésorerie).
- Dolibarr ne gère qu'une seule monnaie à la fois (mono-devise).
- Dolibarr ne contient pas de module de Gestion de la paie.
- Les tâches du module de gestion de projets n'ont pas de dépendance entre elle.
- Dolibarr ne contient pas de Webmail.
- Les tâches du module de gestion de projets n'ont pas de dépendances entre elle.
- Dolibarr n'embarque pas de Webmail intégré nativement.
- Dolibarr ne fait pas le café (pas encore).
## DOCUMENTATION
Les documentations utilisateur, développeur et traducteur sont disponible sous forme de ressources de la communautés via la site [Wiki](https://wiki.dolibarr.org).
## CONTRIBUTING
Voir le fichier [CONTRIBUTING](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)
## CREDITS
Dolibarr est le résultat du travail de nombreux contributeurs depuis des années et utilise des librairies d'autres contributeurs.
Voir le fichier [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT)
## ACTUALITES ET RESEAUX SOCIAUX
Suivez le projet Dolibarr project sur les réseaux francophones

View File

@@ -12,6 +12,7 @@ You can use it as a standalone application or as a web application to be able to
![ScreenShot](https://www.dolibarr.org/images/dolibarr_screenshot1_640x400.png)
## LICENSE
Dolibarr is released 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 (GPL-3+).
@@ -20,12 +21,23 @@ See the [COPYING](https://github.com/Dolibarr/dolibarr/blob/develop/COPYING) fil
Other licenses apply for some included dependencies. See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) for a full list.
## INSTALLING
### Download
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:
@@ -57,6 +69,7 @@ You can use a Web server and a supported database (MariaDb, MySql or Postgresql)
- Follow the installer instructions
## UPGRADING
- Overwrite all old files from 'dolibarr' directory with files provided into the new version's package.
@@ -65,13 +78,15 @@ You can use a Web server and a supported database (MariaDb, MySql or Postgresql)
*Note: migration process can safely be done multiple times by calling the page /install/index.php*
## WHAT'S NEW
See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file.
## FEATURES
### Main modules (all optional)
### Main application/modules (all optional)
- Customers, Prospects and/or Suppliers directory
- Products and/or Services catalog
@@ -97,7 +112,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- Point of Sale
-
### Other modules
### Other application/modules
- Bookmarks management
- Donations management
@@ -110,56 +125,63 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- ClickToDial integration
- RSS integration
- Skype integration
- Payment platforms integration (PayBox, PayPal)
- Payment platforms integration (PayPal, Stripe, Paybox...)
-
### Other general features
- Multi-Users and groups with finely grained rights
- Localization in most major languages
- Can manage several companies by adding external module multi-company.
- Can manage several currencies by adding external module multi-currency.
- Very user friendly and easy to use
- Localization in most major languages.
- Multi-Users and groups with finely grained rights.
- Multi-currency.
- Multi-company by adding of an external module.
- Very user friendly and easy to use.
- Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one)
- Works with PHP 5.3+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](http://wiki.dolibarr.org/index.php/Prerequisite))
- Works with PHP 5.3+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite))
- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites.
- An easy to understand, maintain and code interfaces with your own information system (PHP with no heavy framework; trigger and hook architecture)
- APIs.
- An easy to understand, maintain and develop code (PHP with no heavy framework; trigger and hook architecture)
- Support for country specific features:
- Spanish Tax RE and ISPF
- French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM)
- Canadian double taxes (federal/province) and other countries using cumulative VAT
- Tunisian tax stamp
- Argentina invoice numbering using A,B,C...
- Compatible with [European directives](http://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE)
- PDF or ODT generation for invoice, proposals, orders...
-
### Extending
Dolibarr can be extended with a lot of other external modules from third party developers available at the [DoliStore](https://www.dolistore.com).
Dolibarr can be extended with a lot of other external application or modules from third party developers available at the [DoliStore](https://www.dolistore.com).
## FUTURE
These are features that Dolibarr does **not** yet fully support:
- Double-entry bookkeeping yet (only bank and treasury management)
- Tasks dependencies in projects
- Payroll module
- Webmail
- No native embedded Webmail
- Dolibarr can't do coffee (yet)
## DOCUMENTATION
Administrator, user, developer and translator's documentations are available along with other community resources on the [Wiki](https://wiki.dolibarr.org).
## CONTRIBUTING
See file [CONTRIBUTING](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)
## CREDITS
Dolibarr is the work of many contributors over the years and uses some fine libraries.
See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) file.
## NEWS AND SOCIAL NETWORKS
Follow Dolibarr project on:

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 vim 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,6 +10,8 @@ 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
# Those are false positives, the files are their own sources since
# they are data files
source-is-missing htdocs/includes/mobiledetect/mobiledetectlib/Mobile_Detect.json

View File

@@ -353,7 +353,7 @@ begin
begin
// TODO Copy file or ask to install package ?
//CustomMessage('YouWillInstallDoliWamp')+#13#13
MsgBox('The package vcredist_x86.exe must have been installed first. It seems it is not. Please install it first from <a href="http://www.microsoft.com/en-us/download/details.aspx?id=30679">http://www.microsoft.com/en-us/download/details.aspx?id=30679</a> then restart DoliWamp installation/upgrade.',mbInformation,MB_OK);
MsgBox('The Visual C++ Redistributable package should be installed, it seems it is not. Please install the 32-bit version from http://www.microsoft.com/en-us/download/details.aspx?id=30679, then restart the DoliWAMP installation/upgrade.',mbInformation,MB_OK);
end;
// Pb seems similar with msvcp110.dll
//vcredist_x64.exe

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,119 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
* Main
*/
$includecustom=0;
$includeconstants=array();
if (empty($argv[1]))
{
print "Usage: ".$script_file." release=x.y.z\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;
}
parse_str($argv[1]);
if ($release != DOL_VERSION)
$i=0;
while ($i < $argc)
{
print 'Error: release is not version declared into filefunc.in.php.'."\n";
exit -1;
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(dirname(__FILE__)).'/htdocs/install';
print 'Delete current files '.$outputdir.'/filelist*.xml'."\n";
dol_delete_file($outputdir.'/filelist*.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|public\/test|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // 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 +166,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

@@ -19,7 +19,7 @@ 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\@vmprod.dolibarr.org:/home/dolibarr/dolibarr.org/httpdocs/files";
$PUBLISHBETARC="dolibarr\@vmprod1.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
@@ -366,7 +366,9 @@ if ($nboftargetok) {
}
else # For a maintenance release
{
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
#print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. | grep -v "Merge branch" | grep -v "Merge pull" | grep "^ " | sed -e "s/^[0-9a-z]* *//" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
}
print "\n";
if (! $ret)
@@ -548,23 +550,16 @@ 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`;
$ret=`rm -f $BUILDROOT/$PROJECT/.cvsignore $BUILDROOT/$PROJECT/*/.cvsignore $BUILDROOT/$PROJECT/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.cvsignore`;
$ret=`rm -f $BUILDROOT/$PROJECT/.gitignore $BUILDROOT/$PROJECT/*/.gitignore $BUILDROOT/$PROJECT/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.gitignore`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/geoip/sample*.*`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/jqueryFileTree/connectors/jqueryFileTree.pl`; # Avoid errors into rpmlint
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/template`; # Package not valid for most linux distributions (errors reported into compile.js). Package should be embed by modules to avoid problems.
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpmailer`; # Package not valid for most linux distributions (errors reported into file LICENSE). Package should be embed by modules to avoid problems.
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/adapters`; # Keep this removal in case we embed libraries
$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`;
@@ -573,6 +568,7 @@ if ($nboftargetok) {
$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/parsedown/LICENSE.txt`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/php-iban/docs`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/.gitattributes`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Classes/license.md`;
@@ -581,22 +577,26 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Examples`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/unitTests`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/license.md`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/LICENSE`;
$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`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/theme/common/octicons/LICENSE`;
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 keep files only
$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
print "find $BUILDROOT/$PROJECT/htdocs/custom/* -type l -exec rm -fr {} \\;\n";
$ret=`find $BUILDROOT/$PROJECT/htdocs/custom/* -type l -exec rm -fr {} \\; >/dev/null 2>&1`; # For custom we want to keep files only
$ret=`find $BUILDROOT/$PROJECT/htdocs/custom/* -type l -exec rm -fr {} \\; >/dev/null 2>&1`; # For custom we want to remove all subdirs, even symbolic links, but not files
}
# Build package for each target
@@ -915,9 +915,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`;
@@ -980,13 +977,14 @@ 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/actions_mymodule.class.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/class/api_myobject.class.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/core/modules/modMyModule.class.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/mymoduleindex.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

@@ -3,6 +3,7 @@
# \file build/makepack-dolibarrmodule.pl
# \brief Package builder (tgz, zip, rpm, deb, exe)
# \author (c)2005-2014 Laurent Destailleur <eldy@users.sourceforge.net>
# \contributor (c)2017 Nicolas ZABOURI <info@inovea-conseil.com>
#----------------------------------------------------------------------------
use Cwd;
@@ -134,7 +135,15 @@ foreach my $PROJECT (@PROJECTLIST) {
# Get version $MAJOR, $MINOR and $BUILD
print "Version detected for module ".$PROJECT.": ";
$result=open(IN,"<".$SOURCE."/htdocs/".$PROJECTLC."/core/modules/mod".$PROJECT.".class.php");
if (! $result) { die "Error: Can't open descriptor file ".$SOURCE."/htdocs/".$PROJECTLC."/core/modules/mod".$PROJECT.".class.php for reading.\n"; }
$custom=false;
if (! $result) {
$result=open(IN,"<".$SOURCE."/htdocs/custom/".$PROJECTLC."/core/modules/mod".$PROJECT.".class.php");
if (! $result) {
die "Error: Can't open descriptor file ".$SOURCE."/htdocs/(or /htdocs/custom/)".$PROJECTLC."/core/modules/mod".$PROJECT.".class.php for reading.\n";
}else{
$custom = true;
}
}
while(<IN>)
{
if ($_ =~ /this->version\s*=\s*'([\d\.]+)'/) { $PROJVERSION=$1; break; }
@@ -294,8 +303,11 @@ foreach my $PROJECT (@PROJECTLIST) {
$ret=`rm -fr $BUILDROOT/$PROJECTLC/htdocs/conf/conf.php.old`;
$ret=`rm -fr $BUILDROOT/$PROJECTLC/htdocs/conf/conf.php.postgres`;
$ret=`rm -fr $BUILDROOT/$PROJECTLC/htdocs/conf/conf*sav*`;
if($custom){
$ret=`cp -r $BUILDROOT/$PROJECTLC/htdocs/custom/* $BUILDROOT/$PROJECTLC/htdocs/.`;
}
$ret=`rm -fr $BUILDROOT/$PROJECTLC/htdocs/custom`;
$ret=`rm -fr $BUILDROOT/$PROJECTLC/htdocs/custom2`;
$ret=`rm -fr $BUILDROOT/$PROJECTLC/htdocs/custom2`;
$ret=`rm -fr $BUILDROOT/$PROJECTLC/test`;
$ret=`rm -fr $BUILDROOT/$PROJECTLC/Thumbs.db $BUILDROOT/$PROJECTLC/*/Thumbs.db $BUILDROOT/$PROJECTLC/*/*/Thumbs.db $BUILDROOT/$PROJECTLC/*/*/*/Thumbs.db $BUILDROOT/$PROJECTLC/*/*/*/*/Thumbs.db`;
$ret=`rm -fr $BUILDROOT/$PROJECTLC/CVS* $BUILDROOT/$PROJECTLC/*/CVS* $BUILDROOT/$PROJECTLC/*/*/CVS* $BUILDROOT/$PROJECTLC/*/*/*/CVS* $BUILDROOT/$PROJECTLC/*/*/*/*/CVS* $BUILDROOT/$PROJECTLC/*/*/*/*/*/CVS*`;

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

@@ -1,8 +1,10 @@
README (English)
##################################################
Install script for Virtualmin Pro
Install script for Virtualmin Professional / GPL
##################################################
This script will install automatically Dolibarr from Virtualmin Pro
http://www.virtualmin.com
This script will install automatically Dolibarr from Virtualmin.
(Included in the professional version and can be added in the GPL version)
https://www.virtualmin.com
http://www.webmin.com/virtualmin.html

View File

@@ -1,7 +1,7 @@
#----------------------------------------------------------------------------
# \file dolibarr.pl
# \brief Dolibarr script install for Virtualmin Pro
# \author (c)2009-2015 Regis Houssin <regis.houssin@capnetworks.com>
# \author (c)2009-2017 Regis Houssin <regis.houssin@capnetworks.com>
#----------------------------------------------------------------------------
@@ -30,7 +30,12 @@ return "Regis Houssin";
# script_dolibarr_versions()
sub script_dolibarr_versions
{
return ( "3.8.1", "3.7.1", "3.6.4", "3.5.7" );
return ( "5.0.4", "4.0.6", "3.9.4" );
}
sub script_dolibarr_release
{
return 2; # for mysqli fix
}
sub script_dolibarr_category
@@ -177,9 +182,9 @@ if ($opts->{'newdb'} && !$upgrade) {
local ($dbtype, $dbname) = split(/_/, $opts->{'db'}, 2);
local $dbuser = $dbtype eq "mysql" ? &mysql_user($d) : &postgres_user($d);
local $dbpass = $dbtype eq "mysql" ? &mysql_pass($d) : &postgres_pass($d, 1);
local $dbphptype = $dbtype eq "mysql" && $version >= 3.6 ? "mysql" :
local $dbphptype = $dbtype eq "mysql" && $version < 3.6 ? "mysql" :
$dbtype eq "mysql" ? "mysqli" : "pgsql";
local $dbhost = &get_database_host($dbtype);
local $dbhost = &get_database_host($dbtype, $d);
local $dberr = &check_script_db_connection($dbtype, $dbname, $dbuser, $dbpass);
return (0, "Database connection failed : $dberr") if ($dberr);
@@ -206,9 +211,6 @@ $pgcharset = $tmpl->{'postgres_encoding'};
$charset = $dbtype eq "mysql" ? $mycharset : $pgcharset;
$collate = $dbtype eq "mysql" ? $mycollate : "C";
# Install filename
local $step = $version >= 3.8 ? "step" : "etape";
$path = &script_path_url($d, $opts);
if ($path =~ /^https:/ || $d->{'ssl'}) {
$url = "https://$d->{'dom'}";
@@ -222,15 +224,11 @@ if ($opts->{'path'} =~ /\w/) {
if (!$upgrade) {
local $cdef = "$opts->{'dir'}/conf/conf.php.example";
&run_as_domain_user($d, "cp ".quotemeta($cdef)." ".quotemeta($cfile));
&copy_source_dest_as_domain_user($d, $cdef, $cfile);
&set_permissions_as_domain_user($d, 0777, $cfiledir);
&set_permissions_as_domain_user($d, 0666, $cfile);
&copy_source_dest_as_domain_user($d, $cfile);
&run_as_domain_user($d, "mkdir ".quotemeta($docdir));
&set_permissions_as_domain_user($d, 0777, $docdir);
if (!$version >= 3.7.2) {
&run_as_domain_user($d, "mkdir ".quotemeta($altdir));
&set_permissions_as_domain_user($d, 0777, $altdir);
}
}
else {
# Preserve old config file, documents and custom directory
@@ -266,7 +264,8 @@ if ($upgrade) {
[ "versionfrom", $upgrade->{'version'} ],
[ "versionto", $ver ],
);
local $err = &call_dolibarr_wizard_page(\@params, $step."5", $d, $opts);
local $p = $ver >= 3.8 ? "step5" : "etape5";
local $err = &call_dolibarr_wizard_page(\@params, $p, $d, $opts);
return (-1, "Dolibarr wizard failed : $err") if ($err);
# Remove the installation directory.
@@ -289,15 +288,17 @@ else {
[ "main_force_https", $opts->{'forcehttps'} ],
[ "dolibarr_main_db_character_set", $charset ],
[ "dolibarr_main_db_collation", $collate ],
[ "main_use_alt_dir", "1" ],
[ "usealternaterootdir", "1" ],
[ "main_alt_dir_name", "custom" ],
);
local $err = &call_dolibarr_wizard_page(\@params, $step."1", $d, $opts);
local $p = $ver >= 3.8 ? "step1" : "etape1";
local $err = &call_dolibarr_wizard_page(\@params, $p, $d, $opts);
return (-1, "Dolibarr wizard failed : $err") if ($err);
# Second page (Populate database)
local @params = ( [ "action", "set" ] );
local $err = &call_dolibarr_wizard_page(\@params, $step."2", $d, $opts);
local $p = $ver >= 3.8 ? "step2" : "etape2";
local $err = &call_dolibarr_wizard_page(\@params, $p, $d, $opts);
return (-1, "Dolibarr wizard failed : $err") if ($err);
# Third page (Add administrator account)
@@ -306,7 +307,8 @@ else {
[ "pass", $dompass ],
[ "pass_verif", $dompass ],
);
local $err = &call_dolibarr_wizard_page(\@params, $step."5", $d, $opts);
local $p = $ver >= 3.8 ? "step5" : "etape5";
local $err = &call_dolibarr_wizard_page(\@params, $p, $d, $opts);
return (-1, "Dolibarr wizard failed : $err") if ($err);
# Remove the installation directory and protect config file.
@@ -384,7 +386,10 @@ sub script_dolibarr_check_latest
{
local ($ver) = @_;
local @vers = &osdn_package_versions("dolibarr",
$ver >= 3.8 ? "dolibarr\\-(3\\.[0-9\\.]+)\\.tgz" :
$ver >= 5.0 ? "dolibarr\\-(5\\.0\\.[0-9\\.]+)\\.tgz" :
$ver >= 4.0 ? "dolibarr\\-(4\\.0\\.[0-9\\.]+)\\.tgz" :
$ver >= 3.9 ? "dolibarr\\-(3\\.9\\.[0-9\\.]+)\\.tgz" :
$ver >= 3.8 ? "dolibarr\\-(3\\.8\\.[0-9\\.]+)\\.tgz" :
$ver >= 3.7 ? "dolibarr\\-(3\\.7\\.[0-9\\.]+)\\.tgz" :
$ver >= 3.6 ? "dolibarr\\-(3\\.6\\.[0-9\\.]+)\\.tgz" :
$ver >= 3.5 ? "dolibarr\\-(3\\.5\\.[0-9\\.]+)\\.tgz" :

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
@@ -162,9 +162,11 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/api
%_datadir/dolibarr/htdocs/asterisk
%_datadir/dolibarr/htdocs/barcode
%_datadir/dolibarr/htdocs/blockedlog
%_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
@@ -193,6 +195,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
@@ -203,10 +206,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
@@ -242,9 +242,11 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/api
%_datadir/dolibarr/htdocs/asterisk
%_datadir/dolibarr/htdocs/barcode
%_datadir/dolibarr/htdocs/blockedlog
%_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
@@ -273,6 +275,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
@@ -283,10 +286,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
@@ -159,9 +159,11 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/api
%_datadir/dolibarr/htdocs/asterisk
%_datadir/dolibarr/htdocs/barcode
%_datadir/dolibarr/htdocs/blockedlog
%_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
@@ -190,6 +192,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
@@ -200,10 +203,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
@@ -170,9 +170,11 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/api
%_datadir/dolibarr/htdocs/asterisk
%_datadir/dolibarr/htdocs/barcode
%_datadir/dolibarr/htdocs/blockedlog
%_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
@@ -201,6 +203,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
@@ -211,10 +214,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 "@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
@@ -116,7 +99,7 @@ JQUERYFILETREE:
RESTLER:
--------
* Add 2 lines into function
* Add 2 lines into file AutoLoader.php to complete function
private function alias($className, $currentClass)
{
...
@@ -127,4 +110,25 @@ to get
if ($className == 'Luracast\Restler\string') return;
if ($className == 'Luracast\Restler\mixed') return;
...
PARSEDOWN
---------
* Fix to avoid fatal error when mb_strlen not available:
// @CHANGE LDR Fix when mb_strlen is not available
//$shortage = 4 - mb_strlen($line, 'utf-8') % 4;
if (function_exists('mb_strlen')) $len = mb_strlen($line, 'utf-8');
else $len = strlen($line);
$shortage = 4 - $len % 4;
JEDITABLE.JS
------------
* <button type="submit" /> => <button class="button" type="submit" />
* <button type="cancel" /> => <button class="button" type="cancel" />

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=*)"

View File

@@ -155,7 +155,7 @@ fi
#echo "mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile"
#mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile
#echo "drop old table"
echo "drop table llx_accounting_account;" | mysql -P$port -u$admin $passwd $base
echo "drop table if exists llx_accounting_account;" | mysql -P$port -u$admin $passwd $base
echo "mysql -P$port -u$admin -p***** $base < $mydir/$dumpfile"
mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile
export res=$?

View File

@@ -528,7 +528,7 @@ CREATE TABLE `llx_bank` (
LOCK TABLES `llx_bank` WRITE;
/*!40000 ALTER TABLE `llx_bank` DISABLE KEYS */;
INSERT INTO `llx_bank` VALUES (1,'2010-07-08 23:56:14','2013-03-07 21:28:51','2010-07-08','2010-07-08',2000.00000000,'(Initial balance)',1,NULL,1,'SOLD','201210',NULL,1,NULL,0,NULL,NULL,NULL),(2,'2010-07-09 00:00:24','0000-00-00 00:00:00','2010-07-09','2010-07-09',500.00000000,'(Initial balance)',2,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(3,'2010-07-10 13:33:42','0000-00-00 00:00:00','2010-07-10','2010-07-10',0.00000000,'(Solde initial)',3,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(4,'2010-07-10 14:59:41','0000-00-00 00:00:00','2010-07-10','2010-07-10',0.02000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,'Client salon invidivdu',NULL),(5,'2011-07-18 20:50:24','0000-00-00 00:00:00','2011-07-08','2011-07-08',20.00000000,'(CustomerInvoicePayment)',1,1,NULL,'CB','201107',NULL,1,NULL,0,NULL,NULL,NULL),(6,'2011-07-18 20:50:47','0000-00-00 00:00:00','2011-07-08','2011-07-08',10.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(8,'2011-08-01 03:34:11','2013-03-07 21:28:51','2011-08-01','2011-08-01',5.63000000,'(CustomerInvoicePayment)',1,1,1,'CB','201210',NULL,1,NULL,0,NULL,NULL,NULL),(12,'2011-08-05 23:11:37','2013-03-07 21:33:57','2011-08-05','2011-08-05',-10.00000000,'(SocialContributionPayment)',1,1,1,'VIR','201210',NULL,1,NULL,0,NULL,NULL,NULL),(13,'2011-08-06 20:33:54','0000-00-00 00:00:00','2011-08-06','2011-08-06',5.98000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(14,'2011-08-08 02:53:40','0000-00-00 00:00:00','2011-08-08','2011-08-08',26.10000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(15,'2011-08-08 02:55:58','2013-03-07 21:39:20','2011-08-08','2011-08-08',26.96000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201211',NULL,1,NULL,0,NULL,NULL,NULL),(16,'2012-12-09 15:28:44','2012-12-09 14:28:44','2012-12-09','2012-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(17,'2012-12-09 15:28:53','2012-12-09 14:33:07','2012-12-09','2012-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(18,'2012-12-09 17:35:55','2012-12-09 16:35:55','2012-12-09','2012-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(19,'2012-12-09 17:37:02','2012-12-09 16:37:02','2012-12-09','2012-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(20,'2012-12-09 18:35:07','2012-12-09 17:35:07','2012-12-09','2012-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(21,'2012-12-12 18:54:33','2013-03-07 21:28:51','2012-12-12','2012-12-12',1.00000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201210',NULL,1,NULL,0,NULL,NULL,NULL),(22,'2013-03-06 16:48:16','2013-03-06 15:48:16','2013-03-06','2013-03-06',20.00000000,'(SubscriptionPayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(23,'2013-03-20 14:30:11','2013-03-20 13:30:11','2013-03-20','2013-03-20',10.00000000,'(SubscriptionPayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL);
INSERT INTO `llx_bank` VALUES (1,'2010-07-08 23:56:14','2013-03-07 21:28:51','2010-07-08','2010-07-08',2000.00000000,'(Initial balance)',1,NULL,1,'SOLD','201210',NULL,1,NULL,0,NULL,NULL,NULL),(2,'2010-07-09 00:00:24','2010-07-09 00:00:24','2010-07-09','2010-07-09',500.00000000,'(Initial balance)',2,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(3,'2010-07-10 13:33:42','2010-07-10 13:33:42','2010-07-10','2010-07-10',0.00000000,'(Solde initial)',3,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(4,'2010-07-10 14:59:41','2010-07-10 14:59:41','2010-07-10','2010-07-10',0.02000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,'Client salon invidivdu',NULL),(5,'2011-07-18 20:50:24','2011-07-18 20:50:24','2011-07-08','2011-07-08',20.00000000,'(CustomerInvoicePayment)',1,1,NULL,'CB','201107',NULL,1,NULL,0,NULL,NULL,NULL),(6,'2011-07-18 20:50:47','2011-07-18 20:50:47','2011-07-08','2011-07-08',10.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(8,'2011-08-01 03:34:11','2013-03-07 21:28:51','2011-08-01','2011-08-01',5.63000000,'(CustomerInvoicePayment)',1,1,1,'CB','201210',NULL,1,NULL,0,NULL,NULL,NULL),(12,'2011-08-05 23:11:37','2013-03-07 21:33:57','2011-08-05','2011-08-05',-10.00000000,'(SocialContributionPayment)',1,1,1,'VIR','201210',NULL,1,NULL,0,NULL,NULL,NULL),(13,'2011-08-06 20:33:54','2011-08-06 20:33:54','2011-08-06','2011-08-06',5.98000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(14,'2011-08-08 02:53:40','2011-08-08 02:53:40','2011-08-08','2011-08-08',26.10000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(15,'2011-08-08 02:55:58','2013-03-07 21:39:20','2011-08-08','2011-08-08',26.96000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201211',NULL,1,NULL,0,NULL,NULL,NULL),(16,'2012-12-09 15:28:44','2012-12-09 14:28:44','2012-12-09','2012-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(17,'2012-12-09 15:28:53','2012-12-09 14:33:07','2012-12-09','2012-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(18,'2012-12-09 17:35:55','2012-12-09 16:35:55','2012-12-09','2012-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(19,'2012-12-09 17:37:02','2012-12-09 16:37:02','2012-12-09','2012-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(20,'2012-12-09 18:35:07','2012-12-09 17:35:07','2012-12-09','2012-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(21,'2012-12-12 18:54:33','2013-03-07 21:28:51','2012-12-12','2012-12-12',1.00000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201210',NULL,1,NULL,0,NULL,NULL,NULL),(22,'2013-03-06 16:48:16','2013-03-06 15:48:16','2013-03-06','2013-03-06',20.00000000,'(SubscriptionPayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(23,'2013-03-20 14:30:11','2013-03-20 13:30:11','2013-03-20','2013-03-20',10.00000000,'(SubscriptionPayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL);
/*!40000 ALTER TABLE `llx_bank` ENABLE KEYS */;
UNLOCK TABLES;
@@ -4844,7 +4844,7 @@ CREATE TABLE `llx_opensurvey_sondage` (
LOCK TABLES `llx_opensurvey_sondage` WRITE;
/*!40000 ALTER TABLE `llx_opensurvey_sondage` DISABLE KEYS */;
INSERT INTO `llx_opensurvey_sondage` VALUES ('m4467s2mtk6khmxc','m4467s2mtk6khmxci2ysw682','fdffdshfghfj jhgjgh','aaa@aaa.com','fdfds','fdffds','2013-03-06 23:00:00','D+','1',1,'dolibarr','0000-00-00 00:00:00');
INSERT INTO `llx_opensurvey_sondage` VALUES ('m4467s2mtk6khmxc','m4467s2mtk6khmxci2ysw682','fdffdshfghfj jhgjgh','aaa@aaa.com','fdfds','fdffds','2013-03-06 23:00:00','D+','1',1,'dolibarr','2000-01-01 00:00:00');
/*!40000 ALTER TABLE `llx_opensurvey_sondage` ENABLE KEYS */;
UNLOCK TABLES;

File diff suppressed because one or more lines are too long

View File

@@ -187,11 +187,13 @@ export list="
--ignore-table=$base.llx_bt_webseedfiles
--ignore-table=$base.llx_c_civilite
--ignore-table=$base.llx_c_dolicloud_plans
--ignore-table=$base.llx_c_pays
--ignore-table=$base.llx_c_source
--ignore-table=$base.llx_cabinetmed_c_banques
--ignore-table=$base.llx_cabinetmed_c_ccam
--ignore-table=$base.llx_cabinetmed_c_examconclusion
--ignore-table=$base.llx_cabinetmed_cons
--ignore-table=$base.llx_cabinetmed_cons_extrafields
--ignore-table=$base.llx_cabinetmed_diaglec
--ignore-table=$base.llx_cabinetmed_examaut
--ignore-table=$base.llx_cabinetmed_exambio
@@ -207,7 +209,18 @@ export list="
--ignore-table=$base.llx_dolicloud_customers
--ignore-table=$base.llx_dolicloud_stats
--ignore-table=$base.llx_dolicloud_emailstemplates
--ignore-table=$base.llx_dolireport_column
--ignore-table=$base.llx_dolireport_criteria
--ignore-table=$base.llx_dolireport_graph
--ignore-table=$base.llx_dolireport_plot
--ignore-table=$base.llx_dolireport_report
--ignore-table=$base.llx_domain
--ignore-table=$base.llx_ecommerce_commande
--ignore-table=$base.llx_ecommerce_facture
--ignore-table=$base.llx_ecommerce_product
--ignore-table=$base.llx_ecommerce_site
--ignore-table=$base.llx_ecommerce_societe
--ignore-table=$base.llx_ecommerce_socpeople
--ignore-table=$base.llx_element_rang
--ignore-table=$base.llx_entity
--ignore-table=$base.llx_filemanager_roots
@@ -215,6 +228,8 @@ export list="
--ignore-table=$base.llx_google_maps
--ignore-table=$base.llx_milestone
--ignore-table=$base.llx_monitoring_probes
--ignore-table=$base.llx_m
--ignore-table=$base.llx_m_extrafields
--ignore-table=$base.llx_notes
--ignore-table=$base.llx_pos_cash
--ignore-table=$base.llx_pos_control_cash

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 +1,4 @@
http://www.taxrates.cc/index.html
http://www.taxrates.cc/index.html
For India: VAT=IGST/CGST=Localtax1/SGST=Localtax2: https://cleartax.in/s/what-is-sgst-cgst-igst

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,678 +0,0 @@
#!/usr/bin/env php
<?php
/* Copyright (C) 2008-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2017 Nicolas ZABOURI <info@inovea-conseil.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 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)
{
$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";
}
$i++;
}
$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,291 +0,0 @@
<?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2016 Regis Houssin <regis.houssin@capnetworks.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/>.
*/
/**
* \defgroup mymodule Module MyModule
* \brief Example of a module descriptor.
* Such a file must be copied into htdocs/mymodule/core/modules directory.
* \file htdocs/mymodule/core/modules/modMyModule.class.php
* \ingroup mymodule
* \brief Description and activation file for module MyModule
*/
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
/**
* Description and activation class for module MyModule
*/
class modMyModule extends DolibarrModules
{
/**
* Constructor. Define names, constants, directories, boxes, permissions
*
* @param DoliDB $db Database handler
*/
public function __construct($db)
{
global $langs,$conf;
$this->db = $db;
// Id for module (must be unique).
// Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id).
$this->numero = 500000; // TODO Go on page http://wiki.dolibarr.org/index.php/List_of_modules_id to reserve id number for your module
// Key text used to identify module (for permissions, menus, etc...)
$this->rights_class = 'mymodule';
// Family can be 'crm','financial','hr','projects','products','ecm','technic','interface','other'
// It is used to group modules by family in module setup page
$this->family = "other";
// Module position in the family
$this->module_position = 500;
// Gives the possibility to the module, to provide his own family info and position of this family (Overwrite $this->family and $this->module_position. Avoid this)
//$this->familyinfo = array('myownfamily' => array('position' => '001', 'label' => $langs->trans("MyOwnFamily")));
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
// Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module)
$this->description = "Description of module MyModule";
$this->descriptionlong = "A very long description. Can be a full HTML content";
$this->editor_name = 'Editor name';
$this->editor_url = 'https://www.dolibarr.org';
// Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'
$this->version = '1.0';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Name of image file used for this module.
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
// If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module'
$this->picto='generic';
// Defined all module parts (triggers, login, substitutions, menus, css, etc...)
// for default path (eg: /mymodule/core/xxxxx) (0=disable, 1=enable)
// for specific path of parts (eg: /mymodule/core/modules/barcode)
// for specific css file (eg: /mymodule/css/mymodule.css.php)
//$this->module_parts = array(
// 'triggers' => 0, // Set this to 1 if module has its own trigger directory (core/triggers)
// 'login' => 0, // Set this to 1 if module has its own login method directory (core/login)
// 'substitutions' => 0, // Set this to 1 if module has its own substitution function file (core/substitutions)
// 'menus' => 0, // Set this to 1 if module has its own menus handler directory (core/menus)
// 'theme' => 0, // Set this to 1 if module has its own theme directory (theme)
// 'tpl' => 0, // Set this to 1 if module overwrite template dir (core/tpl)
// 'barcode' => 0, // Set this to 1 if module has its own barcode directory (core/modules/barcode)
// 'models' => 0, // Set this to 1 if module has its own models directory (core/modules/xxx)
// 'css' => array('/mymodule/css/mymodule.css.php'), // Set this to relative path of css file if module has its own css file
// 'js' => array('/mymodule/js/mymodule.js'), // Set this to relative path of js file if module must load a js on all pages
// 'hooks' => array('hookcontext1','hookcontext2',...) // Set here all hooks context managed by module. You can also set hook context 'all'
// 'dir' => array('output' => 'othermodulename'), // To force the default directories names
// 'workflow' => array('WORKFLOW_MODULE1_YOURACTIONTYPE_MODULE2'=>array('enabled'=>'! empty($conf->module1->enabled) && ! empty($conf->module2->enabled)', 'picto'=>'yourpicto@mymodule')) // Set here all workflow context managed by module
// );
$this->module_parts = array();
// Data directories to create when module is enabled.
// Example: this->dirs = array("/mymodule/temp");
$this->dirs = array();
// Config pages. Put here list of php page, stored into mymodule/admin directory, to use to setup module.
$this->config_page_url = array("mysetuppage.php@mymodule");
// Dependencies
$this->hidden = false; // A condition to hide module
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5,0); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(3,0); // Minimum version of Dolibarr required by module
$this->langfiles = array("mylangfile@mymodule");
// Constants
// List of particular constants to add when module is enabled (key, 'chaine', value, desc, visible, 'current' or 'allentities', deleteonunactive)
// Example: $this->const=array(0=>array('MYMODULE_MYNEWCONST1','chaine','myvalue','This is a constant to add',1),
// 1=>array('MYMODULE_MYNEWCONST2','chaine','myvalue','This is another constant to add',0, 'current', 1)
// );
$this->const = array();
// Array to add new pages in new tabs
// Example: $this->tabs = array('objecttype:+tabname1:Title1:mylangfile@mymodule:$user->rights->mymodule->read:/mymodule/mynewtab1.php?id=__ID__', // To add a new tab identified by code tabname1
// 'objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@mymodule:$user->rights->othermodule->read:/mymodule/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2. Label will be result of calling all substitution functions on 'Title2' key.
// 'objecttype:-tabname:NU:conditiontoremove'); // To remove an existing tab identified by code tabname
// where objecttype can be
// 'categories_x' to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member)
// 'contact' to add a tab in contact view
// 'contract' to add a tab in contract view
// 'group' to add a tab in group view
// 'intervention' to add a tab in intervention view
// 'invoice' to add a tab in customer invoice view
// 'invoice_supplier' to add a tab in supplier invoice view
// 'member' to add a tab in fundation member view
// 'opensurveypoll' to add a tab in opensurvey poll view
// 'order' to add a tab in customer order view
// 'order_supplier' to add a tab in supplier order view
// 'payment' to add a tab in payment view
// 'payment_supplier' to add a tab in supplier payment view
// 'product' to add a tab in product view
// 'propal' to add a tab in propal view
// 'project' to add a tab in project view
// 'stock' to add a tab in stock view
// 'thirdparty' to add a tab in third party view
// 'user' to add a tab in user view
$this->tabs = array();
if (! isset($conf->mymodule) || ! isset($conf->mymodule->enabled))
{
$conf->mymodule=new stdClass();
$conf->mymodule->enabled=0;
}
// Dictionaries
$this->dictionaries=array();
/* Example:
$this->dictionaries=array(
'langs'=>'mylangfile@mymodule',
'tabname'=>array(MAIN_DB_PREFIX."table1",MAIN_DB_PREFIX."table2",MAIN_DB_PREFIX."table3"), // List of tables we want to see into dictonnary editor
'tablib'=>array("Table1","Table2","Table3"), // Label of tables
'tabsql'=>array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table1 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table2 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table3 as f'), // Request to select fields
'tabsqlsort'=>array("label ASC","label ASC","label ASC"), // Sort order
'tabfield'=>array("code,label","code,label","code,label"), // List of fields (result of select to show dictionary)
'tabfieldvalue'=>array("code,label","code,label","code,label"), // List of fields (list of fields to edit a record)
'tabfieldinsert'=>array("code,label","code,label","code,label"), // List of fields (list of fields for insert)
'tabrowid'=>array("rowid","rowid","rowid"), // Name of columns with primary key (try to always name it 'rowid')
'tabcond'=>array($conf->mymodule->enabled,$conf->mymodule->enabled,$conf->mymodule->enabled) // Condition to show each dictionary
);
*/
// Boxes
// Add here list of php file(s) stored in core/boxes that contains class to show a box.
$this->boxes = array(); // List of boxes
// Example:
//$this->boxes=array(
// 0=>array('file'=>'myboxa.php@mymodule','note'=>'','enabledbydefaulton'=>'Home'),
// 1=>array('file'=>'myboxb.php@mymodule','note'=>''),
// 2=>array('file'=>'myboxc.php@mymodule','note'=>'')
//);
// Cronjobs
$this->cronjobs = array(); // List of cron jobs entries to add
// Example: $this->cronjobs=array(0=>array('label'=>'My label', 'jobtype'=>'method', 'class'=>'/dir/class/file.class.php', 'objectname'=>'MyClass', 'method'=>'myMethod', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>2, 'unitfrequency'=>3600, 'test'=>true),
// 1=>array('label'=>'My label', 'jobtype'=>'command', 'command'=>'', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>1, 'unitfrequency'=>3600*24, 'test'=>true)
// );
// Permissions
$this->rights = array(); // Permission array used by this module
$r=0;
// Add here list of permission defined by an id, a label, a boolean and two constant strings.
// Example:
// $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used)
// $this->rights[$r][1] = 'Permision label'; // Permission label
// $this->rights[$r][3] = 1; // Permission by default for new user (0/1)
// $this->rights[$r][4] = 'level1'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
// $this->rights[$r][5] = 'level2'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
// $r++;
// Main menu entries
$this->menu = array(); // List of menus to add
$r=0;
// Add here entries to declare new menus
//
// Example to declare a new Top Menu entry and its Left menu entry:
// $this->menu[$r]=array( 'fk_menu'=>'', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
// 'type'=>'top', // This is a Top menu entry
// 'titre'=>'MyModule top menu',
// 'mainmenu'=>'mymodule',
// 'leftmenu'=>'mymodule',
// 'url'=>'/mymodule/pagetop.php',
// 'langs'=>'mylangfile@mymodule', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
// 'position'=>100,
// 'enabled'=>'$conf->mymodule->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.
// 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
// 'target'=>'',
// 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
// $r++;
//
// Example to declare a Left Menu entry into an existing Top menu entry:
// $this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=xxx', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
// 'type'=>'left', // This is a Left menu entry
// 'titre'=>'MyModule left menu',
// 'mainmenu'=>'xxx',
// 'leftmenu'=>'mymodule',
// 'url'=>'/mymodule/pagelevel2.php',
// 'langs'=>'mylangfile@mymodule', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
// 'position'=>100,
// 'enabled'=>'$conf->mymodule->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
// 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
// 'target'=>'',
// 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
// $r++;
// Exports
$r=1;
// Example:
// $this->export_code[$r]=$this->rights_class.'_'.$r;
// $this->export_label[$r]='MyModule'; // Translation key (used only if key ExportDataset_xxx_z not found)
// $this->export_enabled[$r]='1'; // Condition to show export in list (ie: '$user->id==3'). Set to 1 to always show when module is enabled.
// $this->export_icon[$r]='generic:MyModule'; // Put here code of icon then string for translation key of module name
// $this->export_permission[$r]=array(array("mymodule","level1","level2"));
// $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef');
// $this->export_TypeFields_array[$r]=array('t.date'=>'Date', 't.qte'=>'Numeric', 't.poids'=>'Numeric', 't.fad'=>'Numeric', 't.paq'=>'Numeric', 't.stockage'=>'Numeric', 't.fadparliv'=>'Numeric', 't.livau100'=>'Numeric', 't.forfait'=>'Numeric', 's.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.subprice'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.special_code'=>'Numeric','fd.product_type'=>"Numeric",'fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text','p.accountancy_code_sell'=>'Text');
// $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product');
// $this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
// $this->export_sql_start[$r]='SELECT DISTINCT ';
// $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'facture as f, '.MAIN_DB_PREFIX.'facturedet as fd, '.MAIN_DB_PREFIX.'societe as s)';
// $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)';
// $this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_facture';
// $this->export_sql_order[$r] .=' ORDER BY s.nom';
// $r++;
}
/**
* Function called when module is enabled.
* The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
* It also creates data directories
*
* @param string $options Options when enabling module ('', 'noboxes')
* @return int 1 if OK, 0 if KO
*/
public function init($options='')
{
$sql = array();
//$this->_load_tables('/mymodule/sql/');
return $this->_init($sql, $options);
}
/**
* Function called when module is disabled.
* Remove from database constants, boxes and permissions from Dolibarr database.
* Data directories are not deleted
*
* @param string $options Options when enabling module ('', 'noboxes')
* @return int 1 if OK, 0 if KO
*/
public function remove($options = '')
{
$sql = array();
return $this->_remove($sql, $options);
}
}

View File

@@ -1,349 +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);
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,567 +0,0 @@
<?php
/* Copyright (C) 2007-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2014-2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2016 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2017 Nicolas ZABOURI <info@inovea-conseil.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 dev/skeletons/skeleton_list.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
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php');
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
dol_include_once('/mymodule/class/skeleton_class.class.php');
// Load traductions files requiredby by page
$langs->load("mymodule");
$langs->load("other");
$action=GETPOST('action','alpha');
$massaction=GETPOST('massaction','alpha');
$show_files=GETPOST('show_files','int');
$confirm=GETPOST('confirm','alpha');
$toselect = GETPOST('toselect', 'array');
$id = GETPOST('id','int');
$backtopage = GETPOST('backtopage');
$myparam = GETPOST('myparam','alpha');
$search_all=trim(GETPOST("sall"));
$search_field1=GETPOST("search_field1");
$search_field2=GETPOST("search_field2");
$search_myfield=GETPOST('search_myfield');
$optioncss = GETPOST('optioncss','alpha');
// Load variable for pagination
$limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit;
$sortfield = GETPOST('sortfield','alpha');
$sortorder = GETPOST('sortorder','alpha');
$page = GETPOST('page','int');
if ($page == -1) { $page = 0; }
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (! $sortfield) $sortfield="t.rowid"; // Set here default search field
if (! $sortorder) $sortorder="ASC";
// Protection if external user
$socid=0;
if ($user->societe_id > 0)
{
$socid = $user->societe_id;
//accessforbidden();
}
// Initialize technical object to manage context to save list fields
$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'mymodulelist';
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array
$hookmanager->initHooks(array('mymodulelist'));
$extrafields = new ExtraFields($db);
// fetch optionals attributes and labels
$extralabels = $extrafields->fetch_name_optionals_label('mymodule');
$search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_');
// List of fields to search into when doing a "search in all"
$fieldstosearchall = array(
't.ref'=>'Ref',
't.note_public'=>'NotePublic',
);
if (empty($user->socid)) $fieldstosearchall["t.note_private"]="NotePrivate";
// Definition of fields for list
$arrayfields=array(
't.field1'=>array('label'=>$langs->trans("Field1"), 'checked'=>1),
't.field2'=>array('label'=>$langs->trans("Field2"), 'checked'=>1),
//'t.entity'=>array('label'=>$langs->trans("Entity"), 'checked'=>1, 'enabled'=>(! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode))),
't.datec'=>array('label'=>$langs->trans("DateCreationShort"), 'checked'=>0, 'position'=>500),
't.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
//'t.statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000),
);
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key => $val)
{
$arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>$extrafields->attribute_list[$key], 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>$extrafields->attribute_perms[$key]);
}
}
// Load object if id or ref is provided as parameter
$object=new Skeleton_Class($db);
if (($id > 0 || ! empty($ref)) && $action != 'add')
{
$result=$object->fetch($id,$ref);
if ($result < 0) dol_print_error($db);
}
/*******************************************************************
* ACTIONS
*
* Put here all code to do according to value of "action" parameter
********************************************************************/
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
$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))
{
// Selection of new fields
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
// 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_field1='';
$search_field2='';
$search_date_creation='';
$search_date_update='';
$toselect='';
$search_array_options=array();
}
// Mass actions
$objectclass='Skeleton';
$objectlabel='Skeleton';
$permtoread = $user->rights->skeleton->read;
$permtodelete = $user->rights->skeleton->delete;
$uploaddir = $conf->skeleton->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
/***************************************************
* VIEW
*
* Put here all code to build page
****************************************************/
$now=dol_now();
$form=new Form($db);
//$help_url="EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_Pedidos_de_clientes";
$help_url='';
$title = $langs->trans('MyModuleListTitle');
// 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>';
$sql = "SELECT";
$sql.= " t.rowid,";
$sql.= " t.field1,";
$sql.= " t.field2";
// Add fields from extrafields
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
// Add fields from hooks
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
$sql.=$hookmanager->resPrint;
$sql.= " FROM ".MAIN_DB_PREFIX."mytable as t";
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."mytable_extrafields as ef on (t.rowid = ef.fk_object)";
$sql.= " WHERE 1 = 1";
//$sql.= " WHERE u.entity IN (".getEntity('mytable',1).")";
if ($search_field1) $sql.= natural_search("field1",$search_field1);
if ($search_field2) $sql.= natural_search("field2",$search_field2);
if ($sall) $sql.= natural_search(array_keys($fieldstosearchall), $sall);
// Add where from extra fields
foreach ($search_array_options as $key => $val)
{
$crit=$val;
$tmpkey=preg_replace('/search_options_/','',$key);
$typ=$extrafields->attribute_type[$tmpkey];
$mode=0;
if (in_array($typ, array('int','double'))) $mode=1; // Search on a numeric
if ($val && ( ($crit != '' && ! in_array($typ, array('select'))) || ! empty($crit)))
{
$sql .= natural_search('ef.'.$tmpkey, $crit, $mode);
}
}
// Add where from hooks
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook
$sql.=$hookmanager->resPrint;
$sql.=$db->order($sortfield,$sortorder);
//$sql.= $db->plimit($conf->liste_limit+1, $offset);
// Count total nb of records
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);
$nbtotalofrecords = $db->num_rows($result);
}
$sql.= $db->plimit($limit+1, $offset);
dol_syslog($script_file, LOG_DEBUG);
$resql=$db->query($sql);
if (! $resql)
{
dol_print_error($db);
exit;
}
$num = $db->num_rows($resql);
// Direct jump if only one record found
if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all)
{
$obj = $db->fetch_object($resql);
$id = $obj->rowid;
header("Location: ".DOL_URL_ROOT.'/skeleton/card.php?id='.$id);
exit;
}
llxHeader('', $title, $help_url);
$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;
if ($search_field1 != '') $param.= '&amp;search_field1='.urlencode($search_field1);
if ($search_field2 != '') $param.= '&amp;search_field2='.urlencode($search_field2);
if ($optioncss != '') $param.='&optioncss='.$optioncss;
// Add $param from extra fields
foreach ($search_array_options as $key => $val)
{
$crit=$val;
$tmpkey=preg_replace('/search_options_/','',$key);
if ($val != '') $param.='&search_options_'.$tmpkey.'='.urlencode($val);
}
$arrayofmassactions = array(
'presend'=>$langs->trans("SendByMail"),
'builddoc'=>$langs->trans("PDFMerge"),
);
if ($user->rights->mymodule->supprimer) $arrayofmassactions['delete']=$langs->trans("Delete");
if ($massaction == 'presend') $arrayofmassactions=array();
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
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="contextpage" value="'.$contextpage.'">';
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies', 0, '', '', $limit);
if ($sall)
{
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall);
}
$moreforfilter = '';
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_myfield" value="'.dol_escape_htmltag($search_myfield).'">';
$moreforfilter.= '</div>';
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint;
else $moreforfilter = $hookmanager->resPrint;
if (! empty($moreforfilter))
{
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print $moreforfilter;
print '</div>';
}
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
// Fields title
print '<tr class="liste_titre">';
// LIST_OF_TD_TITLE_FIELDS
//if (! empty($arrayfields['t.field1']['checked'])) print_liste_field_titre($arrayfields['t.field1']['label'],$_SERVER['PHP_SELF'],'t.field1','',$param,'',$sortfield,$sortorder);
//if (! empty($arrayfields['t.field2']['checked'])) print_liste_field_titre($arrayfields['t.field2']['label'],$_SERVER['PHP_SELF'],'t.field2','',$param,'',$sortfield,$sortorder);
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key => $val)
{
if (! empty($arrayfields["ef.".$key]['checked']))
{
$align=$extrafields->getAlignFlag($key);
print_liste_field_titre($extralabels[$key],$_SERVER["PHP_SELF"],"ef.".$key,"",$param,($align?'align="'.$align.'"':''),$sortfield,$sortorder);
}
}
}
// Hook fields
$parameters=array('arrayfields'=>$arrayfields);
$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (! empty($arrayfields['t.datec']['checked'])) print_liste_field_titre($arrayfields['t.datec']['label'],$_SERVER["PHP_SELF"],"t.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
if (! empty($arrayfields['t.tms']['checked'])) print_liste_field_titre($arrayfields['t.tms']['label'],$_SERVER["PHP_SELF"],"t.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
//if (! empty($arrayfields['t.status']['checked'])) print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"t.status","",$param,'align="center"',$sortfield,$sortorder);
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch ');
print '</tr>'."\n";
// Fields title search
print '<tr class="liste_titre">';
// LIST_OF_TD_TITLE_SEARCH
//if (! empty($arrayfields['t.field1']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" name="search_field1" value="'.$search_field1.'" size="10"></td>';
//if (! empty($arrayfields['t.field2']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" name="search_field2" value="'.$search_field2.'" size="10"></td>';
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key => $val)
{
if (! empty($arrayfields["ef.".$key]['checked']))
{
$align=$extrafields->getAlignFlag($key);
$typeofextrafield=$extrafields->attribute_type[$key];
print '<td class="liste_titre'.($align?' '.$align:'').'">';
if (in_array($typeofextrafield, array('varchar', 'int', 'double', 'select')))
{
$crit=$val;
$tmpkey=preg_replace('/search_options_/','',$key);
$searchclass='';
if (in_array($typeofextrafield, array('varchar', 'select'))) $searchclass='searchstring';
if (in_array($typeofextrafield, array('int', 'double'))) $searchclass='searchnum';
print '<input class="flat'.($searchclass?' '.$searchclass:'').'" size="4" type="text" name="search_options_'.$tmpkey.'" value="'.dol_escape_htmltag($search_array_options['search_options_'.$tmpkey]).'">';
}
print '</td>';
}
}
}
// Fields from hook
$parameters=array('arrayfields'=>$arrayfields);
$reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (! empty($arrayfields['t.datec']['checked']))
{
// Date creation
print '<td class="liste_titre">';
print '</td>';
}
if (! empty($arrayfields['t.tms']['checked']))
{
// Date modification
print '<td class="liste_titre">';
print '</td>';
}
/*if (! empty($arrayfields['u.statut']['checked']))
{
// Status
print '<td class="liste_titre" align="center">';
print $form->selectarray('search_statut', array('-1'=>'','0'=>$langs->trans('Disabled'),'1'=>$langs->trans('Enabled')),$search_statut);
print '</td>';
}*/
// Action column
print '<td class="liste_titre" align="right">';
$searchpitco=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
print $searchpitco;
print '</td>';
print '</tr>'."\n";
$i=0;
$var=true;
$totalarray=array();
while ($i < min($num, $limit))
{
$obj = $db->fetch_object($resql);
if ($obj)
{
$var = !$var;
// Show here line of result
print '<tr '.$bc[$var].'>';
// LIST_OF_TD_FIELDS_LIST
foreach ($arrayfields as $key => $value) {
if (!empty($arrayfields[$key]['checked'])) {
$key2 = str_replace('t.', '', $key);
print '<td>' . $obj->$key2 . '</td>';
if (!$i)
$totalarray['nbfield'] ++;
}
}
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key => $val)
{
if (! empty($arrayfields["ef.".$key]['checked']))
{
print '<td';
$align=$extrafields->getAlignFlag($key);
if ($align) print ' align="'.$align.'"';
print '>';
$tmpkey='options_'.$key;
print $extrafields->showOutputField($key, $obj->$tmpkey, '', 1);
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
}
}
// Fields from hook
$parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj);
$reshook=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Date creation
if (! empty($arrayfields['t.datec']['checked']))
{
print '<td align="center">';
print dol_print_date($db->jdate($obj->date_creation), 'dayhour');
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
// Date modification
if (! empty($arrayfields['t.tms']['checked']))
{
print '<td align="center">';
print dol_print_date($db->jdate($obj->date_update), 'dayhour');
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
// Status
/*
if (! empty($arrayfields['u.statut']['checked']))
{
$userstatic->statut=$obj->statut;
print '<td align="center">'.$userstatic->getLibStatut(3).'</td>';
}*/
// Action column
print '<td class="nowrap" align="center">';
if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
{
$selected=0;
if (in_array($obj->rowid, $arrayofselected)) $selected=1;
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected?' checked="checked"':'').'>';
}
print '</td>';
if (! $i) $totalarray['nbfield']++;
print '</tr>';
}
$i++;
}
// Show total line
if (isset($totalarray['totalhtfield']))
{
print '<tr class="liste_total">';
$i=0;
while ($i < $totalarray['nbfield'])
{
$i++;
if ($i == 1)
{
if ($num < $limit && empty($offset)) print '<td align="left">'.$langs->trans("Total").'</td>';
else print '<td align="left">'.$langs->trans("Totalforthispage").'</td>';
}
elseif ($totalarray['totalhtfield'] == $i) print '<td align="right">'.price($totalarray['totalht']).'</td>';
elseif ($totalarray['totalvatfield'] == $i) print '<td align="right">'.price($totalarray['totalvat']).'</td>';
elseif ($totalarray['totalttcfield'] == $i) print '<td align="right">'.price($totalarray['totalttc']).'</td>';
else print '<td></td>';
}
print '</tr>';
}
$db->free($resql);
$parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql);
$reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</table>'."\n";
print '</div>'."\n";
print '</form>'."\n";
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files)
{
// Show list of available documents
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
$urlsource.=str_replace('&amp;','&',$param);
$filedir=$diroutputmassaction;
$genallowed=$user->rights->facture->lire;
$delallowed=$user->rights->facture->lire;
print $formfile->showdocuments('massfilesarea_mymodule','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
}
else
{
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
}
// 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

@@ -1,23 +0,0 @@
#!/bin/bash
# vim:ft=sh:ts=3:sts=3:sw=3:et:
###
# Strips the closing php tag `?>` and any following blank lines from the
# end of any PHP file in the current working directory and sub-directories. Files
# with non-whitespace characters following the closing tag will not be affected.
#
# Author: Bryan C. Geraghty <bryan@ravensight.org>
# Date: 2009-10-28
# Source: http://bryan.ravensight.org/2010/07/remove-php-closing-tag/
##
FILES=$(pcregrep -rnM --include='^.*\.php$' '^\?\>(?=([\s\n]+)?$(?!\n))' .);
for MATCH in $FILES;
do
FILE=`echo $MATCH | awk -F ':' '{print $1}'`;
TARGET=`echo $MATCH | awk -F ':' '{print $2}'`;
LINE_COUNT=`wc -l $FILE | awk -F " " '{print $1}'`;
echo "Removing lines ${TARGET} through ${LINE_COUNT} from file $FILE...";
sed -i "${TARGET},${LINE_COUNT}d" $FILE;
done;

View File

@@ -0,0 +1,17 @@
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
Subledger account Subledger account ??
Proposal ?? Quotation Proposal is ok but proposition looks better (proposal is for a detailed proposition). We can say also "business proposition or business proposal".
Indian are using "Quotation".

View File

@@ -25,7 +25,7 @@ $path=dirname(__FILE__).'/';
$web=0;
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi')
if (substr($sapi_type, 0, 3) == 'cgi')
{
$web=1;
}
@@ -35,9 +35,9 @@ if ($web)
{
echo "<html>";
echo "<head>";
echo "<STYLE type=\"text/css\">
table {
background: #f5f5f5;
border-collapse: separate;
@@ -48,7 +48,7 @@ if ($web)
text-align: left;
width: 800px;
}
th {
background-color: #777;
border-left: 1px solid #555;
@@ -61,7 +61,7 @@ if ($web)
position: relative;
text-shadow: 0 1px 0 #000;
}
td {
border-right: 1px solid #fff;
border-left: 1px solid #e8e8e8;
@@ -70,19 +70,19 @@ if ($web)
padding: 10px 15px;
position: relative;
}
tr {
background-color: #f1f1f1;
}
tr:nth-child(odd) td {
background-color: #f1f1f1;
}
</STYLE>";
echo "<body>";
}
@@ -142,9 +142,9 @@ foreach ($files AS $file) {
}
}
foreach ($langstrings_3d AS $filename => $file)
foreach ($langstrings_3d AS $filename => $file)
{
foreach ($file AS $linenum => $value)
foreach ($file AS $linenum => $value)
{
$keys = array_keys($langstrings_full, $value);
if (count($keys)>1)
@@ -173,11 +173,11 @@ $sininstallandadmin='';
$sother='';
$count = 0;
foreach ($dups as $string => $pages)
foreach ($dups as $string => $pages)
{
$count++;
$s='';
// Keyword $string
if ($web) $s.="<tr>";
if ($web) $s.="<td align=\"center\">";
@@ -188,32 +188,32 @@ foreach ($dups as $string => $pages)
if ($web) $s.="</td>";
if ($web) $s.="<td>";
if (! $web) $s.= ' : ';
// Loop on each files keyword was found
$duplicateinsamefile=0;
$inmain=0;
$inadmin=0;
foreach ($pages AS $file => $lines)
foreach ($pages AS $file => $lines)
{
if ($file == 'main.lang') { $inmain=1; $inadmin=0; }
if ($file == 'admin.lang' && ! $inmain) { $inadmin=1; }
$s.=$file." ";
// Loop on each line keword was found into file.
$listoffilesforthisentry=array();
foreach ($lines as $line => $translatedvalue)
foreach ($lines as $line => $translatedvalue)
{
if (! empty($listoffilesforthisentry[$file])) $duplicateinsamefile=1;
$listoffilesforthisentry[$file]=1;
$s.= "(".$line." - ".htmlentities($translatedvalue).") ";
}
if ($web) $s.="<br>";
}
if ($web) $s.="</td></tr>";
$s.="\n";
if ($duplicateinsamefile) $sduplicateinsamefile .= $s;
else if ($inmain) $sinmainandother .= $s;
else if ($inadmin) $sininstallandadmin .= $s;
@@ -252,7 +252,7 @@ if ($web)
if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($argv[1]) && $argv[1]=='unused=true'))
{
print "***** Strings in en_US that are never used:\n";
$unused=array();
foreach ($langstrings_dist AS $value => $line)
{
@@ -288,7 +288,7 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
if (preg_match('/^JuridicalStatus/', $value)) $qualifiedforclean=0;
if (preg_match('/^CalcMode/', $value)) $qualifiedforclean=0;
if (preg_match('/^newLT/', $value)) $qualifiedforclean=0;
if (preg_match('/^LT\d/', $value)) $qualifiedforclean=0;
if (preg_match('/^LT[0-9]/', $value)) $qualifiedforclean=0;
if (preg_match('/^TypeContact_contrat_/', $value)) $qualifiedforclean=0;
if (preg_match('/^ErrorPriceExpression/', $value)) $qualifiedforclean=0;
if (preg_match('/^Language_/', $value)) $qualifiedforclean=0;
@@ -310,10 +310,12 @@ 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;
// other.lang
// other.lang
if (preg_match('/^Notify_/', $value)) $qualifiedforclean=0;
if (preg_match('/^PredefinedMail/', $value)) $qualifiedforclean=0;
if (preg_match('/^DemoCompany/', $value)) $qualifiedforclean=0;
@@ -334,17 +336,17 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
if (preg_match('/OppStatus/', $value)) $qualifiedforclean=0;
if (preg_match('/AvailabilityType/', $value)) $qualifiedforclean=0;
if (preg_match('/CardProduct/', $value)) $qualifiedforclean=0;
if (preg_match('/sms/i', $value)) $qualifiedforclean=0;
if (preg_match('/TF_/i', $value)) $qualifiedforclean=0;
if (preg_match('/WithBankUsing/i', $value)) $qualifiedforclean=0;
if (preg_match('/descWORKFLOW_/i', $value)) $qualifiedforclean=0;
if (! $qualifiedforclean)
{
continue;
continue;
}
//$search = '\'trans("'.$value.'")\'';
$search = '-e "\''.$value.'\'" -e \'"'.$value.'"\' -e "('.$value.')" -e "('.$value.',"';
$string = 'grep -R -m 1 -F --exclude=includes/* --include=*.php '.$search.' '.$htdocs.'* '.$scripts.'*';
@@ -354,7 +356,7 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
$unused[$value] = $line;
echo $line; // $trad contains the \n
}
else
else
{
unset($output);
//print 'X'.$output.'Y';
@@ -362,7 +364,7 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
}
if (empty($unused)) print "No string not used found.\n";
else
else
{
$filetosave='/tmp/'.($argv[2]?$argv[2]:"").'notused.lang';
print "Strings in en_US that are never used are saved into file ".$filetosave.":\n";

View File

@@ -303,6 +303,8 @@ foreach($filesToProcess as $fileToProcess)
// ----- Process output now -----
//print "Found primary key = ".$key."\n";
// Key not in other file
if (in_array($key, $arrayofkeytoalwayskeep) || preg_match('/^FormatDate/',$key) || preg_match('/^FormatHour/',$key))
{
@@ -321,7 +323,7 @@ foreach($filesToProcess as $fileToProcess)
|| in_array($key, $arrayofkeytoalwayskeep) || preg_match('/^FormatDate/',$key) || preg_match('/^FormatHour/',$key)
)
{
//print "Key $key differs so we add it into new secondary language (line: $cnt).\n";
//print "Key $key differs (aSecondary=".$aSecondary[$key].", aPrimary=".$aPrimary[$key].", aEnglish=".$aEnglish[$key].") so we add it into new secondary language (line: $cnt).\n";
fwrite($oh, $key."=".(empty($aSecondary[$key])?$aPrimary[$key]:$aSecondary[$key])."\n");
}
}

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

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
@@ -88,13 +97,14 @@ if (empty($reshook))
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") ||GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') ||GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers
{
$search_account = "";
$search_label = "";
$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

@@ -8,7 +8,7 @@
* Copyright (C) 2011 Remy Younes <ryounes@gmail.com>
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@ltairis.fr>
* Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
*
@@ -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");
@@ -54,6 +54,7 @@ $action=GETPOST('action','alpha')?GETPOST('action','alpha'):'view';
$confirm=GETPOST('confirm','alpha');
$id=GETPOST('id','int');
$rowid=GETPOST('rowid','alpha');
$code=GETPOST('code','alpha');
$acts[0] = "activate";
$acts[1] = "disable";
@@ -67,7 +68,7 @@ $active = 1;
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
if ($page == -1) { $page = 0 ; }
if ($page == -1 || $page == null) { $page = 0 ; }
$offset = $listlimit * $page ;
$pageprev = $page - 1;
$pagenext = $page + 1;
@@ -80,7 +81,7 @@ if ($user->societe_id > 0) accessforbidden();
if (! $user->rights->accounting->chartofaccount) accessforbidden();
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('admin'));
// This page is a generic page to edit dictionaries
@@ -217,21 +218,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"),
);
}
/*
@@ -240,7 +226,7 @@ if ($id == 10)
if (GETPOST('button_removefilter') || GETPOST('button_removefilter.x') || GETPOST('button_removefilter_x'))
{
$search_country_id = '';
$search_country_id = '';
}
// Actions add or modify an entry into a dictionary
@@ -474,8 +460,8 @@ if ($action == $acts[0])
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"]."'";
elseif ($code) {
$sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code='".$code."'";
}
$result = $db->query($sql);
@@ -494,8 +480,8 @@ if ($action == $acts[1])
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"]."'";
elseif ($code) {
$sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code='".$code."'";
}
$result = $db->query($sql);
@@ -514,8 +500,8 @@ if ($action == 'activate_favorite')
if ($rowid) {
$sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE ".$rowidcol."='".$rowid."'";
}
elseif ($_GET["code"]) {
$sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE code='".$_GET["code"]."'";
elseif ($code) {
$sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE code='".$code."'";
}
$result = $db->query($sql);
@@ -534,8 +520,8 @@ if ($action == 'disable_favorite')
if ($rowid) {
$sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE ".$rowidcol."='".$rowid."'";
}
elseif ($_GET["code"]) {
$sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE code='".$_GET["code"]."'";
elseif ($code) {
$sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE code='".$code."'";
}
$result = $db->query($sql);
@@ -571,7 +557,7 @@ 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);
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$code.'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1);
}
//var_dump($elementList);
@@ -589,7 +575,7 @@ if ($id)
else $sql.=" WHERE ";
$sql.= " c.rowid = ".$search_country_id;
}
if ($sortfield)
{
// If sort order is "country", we use country_code instead
@@ -615,7 +601,7 @@ if ($id)
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="noborder" width="100%">';
// Form to add a new line
@@ -736,11 +722,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 +743,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>';
}
@@ -789,7 +774,7 @@ if ($id)
$paramwithsearch = $param;
if ($sortorder) $paramwithsearch.= '&sortorder='.$sortorder;
if ($sortfield) $paramwithsearch.= '&sortfield='.$sortfield;
// There is several pages
if ($num > $listlimit)
{
@@ -881,9 +866,9 @@ if ($id)
foreach ($fieldlist as $field => $value)
{
$showfield=1; // By defaut
if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $showfield=0; }
if ($showfield)
{
if ($value == 'country')
@@ -901,21 +886,19 @@ 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>';
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)))
{
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
@@ -928,7 +911,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>';
@@ -945,7 +928,7 @@ if ($id)
{
foreach ($fieldlist as $field => $value)
{
$showfield=1;
$align="left";
$valuetoshow=$obj->{$fieldlist[$field]};
@@ -1078,21 +1061,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";
@@ -1180,7 +1148,6 @@ else
* Show list of dictionary to show
*/
$var=true;
$lastlineisempty=false;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
@@ -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@zendsi.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))
if (empty($user->rights->accounting->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";
@@ -106,20 +104,21 @@ $formaccounting->select_accounting_category($cat_id, 'account_category', 1, 0, 0
print '<input class="button" type="submit" value="' . $langs->trans("Select") . '">';
print '</td></tr>';
if (! empty($cat_id))
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 ++;
}
}
}
@@ -165,4 +164,4 @@ if ($action == 'display' || $action == 'delete') {
llxFooter();
$db->close();
$db->close();

View File

@@ -8,7 +8,7 @@
* Copyright (C) 2011 Remy Younes <ryounes@gmail.com>
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@ltairis.fr>
* Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
*
@@ -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");
@@ -54,9 +54,10 @@ $action=GETPOST('action','alpha')?GETPOST('action','alpha'):'view';
$confirm=GETPOST('confirm','alpha');
$id=GETPOST('id','int');
$rowid=GETPOST('rowid','alpha');
$code=GETPOST('code','alpha');
// Security access
if (! empty($user->rights->accountancy->chartofaccount))
if (empty($user->rights->accounting->chartofaccount))
{
accessforbidden();
}
@@ -73,14 +74,14 @@ $active = 1;
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
if ($page == -1) { $page = 0 ; }
if ($page == -1 || $page == null) { $page = 0 ; }
$offset = $listlimit * $page ;
$pageprev = $page - 1;
$pagenext = $page + 1;
$search_country_id = GETPOST('search_country_id','int');
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('admin'));
// This page is a generic page to edit dictionaries
@@ -151,7 +152,7 @@ $sourceList=array();
if (GETPOST('button_removefilter') || GETPOST('button_removefilter.x') || GETPOST('button_removefilter_x'))
{
$search_country_id = '';
$search_country_id = '';
}
// Actions add or modify an entry into a dictionary
@@ -168,9 +169,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 +181,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 +210,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 +222,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
@@ -385,8 +371,8 @@ if ($action == $acts[0])
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"]."'";
elseif ($code) {
$sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code='".$code."'";
}
$result = $db->query($sql);
@@ -405,8 +391,8 @@ if ($action == $acts[1])
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"]."'";
elseif ($code) {
$sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code='".$code."'";
}
$result = $db->query($sql);
@@ -425,8 +411,8 @@ if ($action == 'activate_favorite')
if ($rowid) {
$sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE ".$rowidcol."='".$rowid."'";
}
elseif ($_GET["code"]) {
$sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE code='".$_GET["code"]."'";
elseif ($code) {
$sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE code='".$code."'";
}
$result = $db->query($sql);
@@ -445,8 +431,8 @@ if ($action == 'disable_favorite')
if ($rowid) {
$sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE ".$rowidcol."='".$rowid."'";
}
elseif ($_GET["code"]) {
$sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE code='".$_GET["code"]."'";
elseif ($code) {
$sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE code='".$code."'";
}
$result = $db->query($sql);
@@ -466,39 +452,17 @@ $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')
{
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);
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$code.'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1);
}
//var_dump($elementList);
@@ -516,7 +480,7 @@ if ($id)
else $sql.=" WHERE ";
$sql.= " c.rowid = ".$search_country_id;
}
if ($sortfield)
{
// If sort order is "country", we use country_code instead
@@ -543,7 +507,7 @@ if ($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
@@ -563,19 +527,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,50 +535,21 @@ 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]=='sens') { $valuetoshow=$langs->trans("Sens"); }
if ($fieldlist[$field]=='range_account') { $valuetoshow=$langs->trans("Range"); }
if ($fieldlist[$field]=='sens') { $valuetoshow=$langs->trans("Direction"); }
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 != '')
{
print '<td align="'.$align.'">';
@@ -639,7 +561,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 +570,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 +590,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 +600,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);
@@ -703,7 +618,7 @@ if ($id)
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)
{
@@ -712,108 +627,15 @@ 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)
{
$showfield=1; // By defaut
if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $showfield=0; }
if ($showfield)
{
if ($value == 'country')
@@ -829,27 +651,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("Direction"); }
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 +731,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").'">';
@@ -880,7 +755,7 @@ if ($id)
{
foreach ($fieldlist as $field => $value)
{
$showfield=1;
$align="left";
$valuetoshow=$obj->{$fieldlist[$field]};
@@ -910,19 +785,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 +863,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 +871,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 +888,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 +904,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 +925,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 +968,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 +978,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 +1121,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

@@ -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-2016 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
@@ -23,7 +23,7 @@
*/
/**
* \file htdocs/accountancy/admin/index.php
* \file htdocs/accountancy/admin/defaultaccounts.php
* \ingroup Advanced accountancy
* \brief Setup page to configure accounting expert module
*/
@@ -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");
@@ -42,7 +42,7 @@ $langs->load("salaries");
$langs->load("loan");
// Security check
if (! empty($user->rights->accountancy->chartofaccount))
if (empty($user->rights->accounting->chartofaccount))
{
accessforbidden();
}
@@ -50,23 +50,26 @@ if (! empty($user->rights->accountancy->chartofaccount))
$action = GETPOST('action', 'alpha');
$list_account_main = array (
'ACCOUNTING_ACCOUNT_CUSTOMER',
'ACCOUNTING_ACCOUNT_SUPPLIER',
'SALARIES_ACCOUNTING_ACCOUNT_PAYMENT',
);
$list_account = array (
'ACCOUNTING_ACCOUNT_SUPPLIER',
'ACCOUNTING_ACCOUNT_CUSTOMER',
'SALARIES_ACCOUNTING_ACCOUNT_PAYMENT',
'ACCOUNTING_PRODUCT_BUY_ACCOUNT',
'ACCOUNTING_PRODUCT_SOLD_ACCOUNT',
'ACCOUNTING_SERVICE_BUY_ACCOUNT',
'ACCOUNTING_SERVICE_SOLD_ACCOUNT',
'ACCOUNTING_VAT_BUY_ACCOUNT',
'ACCOUNTING_VAT_SOLD_ACCOUNT',
'ACCOUNTING_VAT_PAY_ACCOUNT',
'ACCOUNTING_ACCOUNT_SUSPENSE',
'ACCOUNTING_ACCOUNT_TRANSFER_CASH',
'DONATION_ACCOUNTINGACCOUNT',
'LOAN_ACCOUNTING_ACCOUNT_CAPITAL',
'LOAN_ACCOUNTING_ACCOUNT_INTEREST',
'LOAN_ACCOUNTING_ACCOUNT_INSURANCE'
'ACCOUNTING_PRODUCT_BUY_ACCOUNT',
'ACCOUNTING_PRODUCT_SOLD_ACCOUNT',
'ACCOUNTING_SERVICE_BUY_ACCOUNT',
'ACCOUNTING_SERVICE_SOLD_ACCOUNT',
'ACCOUNTING_VAT_BUY_ACCOUNT',
'ACCOUNTING_VAT_SOLD_ACCOUNT',
'ACCOUNTING_VAT_PAY_ACCOUNT',
'ACCOUNTING_ACCOUNT_SUSPENSE',
'ACCOUNTING_ACCOUNT_TRANSFER_CASH',
'DONATION_ACCOUNTINGACCOUNT',
'LOAN_ACCOUNTING_ACCOUNT_CAPITAL',
'LOAN_ACCOUNTING_ACCOUNT_INTEREST',
'LOAN_ACCOUNTING_ACCOUNT_INSURANCE'
);
@@ -93,15 +96,23 @@ if (GETPOST('change_chart'))
if ($action == 'update') {
$error = 0;
foreach ( $list_account as $constname ) {
foreach ( $list_account_main as $constname ) {
$constvalue = GETPOST($constname, 'alpha');
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
$error ++;
}
}
foreach ( $list_account as $constname ) {
$constvalue = GETPOST($constname, 'alpha');
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
$error ++;
}
}
if (! $error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
@@ -114,15 +125,14 @@ if ($action == 'update') {
* View
*/
llxHeader();
$form = new Form($db);
$formaccountancy = new FormVentilation($db);
$formaccounting = new FormAccounting($db);
llxHeader();
$linkback = '';
print load_fiche_titre($langs->trans('MenuDefaultAccounts'), $linkback, 'title_accountancy');
print '<br>';
print $langs->trans("DefaultBindingDesc").'<br>';
print '<br>';
@@ -130,20 +140,48 @@ 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">';
// Define Chart of accounts
// Define main accounts for thirdparty
print '<table class="noborder" width="100%">';
foreach ( $list_account as $key ) {
$var = ! $var;
print '<tr ' . $bc[$var] . ' class="value">';
foreach ($list_account_main as $key) {
print '<tr class="oddeven value">';
// Param
$label = $langs->trans($key);
$keydesc=$key.'_Desc';
$htmltext = $langs->trans($keydesc);
print '<td class="fieldrequired" width="50%">';
print $form->textwithpicto($label, $htmltext);
print '</td>';
// Value
print '<td>'; // Do not force align=right, or it align also the content of the select box
print $formaccounting->select_account($conf->global->$key, $key, 1, '', 1, 1);
print '</td>';
print '</tr>';
}
print "</table>\n";
print '<br>';
// Define default accounts
print '<table class="noborder" width="100%">';
foreach ($list_account as $key) {
print '<tr class="oddeven value">';
// Param
$label = $langs->trans($key);
print '<td>' . $label . '</td>';
print '<td width="50%">' . $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 '<td>'; // Do not force align=right, or it align also the content of the select box
print $formaccounting->select_account($conf->global->$key, $key, 1, '', 1, 1);
print '</td>';
print '</tr>';
}

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2013-2015 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>
@@ -38,7 +38,7 @@ $langs->load("admin");
$langs->load("accountancy");
// Security check
if (empty($user->admin) || ! empty($user->rights->accountancy->chartofaccount))
if (empty($user->admin) && empty($user->rights->accounting->chartofaccount))
{
accessforbidden();
}
@@ -47,7 +47,7 @@ $action = GETPOST('action', 'alpha');
// Parameters ACCOUNTING_EXPORT_*
$main_option = array (
'ACCOUNTING_EXPORT_PREFIX_SPEC'
'ACCOUNTING_EXPORT_PREFIX_SPEC'
);
$model_option = array (
@@ -67,10 +67,10 @@ $model_option = array (
*/
if ($action == 'update') {
$error = 0;
$format = GETPOST('format', 'alpha');
$modelcsv = GETPOST('modelcsv', 'int');
if (! empty($format)) {
if (! dolibarr_set_const($db, 'ACCOUNTING_EXPORT_FORMAT', $format, 'chaine', 0, '', $conf->entity)) {
$error ++;
@@ -78,7 +78,7 @@ if ($action == 'update') {
} else {
$error ++;
}
if (! empty($modelcsv)) {
if (! dolibarr_set_const($db, 'ACCOUNTING_EXPORT_MODELCSV', $modelcsv, 'chaine', 0, '', $conf->entity)) {
$error ++;
@@ -89,23 +89,23 @@ if ($action == 'update') {
} else {
$error ++;
}
foreach ( $main_option as $constname ) {
$constvalue = GETPOST($constname, 'alpha');
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
$error ++;
}
}
foreach ( $model_option as $constname ) {
$constvalue = GETPOST($constname, 'alpha');
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
$error ++;
}
}
if (! $error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
@@ -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,14 +148,13 @@ $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);
print '<td width="50%">' . $label . '</td>';
// Value
print '<td>';
print '<input type="text" size="20" name="' . $key . '" value="' . $conf->global->$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">';
@@ -188,7 +187,7 @@ if (! $conf->use_javascript_ajax) {
print '<td>';
$listmodelcsv = AccountancyExport::getType();
print $form->selectarray("modelcsv", $listmodelcsv, $conf->global->ACCOUNTING_EXPORT_MODELCSV, 0);
print '</td>';
}
print "</td></tr>";
@@ -206,13 +205,13 @@ if ($num2) {
print '<tr class="liste_titre">';
print '<td colspan="3">' . $langs->trans('OtherOptions') . '</td>';
print "</tr>\n";
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV > 1)
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV > AccountancyExport::$EXPORT_TYPE_NORMAL)
{
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">';
@@ -225,26 +224,24 @@ if ($num2) {
'txt' => $langs->trans("txt")
);
print $form->selectarray("format", $listformat, $conf->global->ACCOUNTING_EXPORT_FORMAT, 0);
print '</td>';
}
print "</td></tr>";
foreach ( $model_option as $key ) {
$var = ! $var;
print '<tr ' . $bc[$var] . ' class="value">';
print '<tr class="oddeven value">';
// Param
$label = $langs->trans($key);
print '<td width="50%">' . $label . '</td>';
// Value
print '<td>';
print '<input type="text" size="20" name="' . $key . '" value="' . $conf->global->$key . '">';
print '</td></tr>';
}
print "</table>\n";
}

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
@@ -43,10 +43,10 @@ $id = GETPOST('id', 'int');
// List of statut
static $tmpstatut2label = array (
'0' => 'OpenFiscalYear',
'1' => 'CloseFiscalYear'
'1' => 'CloseFiscalYear'
);
$statut2label = array (
''
''
);
foreach ( $tmpstatut2label as $key => $val )
$statut2label[$key] = $langs->trans($val);
@@ -69,7 +69,7 @@ if ($action == 'confirm_delete' && $confirm == "yes") {
} else {
setEventMessages($object->error, $object->errors, 'errors');
}
}
}
else if ($action == 'add') {
if (! GETPOST('cancel', 'alpha')) {
@@ -113,7 +113,7 @@ else if ($action == 'add') {
header("Location: ./fiscalyear.php");
exit();
}
}
}
// Update record
else if ($action == 'update') {
@@ -126,7 +126,7 @@ else if ($action == 'update') {
$object->statut = GETPOST('statut', 'int');
$result = $object->update($user);
if ($result > 0) {
header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id);
exit();
@@ -145,13 +145,13 @@ else if ($action == 'update') {
* View
*/
$form = new Form($db);
$title = $langs->trans("Fiscalyear") . " - " . $langs->trans("Card");
$helpurl = "";
llxHeader("",$title,$helpurl);
$form = new Form($db);
if ($action == 'create')
if ($action == 'create')
{
print load_fiche_titre($langs->trans("NewFiscalYear"));
@@ -176,12 +176,14 @@ 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>';
@@ -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>';
@@ -303,9 +306,9 @@ if ($action == 'create')
print '<div class="tabsAction">';
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,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

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@zendsi.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
@@ -32,7 +32,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");
@@ -52,8 +51,8 @@ $action = GETPOST('action', 'alpha');
$list = array (
'ACCOUNTING_LENGTH_GACCOUNT',
'ACCOUNTING_LENGTH_AACCOUNT' ,
'ACCOUNTING_LENGTH_DESCRIPTION', // adjust size displayed for lines description for dol_trunc
'ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT', // adjust size displayed for select account description for dol_trunc
// 'ACCOUNTING_LENGTH_DESCRIPTION', // adjust size displayed for lines description for dol_trunc
// 'ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT', // adjust size displayed for select account description for dol_trunc
);
@@ -66,28 +65,28 @@ $accounting_mode = defined('ACCOUNTING_MODE') ? ACCOUNTING_MODE : 'RECETTES-DEPE
if ($action == 'update') {
$error = 0;
$accounting_modes = array (
'RECETTES-DEPENSES',
'CREANCES-DETTES'
'CREANCES-DETTES'
);
$accounting_mode = GETPOST('accounting_mode', 'alpha');
if (in_array($accounting_mode, $accounting_modes)) {
if (! dolibarr_set_const($db, 'ACCOUNTING_MODE', $accounting_mode, 'chaine', 0, '', $conf->entity)) {
$error ++;
}
} else {
$error ++;
}
if ($error) {
setEventMessages($langs->trans("Error"), null, 'errors');
}
foreach ($list as $constname)
foreach ($list as $constname)
{
$constvalue = GETPOST($constname, 'alpha');
@@ -142,18 +141,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 +159,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 +169,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 +212,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 +225,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 +238,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">';
@@ -273,13 +266,11 @@ if (! empty($user->admin))
}
// Param a user $user->rights->accountancy->chartofaccount can access
foreach ($list as $key)
// Param a user $user->rights->accounting->chartofaccount can access
foreach ($list as $key)
{
$var = ! $var;
print '<tr class="oddeven value">';
print '<tr ' . $bc[$var] . ' class="value">';
if (! empty($conf->global->ACCOUNTING_MANAGE_ZERO) && ($key == 'ACCOUNTING_LENGTH_GACCOUNT' || $key == 'ACCOUNTING_LENGTH_AACCOUNT')) continue;
// Param
@@ -289,7 +280,7 @@ foreach ($list as $key)
print '<td align="right">';
print '<input type="text" class="maxwidth100" id="' . $key . '" name="' . $key . '" value="' . $conf->global->$key . '">';
print '</td>';
print '</tr>';
}
@@ -306,7 +297,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,747 @@
<?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');
$code=GETPOST('code','alpha');
// Security access
if (empty($user->rights->accounting->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 == null) { $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 page. Note that conf->hooks_modules contains array of hook context
$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'),
'5' => $langs->trans('AccountingJournalType5'),
'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 ($code) {
$sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code='".$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 ($code) {
$sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code='".$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);
// 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='.$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

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com>
@@ -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;
@@ -98,7 +98,7 @@ $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action);
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
// 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
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers
{
$search_ref = '';
$search_label = '';
@@ -111,16 +111,16 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP
if ($action == 'update') {
if (! empty($btn_changetype)) {
$error = 0;
$accounting_product_modes = array (
'ACCOUNTANCY_SELL',
'ACCOUNTANCY_BUY'
'ACCOUNTANCY_BUY'
);
$accounting_product_mode = GETPOST('accounting_product_mode', 'alpha');
if (in_array($accounting_product_mode, $accounting_product_modes)) {
if (! dolibarr_set_const($db, 'ACCOUNTING_PRODUCT_MODE', $accounting_product_mode, 'chaine', 0, '', $conf->entity)) {
$error ++;
}
@@ -128,26 +128,26 @@ if ($action == 'update') {
$error ++;
}
}
if (! empty($btn_changeaccount)) {
//$msg = '<div><span class="accountingprocessing">' . $langs->trans("Processing") . '...</span></div>';
if (! empty($chk_prod)) {
$accounting = new AccountingAccount($db);
//$msg .= '<div><span class="accountingprocessing">' . count($chk_prod) . ' ' . $langs->trans("SelectedLines") . '</span></div>';
$cpt = 0; $ok = 0; $ko = 0;
foreach ( $chk_prod as $productid ) {
$accounting_account_id = GETPOST('codeventil_' . $productid);
$result = $accounting->fetch($accounting_account_id, null, 1);
if ($result < 0) {
// setEventMessages(null, $accounting->errors, 'errors');
$msg .= '<div><font color="red">' . $langs->trans("ErrorDB") . ' : ' . $langs->trans("Product") . ' ' . $productid . ' ' . $langs->trans("NotVentilatedinAccount") . ' : id=' . $accounting_account_id . '<br/> <pre>' . $sql . '</pre></font></div>';
} else {
$sql = " UPDATE " . MAIN_DB_PREFIX . "product";
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
$sql .= " SET accountancy_code_buy = " . $accounting->account_number;
@@ -156,7 +156,7 @@ if ($action == 'update') {
$sql .= " SET accountancy_code_sell = " . $accounting->account_number;
}
$sql .= " WHERE rowid = " . $productid;
dol_syslog("/accountancy/admin/productaccount.php sql=" . $sql, LOG_DEBUG);
if ($db->query($sql)) {
$ok++;
@@ -166,7 +166,7 @@ if ($action == 'update') {
//$msg .= '<div><font color="red">' . $langs->trans("ErrorDB") . ' : ' . $langs->trans("Product") . ' ' . $productid . ' ' . $langs->trans("NotVentilatedinAccount") . ' : ' . length_accountg($accounting->account_number) . '<br/> <pre>' . $sql . '</pre></font></div>';
}
}
$cpt ++;
}
} else {
@@ -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);
@@ -258,11 +258,11 @@ $sql .= $db->plimit($limit + 1, $offset);
dol_syslog("/accountancy/admin/productaccount.php:: sql=" . $sql, LOG_DEBUG);
$result = $db->query($sql);
if ($result)
if ($result)
{
$num = $db->num_rows($result);
$i = 0;
$param='';
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
@@ -271,7 +271,7 @@ if ($result)
if ($search_desc > 0) $param.="&search_desc=".urlencode($search_desc);
if ($search_current_account > 0) $param.="&search_current_account=".urlencode($search_current_account);
if ($search_current_account_valid && $search_current_account_valid != '-1') $param.="&search_current_account_valid=".urlencode($search_current_account_valid);
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">';
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
@@ -279,14 +279,15 @@ 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>';
print $langs->trans("InitAccountancyDesc") . '<br>';
print '<br>';
// Select mode
// Select mode
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans('Options') . '</td><td>' . $langs->trans('Description') . '</td>';
@@ -297,37 +298,23 @@ if ($result)
print '<tr ' . $bc[true] . '><td class="titlefield"><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_BUY"' . ($accounting_product_mode == 'ACCOUNTANCY_BUY' ? ' checked' : '') . '> ' . $langs->trans('OptionModeProductBuy') . '</td>';
print '<td>'.$langs->trans('OptionModeProductBuyDesc')."</td></tr>\n";
print "</table>\n";
print '<div align="center"><input type="submit" class="button" value="' . $langs->trans('Refresh') . '" name="changetype"></div>';
print "<br>\n";
// Filter on categories
$moreforfilter='';
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
$texte=$langs->trans("ListOfProductsServices");
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,14 +329,30 @@ 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("Ref", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "p.description", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("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("CurrentDedicatedAccountingAccount", $_SERVER["PHP_SELF"], $fieldtosortaccount, "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("AssignDedicatedAccountingAccount");
$clickpitco=$form->showCheckAddButtons('checkforselect', 1);
print_liste_field_titre($clickpitco, '', '', '', '', 'align="center"');
print '</tr>';
$product_static = new Product($db);
$var = true;
$i=0;
while ($i < min($num,$limit))
@@ -364,7 +367,7 @@ if ($result)
$product_static->description = $obj->description;
$product_static->status = $obj->tosell;
$product_static->status_buy = $obj->tobuy;
if ($obj->product_type == 0) {
$compta_prodsell = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef"));
$compta_prodsell_id = $aarowid_prodsell;
@@ -372,7 +375,7 @@ if ($result)
$compta_prodsell = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef"));
$compta_prodsell_id = $aarowid_servsell;
}
if ($obj->product_type == 0) {
$compta_prodbuy = (! empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef"));
$compta_prodbuy_id = $aarowid_prodbuy;
@@ -380,42 +383,41 @@ if ($result)
$compta_prodbuy = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef"));
$compta_prodbuy_id = $aarowid_servbuy;
}
$var = ! $var;
print '<tr '. $bc[$var].'>';
print '<tr class="oddeven">';
print '<td>';
print $product_static->getNomUrl(1);
print '</td>';
print '<td align="left">'.$obj->label.'</td>';
if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC))
if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC))
{
// TODO ADJUST DESCRIPTION SIZE
// print '<td align="left">' . $obj->description . '</td>';
// TODO: we shoul set a user defined value to adjust user square / wide screen size
$trunclengh = defined('ACCOUNTING_LENGTH_DESCRIPTION') ? ACCOUNTING_LENGTH_DESCRIPTION : 64;
$trunclengh = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION;
print '<td style="' . $code_sell_p_l_differ . '">' . nl2br(dol_trunc($obj->description, $trunclengh)) . '</td>';
}
print '<td align="center">'.$product_static->getLibStatut(3, 0).'</td>';
print '<td align="center">'.$product_static->getLibStatut(3, 1).'</td>';
// Current accounting account
print '<td align="left">';
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
print length_accountg($obj->accountancy_code_buy);
if ($obj->accountancy_code_buy && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount"));
if ($obj->accountancy_code_buy && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount"));
}
else
{
print length_accountg($obj->accountancy_code_sell);
if ($obj->accountancy_code_sell && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount"));
if ($obj->accountancy_code_sell && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount"));
}
print '</td>';
// Dedicated account
$defaultvalue='';
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
@@ -438,15 +440,15 @@ if ($result)
print $form->select_account($defaultvalue, 'codeventil_' . $product_static->id, 1, array(), 1);
print '</td>';
}
// 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 ++;
}
print '</table>';
// Example : Adding jquery code
print '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
@@ -459,7 +461,7 @@ if ($result)
/* console.log( index + ": " + $( this ).text() ); */
if ($(this).is(\':checked\')) atleastoneselected++;
});
if (atleastoneselected) jQuery("#changeaccount").removeAttr(\'disabled\');
else jQuery("#changeaccount").attr(\'disabled\',\'disabled\');
if (atleastoneselected) jQuery("#changeaccount").attr(\'class\',\'butAction\');
@@ -472,12 +474,12 @@ if ($result)
init_savebutton();
});
</script>';
print '<br><div align="center"><input type="submit" class="butAction" id="changeaccount" name="changeaccount" value="' . $langs->trans("Save") . '"></div>';
print '</form>';
$db->free($result);
} else {
dol_print_error($db);

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
/* Copyright (C) 2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 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
@@ -28,8 +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 . '/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountancyexport.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
@@ -51,17 +53,17 @@ if ($search_accountancy_code_end == - 1) {
$search_accountancy_code_end = '';
}
if (GETPOST("button_export_csv_x") || GETPOST("button_export_csv")) {
if (GETPOST("button_export_csv_x") || 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,12 +100,12 @@ 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','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers
{
$search_accountancy_code_start = '';
$search_accountancy_code_end = '';
$search_date_start = '';
$search_date_end = '';
$search_accountancy_code_start = '';
$search_accountancy_code_end = '';
$search_date_start = '';
$search_date_end = '';
}
@@ -112,7 +114,10 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP
*/
if ($action == 'export_csv') {
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == AccountancyExport::$EXPORT_TYPE_CEGID) $sep = ";"; // For CEGID, we force separator.
$journal = 'bookkepping';
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
@@ -122,11 +127,7 @@ if ($action == 'export_csv') {
setEventMessages($object->error, $object->errors, 'errors');
}
foreach ( $object->lines as $line ) {
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) {
$sep = ";";
}
foreach ($object->lines as $line) {
print length_accountg($line->numero_compte) . $sep;
print $line->debit . $sep;
print $line->credit . $sep;
@@ -137,147 +138,137 @@ if ($action == 'export_csv') {
}
else {
$title_page = $langs->trans("AccountBalance") . ' ' . dol_print_date($search_date_start) . '-' . dol_print_date($search_date_end);
llxHeader('', $title_page);
// List
$title_page = $langs->trans("AccountBalance") . (($search_date_start || $search_date_end) ? ' ' . dol_print_date($search_date_start) . '-' . dol_print_date($search_date_end) : '');
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
$nbtotalofrecords = $object->fetchAllBalance($sortorder, $sortfield, 0, 0, $filter);
if ($nbtotalofrecords < 0) {
setEventMessages($object->error, $object->errors, 'errors');
}
}
$result = $object->fetchAllBalance($sortorder, $sortfield, $limit, $offset, $filter);
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
}
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);
$moreforfilter = '';
$moreforfilter .= '<div class="divsearchfield">';
$moreforfilter .= $langs->trans('DateStart') . ': ';
$moreforfilter .= $form->select_date($search_date_start, 'date_start', 0, 0, 1, '', 1, 0, 1);
$moreforfilter .= $langs->trans('DateEnd') . ': ';
$moreforfilter .= $form->select_date($search_date_end, 'date_end', 0, 0, 1, '', 1, 0, 1);
$moreforfilter .= '</div>';
if (! empty($moreforfilter)) {
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print $moreforfilter;
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</div>';
}
print '<table class="liste ' . ($moreforfilter ? "listwithfilterbefore" : "") . '">';
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);
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("Solde"), $_SERVER["PHP_SELF"], "", $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" 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;
$sous_total_credit = 0;
$displayed_account = "";
foreach ($object->lines as $line) {
$var = ! $var;
$link = '';
$total_debit += $line->debit;
$total_credit += $line->credit;
$description = $object->get_compte_desc($line->numero_compte); // Search description of the account
$root_account_description = $object->get_compte_racine($line->numero_compte);
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] . '>';
// Permet d'afficher le compte comptable
if ($root_account_description != $displayed_account) {
// Affiche un Sous-Total par compte comptable
if ($displayed_account != "") {
print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap" align="right">' . price($sous_total_debit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit - $sous_total_debit) . '</td>';
print "<td>&nbsp;</td>\n";
print '</tr>';
}
// Affiche le compte comptable en d<>but de ligne
print "<tr>";
print '<td colspan="6" style="font-weight:bold; border-bottom: 1pt solid black;">' . $root_account_description . '</td>';
print '</tr>';
$displayed_account = $root_account_description;
$sous_total_debit = 0;
$sous_total_credit = 0;
}
// $object->get_compte_racine($line->numero_compte);
print '<td>' . length_accountg($line->numero_compte) . '</td>';
print '<td>' . $description . '</td>';
print '<td align="right">' . price($line->debit) . '</td>';
print '<td align="right">' . price($line->credit) . '</td>';
print '<td align="right">' . price($line->credit - $line->debit) . '</td>';
print '<td align="center">' . $link;
print '</td>';
print "</tr>\n";
// Comptabilise le sous-total
$sous_total_debit += $line->debit;
$sous_total_credit += $line->credit;
}
print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap" align="right">' . price($sous_total_debit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit - $sous_total_debit) . '</td>';
print "<td>&nbsp;</td>\n";
print '</tr>';
print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("AccountBalance") . ':</td><td class="nowrap" align="right">' . price($total_debit) . '</td><td class="nowrap" align="right">' . price($total_credit) . '</td><td class="nowrap" align="right">' . price($total_credit - $total_debit) . '</td>';
print "<td>&nbsp;</td>\n";
print '</tr>';
print "</table>";
print '</form>';
llxFooter();
llxHeader('', $title_page);
// List
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
$nbtotalofrecords = $object->fetchAllBalance($sortorder, $sortfield, 0, 0, $filter);
if ($nbtotalofrecords < 0) {
setEventMessages($object->error, $object->errors, 'errors');
}
}
$result = $object->fetchAllBalance($sortorder, $sortfield, $limit, $offset, $filter);
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
}
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
$button = '<input type="submit" name="button_export_csv" class="butAction" value="' . $langs->trans("Export") . ' ('.$conf->global->ACCOUNTING_EXPORT_FORMAT.')" />';
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, $result, 'title_accountancy', 0, $button);
$moreforfilter = '';
$moreforfilter .= '<div class="divsearchfield">';
$moreforfilter .= $langs->trans('DateStart') . ': ';
$moreforfilter .= $form->select_date($search_date_start, 'date_start', 0, 0, 1, '', 1, 0, 1);
$moreforfilter .= $langs->trans('DateEnd') . ': ';
$moreforfilter .= $form->select_date($search_date_end, 'date_end', 0, 0, 1, '', 1, 0, 1);
$moreforfilter .= '</div>';
if (! empty($moreforfilter)) {
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print $moreforfilter;
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</div>';
}
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("AccountAccounting", $_SERVER['PHP_SELF'], "t.numero_compte", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre("Label", $_SERVER['PHP_SELF'], "t.label_operation", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("Solde", $_SERVER["PHP_SELF"], "", $options, "", 'align="right"', $sortfield, $sortorder);
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
print "</tr>\n";
$total_debit = 0;
$total_credit = 0;
$sous_total_debit = 0;
$sous_total_credit = 0;
$displayed_account = "";
foreach ($object->lines as $line) {
$link = '';
$total_debit += $line->debit;
$total_credit += $line->credit;
$description = $object->get_compte_desc($line->numero_compte); // Search description of the account
$root_account_description = $object->get_compte_racine($line->numero_compte);
if (empty($description)) {
$link = '<a href="../admin/card.php?action=create&compte=' . length_accountg($line->numero_compte) . '">' . img_edit_add() . '</a>';
}
print '<tr class="oddeven">';
// Permet d'afficher le compte comptable
if ($root_account_description != $displayed_account) {
// Affiche un Sous-Total par compte comptable
if ($displayed_account != "") {
print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap" align="right">' . price($sous_total_debit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit - $sous_total_debit) . '</td>';
print "<td>&nbsp;</td>\n";
print '</tr>';
}
// Affiche le compte comptable en d<>but de ligne
print "<tr>";
print '<td colspan="6" style="font-weight:bold; border-bottom: 1pt solid black;">' . $root_account_description . '</td>';
print '</tr>';
$displayed_account = $root_account_description;
$sous_total_debit = 0;
$sous_total_credit = 0;
}
// $object->get_compte_racine($line->numero_compte);
print '<td>' . length_accountg($line->numero_compte) . '</td>';
print '<td>' . $description . '</td>';
print '<td align="right">' . price($line->debit) . '</td>';
print '<td align="right">' . price($line->credit) . '</td>';
print '<td align="right">' . price($line->credit - $line->debit) . '</td>';
print '<td align="center">' . $link;
print '</td>';
print "</tr>\n";
// Comptabilise le sous-total
$sous_total_debit += $line->debit;
$sous_total_credit += $line->credit;
}
print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap" align="right">' . price($sous_total_debit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit - $sous_total_debit) . '</td>';
print "<td>&nbsp;</td>\n";
print '</tr>';
print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("AccountBalance") . ':</td><td class="nowrap" align="right">' . price($total_debit) . '</td><td class="nowrap" align="right">' . price($total_credit) . '</td><td class="nowrap" align="right">' . price($total_credit - $total_debit) . '</td>';
print "<td>&nbsp;</td>\n";
print '</tr>';
print "</table>";
print '</form>';
llxFooter();
}
$db->close();

View File

@@ -1,8 +1,8 @@
<?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) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
* 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

View File

@@ -1,7 +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) 2013-2017 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2017 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 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
@@ -18,18 +19,19 @@
*/
/**
* \file htdocs/accountancy/bookkeeping/card.php
* \ingroup Advanced accountancy
* \brief Page to show book-entry
* \file htdocs/accountancy/bookkeeping/card.php
* \ingroup Advanced accountancy
* \brief Page to show book-entry
*/
require '../../main.inc.php';
// Class
require '../../main.inc.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';
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php';
// Langs
$langs->load("accountancy");
// Security check
@@ -37,49 +39,63 @@ $id = GETPOST('id', 'int');
if ($user->societe_id > 0) {
accessforbidden();
}
$action = GETPOST('action');
$action = GETPOST('action','aZ09');
$mode = GETPOST('mode','aZ09'); // '' or 'tmp'
$piece_num = GETPOST("piece_num");
$mesg = '';
$account_number = GETPOST('account_number');
$code_tiers = GETPOST('code_tiers');
if ($code_tiers == - 1) {
$code_tiers = null;
$subledger_account = GETPOST('subledger_account');
if ($subledger_account == - 1) {
$subledger_account = null;
}
$label_compte = GETPOST('label_compte');
$label_operation= GETPOST('label_operation');
$debit = price2num(GETPOST('debit'));
$credit = price2num(GETPOST('credit'));
$save = GETPOST('save');
if (! empty($save)) {
$action = 'add';
}
$update = GETPOST('update');
if (! empty($update)) {
$action = 'confirm_update';
}
$save = GETPOST('save','alpha');
if (! empty($save)) $action = 'add';
$update = GETPOST('update','alpha');
if (! empty($update)) $action = 'confirm_update';
$object = new BookKeeping($db);
/*
* Actions
*/
if ($action == "confirm_update") {
$error = 0;
if ((floatval($debit) != 0.0) && (floatval($credit) != 0.0)) {
setEventMessages($langs->trans('ErrorDebitCredit'), null, 'errors');
$error ++;
$error++;
setEventMessages($langs->trans('ErrorDebitCredit'), null, 'errors');
$action='update';
}
if (empty($account_number) || $account_number == '-1')
{
$error++;
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("AccountAccountingShort")), null, 'errors');
$action='update';
}
if (empty($error)) {
if (! $error)
{
$book = new BookKeeping($db);
$result = $book->fetch($id);
$result = $book->fetch($id, null, $mode);
if ($result < 0) {
$error++;
setEventMessages($book->error, $book->errors, 'errors');
} else {
$book->numero_compte = $account_number;
$book->code_tiers = $code_tiers;
$book->subledger_account = $subledger_account;
$book->label_compte = $label_compte;
$book->label_operation= $label_operation;
$book->debit = $debit;
$book->credit = $credit;
@@ -92,11 +108,18 @@ if ($action == "confirm_update") {
$book->sens = 'C';
}
$result = $book->update($user);
$result = $book->update($user, false, $mode);
if ($result < 0) {
setEventMessages($book->error, $book->errors, 'errors');
} else {
setEventMessages($langs->trans('Saved'), null, 'mesgs');
if ($mode != '_tmp')
{
setEventMessages($langs->trans('Saved'), null, 'mesgs');
}
$debit = 0;
$credit = 0;
$action = '';
}
}
@@ -106,17 +129,26 @@ if ($action == "confirm_update") {
else if ($action == "add") {
$error = 0;
if ((floatval($debit) != 0.0) && (floatval($credit) != 0.0)) {
setEventMessages($langs->trans('ErrorDebitCredit'), null, 'errors');
$error ++;
if ((floatval($debit) != 0.0) && (floatval($credit) != 0.0))
{
$error++;
setEventMessages($langs->trans('ErrorDebitCredit'), null, 'errors');
$action='';
}
if (empty($account_number) || $account_number == '-1')
{
$error++;
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("AccountAccountingShort")), null, 'errors');
$action='';
}
if (empty($error)) {
if (! $error) {
$book = new BookKeeping($db);
$book->numero_compte = $account_number;
$book->code_tiers = $code_tiers;
$book->subledger_account = $subledger_account;
$book->label_compte = $label_compte;
$book->label_operation= $label_operation;
$book->debit = $debit;
$book->credit = $credit;
$book->doc_date = GETPOST('doc_date');
@@ -137,11 +169,18 @@ else if ($action == "add") {
$book->sens = 'C';
}
$result = $book->createStd($user);
$result = $book->createStd($user, false, $mode);
if ($result < 0) {
setEventMessages($book->error, $book->errors, 'errors');
} else {
setEventMessages($langs->trans('Saved'), null, 'mesgs');
if ($mode != '_tmp')
{
setEventMessages($langs->trans('Saved'), null, 'mesgs');
}
$debit = 0;
$credit = 0;
$action = '';
}
}
@@ -150,14 +189,13 @@ else if ($action == "add") {
else if ($action == "confirm_delete") {
$book = new BookKeeping($db);
$result = $book->fetch($id);
$result = $book->fetch($id, null, $mode);
$piece_num = $book->piece_num;
if ($result < 0) {
setEventMessages($book->error, $book->errors, 'errors');
} else {
$result = $book->delete($user);
$result = $book->delete($user, false, $mode);
if ($result < 0) {
setEventMessages($book->error, $book->errors, 'errors');
}
@@ -166,39 +204,100 @@ else if ($action == "confirm_delete") {
}
else if ($action == "confirm_create") {
$error = 0;
$book = new BookKeeping($db);
$error = 0;
if (! GETPOST('next_num_mvt'))
{
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NumPiece")), null, 'errors');
$book = new BookKeeping($db);
if (! GETPOST('code_journal') || GETPOST('code_journal') == '-1') {
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Journal")), null, 'errors');
$action='create';
$error++;
}
if (! GETPOST('next_num_mvt'))
{
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NumPiece")), null, 'errors');
$error++;
}
if (! $error)
{
$book->label_compte = '';
$book->debit = 0;
$book->credit = 0;
$book->doc_date = $date_start = dol_mktime(0, 0, 0, GETPOST('doc_datemonth'), GETPOST('doc_dateday'), GETPOST('doc_dateyear'));
$book->doc_type = GETPOST('doc_type');
$book->piece_num = GETPOST('next_num_mvt');
$book->doc_ref = GETPOST('doc_ref');
$book->code_journal = GETPOST('code_journal');
$book->fk_doc = 0;
$book->fk_docdet = 0;
$book->montant = 0;
$result = $book->createStd($user);
if ($result < 0) {
setEventMessages($book->error, $book->errors, 'errors');
} else {
$book->label_compte = '';
$book->debit = 0;
$book->credit = 0;
$book->doc_date = $date_start = dol_mktime(0, 0, 0, GETPOST('doc_datemonth'), GETPOST('doc_dateday'), GETPOST('doc_dateyear'));
$book->doc_type = GETPOST('doc_type');
$book->piece_num = GETPOST('next_num_mvt');
$book->doc_ref = GETPOST('doc_ref');
$book->code_journal = GETPOST('code_journal');
$book->fk_doc = 0;
$book->fk_docdet = 0;
$book->montant = 0;
$result = $book->createStd($user,0, $mode);
if ($result < 0) {
setEventMessages($book->error, $book->errors, 'errors');
} else {
if ($mode != '_tmp')
{
setEventMessages($langs->trans('Saved'), null, 'mesgs');
}
$action = 'update';
$id=$book->id;
$piece_num = $book->piece_num;
}
}
}
if ($action == 'setdate') {
$datedoc = dol_mktime(0, 0, 0, GETPOST('doc_datemonth'), GETPOST('doc_dateday'), GETPOST('doc_dateyear'));
$result = $object->updateByMvt($piece_num,'doc_date',$db->idate($datedoc),$mode);
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
} else {
if ($mode != '_tmp')
{
setEventMessages($langs->trans('Saved'), null, 'mesgs');
$action = '';
$piece_num = $book->piece_num;
}
}
$action = '';
}
}
if ($action == 'setjournal') {
$journaldoc = trim(GETPOST('code_journal'));
$result = $object->updateByMvt($piece_num,'code_journal',$journaldoc,$mode);
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
} else {
if ($mode != '_tmp')
{
setEventMessages($langs->trans('Saved'), null, 'mesgs');
}
$action = '';
}
}
if ($action == 'setdocref') {
$refdoc = trim(GETPOST('doc_ref'));
$result = $object->updateByMvt($piece_num,'doc_ref',$refdoc,$mode);
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
} else {
if ($mode != '_tmp')
{
setEventMessages($langs->trans('Saved'), null, 'mesgs');
}
$action = '';
}
}
// Validate transaction
if ($action == 'valid') {
$result = $object->transformTransaction(0,$piece_num);
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
} else {
header("Location: list.php?sortfield=t.piece_num&sortorder=asc");
exit;
}
}
@@ -207,52 +306,33 @@ else if ($action == "confirm_create") {
* View
*/
llxHeader();
$html = new Form($db);
$formventilation = new FormVentilation($db);
$formaccounting = new FormAccounting($db);
$accountjournal = new AccountingJournal($db);
/*
* Confirmation to delete the command
*/
llxHeader('', $langs->trans("CreateMvts"));
// Confirmation to delete the command
if ($action == 'delete') {
$formconfirm = $html->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'confirm_delete', '', 0, 1);
$formconfirm = $html->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id.'&mode='. $mode, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'confirm_delete', '', 0, 1);
print $formconfirm;
}
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))
{
dol_print_error('', 'Failed to get next piece number');
}
$next_num_mvt = $book->getNextNumMvt('_tmp');
if (empty($next_num_mvt))
{
dol_print_error('', 'Failed to get next piece number');
}
print '<form action="' . $_SERVER["PHP_SELF"] . '" name="create_mvt" method="POST">';
print '<input type="hidden" name="action" value="confirm_create">' . "\n";
print '<input type="hidden" name="next_num_mvt" value="' . $next_num_mvt . '">' . "\n";
print '<input type="hidden" name="mode" value="_tmp">' . "\n";
dol_fiche_head();
@@ -271,7 +351,7 @@ if ($action == 'create') {
print '<tr>';
print '<td class="fieldrequired">' . $langs->trans("Codejournal") . '</td>';
print '<td>' . $html->selectarray('code_journal', $code_journal_array) . '</td>';
print '<td>' . $formaccounting->select_journal(GETPOST('code_journal'),'code_journal',0,1,array(),1,1) . '</td>';
print '</tr>';
print '<tr>';
@@ -281,7 +361,7 @@ if ($action == 'create') {
print '<tr>';
print '<td>' . $langs->trans("Doctype") . '</td>';
print '<td><input type="text" class="minwidth200" name="doc_type" value=""/></td>';
print '<td><input type="text" class="minwidth200 name="doc_type" value=""/></td>';
print '</tr>';
print '</table>';
@@ -295,44 +375,175 @@ if ($action == 'create') {
print '</form>';
} else {
$book = new BookKeeping($db);
$result = $book->fetchPerMvt($piece_num);
$result = $book->fetchPerMvt($piece_num, $mode);
if ($result < 0) {
setEventMessages($book->error, $book->errors, 'errors');
}
if (! empty($book->piece_num)) {
print load_fiche_titre($langs->trans("UpdateMvts"), '<a href="list.php">' . $langs->trans('BackToList') . '</a>');
$backlink = '<a href="list.php">' . $langs->trans('BackToList') . '</a>';
dol_fiche_head();
print '<table class="border" width="100%">';
print '<tr class="pair">';
print load_fiche_titre($langs->trans("UpdateMvts"), $backlink);
$head=array();
$h=0;
$head[$h][0] = $_SERVER['PHP_SELF'].'?piece_num='.$book->piece_num.($mode?'&mode='.$mode:'');
$head[$h][1] = $langs->trans("Transaction");
$head[$h][2] = 'transaction';
$h++;
dol_fiche_head($head, 'transaction', '', -1);
//dol_banner_tab($book, '', $backlink);
print '<div class="fichecenter">';
print '<div class="fichehalfleft">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">';
// account movement
print '<tr>';
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>';
// date
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Docdate');
print '</td>';
if ($action != 'editdate')
print '<td><a href="'.$_SERVER["PHP_SELF"].'?action=editdate&amp;piece_num='. $book->piece_num .'&amp;mode='. $mode .'">'.img_edit($langs->transnoentitiesnoconv('SetDate'),1).'</a></td>';
print '</tr></table>';
print '</td><td colspan="3">';
if ($action == 'editdate') {
print '<form name="setdate" action="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '" method="post">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="action" value="setdate">';
print '<input type="hidden" name="mode" value="'.$mode.'">';
$form->select_date($book->doc_date ? $book->doc_date : - 1, 'doc_date', '', '', '', "setdate");
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
print '</form>';
} else {
print $book->doc_date ? dol_print_date($book->doc_date, 'daytext') : '&nbsp;';
}
print '</td>';
print '</tr>';
print '<tr class="pair">';
print '<td>' . $langs->trans("Codejournal") . '</td>';
print '<td>' . $book->code_journal . '</td>';
//journal
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Codejournal');
print '</td>';
if ($action != 'editjournal')
print '<td><a href="'.$_SERVER["PHP_SELF"].'?action=editjournal&amp;piece_num='.$book->piece_num.'&amp;mode='. $mode .'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).'</a></td>';
print '</tr></table>';
print '</td><td>';
if ($action == 'editjournal') {
print '<form name="setjournal" action="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '" method="post">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="action" value="setjournal">';
print '<input type="hidden" name="mode" value="'.$mode.'">';
print $formaccounting->select_journal($book->code_journal,'code_journal',0,0,array(),1,1);
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
print '</form>';
} else {
print $book->code_journal ;
}
print '</td>';
print '</tr>';
print '<tr class="impair">';
print '<td>' . $langs->trans("Docref") . '</td>';
print '<td>' . $book->doc_ref . '</td>';
//docref
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Docref');
print '</td>';
if ($action != 'editdocref')
print '<td><a href="'.$_SERVER["PHP_SELF"].'?action=editdocref&amp;piece_num='.$book->piece_num.'&amp;mode='. $mode .'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).'</a></td>';
print '</tr></table>';
print '</td><td>';
if ($action == 'editdocref') {
print '<form name="setdocref" action="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '" method="post">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="action" value="setdocref">';
print '<input type="hidden" name="mode" value="'.$mode.'">';
print '<input type="text" size="20" name="doc_ref" value="'.$book->doc_ref.'">';
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
print '</form>';
} else {
print $book->doc_ref ;
}
print '</td>';
print '</tr>';
print '<tr class="pair">';
print '</table>';
print '</div>';
print '<div class="fichehalfright"><div class="ficheaddleft">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">';
// Doc type
print '<tr>';
print '<td>' . $langs->trans("Doctype") . '</td>';
print '<td>' . $book->doc_type . '</td>';
print '</tr>';
print '</table>';
dol_fiche_end();
// Validate
/*
print '<tr>';
print '<td class="titlefield">' . $langs->trans("Status") . '</td>';
print '<td>';
if (empty($book->validated)) {
print '<a href="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $line->rowid . '&action=enable">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a>';
} else {
print '<a href="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $line->rowid . '&action=disable">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a>';
}
print '</td>';
print '</tr>';
*/
// check data
/*
print '<tr>';
print '<td class="titlefield">' . $langs->trans("Control") . '</td>';
if ($book->doc_type == 'customer_invoice')
{
$sqlmid = 'SELECT rowid as ref';
$sqlmid .= " FROM ".MAIN_DB_PREFIX."facture as fac";
$sqlmid .= " WHERE fac.rowid=" . $book->fk_doc;
dol_syslog("accountancy/bookkeeping/card.php::sqlmid=" . $sqlmid, LOG_DEBUG);
$resultmid = $db->query($sqlmid);
if ($resultmid) {
$objmid = $db->fetch_object($resultmid);
$invoicestatic = new Facture($db);
$invoicestatic->fetch($objmid->ref);
$ref=$langs->trans("Invoice").' '.$invoicestatic->getNomUrl(1);
}
else dol_print_error($db);
}
print '<td>' . $ref .'</td>';
print '</tr>';
*/
print "</table>\n";
print '</div></div>';
print '</div>';
print '<div style="clear:both"></div>';
print '<br>';
$result = $book->fetch_all_per_mvt($piece_num);
$result = $book->fetchAllPerMvt($piece_num, $mode);
if ($result < 0) {
setEventMessages($book->error, $book->errors, 'errors');
} else {
@@ -346,9 +557,8 @@ if ($action == 'create') {
print '<input type="hidden" name="code_journal" value="' . $book->code_journal . '">' . "\n";
print '<input type="hidden" name="fk_doc" value="' . $book->fk_doc . '">' . "\n";
print '<input type="hidden" name="fk_docdet" value="' . $book->fk_docdet . '">' . "\n";
print '<input type="hidden" name="mode" value="' . $mode . '">' . "\n";
$var=False;
print "<table class=\"noborder\" width=\"100%\">";
if (count($book->linesmvt) > 0) {
@@ -357,86 +567,120 @@ if ($action == 'create') {
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("AccountAccountingShort"));
print_liste_field_titre($langs->trans("Code_tiers"));
print_liste_field_titre($langs->trans("Labelcompte"));
print_liste_field_titre($langs->trans("Debit"), "", "", "", "", 'align="right"');
print_liste_field_titre($langs->trans("Credit"), "", "", "", "", 'align="right"');
print_liste_field_titre($langs->trans("Amount"), "", "", "", "", 'align="right"');
print_liste_field_titre($langs->trans("Sens"), "", "", "", "", 'align="center"');
print_liste_field_titre($langs->trans("Action"), "", "", "", "", 'width="60" align="center"');
print_liste_field_titre("AccountAccountingShort");
print_liste_field_titre("SubledgerAccount");
print_liste_field_titre("Labelcompte");
print_liste_field_titre("Label");
print_liste_field_titre("Debit", "", "", "", "", 'align="right"');
print_liste_field_titre("Credit", "", "", "", "", 'align="right"');
print_liste_field_titre("Action", "", "", "", "", 'width="60" align="center"');
print "</tr>\n";
foreach ($book->linesmvt as $line) {
$var = ! $var;
print '<tr ' . $bc[$var] . '>';
foreach ( $book->linesmvt as $line ) {
print '<tr class="oddeven">';
$total_debit += $line->debit;
$total_credit += $line->credit;
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', 1, array (), 1, 1, '');
print '</td>';
print '<td>';
print $formventilation->select_auxaccount($line->code_tiers, 'code_tiers', 1);
// TODO For the moment we keep a fre input text instead of a combo. The select_auxaccount has problem because it does not
// use setup of keypress to select thirdparty and this hang browser on large database.
if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
{
print $formaccounting->select_auxaccount($line->subledger_account, 'subledger_account', 1);
}
else
{
print '<input type="text" name="subledger_account" value="'.$line->subledger_account.'">';
}
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>';
print '<td align="right"><input type="text" size="6" name="credit" value="' . price($line->credit) . '"/></td>';
print '<td align="right">' . price($line->montant) . '</td>';
print '<td align="center">' . $line->sens . '</td>';
print '<td><input type="text" size="15" name="label_operation" value="' . $line->label_operation. '"/></td>';
print '<td align="right"><input type="text" size="6" class="right" name="debit" value="' . price($line->debit) . '"/></td>';
print '<td align="right"><input type="text" size="6" class="right" name="credit" value="' . price($line->credit) . '"/></td>';
print '<td>';
print '<input type="hidden" name="id" value="' . $line->id . '">' . "\n";
print '<input type="submit" class="button" name="update" value="' . $langs->trans("Update") . '">';
print '</td>';
} else {
print '<td>' . length_accountg($line->numero_compte) . '</td>';
print '<td>' . length_accounta($line->code_tiers) . '</td>';
print '<td>' . length_accounta($line->subledger_account) . '</td>';
print '<td>' . $line->label_compte . '</td>';
print '<td>' . $line->label_operation. '</td>';
print '<td align="right">' . price($line->debit) . '</td>';
print '<td align="right">' . price($line->credit) . '</td>';
print '<td align="right">' . price($line->montant) . '</td>';
print '<td align="center">' . $line->sens . '</td>';
print '<td align="center">';
print '<a href="./card.php?action=update&amp;id=' . $line->id . '&amp;piece_num=' . $line->piece_num . '">';
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=update&id=' . $line->id . '&piece_num=' . $line->piece_num . '&mode='.$mode.'">';
print img_edit();
print '</a>&nbsp;';
print '<a href="./card.php?action=delete&amp;id=' . $line->id . '&amp;piece_num=' . $line->piece_num . '">';
print img_delete();
print '</a>';
print '</a> &nbsp;';
$actiontodelete='detele';
if ($mode == '_tmp') $actiontodelete='confirm_delete';
print '<a href="' . $_SERVER["PHP_SELF"] . '?action='.$actiontodelete.'&id=' . $line->id . '&piece_num=' . $line->piece_num . '&mode='.$mode.'">';
print img_delete();
print '</a>';
print '</td>';
}
print "</tr>\n";
}
if ($total_debit != $total_credit)
if (price2num($total_debit) != price2num($total_credit))
{
setEventMessages(null, array($langs->trans('MvtNotCorrectlyBalanced', $total_credit, $total_debit)), 'warnings');
}
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', 1, array (), 1, 1, '');
print '</td>';
print '<td>';
print $formventilation->select_auxaccount($code_tiers, 'code_tiers', 1);
// TODO For the moment we keep a fre input text instead of a combo. The select_auxaccount has problem because it does not
// use setup of keypress to select thirdparty and this hang browser on large database.
if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
{
print $formaccounting->select_auxaccount($subledger_account, 'subledger_account', 1);
}
else
{
print '<input type="text" name="subledger_account" value="">';
}
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></td>';
print '<td></td>';
print '<td><input type="text" size="15" name="label_compte" value="' . $line->label_compte . '"/></td>';
print '<td><input type="text" size="15" name="label_operation" value="' . $line->label_operation. '"/></td>';
print '<td align="right"><input type="text" size="6" class="right" name="debit" value="' . ($debit ? price($debit) : '') . '"/></td>';
print '<td align="right"><input type="text" size="6" class="right" name="credit" value="' . ($credit ? price($credit) : '') . '"/></td>';
print '<td><input type="submit" class="button" name="save" value="' . $langs->trans("Add") . '"></td>';
print '</tr>';
}
print '</table>';
if ($mode=='_tmp' && $action=='')
{
print '<br>';
print '<div class="center">';
if ($total_debit == $total_credit)
{
print '<a class="button" href="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '&action=valid">'.$langs->trans("ValidTransaction").'</a>';
}
else
{
print '<input type="submit" class="button" disabled="disabled" href="#" title="'.dol_escape_htmltag($langs->trans("MvtNotCorrectlyBalanced", $credit, $debit)).'" value="'.dol_escape_htmltag($langs->trans("ValidTransaction")).'">';
}
print ' &nbsp; ';
print '<a class="button" href="' . DOL_URL_ROOT.'/accountancy/bookkeeping/list.php">'.$langs->trans("Cancel").'</a>';
print "</div>";
}
print '</form>';
}
}
@@ -445,5 +689,6 @@ if ($action == 'create') {
}
}
dol_fiche_end();
llxFooter();
$db->close();

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-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2016-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
@@ -16,7 +16,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
@@ -25,12 +24,12 @@
* \brief List operation of book keeping
*/
require '../../main.inc.php';
// Class
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountancyexport.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 . '/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");
@@ -46,11 +45,11 @@ $search_date_start = dol_mktime(0, 0, 0, GETPOST('date_startmonth', 'int'), GETP
$search_date_end = dol_mktime(0, 0, 0, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int'));
$search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int'));
if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt")) {
if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_delmvt")) {
$action = 'delbookkeepingyear';
}
if (GETPOST("button_export_csv_x") || GETPOST("button_export_csv")) {
$action = 'export_csv';
if (GETPOST("button_export_file_x") || GETPOST("button_export_file.x") || GETPOST("button_export_file")) {
$action = 'export_file';
}
$search_accountancy_code = GETPOST("search_accountancy_code");
@@ -79,7 +78,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,12 +92,12 @@ 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);
if ($action != 'export_csv' && ! isset($_POST['begin']) && ! isset($_GET['begin']) && ! isset($_POST['formfilteraction'])) {
if ($action != 'export_file' && ! isset($_POST['begin']) && ! isset($_GET['begin']) && ! isset($_POST['formfilteraction']) && empty($page)) {
$search_date_start = dol_mktime(0, 0, 0, 1, 1, dol_print_date(dol_now(), '%Y'));
$search_date_end = dol_mktime(0, 0, 0, 12, 31, dol_print_date(dol_now(), '%Y'));
}
@@ -112,7 +111,7 @@ if ($action != 'export_csv' && ! isset($_POST['begin']) && ! isset($_GET['begin'
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers
{
$search_mvt_num = '';
$search_doc_type = '';
@@ -170,19 +169,19 @@ if (! empty($search_accountancy_code_end)) {
$param .= '&search_accountancy_code_end=' . $search_accountancy_code_end;
}
if (! empty($search_accountancy_aux_code)) {
$filter['t.code_tiers'] = $search_accountancy_aux_code;
$filter['t.subledger_account'] = $search_accountancy_aux_code;
$param .= '&search_accountancy_aux_code=' . $search_accountancy_aux_code;
}
if (! empty($search_accountancy_aux_code_start)) {
$filter['t.code_tiers>='] = $search_accountancy_aux_code_start;
$filter['t.subledger_account>='] = $search_accountancy_aux_code_start;
$param .= '&search_accountancy_aux_code_start=' . $search_accountancy_aux_code_start;
}
if (! empty($search_accountancy_aux_code_end)) {
$filter['t.code_tiers<='] = $search_accountancy_aux_code_end;
$filter['t.subledger_account<='] = $search_accountancy_aux_code_end;
$param .= '&search_accountancy_aux_code_end=' . $search_accountancy_aux_code_end;
}
if (! empty($search_mvt_label)) {
$filter['t.label_compte'] = $search_mvt_label;
$filter['t.label_operation'] = $search_mvt_label;
$param .= '&search_mvt_label=' . $search_mvt_label;
}
if (! empty($search_direction)) {
@@ -222,7 +221,7 @@ if ($action == 'delbookkeepingyearconfirm') {
$deljournal=0;
}
if (! empty($delyear) || ! empty($deljournal))
if (! empty($delyear) || ! empty($deljournal))
{
$result = $object->deleteByYearAndJournal($delyear,$deljournal);
if ($result < 0) {
@@ -260,9 +259,8 @@ if ($action == 'delmouvconfirm') {
}
}
if ($action == 'export_csv') {
include DOL_DOCUMENT_ROOT . '/accountancy/class/accountancyexport.class.php';
// Export into a file with format defined into setup
if ($action == 'export_file') {
$result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter);
@@ -291,7 +289,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 +318,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->select_journal($deljournal, 'deljournal', '', 1, 1, 1, '', 0, 1);
$form_question['delyear'] = array (
'name' => 'delyear',
@@ -333,9 +330,9 @@ if ($action == 'delbookkeepingyear') {
);
$form_question['deljournal'] = array (
'name' => 'deljournal',
'type' => 'select',
'type' => 'other', // We don't use select here, the journal_array is already a select html component
'label' => $langs->trans('DelJournal'),
'values' => $journal_array,
'value' => $journal_array,
'default' => $deljournal
);
@@ -354,59 +351,77 @@ 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:'').'">';
$listofformat=AccountancyExport::getType();
$button = '<a class="butAction" name="button_export_file" href="'.$_SERVER["PHP_SELF"].'?action=export_file'.($param?'&'.$param:'').'">';
if (count($filter)) $button.= $langs->trans("ExportFilteredList");
else $button.= $langs->trans("ExportList");
$button.=' ('.$listofformat[$conf->global->ACCOUNTING_EXPORT_MODELCSV].')';
$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);
print '<div class="tabsAction">' . "\n";
print '<div class="tabsAction tabsActionNoBottom">' . "\n";
print '<div class="inline-block divButAction"><a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a></div>';
print '<div class="inline-block divButAction"><a class="butActionDelete" name="button_delmvt" href="'.$_SERVER["PHP_SELF"].'?action=delbookkeepingyear'.($param?'&'.$param:'').'">' . $langs->trans("DelBookKeeping") . '</a></div>';
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') . ': ';
print '<div class="nowrap">';
print $langs->trans('From') . ' ';
print $form->select_date($search_date_start, 'date_start', 0, 0, 1);
print '<br>';
print $langs->trans('to') . ': ';
print '</div>';
print '<div class="nowrap">';
print $langs->trans('to') . ' ';
print $form->select_date($search_date_end, 'date_end', 0, 0, 1);
print '</div>';
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 '<br>';
print $langs->trans('to');
print $formventilation->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array (), 1, 1, '');
print '<div class="nowrap">';
print $langs->trans('From').' ';
print $formaccounting->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, 'maxwidth200');
print '</div>';
print '<div class="nowrap">';
print $langs->trans('to').' ';
print $formaccounting->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array (), 1, 1, 'maxwidth200');
print '</div>';
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 '<br>';
print $langs->trans('to');
print $formventilation->select_auxaccount($search_accountancy_aux_code_end, 'search_accountancy_aux_code_end', 1);
print '<div class="nowrap">';
print $langs->trans('From').' ';
// TODO For the moment we keep a fre input text instead of a combo. The select_auxaccount has problem because it does not
// use setup of keypress to select thirdparty and this hang browser on large database.
if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
{
print $formaccounting->select_auxaccount($search_accountancy_aux_code_start, 'search_accountancy_aux_code_start', 1);
}
else
{
print '<input type="text" name="search_accountancy_aux_code_start" value="'.$search_accountancy_aux_code_start.'">';
}
print '</div>';
print '<div class="nowrap">';
print $langs->trans('to').' ';
// TODO For the moment we keep a fre input text instead of a combo. The select_auxaccount has problem because it does not
// use setup of keypress to select thirdparty and this hang browser on large database.
if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
{
print $formaccounting->select_auxaccount($search_accountancy_aux_code_end, 'search_accountancy_aux_code_end', 1);
}
else
{
print '<input type="text" name="search_accountancy_aux_code_end" value="'.$search_accountancy_aux_code_end.'">';
}
print '</div>';
print '</td>';
print '<td class="liste_titre">';
print '<input type="text" size="7" class="flat" name="search_mvt_label" value="' . $search_mvt_label . '"/>';
@@ -415,38 +430,61 @@ 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("TransactionNumShort", $_SERVER['PHP_SELF'], "t.piece_num", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Docdate", $_SERVER['PHP_SELF'], "t.doc_date", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("Docref", $_SERVER['PHP_SELF'], "t.doc_ref", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("AccountAccountingShort", $_SERVER['PHP_SELF'], "t.numero_compte", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("SubledgerAccount", $_SERVER['PHP_SELF'], "t.subledger_account", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Label", $_SERVER['PHP_SELF'], "t.label_operation", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("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;
foreach ($object->lines as $line ) {
$var = ! $var;
$i=0;
while ($i < min($num, $limit))
{
$line = $object->lines[$i];
$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>';
print '<td>' . length_accounta($line->subledger_account) . '</td>';
print '<td>' . $line->label_operation . '</td>';
print '<td align="right">' . ($line->debit ? price($line->debit) : ''). '</td>';
print '<td align="right">' . ($line->credit ? price($line->credit) : '') . '</td>';
$accountingjournal = new AccountingJournal($db);
$result = $accountingjournal->fetch('',$line->code_journal);
$journaltoshow = (($result > 0)?$accountingjournal->getNomUrl(0,0,0,'',0) : $line->code_journal);
print '<td align="center">' . $journaltoshow . '</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>';
print '</td>';
print "</tr>\n";
$i++;
}
print '<tr class="liste_total">';
@@ -456,10 +494,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

@@ -1,9 +1,8 @@
<?php
/*
* Copyright (C) 2016 Neil Orley <neil.orley@oeris.fr> largely based on the great work of :
* - 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 Neil Orley <neil.orley@oeris.fr>
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* 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
@@ -29,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
@@ -59,7 +58,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,10 +74,6 @@ if (empty($search_date_end)) $search_date_end = dol_mktime(0, 0, 0, 12, 31, dol_
$object = new BookKeeping($db);
$formventilation = new FormVentilation($db);
$formother = new FormOther($db);
$form = new Form($db);
$options = '';
$filter = array ();
@@ -97,18 +92,18 @@ if (! empty($search_doc_date)) {
}
if (!GETPOST("button_removefilter_x") && !GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
if (! GETPOST('button_removefilter_x','alpha') && ! GETPOST('button_removefilter.x','alpha') && ! GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers
{
if (! empty($search_accountancy_code_start)) {
$filter['t.numero_compte'] = $search_accountancy_code_start;
$options .= '&amp;search_accountancy_code_start=' . $search_accountancy_code_start;
}
if (! empty($search_label_account)) {
$filter['t.label_compte'] = $search_label_account;
$filter['t.label_operation'] = $search_label_account;
$options .= '&amp;search_label_account=' . $search_label_account;
}
if (! empty($search_mvt_label)) {
$filter['t.label_compte'] = $search_mvt_label;
$filter['t.label_operation'] = $search_mvt_label;
$options .= '&amp;search_mvt_label=' . $search_mvt_label;
}
if (! empty($search_direction)) {
@@ -126,7 +121,7 @@ if (!GETPOST("button_removefilter_x") && !GETPOST("button_removefilter")) // Bot
* Action
*/
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers
{
$search_doc_date = '';
$search_accountancy_code = '';
@@ -156,12 +151,15 @@ if ($action == 'delmouvconfirm') {
* View
*/
$formaccounting = new FormAccounting($db);
$formother = new FormOther($db);
$form = new Form($db);
$title_page = $langs->trans("Bookkeeping") . ' ' . strtolower($langs->trans("By")) . ' ' . $langs->trans("AccountAccounting");
llxHeader('', $title_page);
// List
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
$nbtotalofrecords = $object->fetchAllByAccount($sortorder, $sortfield, 0, 0, $filter);
@@ -174,7 +172,9 @@ $result = $object->fetchAllByAccount($sortorder, $sortfield, $limit, $offset, $f
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
}
$nbtotalofrecords = $result;
$num=count($object->lines);
if ($action == 'delmouv') {
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?mvt_num=' . GETPOST('mvt_num'), $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delmouvconfirm', '', 0, 1);
@@ -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',
@@ -205,9 +205,9 @@ if ($action == 'delbookkeepingyear') {
print '<form method="GET" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
print '<form method="POST" 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);
@@ -217,22 +217,11 @@ if ( preg_match('/^asc/i', $sortorder) )
else
$sortorder = "desc";
print '<div class="tabsAction">' . "\n";
print '<div class="tabsAction tabsActionNoBottom">' . "\n";
print '<div class="inline-block divButAction"><a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a></div>';
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>';
@@ -248,41 +237,55 @@ print '<td class="liste_titre"><input type="text" size="7" class="flat" name="se
print '<td class="liste_titre"><input type="text" size="7" class="flat" name="search_label_account" value="' . $search_label_account . '"/></td>';
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="center"><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("AccountAccountingShort", $_SERVER['PHP_SELF']);
print_liste_field_titre("TransactionNumShort", $_SERVER['PHP_SELF'], "t.piece_num", "", $options, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("Docdate", $_SERVER['PHP_SELF'], "t.doc_date", "", $options, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("Docref", $_SERVER['PHP_SELF'], "t.doc_ref", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre("Label");
print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("Codejournal", $_SERVER['PHP_SELF'], "t.code_journal", "", $options, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
print "</tr>\n";
print '</tr>';
$var = True;
$total_debit = 0;
$total_credit = 0;
$sous_total_debit = 0;
$sous_total_credit = 0;
$displayed_account_number = null; // Start with undefined to be able to distinguish with empty
$displayed_account_number = null; // Start with undefined to be able to distinguish with empty
foreach ( $object->lines as $line ) {
$var = ! $var;
$i=0;
while ($i < min($num, $limit))
{
$line = $object->lines[$i];
$total_debit += $line->debit;
$total_credit += $line->credit;
$accountg = length_accountg($line->numero_compte);
//if (empty($accountg)) $accountg = '-';
// Is it a break ?
if ($accountg != $displayed_account_number || ! isset($displayed_account_number)) {
// 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
$colspan = 9;
print "<tr>";
@@ -291,48 +294,51 @@ foreach ( $object->lines as $line ) {
else print '<span class="error">'.$langs->trans("Unknown").'</span>';
print '</td>';
print '</tr>';
$displayed_account_number = $accountg;
//if (empty($displayed_account_number)) $displayed_account_number='-';
$sous_total_debit = 0;
$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>';
print strlen(length_accounta($line->subledger_account)) == 0 ? '<td>' . $line->label_operation . '</td>' : '<td>' . $line->label_operation . '<br /><span style="font-size:0.8em">(' . length_accounta($line->subledger_account) . ')</span></td>';
print '<td align="right">' . price($line->debit) . '</td>';
print '<td align="right">' . price($line->credit) . '</td>';
print '<td align="right">' . ($line->debit ? price($line->debit) :''). '</td>';
print '<td align="right">' . ($line->credit ? price($line->credit) : '') . '</td>';
print '<td align="center">' . $line->code_journal . '</td>';
print '<td align="center">';
print '<a href="./card.php?piece_num=' . $line->piece_num . '">' . img_edit() . '</a>&nbsp;';
print '<a href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?piece_num=' . $line->piece_num . '">' . img_edit() . '</a>&nbsp;';
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=delmouv&mvt_num=' . $line->piece_num . $options . '&page=' . $page . '">' . img_delete() . '</a>';
print '</td>';
print "</tr>\n";
// Comptabilise le sous-total
$sous_total_debit += $line->debit;
$sous_total_credit += $line->credit;
// Comptabilise le sous-total
$sous_total_debit += $line->debit;
$sous_total_credit += $line->credit;
$i++;
}
// Affiche un Sous-Total du dernier compte comptable affiché
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>';
@@ -352,6 +358,4 @@ print "</table>";
print '</form>';
llxFooter();
$db->close();

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) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
*
* This program is free software; you can redistribute it and/or modify
@@ -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');
@@ -52,22 +52,22 @@ $search_numero_compte_end = GETPOST('search_numero_compte_end', 'alpha');
if ($search_numero_compte_end == - 1) {
$search_numero_compte_end = '';
}
$search_code_tiers = GETPOST('search_code_tiers', 'alpha');
$search_code_tiers_start = GETPOST('search_code_tiers_start', 'alpha');
if ($search_code_tiers_start == - 1) {
$search_code_tiers_start = '';
$search_subledger_account = GETPOST('search_subledger_account', 'alpha');
$search_subledger_account_start = GETPOST('search_subledger_account_start', 'alpha');
if ($search_subledger_account_start == - 1) {
$search_subledger_account_start = '';
}
$search_code_tiers_end = GETPOST('search_code_tiers_end', 'alpha');
if ($search_code_tiers_end == - 1) {
$search_code_tiers_end = '';
$search_subledger_account_end = GETPOST('search_subledger_account_end', 'alpha');
if ($search_subledger_account_end == - 1) {
$search_subledger_account_end = '';
}
$search_label_compte = GETPOST('search_label_compte', 'alpha');
$search_label_operation = GETPOST('search_label_operation', 'alpha');
$search_sens = GETPOST('search_sens', 'alpha');
$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)) {
@@ -81,16 +81,19 @@ if ($sortfield == "")
$offset = $limit * $page;
llxHeader('', $langs->trans("Bookkeeping"));
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
/*
* Actions
*/
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers
{
$search_doc_type = "";
$search_doc_date = "";
$search_doc_ref = "";
$search_numero_compte = "";
$search_code_tiers = "";
$search_label_compte = "";
$search_subledger_account = "";
$search_label_operation = "";
$search_sens = "";
$search_code_journal = "";
}
@@ -129,21 +132,21 @@ if (! empty($search_numero_compte_end)) {
$filter['t.numero_compte<='] = $search_numero_compte_end;
$options .= '&amp;search_numero_compte_end=' . $search_numero_compte_end;
}
if (! empty($search_code_tiers)) {
$filter['t.code_tiers'] = $search_code_tiers;
$options .= '&amp;search_code_tiers=' . $search_code_tiers;
if (! empty($search_subledger_account)) {
$filter['t.subledger_account'] = $search_subledger_account;
$options .= '&amp;search_subledger_account=' . $search_subledger_account;
}
if (! empty($search_code_tiers_start)) {
$filter['t.code_tiers>='] = $search_code_tiers_start;
$options .= '&amp;search_code_tiers_start=' . $search_code_tiers_start;
if (! empty($search_subledger_account_start)) {
$filter['t.subledger_account>='] = $search_subledger_account_start;
$options .= '&amp;search_subledger_account_start=' . $search_subledger_account_start;
}
if (! empty($search_code_tiers_end)) {
$filter['t.code_tiers<='] = $search_code_tiers_end;
$options .= '&amp;search_code_tiers_end=' . $search_code_tiers_end;
if (! empty($search_subledger_account_end)) {
$filter['t.subledger_account<='] = $search_subledger_account_end;
$options .= '&amp;search_subledger_account_end=' . $search_subledger_account_end;
}
if (! empty($search_label_compte)) {
$filter['t.label_compte'] = $search_label_compte;
$options .= '&amp;search_label_compte=' . $search_label_compte;
if (! empty($search_label_operation)) {
$filter['t.label_operation'] = $search_label_operation;
$options .= '&amp;search_label_operation=' . $search_label_operation;
}
if (! empty($search_sens)) {
$filter['t.sens'] = $search_sens;
@@ -154,10 +157,13 @@ if (! empty($search_code_journal)) {
$options .= '&amp;search_code_journal=' . $search_code_journal;
}
/*
* Mode List
* Actions
*/
llxHeader('', $langs->trans("Bookkeeping"));
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
$nbtotalofrecords = $object->fetchAll($sortorder, $sortfield, 0, 0);
@@ -182,32 +188,32 @@ 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_subledger_account_start, 'search_subledger_account_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_subledger_account_end, 'search_subledger_account_end', 1);
print '</div>';
print "<table class=\"noborder\" width=\"100%\">";
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("NumPiece"), $_SERVER['PHP_SELF'], "t.piece_num", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Doctype"), $_SERVER['PHP_SELF'], "t.doc_type", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Date"), $_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("AccountAccounting"), $_SERVER['PHP_SELF'], "t.numero_compte", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("ThirdPartyAccount"), $_SERVER['PHP_SELF'], "t.code_tiers", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Label"), $_SERVER['PHP_SELF'], "t.label_compte", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "t.debit", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Amount"), $_SERVER['PHP_SELF'], "t.montant", "", $options, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Sens"), $_SERVER['PHP_SELF'], "t.sens", "", $options, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Codejournal"), $_SERVER['PHP_SELF'], "t.code_journal", "", $options, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Action"), $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
print_liste_field_titre("NumPiece", $_SERVER['PHP_SELF'], "t.piece_num", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre("Doctype", $_SERVER['PHP_SELF'], "t.doc_type", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre("Date", $_SERVER['PHP_SELF'], "t.doc_date", "", $options, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("Docref", $_SERVER['PHP_SELF'], "t.doc_ref", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre("AccountAccounting", $_SERVER['PHP_SELF'], "t.numero_compte", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre("ThirdPartyAccount", $_SERVER['PHP_SELF'], "t.subledger_account", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre("Label", $_SERVER['PHP_SELF'], "t.label_operation", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("Amount", $_SERVER['PHP_SELF'], "t.montant", "", $options, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("Sens", $_SERVER['PHP_SELF'], "t.sens", "", $options, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("Codejournal", $_SERVER['PHP_SELF'], "t.code_journal", "", $options, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("Action", $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
print "</tr>\n";
print '<tr class="liste_titre">';
@@ -232,11 +238,11 @@ print '<input type="text" size=6 class="flat" name="search_numero_compte" value=
print '</td>';
print '<td class="liste_titre">';
print '<input type="text" size=6 class="flat" name="search_code_tiers" value="' . $search_code_tiers . '"/>';
print '<input type="text" size=6 class="flat" name="search_subledger_account" value="' . $search_subledger_account . '"/>';
print '</td>';
print '<td class="liste_titre">';
print '<input type="text" size=6 class="flat" name="search_label_compte" value="' . $search_label_compte . '"/>';
print '<input type="text" size=6 class="flat" name="search_label_operation" value="' . $search_label_operation . '"/>';
print '</td>';
print '<td class="liste_titre">';
@@ -264,19 +270,16 @@ print '</td>';
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>';
print '<td>' . $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>' . length_accounta($line->subledger_account) . '</td>';
print '<td>' . $line->label_operation . '</td>';
print '<td align="right">' . price($line->debit) . '</td>';
print '<td align="right">' . price($line->credit) . '</td>';
print '<td align="right">' . price($line->montant) . '</td>';

View File

@@ -0,0 +1,331 @@
<?php
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@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 accounting/bookkeeping/thirdparty_lettrage.php
* \ingroup Accounting Expert
* \brief Onglet de gestion de parametrages des ventilations
*/
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/lettering.class.php';
require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
$action=GETPOST('action','aZ09');
$massaction=GETPOST('massaction','alpha');
$show_files=GETPOST('show_files','int');
$confirm=GETPOST('confirm','alpha');
$toselect = GETPOST('toselect', 'array');
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if ($sortorder == "") $sortorder = "ASC";
if ($sortfield == "") $sortfield = "bk.rowid";
$search_year = GETPOST ( "search_year" );
// Security check
$socid = GETPOST("socid",'int');
// if ($user->societe_id) $socid=$user->societe_id;
$object = new Societe($db);
$object->id = $socid;
$object->fetch($socid);
$form = new Form($db);
$BookKeeping = new lettering($db);
$formaccounting = new FormAccounting($db);
/*
* Action
*/
if ($action == 'lettering') {
$result = $BookKeeping->updatelettrage($_POST['ids']);
// var_dump($result);
if( $result < 0 ){
setEventMessages('', $BookKeeping->errors, 'errors' );
$error++;
}
}
if ($action == 'autolettrage') {
$result = $BookKeeping->LettrageTiers($socid);
if( $result < 0 ){
setEventMessages('', $BookKeeping->errors, 'errors' );
$error++;
}
}
llxHeader ( '', 'Compta - Grand Livre' );
/*
* Affichage onglets
*/
$head = societe_prepare_head($object);
dol_htmloutput_mesg(is_numeric($error)?'':$error, $errors, 'error');
dol_fiche_head($head, 'TabAccounting', $langs->trans("ThirdParty"),0,'company');
print '<table width="100%" class="border">';
print '<tr><td width="30%">'.$langs->trans("ThirdPartyName").'</td><td width="70%" colspan="3">';
$object->next_prev_filter="te.fournisseur = 1";
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom','','');
print '</td></tr>';
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
{
print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>';
}
print '<tr>';
print '<td class="nowrap">'.$langs->trans("CustomerCode"). '</td><td colspan="3">';
print $object->code_client;
if ($object->check_codeclient() <> 0) print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>';
print '</td>';
print '</tr>';
$langs->load('compta');
print '<tr>';
print '<td>';
print $form->editfieldkey("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer);
print '</td><td colspan="3">';
print $form->editfieldval("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer);
print '</td>';
print '</tr>';
// Address
print '<tr><td valign="top">'.$langs->trans("Address").'</td><td colspan="3">';
dol_print_address($object->address,'gmap','thirdparty',$object->id);
print '</td></tr>';
// Zip / Town
print '<tr><td class="nowrap">'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td colspan="3">'.$object->zip.(($object->zip && $object->town)?' / ':'').$object->town.'</td>';
print '</tr>';
// Country
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="3">';
//$img=picto_from_langcode($object->country_code);
$img='';
if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0);
else print ($img?$img.' ':'').$object->country;
print '</td></tr>';
print '</table>';
$sql = "SELECT bk.rowid, bk.doc_date, bk.doc_type, bk.doc_ref, bk.code_tiers, bk.numero_compte , bk.label_compte, bk.debit , bk.credit, bk.montant , bk.sens , bk.code_journal , bk.piece_num, bk.lettering_code ";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk";
$sql .= " WHERE (bk.code_tiers = '" . $object->code_compta . "' AND bk.numero_compte = '" .$conf->global->ACCOUNTING_ACCOUNT_CUSTOMER. "' )" ;
if (dol_strlen ( $search_year )) {
$sql .= " AND ( bk.doc_date BETWEEN '" . $search_year . "-0-0' AND '" . ($search_year+1). "-0-0' )";
}
$sql .= " ORDER BY bk.lettering_code ASC, bk.doc_date ASC" ;//. $db->plimit ( $conf->liste_limit + 1, $offset );
// echo $sql;
// dol_syslog ( "bookkeping:liste:create sql=" . $sql, LOG_DEBUG );
$resql = $db->query ( $sql );
if ($resql) {
$num = $db->num_rows ( $resql );
$i = 0;
print '<form name="add" action="?socid='.$object->id.'" method="POST">';
print '<input type="hidden" name="action" value="lettering">';
print '<input type="hidden" name="socid" value="'.$object->id.'">';
print "<table class=\"noborder\" width=\"100%\">";
print '<tr class="liste_titre">';
print '<td></td>';
print_liste_field_titre("Doctype", "liste.php", "bk.doc_type" );
print_liste_field_titre("Docdate", "liste.php", "bk.doc_date" );
print_liste_field_titre("Docref", "liste.php", "bk.doc_ref" );
// print_liste_field_titre("Numerocompte", "liste.php", "bk.numero_compte" );
// print_liste_field_titre("Code_tiers", "liste.php", "bk.code_tiers" );
print_liste_field_titre("Labelcompte", "liste.php", "bk_label_compte" );
print_liste_field_titre("Debit", "liste.php", "bk.debit" );
print_liste_field_titre("Credit", "liste.php", "bk.credit" );
// print_liste_field_titre("Amount", "liste.php", "bk.montant" );
// print_liste_field_titre("Sens", "liste.php", "bk.sens" );
print_liste_field_titre("Codejournal", "liste.php", "bk.code_journal" );
print '<td></td>';
print '<td></td>';
print "</tr>\n";
print '<tr class="liste_titre">';
print '<form action="" method="GET">';
print '<input type="hidden" name="socid" value="' . $_GET ["socid"] . '">';
print '<td><input type="text" name="search_doc_type" value="' . $_GET ["search_doc_type"] . '"></td>';
print '<td><input type="text" name="search_year" value="' . $_GET ["search_year"] . '"></td>';
print '<td><input type="text" name="search_doc_refe" value="' . $_GET ["search_doc_ref"] . '"></td>';
// print '<td><input type="text" name="search_compte" value="' . $_GET ["search_compte"] . '"></td>';
// print '<td><input type="text" name="search_tiers" value="' . $_GET ["search_tiers"] . '"></td>';
print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>';
// print '<td>&nbsp;</td>';
// print '<td>&nbsp;</td>';
print '<td align="right">';
print '<input type="image" class="liste_titre" name="button_search" src="' . DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/search.png" value="' . dol_escape_htmltag ( $langs->trans ( "Search" ) ) . '" title="' . dol_escape_htmltag ( $langs->trans ( "Search" ) ) . '">';
print '</td>';
print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>';
print '</form>';
print '</tr>';
$var = false;
$debit = 0;
$credit = 0;
$solde = 0;
$tmp = '';
while ( $i < $num ) {
$obj = $db->fetch_object ( $resql );
if($tmp !=$obj->lettering_code || empty($tmp) )
$tmp =$obj->lettering_code;
if($tmp !=$obj->lettering_code || empty($obj->lettering_code))
$var = ! $var;
$debit+= $obj->debit;
$credit+= $obj->credit;
$solde+=($obj->credit-$obj->debit);
print "<tr $bc[$var]>";
print '<td>' . $obj->rowid . '</td>';
if(empty($obj->lettering_code)){
print '<td><a href="'.dol_buildpath('/accountancy/bookkeeping/card.php', 1).'?piece_num=' . $obj->piece_num . '">';
print img_edit ();
print '</a>&nbsp;' . $obj->doc_type . '</td>' . "\n";
}
else
print '<td>'.$obj->doc_type . '</td>' . "\n";
print '<td>' . dol_print_date ( $db->jdate ( $obj->doc_date ), 'day' ) . '</td>';
print '<td>' . $obj->doc_ref . '</td>';
// print '<td>' . $obj->numero_compte . '</td>';
// print '<td>' . $obj->code_tiers . '</td>';
print '<td>' . $obj->label_compte . '</td>';
print '<td>' . $obj->debit . '</td>';
print '<td>' . $obj->credit . '</td>';
// print '<td>' . $obj->montant . '</td>';
// print '<td>' . $obj->sens . '</td>';
print '<td>' . $obj->code_journal . '</td>';
print '<td>' . round($solde, 2) . '</td>';
if(empty($obj->lettering_code)){
print '<td><input type="checkbox" name="ids[]" value="' . $obj->rowid . '" /></td>';
}
else
print '<td>' . $obj->lettering_code . '</td>';
print "</tr>\n";
$i ++;
}
print '<tr class="oddeven">';
print '<td colspan="4">Mouvement totaux</td>' . "\n";
print '<td></td>';
// print '<td></td>';
// print '<td></td>';
print '<td><strong>' . $debit . '</strong></td>';
print '<td><strong>' . $credit . '</strong></td>';
print '<td></td>';
print '<td></td>';
print '<td></td>';
print '<td>&nbsp;</td>';
print "</tr>\n";
print "<tr $bc[$var]>";
print '<td colspan="5">Solde Comptable</td>' . "\n";
// print '<td></td>';
// print '<td></td>';
print '<td></td>';
print '<td><strong>' . ($credit-$debit) . '</strong></td>';
print '<td></td>';
print '<td></td>';
print '<td></td>';
print '<td>&nbsp;</td>';
print "</tr>\n";
print "</table>";
print '<input class="butAction" type="submit" value="lettering">';
print '<a class="butAction" href="?socid='.$object->id.'&action=autolettrage">auto lettering</a>';
print "</form>";
$db->free($resql);
} else {
dol_print_error($db);
}
// End of page
llxFooter();
$db->close();

View File

@@ -0,0 +1,335 @@
<?php
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@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 accounting/bookkeeping/thirdparty_lettrage.php
* \ingroup Accounting Expert
* \brief Onglet de gestion de parametrages des ventilations
*/
// Dolibarr environment
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/lettering.class.php';
require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
$action=GETPOST('action','aZ09');
$massaction=GETPOST('massaction','alpha');
$show_files=GETPOST('show_files','int');
$confirm=GETPOST('confirm','alpha');
$toselect = GETPOST('toselect', 'array');
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if ($sortorder == "") $sortorder = "ASC";
if ($sortfield == "") $sortfield = "bk.rowid";
$search_year = GETPOST ( "search_year" );
// Security check
$socid = GETPOST("socid",'int');
// if ($user->societe_id) $socid=$user->societe_id;
$object = new Societe($db);
$object->id = $socid;
$object->fetch($socid);
$form = new Form($db);
$BookKeeping = new lettering($db);
$formaccounting = new FormAccounting($db);
/*
* Action
*/
if ($action == 'lettering') {
$result = $BookKeeping->updatelettrage($_POST['ids']);
// var_dump($result);
if( $result < 0 ){
setEventMessages('', $BookKeeping->errors, 'errors' );
$error++;
}
}
if ($action == 'autolettrage') {
$result = $BookKeeping->LettrageTiers($socid);
if( $result < 0 ){
setEventMessages('', $BookKeeping->errors, 'errors' );
$error++;
}
}
llxHeader ( '', 'Compta - Grand Livre' );
/*
* Affichage onglets
*/
$head = societe_prepare_head($object);
dol_htmloutput_mesg(is_numeric($error)?'':$error, $errors, 'error');
dol_fiche_head($head, 'TabAccounting', $langs->trans("ThirdParty"),0,'company');
print '<table width="100%" class="border">';
print '<tr><td width="30%">'.$langs->trans("ThirdPartyName").'</td><td width="70%" colspan="3">';
$object->next_prev_filter="te.fournisseur = 1";
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom','','');
print '</td></tr>';
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
{
print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>';
}
print '<tr>';
print '<td class="nowrap">'.$langs->trans("SupplierCode"). '</td><td colspan="3">';
print $object->code_fournisseur;
if ($object->check_codefournisseur() <> 0) print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>';
print '</td>';
print '</tr>';
$langs->load('compta');
print '<tr>';
print '<td>';
print $form->editfieldkey("SupplierAccountancyCode",'supplieraccountancycode',$object->code_compta_fournisseur,$object,$user->rights->societe->creer);
print '</td><td colspan="3">';
print $form->editfieldval("SupplierAccountancyCode",'supplieraccountancycode',$object->code_compta_fournisseur,$object,$user->rights->societe->creer);
print '</td>';
print '</tr>';
// Address
print '<tr><td valign="top">'.$langs->trans("Address").'</td><td colspan="3">';
dol_print_address($object->address,'gmap','thirdparty',$object->id);
print '</td></tr>';
// Zip / Town
print '<tr><td class="nowrap">'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td colspan="3">'.$object->zip.(($object->zip && $object->town)?' / ':'').$object->town.'</td>';
print '</tr>';
// Country
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="3">';
//$img=picto_from_langcode($object->country_code);
$img='';
if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0);
else print ($img?$img.' ':'').$object->country;
print '</td></tr>';
print '</table>';
// print_r($soc);
// exit;
// [code_compta] => 411DOUA
// [code_compta_fournisseur] => 401SUPPCODE
/*
* Mode Liste
*
*
*
*/
$sql = "SELECT bk.rowid, bk.doc_date, bk.doc_type, bk.doc_ref, bk.code_tiers, bk.numero_compte , bk.label_compte, bk.debit , bk.credit, bk.montant , bk.sens , bk.code_journal , bk.piece_num, bk.lettering ";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk";
$sql .= " WHERE (bk.code_tiers = '" . $object->code_compta_fournisseur . "' AND bk.numero_compte = '" .$conf->global->ACCOUNTING_ACCOUNT_SUPPLIER. "' )" ;
if (dol_strlen ( $search_year )) {
$sql .= " AND ( bk.doc_date BETWEEN '" . $search_year . "-0-0' AND '" . ($search_year+1). "-0-0' )";
}
$sql .= " ORDER BY bk.lettering ASC, bk.doc_date ASC" ;//. $db->plimit ( $conf->liste_limit + 1, $offset );
// echo $sql;
// dol_syslog ( "bookkeping:liste:create sql=" . $sql, LOG_DEBUG );
$resql = $db->query ( $sql );
if ($resql) {
$num = $db->num_rows ( $resql );
$i = 0;
print '<form name="add" action="?socid='.$object->id.'" method="POST">';
print '<input type="hidden" name="action" value="lettering">';
print '<input type="hidden" name="socid" value="'.$object->id.'">';
print "<table class=\"noborder\" width=\"100%\">";
print '<tr class="liste_titre">';
print '<td></td>';
print_liste_field_titre("Doctype", "liste.php", "bk.doc_type" );
print_liste_field_titre("Docdate", "liste.php", "bk.doc_date" );
print_liste_field_titre("Docref", "liste.php", "bk.doc_ref" );
// print_liste_field_titre("Numerocompte", "liste.php", "bk.numero_compte" );
// print_liste_field_titre("Code_tiers", "liste.php", "bk.code_tiers" );
print_liste_field_titre("Labelcompte", "liste.php", "bk_label_compte" );
print_liste_field_titre("Debit", "liste.php", "bk.debit" );
print_liste_field_titre("Credit", "liste.php", "bk.credit" );
print_liste_field_titre("Amount", "liste.php", "bk.montant" );
print_liste_field_titre("Sens", "liste.php", "bk.sens" );
print_liste_field_titre("Codejournal", "liste.php", "bk.code_journal" );
print '<td></td>';
print '<td></td>';
print "</tr>\n";
print '<tr class="liste_titre">';
print '<form action="" method="GET">';
print '<input type="hidden" name="socid" value="' . $_GET ["socid"] . '">';
print '<td><input type="text" name="search_doc_type" value="' . $_GET ["search_doc_type"] . '"></td>';
print '<td><input type="text" name="search_year" value="' . $_GET ["search_year"] . '"></td>';
print '<td><input type="text" name="search_doc_refe" value="' . $_GET ["search_doc_ref"] . '"></td>';
// print '<td><input type="text" name="search_compte" value="' . $_GET ["search_compte"] . '"></td>';
// print '<td><input type="text" name="search_tiers" value="' . $_GET ["search_tiers"] . '"></td>';
print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>';
print '<td align="right">';
print '<input type="image" class="liste_titre" name="button_search" src="' . DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/search.png" value="' . dol_escape_htmltag ( $langs->trans ( "Search" ) ) . '" title="' . dol_escape_htmltag ( $langs->trans ( "Search" ) ) . '">';
print '</td>';
print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>';
print '</form>';
print '</tr>';
$var = false;
$debit = 0;
$credit = 0;
$solde = 0;
$tmp = '';
while ( $i < $num ) {
$obj = $db->fetch_object ( $resql );
if($tmp !=$obj->lettering || empty($tmp) )
$tmp =$obj->lettering;
if($tmp !=$obj->lettering || empty($obj->lettering))
$var = ! $var;
$debit+= $obj->debit;
$credit+= $obj->credit;
$solde+=($obj->credit-$obj->debit);
print "<tr $bc[$var]>";
print '<td>' . $obj->rowid . '</td>';
if(empty($obj->lettering)){
print '<td><a href="'.dol_buildpath('/accountancy/bookkeeping/card.php', 1).'?piece_num=' . $obj->piece_num . '">';
print img_edit ();
print '</a>&nbsp;' . $obj->doc_type . '</td>' . "\n";
}
else
print '<td>'.$obj->doc_type . '</td>' . "\n";
print '<td>' . dol_print_date ( $db->jdate ( $obj->doc_date ), 'day' ) . '</td>';
print '<td>' . $obj->doc_ref . '</td>';
// print '<td>' . $obj->numero_compte . '</td>';
// print '<td>' . $obj->code_tiers . '</td>';
print '<td>' . $obj->label_compte . '</td>';
print '<td>' . $obj->debit . '</td>';
print '<td>' . $obj->credit . '</td>';
print '<td>' . $obj->montant . '</td>';
print '<td>' . $obj->sens . '</td>';
print '<td>' . $obj->code_journal . '</td>';
print '<td>' . round($solde, 2) . '</td>';
if(empty($obj->lettering)){
print '<td><input type="checkbox" name="ids[]" value="' . $obj->rowid . '" /></td>';
}
else
print '<td>' . $obj->lettering . '</td>';
print "</tr>\n";
$i ++;
}
print '<tr class="oddeven">';
print '<td colspan="4">Mouvement totaux</td>' . "\n";
print '<td></td>';
print '<td></td>';
print '<td></td>';
print '<td><strong>' . $debit . '</strong></td>';
print '<td><strong>' . $credit . '</strong></td>';
print '<td></td>';
print '<td></td>';
print '<td></td>';
print '<td>&nbsp;</td>';
print "</tr>\n";
print "<tr $bc[$var]>";
print '<td colspan="5">Solde Comptable</td>' . "\n";
print '<td></td>';
print '<td></td>';
print '<td></td>';
print '<td><strong>' . ($credit-$debit) . '</strong></td>';
print '<td></td>';
print '<td></td>';
print '<td></td>';
print '<td>&nbsp;</td>';
print "</tr>\n";
print "</table>";
print '<input class="butAction" type="submit" value="lettering">';
print '<a class="butAction" href="?socid='.$object->id.'&action=autolettrage">auto lettering</a>';
print "</form>";
$db->free ( $resql );
} else {
dol_print_error ( $db );
}
// End of page
llxFooter();
$db->close();

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();
@@ -93,7 +92,7 @@ class AccountancyCategory
public function getCptBK($id) {
global $conf;
$sql = "SELECT t.numero_compte, t.label_compte, t.doc_ref";
$sql = "SELECT t.numero_compte, t.label_operation, t.doc_ref";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as t";
$sql .= " WHERE t.numero_compte NOT IN (";
$sql .= " SELECT t.account_number";
@@ -105,7 +104,7 @@ class AccountancyCategory
$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 .= " GROUP BY t.numero_compte, t.label_compte, t.doc_ref";
$sql .= " GROUP BY t.numero_compte, t.label_operation, t.doc_ref";
$sql .= " ORDER BY t.numero_compte";
$this->lines_CptBk = array ();
@@ -139,7 +138,7 @@ class AccountancyCategory
*/
public function getAccountsWithNoCategory($id) {
global $conf;
$sql = "SELECT aa.account_number as numero_compte, aa.label as label_compte";
$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";
@@ -148,9 +147,9 @@ class AccountancyCategory
$sql .= " AND aa.active = 1";
$sql .= " GROUP BY aa.account_number, aa.label";
$sql .= " ORDER BY aa.account_number, aa.label";
$this->lines_CptBk = array ();
dol_syslog(__METHOD__, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
@@ -160,17 +159,17 @@ class AccountancyCategory
$this->lines_cptbk[] = $obj;
}
}
return $num;
} else {
$this->error = "Error " . $this->db->lasterror();
$this->errors[] = $this->error;
dol_syslog(__METHOD__ . " " . implode(',' . $this->errors), LOG_ERR);
return - 1;
}
}
/**
* Function to add an accounting account in an accounting category
*
@@ -192,7 +191,7 @@ class AccountancyCategory
$sql .= " AND aa.active = 1";
$this->db->begin();
dol_syslog(__METHOD__, LOG_DEBUG);
$resql = $this->db->query($sql);
if (! $resql) {
@@ -202,9 +201,9 @@ class AccountancyCategory
return -1;
}
while ( $obj = $this->db->fetch_object($resql))
while ( $obj = $this->db->fetch_object($resql))
{
if (array_key_exists(length_accountg($obj->account_number), $cpts))
if (array_key_exists(length_accountg($obj->account_number), $cpts))
{
$sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account";
$sql .= " SET fk_accounting_category=" . $id_cat;
@@ -333,7 +332,7 @@ class AccountancyCategory
}
/**
* Function to show result of an accounting account from the general ledger with a sens and a period
* Function to show result of an accounting account from the ledger with a direction and a period
*
* @param int $cpt Id accounting account
* @param string $month Specifig month - Can be empty
@@ -430,4 +429,160 @@ class AccountancyCategory
return - 1;
}
}
public function getCats() {
global $db, $langs, $user, $mysoc;
if (empty($mysoc->country_id) && empty($mysoc->country_code)) {
dol_print_error('', 'Call to select_accounting_account with mysoc country not yet defined');
exit();
}
if (! empty($mysoc->country_id)) {
$sql = "SELECT c.rowid, c.code, c.label, c.formula, c.position, c.category_type";
$sql .= " FROM " . MAIN_DB_PREFIX . "c_accounting_category as c";
$sql .= " WHERE c.active = 1 ";
$sql .= " AND c.fk_country = " . $mysoc->country_id;
$sql .= " ORDER BY c.position ASC";
} else {
$sql = "SELECT c.rowid, c.code, c.label, c.formula, c.position, c.category_type";
$sql .= " FROM " . MAIN_DB_PREFIX . "c_accounting_category as c, " . MAIN_DB_PREFIX . "c_country as co";
$sql .= " WHERE c.active = 1 AND c.fk_country = co.rowid";
$sql .= " AND co.code = '" . $mysoc->country_code . "'";
$sql .= " ORDER BY c.position ASC";
}
dol_syslog(__METHOD__ . " sql=" . $sql, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$i = 0;
$obj = '';
$num = $this->db->num_rows($resql);
$data = array ();
if ($num) {
while ( $i < $num ) {
$obj = $this->db->fetch_object($resql);
$data[] = array (
'rowid' => $obj->rowid,
'code' => $obj->code,
'position' => $obj->position,
'label' => $obj->label,
'formula' => $obj->formula,
'category_type' => $obj->category_type
);
$i ++;
}
}
return $data;
} else {
$this->error = "Error " . $this->db->lasterror();
$this->errors[] = $this->error;
dol_syslog(__METHOD__ . " " . implode(',', $this->errors), LOG_ERR);
return - 1;
}
}
// calcule
const PATTERN = '/(?:\-?\d+(?:\.?\d+)?[\+\-\*\/])+\-?\d+(?:\.?\d+)?/';
const PARENTHESIS_DEPTH = 10;
public function calculate($input){
if(strpos($input, '+') != null || strpos($input, '-') != null || strpos($input, '/') != null || strpos($input, '*') != null){
// Remove white spaces and invalid math chars
$input = str_replace(',', '.', $input);
$input = preg_replace('[^0-9\.\+\-\*\/\(\)]', '', $input);
// Calculate each of the parenthesis from the top
$i = 0;
while(strpos($input, '(') || strpos($input, ')')){
$input = preg_replace_callback('/\(([^\(\)]+)\)/', 'self::callback', $input);
$i++;
if($i > self::PARENTHESIS_DEPTH){
break;
}
}
// Calculate the result
if(preg_match(self::PATTERN, $input, $match)){
return $this->compute($match[0]);
}
return 0;
}
return $input;
}
private function compute($input){
$compute = create_function('', 'return '.$input.';');
return 0 + $compute();
}
private function callback($input){
if(is_numeric($input[1])){
return $input[1];
}
elseif(preg_match(self::PATTERN, $input[1], $match)){
return $this->compute($match[0]);
}
return 0;
}
/**
* get cpts of category
*
* @param int $cat_id Id accounting account category
*
* @return array Result in table
*/
public function getCptsCat($cat_id) {
global $mysoc;
$sql = "";
if (empty($mysoc->country_id) && empty($mysoc->country_code)) {
dol_print_error('', 'Call to select_accounting_account with mysoc country not yet defined');
exit();
}
$sql = "SELECT t.rowid, t.account_number, t.label as name_cpt";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as t";
$sql .= " WHERE t.fk_accounting_category = ".$cat_id;
$sql .= " ORDER BY t.account_number ";
//echo $sql;
$resql = $this->db->query($sql);
if ($resql) {
$i = 0;
$obj = '';
$num = $this->db->num_rows($resql);
$data = array ();
if ($num) {
while ( $obj = $this->db->fetch_object($resql) ) {
$name_cat = $obj->name_cat;
$data[] = array (
'id' => $obj->rowid,
'account_number' => $obj->account_number,
'name_cpt' => $obj->name_cpt,
);
$i ++;
}
}
return $data;
} else {
$this->error = "Error " . $this->db->lasterror();
dol_syslog(__METHOD__ . " " . $this->error, LOG_ERR);
return -1;
}
}
}

View File

@@ -5,7 +5,7 @@
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2016 Pierre-Henry Favre <phf@atm-consulting.fr>
* 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
@@ -32,14 +32,15 @@
*
* Manage the different format accountancy export
*/
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions.lib.php';
class AccountancyExport
{
/**
*
* @var Type of export
* @var Type of export. Defined by $conf->global->ACCOUNTING_EXPORT_MODELCSV
*/
public static $EXPORT_TYPE_NORMAL = 1;
public static $EXPORT_TYPE_NORMAL = 1; // Classic CSV
public static $EXPORT_TYPE_CEGID = 2;
public static $EXPORT_TYPE_COALA = 3;
public static $EXPORT_TYPE_BOB50 = 4;
@@ -47,6 +48,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;
/**
*
@@ -80,7 +82,7 @@ class AccountancyExport
}
/**
* Get all export type are available
* Array wit all export type available (key + label)
*
* @return array of type
*/
@@ -96,6 +98,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 +148,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;
@@ -167,7 +173,7 @@ class AccountancyExport
print $date . $this->separator;
print $line->doc_ref . $this->separator;
print length_accountg($line->numero_compte) . $this->separator;
print length_accounta($line->code_tiers) . $this->separator;
print length_accounta($line->subledger_account) . $this->separator;
print price($line->debit) . $this->separator;
print price($line->credit) . $this->separator;
print $line->code_journal . $this->separator;
@@ -190,10 +196,10 @@ class AccountancyExport
print $date . $separator;
print $line->code_journal . $separator;
print length_accountg($line->numero_compte) . $separator;
print length_accounta($line->code_tiers) . $separator;
print length_accounta($line->subledger_account) . $separator;
print $line->sens . $separator;
print price($line->montant) . $separator;
print $line->label_compte . $separator;
print $line->label_operation . $separator;
print $line->doc_ref;
print $this->end_line;
}
@@ -215,7 +221,7 @@ class AccountancyExport
print $line->piece_num . $this->separator;
print length_accountg($line->numero_compte) . $this->separator;
print '' . $this->separator;
print $line->label_compte . $this->separator;
print $line->label_operation . $this->separator;
print $date . $this->separator;
if ($line->sens=='D') {
print price($line->montant) . $this->separator;
@@ -225,7 +231,7 @@ class AccountancyExport
print price($line->montant) . $this->separator;
}
print $line->doc_ref . $this->separator;
print $line->label_compte . $this->separator;
print $line->label_operation . $this->separator;
print $this->end_line;
}
}
@@ -249,7 +255,7 @@ class AccountancyExport
print price($line->debit) . $this->separator;
print price($line->credit) . $this->separator;
print 'E' . $this->separator;
print length_accountg($line->code_tiers) . $this->separator;
print length_accountg($line->subledger_account) . $this->separator;
print $this->end_line;
}
}
@@ -269,7 +275,7 @@ class AccountancyExport
$date = dol_print_date($line->doc_date, '%d/%m/%Y');
print $date . $this->separator;
if (empty($line->code_tiers)) {
if (empty($line->subledger_account)) {
print 'G' . $this->separator;
print length_accounta($line->numero_compte) . $this->separator;
} else {
@@ -279,12 +285,12 @@ class AccountancyExport
if (substr($line->numero_compte, 0, 3) == '401') {
print 'F' . $this->separator;
}
print length_accountg($line->code_tiers) . $this->separator;
print length_accountg($line->subledger_account) . $this->separator;
}
print price($line->debit) . $this->separator;
print price($line->credit) . $this->separator;
print dol_trunc($line->label_compte, 32) . $this->separator;
print dol_trunc($line->label_operation, 32) . $this->separator;
print $this->end_line;
}
}
@@ -302,11 +308,11 @@ class AccountancyExport
$this->end_line ="\r\n";
$i = 1;
$date_ecriture = dol_print_date(time(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be yyyymmdd
$date_ecriture = dol_print_date(dol_now(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be yyyymmdd
foreach ( $TData as $data ) {
$code_compta = $data->numero_compte;
if (! empty($data->code_tiers))
$code_compta = $data->code_tiers;
if (! empty($data->subledger_account))
$code_compta = $data->subledger_account;
$Tab = array ();
$Tab['num_ecriture'] = str_pad($i, 5);
@@ -315,11 +321,11 @@ class AccountancyExport
$Tab['date_ope'] = dol_print_date($data->doc_date, $conf->global->ACCOUNTING_EXPORT_DATE);
$Tab['num_piece'] = str_pad(self::trunc($data->piece_num, 12), 12);
$Tab['num_compte'] = str_pad(self::trunc($code_compta, 11), 11);
$Tab['libelle_ecriture'] = str_pad(self::trunc($data->doc_ref . $data->label_compte, 25), 25);
$Tab['libelle_ecriture'] = str_pad(self::trunc($data->doc_ref . $data->label_operation, 25), 25);
$Tab['montant'] = str_pad(abs($data->montant), 13, ' ', STR_PAD_LEFT);
$Tab['type_montant'] = str_pad($data->sens, 1);
$Tab['vide'] = str_repeat(' ', 18);
$Tab['intitule_compte'] = str_pad(self::trunc($data->label_compte, 34), 34);
$Tab['intitule_compte'] = str_pad(self::trunc($data->label_operation, 34), 34);
$Tab['end'] = 'O2003';
$Tab['end_line'] = $this->end_line;
@@ -344,8 +350,8 @@ class AccountancyExport
$date_ecriture = dol_print_date(time(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy
foreach ( $TData as $data ) {
$code_compta = $data->numero_compte;
if (! empty($data->code_tiers))
$code_compta = $data->code_tiers;
if (! empty($data->subledger_account))
$code_compta = $data->subledger_account;
$Tab = array ();
$Tab['type_ligne'] = 'M';
@@ -354,7 +360,7 @@ class AccountancyExport
$Tab['folio'] = '000';
$Tab['date_ecriture'] = $date_ecriture;
$Tab['filler'] = ' ';
$Tab['libelle_ecriture'] = str_pad(self::trunc($data->doc_ref . ' ' . $data->label_compte, 20), 20);
$Tab['libelle_ecriture'] = str_pad(self::trunc($data->doc_ref . ' ' . $data->label_operation, 20), 20);
$Tab['sens'] = $data->sens; // C or D
$Tab['signe_montant'] = '+';
$Tab['montant'] = str_pad(abs($data->montant), 12, '0', STR_PAD_LEFT); // TODO manage negative amount
@@ -370,7 +376,7 @@ class AccountancyExport
$Tab['devis'] = str_pad($conf->currency, 3);
$Tab['code_journal2'] = str_pad(self::trunc($data->code_journal, 3), 3);
$Tab['filler3'] = str_repeat(' ', 3);
$Tab['libelle_ecriture2'] = str_pad(self::trunc($data->doc_ref . ' ' . $data->label_compte, 32), 32);
$Tab['libelle_ecriture2'] = str_pad(self::trunc($data->doc_ref . ' ' . $data->label_operation, 32), 32);
$Tab['num_piece3'] = str_pad(self::trunc($data->piece_num, 10), 10);
$Tab['filler4'] = str_repeat(' ', 73);
@@ -382,7 +388,7 @@ class AccountancyExport
/**
* Export format : Normal
* Export format : EBP
*
* @param array $objectLines data
*
@@ -401,7 +407,7 @@ class AccountancyExport
print $line->code_journal . $this->separator;
print length_accountg($line->numero_compte) . $this->separator;
print substr(length_accountg($line->numero_compte),0,2) . $this->separator;
print '"'.dol_trunc($line->label_compte,40,'right','UTF-8',1).'"' . $this->separator;
print '"'.dol_trunc($line->label_operation,40,'right','UTF-8',1).'"' . $this->separator;
print '"'.dol_trunc($line->piece_num,15,'right','UTF-8',1).'"'.$this->separator;
print price2num($line->montant).$this->separator;
print $line->sens.$this->separator;
@@ -412,6 +418,42 @@ class AccountancyExport
}
/**
* Export format : Agiris Isacompta
*
* @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->piece_num . $this->separator;
print $line->label_operation . $this->separator;
print $date . $this->separator;
print $line->label_operation . $this->separator;
if (empty($line->subledger_account)) {
print length_accountg($line->numero_compte) . $this->separator;
} else {
print length_accounta($line->subledger_account) . $this->separator;
}
print $line->doc_ref . $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;
print $this->end_line;
}
}
/**
*

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
*
* This program is free software; you can redistribute it and/or modify
@@ -37,7 +37,7 @@ class AccountancySystem
var $label;
var $account_number;
var $account_parent;
/**
* Constructor
*
@@ -46,8 +46,8 @@ class AccountancySystem
function __construct($db) {
$this->db = $db;
}
/**
* Load record in memory
*
@@ -55,11 +55,11 @@ class AccountancySystem
* @param string $ref ref
* @return int <0 if KO, Id of record if OK and found
*/
function fetch($rowid = 0, $ref = '')
function fetch($rowid = 0, $ref = '')
{
global $conf;
if ($rowid > 0 || $ref)
if ($rowid > 0 || $ref)
{
$sql = "SELECT a.pcg_version, a.label, a.active";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_system as a";
@@ -69,12 +69,12 @@ class AccountancySystem
} elseif ($ref) {
$sql .= " a.pcg_version = '" . $ref . "'";
}
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;
@@ -82,7 +82,7 @@ class AccountancySystem
$this->ref = $obj->pcg_version;
$this->label = $obj->label;
$this->active = $obj->active;
return $this->id;
} else {
return 0;
@@ -94,8 +94,8 @@ class AccountancySystem
}
return - 1;
}
/**
* Insert accountancy system name into database
*
@@ -104,16 +104,16 @@ class AccountancySystem
*/
function create($user) {
$now = dol_now();
$sql = "INSERT INTO " . MAIN_DB_PREFIX . "accounting_system";
$sql .= " (date_creation, fk_user_author, numero, label)";
$sql .= " VALUES (" . $this->db->idate($now) . "," . $user->id . ",'" . $this->numero . "','" . $this->label . "')";
$sql .= " VALUES ('" . $this->db->idate($now) . "'," . $user->id . ",'" . $this->numero . "','" . $this->label . "')";
dol_syslog(get_class($this) . "::create sql=" . $sql, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$id = $this->db->last_insert_id(MAIN_DB_PREFIX . "accounting_system");
if ($id > 0) {
$this->rowid = $id;
$result = $this->rowid;
@@ -127,7 +127,7 @@ class AccountancySystem
$this->error = "AccountancySystem::Create Erreur $result";
dol_syslog($this->error, LOG_ERR);
}
return $result;
}
}

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com>
@@ -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,276 @@
<?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;
public $code;
public $label;
public $nature; // 0:various operations, 1:sale, 2:purchase, 3:bank, 4:expense-report, 9: has-new
public $active;
public $lines;
/**
* 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 = " . (int) $rowid;
} elseif ($journal_code) {
$sql .= " code = '" . $this->db->escape($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;
}
/**
* Load object in memory from the database
*
* @param string $sortorder Sort Order
* @param string $sortfield Sort field
* @param int $limit offset limit
* @param int $offset offset limit
* @param array $filter filter array
* @param string $filtermode filter mode (AND or OR)
*
* @return int <0 if KO, >0 if OK
*/
function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') {
$sql = "SELECT rowid, code, label, nature, active";
$sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t';
// Manage filter
$sqlwhere = array();
if (count($filter) > 0) {
foreach ( $filter as $key => $value ) {
if ($key == 't.code' || $key == 't.label' || $key == 't.nature') {
$sqlwhere[] = $key . '\'' . $this->db->escape($value) . '\'';
} elseif ($key == 't.rowid' || $key == 't.active') {
$sqlwhere[] = $key . '=' . $value;
}
}
}
$sql .= ' WHERE 1 = 1';
$sql .= " AND entity IN (" . getEntity('accountancy') . ")";
if (count($sqlwhere) > 0) {
$sql .= ' AND ' . implode(' ' . $filtermode . ' ', $sqlwhere);
}
if (! empty($sortfield)) {
$sql .= $this->db->order($sortfield, $sortorder);
}
if (! empty($limit)) {
$sql .= ' ' . $this->db->plimit($limit + 1, $offset);
}
$this->lines = array();
dol_syslog(get_class($this) . "::fetch sql=" . $sql, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$num = $this->db->num_rows($resql);
while ( $obj = $this->db->fetch_object($resql) ) {
$line = new self($this->db);
$line->id = $obj->rowid;
$line->code = $obj->code;
$line->label = $obj->label;
$line->nature = $obj->nature;
$line->active = $obj->active;
$this->lines[] = $line;
}
$this->db->free($resql);
return $num;
} else {
$this->errors[] = 'Error ' . $this->db->lasterror();
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
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 == 5) return $langs->trans('AccountingJournalType5');
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 == 5) return $langs->trans('AccountingJournalType5');
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

@@ -0,0 +1,330 @@
<?php
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@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 2 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 accountancy/class/bookkeeping.class.php
* \ingroup Accounting Expert
* \brief Fichier de la classe des comptes comptable
*/
include_once DOL_DOCUMENT_ROOT."/accountancy/class/bookkeeping.class.php";
include_once DOL_DOCUMENT_ROOT."/societe/class/societe.class.php";
include_once DOL_DOCUMENT_ROOT."/core/lib/date.lib.php";
/**
* Class lettering
*/
class lettering extends BookKeeping
{
/**
* lettrageTiers
*
* @param int $socid Thirdparty id
* @return void
*/
public function lettrageTiers($socid) {
$db = $this->db;
$object = new Societe($this->db);
$object->id = $socid;
$object->fetch($socid);
if( $object->code_compta == '411CUSTCODE')
$object->code_compta = '';
if( $object->code_compta_fournisseur == '401SUPPCODE')
$object->code_compta_fournisseur = '';
$sql = "SELECT bk.rowid, bk.doc_date, bk.doc_type, bk.lettering_code, bk.code_tiers, bk.numero_compte , bk.label_compte, bk.debit , bk.credit, bk.montant , bk.sens , bk.code_journal , bk.piece_num, bk.date_lettering ";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk";
$sql .= " WHERE code_journal = 'BQ' AND ( ";
if(!empty($object->code_compta) )
$sql .= " bk.code_tiers = '" . $object->code_compta . "' ";
if(!empty($object->code_compta) && !empty($object->code_compta_fournisseur) )
$sql .= " OR ";
if(!empty($object->code_compta_fournisseur) )
$sql .= " bk.code_tiers = '" . $object->code_compta_fournisseur . "' ";
$sql .= " ) AND ( bk.date_lettering ='' OR bk.date_lettering IS NULL ) AND bk.lettering_code !='' ";
$sql .= " GROUP BY bk.lettering_code ";
$resql = $db->query ( $sql );
if ($resql) {
$num = $db->num_rows ( $resql );
$i = 0;
while ( $i < $num ) {
$obj = $db->fetch_object ( $resql );
$i++;
$sql = "SELECT bk.rowid ";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk";
$sql .= " WHERE bk.lettering_code = '".$obj->lettering_code."' ";
$sql .= " AND ( ";
if(!empty($object->code_compta) )
$sql .= " bk.code_tiers = '" . $object->code_compta . "' ";
if(!empty($object->code_compta) && !empty($object->code_compta_fournisseur) )
$sql .= " OR ";
if(!empty($object->code_compta_fournisseur) )
$sql .= " bk.code_tiers = '" . $object->code_compta_fournisseur . "' ";
$sql .= " ) ";
// echo $sql;
$resql2 = $db->query ( $sql );
if ($resql2) {
$num2 = $db->num_rows ( $resql2 );
$i2 = 0;
$ids = array();
while ( $i2 < $num2 ) {
$obj2 = $db->fetch_object ( $resql2 );
$i2++;
$ids[] = $obj2->rowid;
}
if(count($ids) > 1 ){
$result = $this->updatelettrage($ids);
// var_dump($result);
// if( $result < 0 ){
// setEventMessages('', $BookKeeping->errors, 'errors' );
// $error++;
//
// }
}
}
}
}
/**
Prise en charge des lettering complexe avec prelevment , virement
*/
$sql = "SELECT bk.rowid, bk.doc_date, bk.doc_type, bk.doc_ref, bk.code_tiers, bk.numero_compte , bk.label_compte, bk.debit , bk.credit, bk.montant , bk.sens , bk.code_journal , bk.piece_num, bk.date_lettering, bu.url_id , bu.type ";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "bank_url as bu ON(bk.fk_doc = bu.fk_bank AND bu.type IN ('payment', 'payment_supplier') ) ";
$sql .= " WHERE code_journal = 'BQ' AND ( ";
if(!empty($object->code_compta) )
$sql .= " bk.code_tiers = '" . $object->code_compta . "' ";
if(!empty($object->code_compta) && !empty($object->code_compta_fournisseur) )
$sql .= " OR ";
if(!empty($object->code_compta_fournisseur) )
$sql .= " bk.code_tiers = '" . $object->code_compta_fournisseur . "' ";
$sql .= " ) AND date_lettering ='' ";
$sql .= " GROUP BY bk.lettering_code ";
// echo $sql;
//
$resql = $db->query ( $sql );
if ($resql) {
$num = $db->num_rows ( $resql );
$i = 0;
while ( $i < $num ) {
$obj = $db->fetch_object ( $resql );
$ids = array();
$i++;
// print_r($obj);
if($obj->type =='payment_supplier' ) {
$ids[] = $obj->rowid;
$sql= 'SELECT bk.rowid, facf.ref, facf.ref_supplier, payf.fk_bank ';
$sql.= " FROM " . MAIN_DB_PREFIX . "facture_fourn facf ";
$sql.= " INNER JOIN " . MAIN_DB_PREFIX . "paiementfourn_facturefourn as payfacf ON payfacf.fk_facturefourn=facf.rowid";
$sql.= " INNER JOIN " . MAIN_DB_PREFIX . "paiementfourn as payf ON payfacf.fk_paiementfourn=payf.rowid";
$sql.= " INNER JOIN " .MAIN_DB_PREFIX . "accounting_bookkeeping as bk ON( bk.fk_doc = facf.ref) ";
// $sqlmid.= " LEFT JOIN " . MAIN_DB_PREFIX . "societe as soc ON soc.rowid=facf.fk_soc";
// $sqlmid.= " INNER JOIN " . MAIN_DB_PREFIX . "c_paiement as payc ON payc.id=payf.fk_paiement";
$sql .= " WHERE 1 ";
$sql .= " AND fk_paiementfourn = '".$obj->url_id."' ";
// $sql .= " AND (bk.numero_compte = '" . $object->code_compta . "' OR bk.numero_compte = '" . $object->code_compta_fournisseur . "') ";
$sql .= " AND ( ";
if(!empty($object->code_compta) )
$sql .= " bk.code_tiers = '" . $object->code_compta . "' ";
if(!empty($object->code_compta) && !empty($object->code_compta_fournisseur) )
$sql .= " OR ";
if(!empty($object->code_compta_fournisseur) )
$sql .= " bk.code_tiers = '" . $object->code_compta_fournisseur . "' ";
$sql .= " ) ";
// echo $sql;
// exit;
}
elseif($obj->type =='payment' ){
$ids[] = $obj->rowid;
$sql= 'SELECT bk.rowid,fac.facnumber , pay.fk_bank ';
$sql.= " FROM " . MAIN_DB_PREFIX . "facture fac ";
$sql.= " INNER JOIN " . MAIN_DB_PREFIX . "paiement_facture as payfac ON payfac.fk_facture=fac.rowid";
$sql.= " INNER JOIN " . MAIN_DB_PREFIX . "paiement as pay ON payfac.fk_paiement=pay.rowid";
$sql.= " INNER JOIN " .MAIN_DB_PREFIX . "accounting_bookkeeping as bk ON( bk.fk_doc = fac.rowid) ";
$sql .= " WHERE 1 ";
$sql .= " AND payfac.fk_paiement = '".$obj->url_id."' ";
$sql .= " AND ( ";
if(!empty($object->code_compta) )
$sql .= " bk.code_tiers = '" . $object->code_compta . "' ";
if(!empty($object->code_compta) && !empty($object->code_compta_fournisseur) )
$sql .= " OR ";
if(!empty($object->code_compta_fournisseur) )
$sql .= " bk.code_tiers = '" . $object->code_compta_fournisseur . "' ";
$sql .= " ) ";
// echo $sql;
}
$resql2 = $db->query ( $sql );
if ($resql2) {
$num2 = $db->num_rows ( $resql2 );
$i2 = 0;
while ( $i2 < $num2 ) {
$obj2 = $db->fetch_object ( $resql2 );
$i2++;
$ids[] = $obj2->rowid;
}
// print_r($ids);
// exit;
if(count($ids) > 1 ){
$result = $this->updatelettrage($ids);
// var_dump($result);
// if( $result < 0 ){
// setEventMessages('', $BookKeeping->errors, 'errors' );
// $error++;
//
// }
}
// exit;
}
}
}
}
public function updatelettrage($ids, $notrigger=false){
$error = 0;
$sql = "SELECT lettering_code FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping WHERE ";
$sql .= " lettering_code != '' GROUP BY lettering_code ORDER BY lettering_code DESC limit 1; ";
// echo $sql;
$result = $this->db->query ( $sql );
if ($result) {
$obj = $this->db->fetch_object ( $result );
$lettre = (empty($obj->lettering_code)? 'AAA' : $obj->lettering_code );
if(!empty($obj->lettering_code))
$lettre++;
}
else{
$this->errors[] = 'Error'.$this->db->lasterror();;
$error++;
}
// var_dump(__line__, $error);
$sql = "SELECT SUM(ABS(debit)) as deb, SUM(ABS(credit)) as cred FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping WHERE ";
$sql .= " rowid IN (".implode(',', $ids).") ";
$result = $this->db->query ( $sql );
if ($result) {
$obj = $this->db->fetch_object ( $result );
// print_r($obj);
if( !(round(abs($obj->deb),2) === round(abs($obj->cred),2)) ){
// echo $sql;
// print_r($obj);
$this->errors[] = 'Total not exacts '.round(abs($obj->deb),2).' vs '. round(abs($obj->cred),2);
$error++;
}
}
else{
$this->errors[] = 'Erreur sql'.$this->db->lasterror();;
$error++;
}
// Update request
$now = dol_now();
$sql = "UPDATE ".MAIN_DB_PREFIX."accounting_bookkeeping SET";
$sql.= " lettering_code='".$lettre."'";
$sql.= " , date_lettering = " .$now ; // todo correct date it's false
$sql.= " WHERE rowid IN (".implode(',', $ids).") ";
// echo $sql ;
//
// var_dump(__line__, $error);
// print_r($this->errors);
// exit;
$this->db->begin();
dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG);
$resql = $this->db->query($sql);
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
if (! $error)
{
if (! $notrigger)
{
// Uncomment this and change MYOBJECT to your own tag if you
// want this action calls a trigger.
//// Call triggers
//include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
//$interface=new Interfaces($this->db);
//$result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf);
//if ($result < 0) { $error++; $this->errors=$interface->errors; }
//// End call triggers
}
}
// var_dump(__line__, $error);
// Commit or rollback
if ($error)
{
// foreach($this->errors as $errmsg)
// {
// dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR);
// $this->error.=($this->error?', '.$errmsg:$errmsg);
// }
$this->db->rollback();
// echo $this->error;
// var_dump(__line__, $error);
return -1*$error;
}
else
{
$this->db->commit();
return 1;
}
}
}

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

@@ -1,9 +1,9 @@
<?php
/* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
/* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* 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
@@ -23,7 +23,7 @@
/**
* \file htdocs/accountancy/customer/index.php
* \ingroup Advanced accountancy
* \brief Home customer ventilation
* \brief Home customer journalization page
*/
require '../../main.inc.php';
@@ -40,7 +40,7 @@ $langs->load("accountancy");
// Security check
if (empty($conf->accounting->enabled)) {
accessforbidden();
accessforbidden();
}
if ($user->societe_id > 0)
accessforbidden();
@@ -58,7 +58,7 @@ if ($year == 0) {
}
// Validate History
$action = GETPOST('action','alpha');
$action = GETPOST('action','aZ09');
@@ -73,7 +73,7 @@ if ($action == 'validatehistory') {
// First clean corrupted data
$sqlclean = "UPDATE " . MAIN_DB_PREFIX . "facturedet as fd";
$sqlclean .= " SET fd.fk_code_ventilation = 0";
$sqlclean .= " SET fk_code_ventilation = 0";
$sqlclean .= ' WHERE fd.fk_code_ventilation NOT IN ';
$sqlclean .= ' (SELECT accnt.rowid ';
$sqlclean .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
@@ -91,13 +91,13 @@ if ($action == 'validatehistory') {
$sql1 .= " AND " . MAIN_DB_PREFIX . "facturedet.fk_code_ventilation = 0";
} else {
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet as fd, " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
$sql1 .= " SET fd.fk_code_ventilation = accnt.rowid";
$sql1 .= " SET fk_code_ventilation = accnt.rowid";
$sql1 .= " WHERE fd.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS;
$sql1 .= " AND accnt.active = 1 AND p.accountancy_code_sell=accnt.account_number";
$sql1 .= " AND fd.fk_code_ventilation = 0";
}
dol_syslog("htdocs/accountancy/customer/index.php sql=" . $sql, LOG_DEBUG);
dol_syslog('htdocs/accountancy/customer/index.php');
$resql1 = $db->query($sql1);
if (! $resql1) {
@@ -113,7 +113,7 @@ if ($action == 'validatehistory') {
$db->begin();
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet as fd";
$sql1 .= " SET fd.fk_code_ventilation = 0";
$sql1 .= " SET fk_code_ventilation = 0";
$sql1 .= ' WHERE fd.fk_code_ventilation NOT IN ';
$sql1 .= ' (SELECT accnt.rowid ';
$sql1 .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
@@ -134,16 +134,16 @@ if ($action == 'validatehistory') {
} elseif ($action == 'cleanaccountancycode') {
$error = 0;
$db->begin();
// Now clean
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet as fd";
$sql1.= " SET fd.fk_code_ventilation = 0";
$sql1.= " SET fk_code_ventilation = 0";
$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);
$resql1 = $db->query($sql1);
@@ -173,7 +173,7 @@ print $langs->trans("DescVentilCustomer") . '<br>';
print $langs->trans("DescVentilMore", $langs->transnoentitiesnoconv("ValidateHistory"), $langs->transnoentitiesnoconv("ToBind")) . '<br>';
print '<br>';
//print '<div class="inline-block divButAction">';
// TODO Remove this. Should be done into the repair.php script
// TODO Remove this. Should be done always or into the repair.php script.
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>';
@@ -187,9 +187,9 @@ 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);
dol_syslog('htdocs/accountancy/customer/index.php');
$result = $db->query($sql);
if ($result) {
$row = $db->fetch_row($result);
@@ -203,10 +203,6 @@ $buttonbind = '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' .
$buttonreset = '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=cleanaccountancycode">' . $langs->trans("CleanHistory", $year_current) . '</a>';
$var = true;
print_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
print '<table class="noborder" width="100%">';
@@ -217,8 +213,8 @@ for($i = 1; $i <= 12; $i ++) {
}
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT " . $db->ifsql('aa.account_number IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.account_number') . " AS codecomptable,";
$sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.label') . " AS intitule,";
$sql = "SELECT " . $db->ifsql('aa.account_number IS NULL', "'tobind'", 'aa.account_number') . " AS codecomptable,";
$sql .= " " . $db->ifsql('aa.label IS NULL', "'tobind'", 'aa.label') . " AS intitule,";
for($i = 1; $i <= 12; $i ++) {
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, 'fd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
}
@@ -228,7 +224,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 . ")";
@@ -237,16 +233,27 @@ if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
}
$sql .= " GROUP BY fd.fk_code_ventilation,aa.account_number,aa.label";
dol_syslog("htdocs/accountancy/customer/index.php sql=" . $sql, LOG_DEBUG);
dol_syslog('htdocs/accountancy/customer/index.php sql=' . $sql, LOG_DEBUG);
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
while ( $row = $db->fetch_row($resql)) {
$var = ! $var;
print '<tr ' . $bc[$var] . '><td>' . length_accountg($row[0]) . '</td>';
print '<td align="left">' . $row[1] . '</td>';
print '<tr class="oddeven"><td>';
if ($row[0] == 'tobind')
{
print $langs->trans("Unknown");
}
else print length_accountg($row[0]);
print '</td>';
print '<td align="left">';
if ($row[0] == 'tobind')
{
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/customer/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
}
else print $row[1];
print '</td>';
for($i = 2; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';
}
@@ -270,14 +277,14 @@ print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td width="200">' . $langs->trans("Account") . '</td>';
print '<td width="200" align="left">' . $langs->trans("Label") . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT " . $db->ifsql('aa.account_number IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.account_number') . " AS codecomptable,";
$sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.label') . " AS intitule,";
$sql = "SELECT " . $db->ifsql('aa.account_number IS NULL', "'tobind'", 'aa.account_number') . " AS codecomptable,";
$sql .= " " . $db->ifsql('aa.label IS NULL', "'tobind'", 'aa.label') . " AS intitule,";
for($i = 1; $i <= 12; $i ++) {
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, 'fd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, 'fd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
}
$sql .= " SUM(fd.total_ht) as total";
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
@@ -285,7 +292,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 {
@@ -294,26 +301,37 @@ if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND aa.account_number IS NOT NULL";
$sql .= " GROUP BY fd.fk_code_ventilation,aa.account_number,aa.label";
dol_syslog("htdocs/accountancy/customer/index.php sql=" . $sql, LOG_DEBUG);
dol_syslog('htdocs/accountancy/customer/index.php');
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$num = $db->num_rows($resql);
while ( $row = $db->fetch_row($resql)) {
while ( $row = $db->fetch_row($resql)) {
$var = ! $var;
print '<tr ' . $bc[$var] . '><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>';
}
print '<td align="right">' . price($row[13]) . '</td>';
print '<td align="right"><b>' . price($row[14]) . '</b></td>';
print '</tr>';
}
$db->free($resql);
print '<tr class="oddeven"><td>';
if ($row[0] == 'tobind')
{
print $langs->trans("Unknown");
}
else print length_accountg($row[0]);
print '</td>';
print '<td align="left">';
if ($row[0] == 'tobind')
{
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/customer/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
}
else print $row[1];
print '</td>';
for($i = 2; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';
}
print '<td align="right">' . price($row[13]) . '</td>';
print '<td align="right"><b>' . price($row[14]) . '</b></td>';
print '</tr>';
}
$db->free($resql);
} else {
print $db->lasterror(); // Show last sql error
print $db->lasterror(); // Show last sql error
}
print "</table>\n";
@@ -321,101 +339,100 @@ print "</table>\n";
if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. Why showing a report that should rely on result of this step ?
{
print '<br>';
print '<br>';
print_fiche_titre($langs->trans("OtherInfo"), '', '');
print "<br>\n";
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td width="400" align="left">' . $langs->trans("TotalVente") . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT '" . $langs->trans("TotalVente") . "' AS total,";
for($i = 1; $i <= 12; $i ++) {
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, 'fd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
}
$sql .= " SUM(fd.total_ht) as total";
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
$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
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_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
}
dol_syslog('htdocs/accountancy/customer/index.php');
$resql = $db->query($sql);
if ($resql) {
$i = 0;
$num = $db->num_rows($resql);
while ($row = $db->fetch_row($resql)) {
print '<tr><td>' . $row[0] . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';
}
print '<td align="right"><b>' . price($row[13]) . '</b></td>';
print '</tr>';
$i ++;
}
$db->free($resql);
} else {
print $db->lasterror(); // Show last sql error
}
print "</table>\n";
if (! empty($conf->margin->enabled)) {
print "<br>\n";
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td width="400">' . $langs->trans("TotalMarge") . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT '" . $langs->trans("Vide") . "' AS marge,";
for($i = 1; $i <= 12; $i ++) {
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, '(fd.total_ht-(fd.qty * fd.buy_price_ht))', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
}
$sql .= " SUM((fd.total_ht-(fd.qty * fd.buy_price_ht))) as total";
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
$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
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_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
}
dol_syslog('htdocs/accountancy/customer/index.php:: $sql=' . $sql);
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
while ($row = $db->fetch_row($resql)) {
print '<tr><td>' . $row[0] . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td align="right">' . price(price2num($row[$i])) . '</td>';
}
print '<td align="right"><b>' . price(price2num($row[13])) . '</b></td>';
print '</tr>';
}
$db->free($resql);
} else {
print $db->lasterror(); // Show last sql error
}
print "</table>\n";
}
print '<br>';
print '<br>';
print_fiche_titre($langs->trans("OtherInfo"), '', '');
print "<br>\n";
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td width="400" align="left">' . $langs->trans("TotalVente") . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT '" . $langs->trans("TotalVente") . "' AS total,";
for($i = 1; $i <= 12; $i ++) {
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, 'fd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
}
$sql .= " SUM(fd.total_ht) as total";
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
$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
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_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
}
dol_syslog('htdocs/accountancy/customer/index.php');
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
while ($row = $db->fetch_row($resql)) {
print '<tr><td>' . $row[0] . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';
}
print '<td align="right"><b>' . price($row[13]) . '</b></td>';
print '</tr>';
}
$db->free($resql);
} else {
print $db->lasterror(); // Show last sql error
}
print "</table>\n";
if (! empty($conf->margin->enabled)) {
print "<br>\n";
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td width="400">' . $langs->trans("TotalMarge") . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT '" . $langs->trans("Vide") . "' AS marge,";
for($i = 1; $i <= 12; $i ++) {
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, '(fd.total_ht-(fd.qty * fd.buy_price_ht))', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
}
$sql .= " SUM((fd.total_ht-(fd.qty * fd.buy_price_ht))) as total";
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
$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
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_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
}
dol_syslog('htdocs/accountancy/customer/index.php');
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
while ($row = $db->fetch_row($resql)) {
print '<tr><td>' . $row[0] . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td align="right">' . price(price2num($row[$i])) . '</td>';
}
print '<td align="right"><b>' . price(price2num($row[13])) . '</b></td>';
print '</tr>';
}
$db->free($resql);
} else {
print $db->lasterror(); // Show last sql error
}
print "</table>\n";
}
}

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-2016 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2014-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
@@ -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);
/*
@@ -84,8 +85,9 @@ $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
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers
{
$search_lineid = '';
$search_ref = '';
$search_invoice = '';
$search_label = '';
@@ -119,7 +121,7 @@ if (is_array($changeaccount) && count($changeaccount) > 0) {
$db->rollback();
setEventMessages($db->lasterror(), null, 'errors');
}
$account_parent = ''; // Protection to avoid to mass apply it a second time
}
@@ -150,8 +152,8 @@ 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 = "SELECT f.rowid as factid, f.facnumber, f.type, f.datef, f.ref_client,";
$sql .= " fd.rowid, fd.description, fd.product_type, fd.total_ht, fd.total_tva, fd.tva_tx, fd.vat_src_code, 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
@@ -235,7 +240,7 @@ if ($result) {
if ($search_tvaintra)
$param .= "&search_tvaintra=" . $search_tvaintra;
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.'">';
@@ -243,111 +248,114 @@ 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 '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\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);
print_liste_field_titre($langs->trans("Date"), $_SERVER["PHP_SELF"], "f.datef, f.facnumber, fd.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("ProductRef"), $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
//print_liste_field_titre($langs->trans("ProductLabel"), $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Description"), $_SERVER["PHP_SELF"], "fd.description", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Amount"), $_SERVER["PHP_SELF"], "fd.total_ht", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("VATRate"), $_SERVER["PHP_SELF"], "fd.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($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"');
print "</tr>\n";
print '<tr class="liste_titre">';
print '<td class="liste_titre"></td>';
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="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" 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" placeholder="%" 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="center"><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;
$searchpicto=$form->showFilterButtons();
print $searchpicto;
print "</td></tr>\n";
print '<tr class="liste_titre">';
print_liste_field_titre("LineId", $_SERVER["PHP_SELF"], "fd.rowid", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.facnumber", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "f.datef, f.facnumber, fd.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("ProductRef", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
//print_liste_field_titre("ProductLabel", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "fd.description", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "fd.total_ht", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "fd.tva_tx", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "aa.account_number", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("Country", $_SERVER["PHP_SELF"], "co.label", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("VATIntra", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder);
$clickpicto=$form->showCheckAddButtons();
print_liste_field_titre($clickpicto, '', '', '', '', 'align="center"');
print "</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;
$facture_static->id = $objp->factid;
$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>';
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>';
$text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->description));
$trunclength = defined('ACCOUNTING_LENGTH_DESCRIPTION') ? ACCOUNTING_LENGTH_DESCRIPTION : 32;
$trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION;
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 '<td align="right">' . vatrate($objp->tva_tx.($objp->vat_src_code?' ('.$objp->vat_src_code.')':'')) . '</td>';
print '<td align="center">';
print $codecompta . ' <a href="./card.php?id=' . $objp->rowid . '">';
print img_edit();
print '</a>';
print '</td>';
print '<td>' . $objp->country .'</td>';
print '<td align="center">' . $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);
}
print '</form>';
} else {
print $db->lasterror();

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.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>
@@ -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,10 @@ if ($user->societe_id > 0)
if (! $user->rights->accounting->bind->write)
accessforbidden();
$formventilation = new FormVentilation($db);
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('accountancycustomerlist'));
$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);
@@ -97,25 +101,33 @@ $aarowid_p = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOU
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_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
$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))
{
$search_ref = '';
$search_invoice = '';
$search_label = '';
$search_desc = '';
$search_amount = '';
$search_account = '';
$search_vat = '';
// Purge search criteria
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers
{
$search_lineid = '';
$search_ref = '';
$search_invoice = '';
$search_label = '';
$search_desc = '';
$search_amount = '';
$search_account = '';
$search_vat = '';
}
// Mass actions
$objectclass='AccountingAccount';
$permtoread = $user->rights->accounting->read;
$permtodelete = $user->rights->accounting->delete;
$uploaddir = $conf->accounting->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
// Mass actions
$objectclass='Skeleton';
$objectlabel='Skeleton';
$permtoread = $user->rights->accounting->read;
$permtodelete = $user->rights->accounting->delete;
$uploaddir = $conf->accounting->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
if ($massaction == 'ventil') {
$msg='';
@@ -142,10 +154,10 @@ if ($massaction == 'ventil') {
$sql = " UPDATE " . MAIN_DB_PREFIX . "facturedet";
$sql .= " SET fk_code_ventilation = " . $monCompte;
$sql .= " WHERE rowid = " . $monId;
$accountventilated = new AccountingAccount($db);
$accountventilated->fetch($monCompte, '');
dol_syslog("/accountancy/customer/list.php sql=" . $sql, LOG_DEBUG);
if ($db->query($sql)) {
$msg.= '<div><font color="green">' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' - ' . $langs->trans("VentilatedinAccount") . ' : ' . length_accountg($accountventilated->account_number) . '</font></div>';
@@ -155,7 +167,7 @@ if ($massaction == 'ventil') {
$ko++;
}
}
$cpt++;
}
$msg.='</div>';
@@ -177,9 +189,12 @@ 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, l.vat_src_code,";
$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";
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
$sql.=$hookmanager->resPrint;
$sql .= " FROM " . MAIN_DB_PREFIX . "facture as f";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facturedet as l ON f.rowid = l.fk_facture";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
@@ -187,8 +202,12 @@ $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accounta
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_system as accsys ON accsys.pcg_version = aa.fk_pcg_version";
$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 ='')";
$sql .= " AND (accsys.rowid='" . $conf->global->CHARTOFACCOUNTS . "' OR p.accountancy_code_sell IS NULL OR p.accountancy_code_sell ='' OR p.accountancy_code_sell NOT IN
(SELECT aa.account_number FROM " . MAIN_DB_PREFIX . "accounting_account as aa , " . MAIN_DB_PREFIX . "accounting_system as asy WHERE fk_pcg_version = asy.pcg_version AND asy.rowid ='" . $conf->global->CHARTOFACCOUNTS . "'))";
// 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 +234,12 @@ 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
// Add where from hooks
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook
$sql.=$hookmanager->resPrint;
$sql .= $db->order($sortfield, $sortorder);
@@ -236,7 +260,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 +273,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,51 +281,53 @@ 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";
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);
print_liste_field_titre($langs->trans("Date"), $_SERVER["PHP_SELF"], "f.datef, f.facnumber, l.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("ProductRef"), $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
//print_liste_field_titre($langs->trans("ProductLabel"), $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Description"), $_SERVER["PHP_SELF"], "l.description", "", $param, '', $sortfield, $sortorder);
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="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"');
print "</tr>\n";
// We add search filter
print '<tr class="liste_titre">';
print '<td class="liste_titre"></td>';
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" 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" 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="right" class="liste_titre">';
$searchpitco=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, '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("LineId", $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.facnumber", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "f.datef, f.facnumber, l.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("ProductRef", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
//print_liste_field_titre("ProductLabel", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "l.description", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "l.total_ht", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("AccountAccountingSuggest", '', '', '', '', 'align="center"');
print_liste_field_titre("IntoAccount", '', '', '', '', 'align="center"');
$checkpicto='';
if ($massactionbutton) $checkpicto=$form->showCheckAddButtons('checkforselect', 1);
print_liste_field_titre($checkpicto, '', '', '', '', 'align="center"');
print "</tr>\n";
$facture_static = new Facture($db);
$product_static = new Product($db);
$form = new Form($db);
@@ -310,7 +335,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 +348,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,47 +368,47 @@ 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;
$trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION;
print $form->textwithtooltip(dol_trunc($text,$trunclength), $objp->description);
print '</td>';
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 vatrate($objp->tva_tx_line.($objp->vat_src_code?' ('.$objp->vat_src_code.')':''));
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 +421,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 +432,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');
/*
@@ -69,7 +69,7 @@ if ($action == 'validatehistory') {
// First clean corrupted data
$sqlclean = "UPDATE " . MAIN_DB_PREFIX . "expensereport_det as erd";
$sqlclean .= " SET erd.fk_code_ventilation = 0";
$sqlclean .= " SET fk_code_ventilation = 0";
$sqlclean .= ' WHERE erd.fk_code_ventilation NOT IN ';
$sqlclean .= ' (SELECT accnt.rowid ';
$sqlclean .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
@@ -93,6 +93,8 @@ if ($action == 'validatehistory') {
$sql1 .= " AND erd.fk_code_ventilation = 0";
}
dol_syslog('htdocs/accountancy/expensereport/index.php');
$resql1 = $db->query($sql1);
if (! $resql1) {
$error ++;
@@ -107,7 +109,7 @@ if ($action == 'validatehistory') {
$db->begin();
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "expensereport_det as erd";
$sql1 .= " SET erd.fk_code_ventilation = 0";
$sql1 .= " SET fk_code_ventilation = 0";
$sql1 .= ' WHERE erd.fk_code_ventilation NOT IN ';
$sql1 .= ' (SELECT accnt.rowid ';
$sql1 .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
@@ -129,14 +131,15 @@ if ($action == 'validatehistory') {
$error = 0;
$db->begin();
// Now clean
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "expensereport_det as erd";
$sql1.= " SET erd.fk_code_ventilation = 0";
$sql1.= " SET fk_code_ventilation = 0";
$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);
$resql1 = $db->query($sql1);
@@ -166,47 +169,44 @@ print $langs->trans("DescVentilExpenseReportMore", $langs->transnoentitiesnoconv
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>';
// TODO Remove this. Should be done always or into the repair.php script.
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>';
$buttonbind = '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=validatehistory">' . $langs->trans("ValidateHistory") . '</a>';
$buttonreset = '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=cleanaccountancycode">' . $langs->trans("CleanHistory", $year_current) . '</a>';
$y = $year_current;
$var = true;
$buttonbind = '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=validatehistory">' . $langs->trans("ValidateHistory") . '</a>';
$buttonreset = '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=cleanaccountancycode">' . $langs->trans("CleanHistory", $year_current) . '</a>';
print '<br>';
print_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td width="200" align="left">' . $langs->trans("Account") . '</td>';
print '<tr class="liste_titre"><td width="200">' . $langs->trans("Account") . '</td>';
print '<td width="200" align="left">' . $langs->trans("Label") . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.account_number') ." AS codecomptable,";
$sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.label') . " AS intitule,";
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'tobind'", 'aa.account_number') ." AS codecomptable,";
$sql .= " " . $db->ifsql('aa.label IS NULL', "'tobind'", 'aa.label') . " AS intitule,";
for($i = 1; $i <= 12; $i ++) {
$sql .= " SUM(" . $db->ifsql('MONTH(er.date_debut)=' . $i, 'erd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
}
$sql .= " ROUND(SUM(erd.total_ht),2) as total";
$sql .= " SUM(erd.total_ht) as total";
$sql .= " FROM " . MAIN_DB_PREFIX . "expensereport_det as erd";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "expensereport as er ON er.rowid = erd.fk_expensereport";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = erd.fk_code_ventilation";
$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,10 +217,21 @@ if ($resql) {
while ( $row = $db->fetch_row($resql)) {
$var = ! $var;
print '<tr ' . $bc[$var] . '><td>' . length_accountg($row[0]) . '</td>';
print '<td align="left">' . $row[1] . '</td>';
for($i = 2; $i <= 12; $i ++) {
print '<tr class="oddeven"><td>';
if ($row[0] == 'tobind')
{
print $langs->trans("Unknown");
}
else print length_accountg($row[0]);
print '</td>';
print '<td align="left">';
if ($row[0] == 'tobind')
{
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/expensereport/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
}
else print $row[1];
print '</td>';
for($i = 2; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';
}
print '<td align="right">' . price($row[13]) . '</td>';
@@ -241,15 +252,15 @@ print_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), $buttonreset, '
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td width="200" align="left">' . $langs->trans("Account") . '</td>';
print '<tr class="liste_titre"><td width="200">' . $langs->trans("Account") . '</td>';
print '<td width="200" align="left">' . $langs->trans("Label") . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.account_number') ." AS codecomptable,";
$sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.label') . " AS intitule,";
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'tobind'", 'aa.account_number') ." AS codecomptable,";
$sql .= " " . $db->ifsql('aa.label IS NULL', "'tobind'", 'aa.label') . " AS intitule,";
for($i = 1; $i <= 12; $i ++) {
$sql .= " SUM(" . $db->ifsql('MONTH(er.date_debut)=' . $i, 'erd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
}
@@ -260,21 +271,32 @@ $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";
dol_syslog('/accountancy/expensereport/index.php:: sql=' . $sql);
dol_syslog('htdocs/accountancy/expensereport/index.php');
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
while ( $row = $db->fetch_row($resql)) {
$var = ! $var;
print '<tr ' . $bc[$var] . '><td>' . length_accountg($row[0]) . '</td>';
print '<td align="left">' . $row[1] . '</td>';
for($i = 2; $i <= 12; $i ++) {
print '<tr class="oddeven"><td>';
if ($row[0] == 'tobind')
{
print $langs->trans("Unknown");
}
else print length_accountg($row[0]);
print '</td>';
print '<td align="left">';
if ($row[0] == 'tobind')
{
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/expensereport/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
}
else print $row[1];
print '</td>';
for($i = 2; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';
}
print '<td align="right">' . price($row[13]) . '</td>';
@@ -294,9 +316,9 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
{
print '<br>';
print '<br>';
print_fiche_titre($langs->trans("OtherInfo"), '', '');
print "<br>\n";
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td width="400" align="left">' . $langs->trans("Total") . '</td>';
@@ -304,27 +326,25 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT '" . $langs->trans("TotalExpenseReport") . "' AS label,";
for($i = 1; $i <= 12; $i ++) {
$sql .= " SUM(" . $db->ifsql('MONTH(er.date_create)=' . $i, 'erd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
}
$sql .= " ROUND(SUM(erd.total_ht),2) as total";
$sql .= " SUM(erd.total_ht) as total";
$sql .= " FROM " . MAIN_DB_PREFIX . "expensereport_det as erd";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "expensereport as er ON er.rowid = erd.fk_expensereport";
$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
dol_syslog('/accountancy/expensereport/index.php:: sql=' . $sql);
$sql .= " AND er.entity IN (" . getEntity('expensereport', 0) . ")"; // We don't share object for accountancy
dol_syslog('htdocs/accountancy/expensereport/index.php');
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
while ( $row = $db->fetch_row($resql)) {
print '<tr><td>' . $row[0] . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';
@@ -332,7 +352,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
print '<td align="right"><b>' . price($row[13]) . '</b></td>';
print '</tr>';
}
$db->free($resql);
} else {
print $db->lasterror(); // Show last sql error

View File

@@ -1,10 +1,10 @@
<?php
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.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>
*
*
* 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
@@ -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);
/*
@@ -82,7 +82,7 @@ $formventilation = new FormVentilation($db);
*/
// Purge search criteria
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','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // Both test are required to be compatible with all browsers
{
$search_expensereport = '';
$search_label = '';
@@ -94,13 +94,13 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP
if (is_array($changeaccount) && count($changeaccount) > 0) {
$error = 0;
$db->begin();
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "expensereport_det as erd";
$sql1 .= " SET erd.fk_code_ventilation=" . GETPOST('account_parent');
$sql1 .= ' WHERE erd.rowid IN (' . implode(',', $changeaccount) . ')';
dol_syslog('accountancy/expensereport/lines.php::changeaccount sql= ' . $sql1);
$resql1 = $db->query($sql1);
if (! $resql1) {
@@ -146,7 +146,7 @@ print '<script type="text/javascript">
* Expense reports lines
*/
$sql = "SELECT er.ref, er.rowid as erid,";
$sql .= " erd.rowid, erd.fk_c_type_fees, erd.comments, erd.total_ht, erd.fk_code_ventilation, erd.tva_tx, erd.date,";
$sql .= " erd.rowid, erd.fk_c_type_fees, erd.comments, erd.total_ht, erd.fk_code_ventilation, erd.tva_tx, erd.vat_src_code, erd.date,";
$sql .= " aa.label, aa.account_number,";
$sql .= " f.id as type_fees_id, f.code as type_fees_code, f.label as type_fees_label";
$sql .= " FROM " . MAIN_DB_PREFIX . "expensereport as er";
@@ -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);
@@ -193,7 +193,7 @@ $result = $db->query($sql);
if ($result) {
$num_lines = $db->num_rows($result);
$i = 0;
$param='';
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
@@ -210,8 +210,8 @@ if ($result) {
if ($search_country)
$param .= "&search_country=" . $search_country;
if ($search_tvaintra)
$param .= "&search_tvaintra=" . $search_tvaintra;
$param .= "&search_tvaintra=" . $search_tvaintra;
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.'">';
@@ -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,47 +234,47 @@ if ($result) {
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\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);
print_liste_field_titre($langs->trans("Date"), $_SERVER["PHP_SELF"], "erd.date, erd.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("TypeFees"), $_SERVER["PHP_SELF"], "f.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Description"), $_SERVER["PHP_SELF"], "erd.comments", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Amount"), $_SERVER["PHP_SELF"], "erd.total_ht", "", $param, 'align="right"', $sortfield, $sortorder);
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 '<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="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="center"><input type="text" class="flat maxwidth50" name="search_vat" size="1" placeholder="%" 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="right"></td>';
print '<td class="liste_titre" align="right">';
$searchpicto=$form->showFilterAndCheckAddButtons(1);
$searchpicto=$form->showFilterButtons();
print $searchpicto;
print '</td>';
print "</tr>\n";
print '<tr class="liste_titre">';
print_liste_field_titre("LineId", $_SERVER["PHP_SELF"], "erd.rowid", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("ExpenseReport", $_SERVER["PHP_SELF"], "er.ref", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "erd.date, erd.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("TypeFees", $_SERVER["PHP_SELF"], "f.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "erd.comments", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "erd.total_ht", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "erd.tva_tx", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "aa.account_number", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre('');
$checkpicto=$form->showCheckAddButtons();
print_liste_field_titre($checkpicto, '', '', '', '', 'align="center"');
print "</tr>\n";
$expensereport_static = new ExpenseReport($db);
$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>';
@@ -281,38 +282,38 @@ if ($result) {
print '<td>' . $expensereport_static->getNomUrl(1) . '</td>';
print '<td align="center">' . dol_print_date($db->jdate($objp->date), 'day') . '</td>';
print '<td class="tdoverflow">' . ($langs->trans($objp->type_fees_code) == $objp->type_fees_code ? $objp->type_fees_label : $langs->trans(($objp->type_fees_code))) . '</td>';
print '<td>';
$text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->comments));
$trunclength = defined('ACCOUNTING_LENGTH_DESCRIPTION') ? ACCOUNTING_LENGTH_DESCRIPTION : 32;
$trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION;
print $form->textwithtooltip(dol_trunc($text,$trunclength), $objp->comments);
print '</td>';
print '<td align="right">' . price($objp->total_ht) . '</td>';
print '<td align="center">' . price($objp->tva_tx) . '</td>';
print '<td align="center">' . vatrate($objp->tva_tx.($objp->vat_src_code?' ('.$objp->vat_src_code.')':'')) . '</td>';
print '<td>' . $codeCompta . '</td>';
print '<td align="left"><a href="./card.php?id=' . $objp->rowid . '">';
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 ++;
}
print "</table>";
print "</div>";
if ($nbtotalofrecords > $limit) {
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1);
}
print '</form>';
} else {
print $db->error();

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);
@@ -95,7 +95,7 @@ if (GETPOST('cancel')) { $action='list'; $massaction=''; }
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_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
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers
{
$search_expensereport = '';
$search_label = '';
@@ -139,10 +139,10 @@ if ($massaction == 'ventil') {
$sql = " UPDATE " . MAIN_DB_PREFIX . "expensereport_det";
$sql .= " SET fk_code_ventilation = " . $monCompte;
$sql .= " WHERE rowid = " . $monId;
$accountventilated = new AccountingAccount($db);
$accountventilated->fetch($monCompte, '');
dol_syslog('accountancy/expensereport/list.php:: sql=' . $sql, LOG_DEBUG);
if ($db->query($sql)) {
$msg.= '<div><font color="green">' . $langs->trans("LineOfExpenseReport") . ' ' . $monId . ' - ' . $langs->trans("VentilatedinAccount") . ' : ' . length_accountg($accountventilated->account_number) . '</font></div>';
@@ -152,7 +152,7 @@ if ($massaction == 'ventil') {
$ko++;
}
}
$cpt++;
}
$msg.='</div>';
@@ -174,7 +174,7 @@ llxHeader('', $langs->trans("ExpenseReportsVentilation"));
// Expense report lines
$sql = "SELECT er.ref, er.rowid as erid, er.date_debut,";
$sql .= " erd.rowid, erd.fk_c_type_fees, erd.comments, erd.total_ht as price, erd.fk_code_ventilation, erd.tva_tx as tva_tx_line, erd.date,";
$sql .= " erd.rowid, erd.fk_c_type_fees, erd.comments, erd.total_ht as price, erd.fk_code_ventilation, erd.tva_tx as tva_tx_line, erd.vat_src_code, erd.date,";
$sql .= " f.id as type_fees_id, f.code as type_fees_code, f.label as type_fees_label, f.accountancy_code as code_buy,";
$sql .= " aa.rowid as aarowid";
$sql .= " FROM " . MAIN_DB_PREFIX . "expensereport as er";
@@ -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);
@@ -224,7 +224,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;
@@ -237,8 +237,8 @@ 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.'">';
@@ -246,8 +246,7 @@ 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);
@@ -259,43 +258,46 @@ if ($result) {
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\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);
print_liste_field_titre($langs->trans("Date"), $_SERVER["PHP_SELF"], "erd.date, erd.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("TypeFees"), $_SERVER["PHP_SELF"], "f.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Description"), $_SERVER["PHP_SELF"], "erd.comments", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Amount"), $_SERVER["PHP_SELF"], "erd.total_ht", "", $param, 'align="right"', $sortfield, $sortorder);
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"');
print "</tr>\n";
// We add search filter
print '<tr class="liste_titre">';
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="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" 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="right" class="liste_titre">';
$searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
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("LineId", $_SERVER["PHP_SELF"], "erd.rowid", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("ExpenseReport", $_SERVER["PHP_SELF"], "er.ref", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "erd.date, erd.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("TypeFees", $_SERVER["PHP_SELF"], "f.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "erd.comments", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "erd.total_ht", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "erd.tva_tx", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("AccountAccountingSuggest", '', '', '', '', 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("IntoAccount", '', '', '', '', 'align="center"', $sortfield, $sortorder);
$checkpicto='';
if ($massactionbutton) $checkpicto=$form->showCheckAddButtons('checkforselect', 1);
print_liste_field_titre($checkpicto, '', '', '', '', 'align="center"');
print "</tr>\n";
$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>';
@@ -321,7 +323,7 @@ if ($result) {
// Fees description -- Can be null
print '<td>';
$text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->comments));
$trunclength = defined('ACCOUNTING_LENGTH_DESCRIPTION') ? ACCOUNTING_LENGTH_DESCRIPTION : 32;
$trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION;
print $form->textwithtooltip(dol_trunc($text,$trunclength), $objp->comments);
print '</td>';
@@ -331,7 +333,7 @@ if ($result) {
// Vat rate
print '<td align="right">';
print price($objp->tva_tx_line);
print vatrate($objp->tva_tx_line.($objp->vat_src_code?' ('.$objp->vat_src_code.')':''));
print '</td>';
// Current account
@@ -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>';
@@ -354,7 +356,7 @@ if ($result) {
print '</table>';
print "</div>";
print '</form>';
} else {
print $db->error();

View File

@@ -45,10 +45,13 @@ $langs->load("compta");
$langs->load("banks");
$langs->load("loans");
/*
* Actions
*/
// None
/*
* View
@@ -60,8 +63,6 @@ print load_fiche_titre($langs->trans("AccountancyArea"), '', 'title_accountancy'
$step = 0;
print "<br>\n";
print $langs->trans("AccountancyAreaDescIntro")."<br>\n";
print "<br>\n";print "<br>\n";
@@ -71,33 +72,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 +113,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 +120,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();

File diff suppressed because it is too large Load Diff

View File

@@ -2,8 +2,8 @@
/* 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-2016 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.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,28 +22,24 @@
*/
/**
* \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");
$langs->load("main");
$langs->load("accountancy");
$langs->load("trips");
$langs->loadLangs(array("commercial", "compta","bills","other","accountancy","trips","errors"));
$id_journal = GETPOST('id_journal', 'int');
$action = GETPOST('action','aZ09');
$date_startmonth = GETPOST('date_startmonth');
$date_startday = GETPOST('date_startday');
@@ -51,6 +47,8 @@ $date_startyear = GETPOST('date_startyear');
$date_endmonth = GETPOST('date_endmonth');
$date_endday = GETPOST('date_endday');
$date_endyear = GETPOST('date_endyear');
$in_bookkeeping = GETPOST('in_bookkeeping');
if ($in_bookkeeping == '') $in_bookkeeping = 'notyet';
$now = dol_now();
@@ -58,13 +56,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;
@@ -82,41 +83,49 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end
$date_end = dol_get_last_day($pastmonthyear, $pastmonth, false);
}
$p = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY);
$idpays = $p[0];
$idpays = $mysoc->country_id;
$sql = "SELECT er.rowid, er.ref, er.date_debut as de,";
$sql .= " erd.rowid as erdid, erd.comments, erd.total_ttc, erd.tva_tx, erd.total_ht, erd.total_tva, erd.fk_code_ventilation,";
$sql .= " erd.rowid as erdid, erd.comments, erd.total_ht, erd.total_tva, erd.total_localtax1, erd.total_localtax2, erd.tva_tx, erd.total_ttc, erd.fk_code_ventilation, erd.vat_src_code, ";
$sql .= " u.rowid as uid, u.firstname, u.lastname, u.accountancy_code as user_accountancy_account,";
$sql .= " f.accountancy_code, ct.accountancy_code_buy as account_tva, aa.rowid as fk_compte, aa.account_number as compte, aa.label as label_compte";
$sql .= " f.accountancy_code, aa.rowid as fk_compte, aa.account_number as compte, aa.label as label_compte";
//$sql .= " ct.accountancy_code_buy as account_tva";
$sql .= " FROM " . MAIN_DB_PREFIX . "expensereport_det as erd";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_tva as ct ON erd.tva_tx = ct.taux AND ct.fk_pays = '" . $idpays . "'";
//$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_tva as ct ON erd.tva_tx = ct.taux AND ct.fk_pays = '" . $idpays . "'";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_type_fees as f ON f.id = erd.fk_c_type_fees";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = erd.fk_code_ventilation";
$sql .= " JOIN " . MAIN_DB_PREFIX . "expensereport as er ON er.rowid = erd.fk_expensereport";
$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 .= " 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
if ($date_start && $date_end)
$sql .= " AND er.date_debut >= '" . $db->idate($date_start) . "' AND er.date_debut <= '" . $db->idate($date_end) . "'";
if ($in_bookkeeping == 'already')
$sql .= " AND er.rowid IN (SELECT fk_doc FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab WHERE ab.doc_type='expense_report')";
if ($in_bookkeeping == 'notyet')
$sql .= " AND er.rowid NOT IN (SELECT fk_doc FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab WHERE ab.doc_type='expense_report')";
$sql .= " ORDER BY er.date_debut";
dol_syslog('accountancy/journal/expensereportsjournal.php:: $sql=' . $sql);
dol_syslog('accountancy/journal/expensereportsjournal.php', LOG_DEBUG);
$result = $db->query($sql);
if ($result) {
$num = $db->num_rows($result);
// les variables
$account_salary = (! empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT)) ? $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT : $langs->trans("CodeNotDef");
$account_vat = (! empty($conf->global->ACCOUNTING_VAT_BUY_ACCOUNT)) ? $conf->global->ACCOUNTING_VAT_BUY_ACCOUNT : $langs->trans("CodeNotDef");
$taber = array ();
$tabht = array ();
$tabtva = array ();
$def_tva = array ();
$tabttc = array ();
$tablocaltax1 = array ();
$tablocaltax2 = array ();
$tabuser = array ();
$num = $db->num_rows($result);
// Variables
$account_salary = (! empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT)) ? $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT : 'NotDefined';
$account_vat = (! empty($conf->global->ACCOUNTING_VAT_BUY_ACCOUNT)) ? $conf->global->ACCOUNTING_VAT_BUY_ACCOUNT : 'NotDefined';
$i = 0;
while ( $i < $num ) {
$obj = $db->fetch_object($result);
@@ -124,21 +133,38 @@ if ($result) {
// Controls
$compta_user = (! empty($obj->user_accountancy_account)) ? $obj->user_accountancy_account : $account_salary;
$compta_fees = $obj->compte;
$compta_tva = (! empty($obj->account_tva) ? $obj->account_tva : $account_vat);
// Define array for display vat tx
$def_tva[$obj->rowid]=price($obj->tva_tx);
$vatdata = getTaxesFromId($obj->tva_tx.($obj->vat_src_code?' ('.$obj->vat_src_code.')':''), $mysoc, $mysoc, 0);
$compta_tva = (! empty($vatdata['accountancy_code_buy']) ? $vatdata['accountancy_code_buy'] : $account_vat);
$compta_localtax1 = (! empty($vatdata['accountancy_code_buy']) ? $vatdata['accountancy_code_buy'] : $cpttva);
$compta_localtax2 = (! empty($vatdata['accountancy_code_buy']) ? $vatdata['accountancy_code_buy'] : $cpttva);
// Define array to display all VAT rates that use this accounting account $compta_tva
if (price2num($obj->tva_tx) || ! empty($obj->vat_src_code))
{
$def_tva[$obj->rowid][$compta_tva][vatrate($obj->tva_tx).($obj->vat_src_code?' ('.$obj->vat_src_code.')':'')]=(vatrate($obj->tva_tx).($obj->vat_src_code?' ('.$obj->vat_src_code.')':''));
}
$taber[$obj->rowid]["date"] = $db->jdate($obj->de);
$taber[$obj->rowid]["ref"] = $obj->ref;
$taber[$obj->rowid]["comments"] = $obj->comments;
$taber[$obj->rowid]["fk_expensereportdet"] = $obj->erdid;
// Avoid warnings
if (! isset($tabttc[$obj->rowid][$compta_user])) $tabttc[$obj->rowid][$compta_user] = 0;
if (! isset($tabht[$obj->rowid][$compta_fees])) $tabht[$obj->rowid][$compta_fees] = 0;
if (! isset($tabtva[$obj->rowid][$compta_tva])) $tabtva[$obj->rowid][$compta_tva] = 0;
if (! isset($tablocaltax1[$obj->rowid][$compta_localtax1])) $tablocaltax1[$obj->rowid][$compta_localtax1] = 0;
if (! isset($tablocaltax2[$obj->rowid][$compta_localtax2])) $tablocaltax2[$obj->rowid][$compta_localtax2] = 0;
$tabttc[$obj->rowid][$compta_user] += $obj->total_ttc;
$tabht[$obj->rowid][$compta_fees] += $obj->total_ht;
$tabtva[$obj->rowid][$compta_tva] += $obj->total_tva;
$tablocaltax1[$obj->rowid][$compta_localtax1] += $obj->total_localtax1;
$tablocaltax2[$obj->rowid][$compta_localtax2] += $obj->total_localtax2;
$tabuser[$obj->rowid] = array (
'id' => $obj->uid,
'name' => $obj->firstname.' '.$obj->lastname,
'name' => dolGetFirstLastname($obj->firstname, $obj->lastname),
'user_accountancy_code' => $obj->user_accountancy_account
);
@@ -153,168 +179,198 @@ if ($action == 'writebookkeeping') {
$now = dol_now();
$error = 0;
foreach ($taber as $key => $val)
foreach ($taber as $key => $val) // Loop on each expense report
{
$errorforline = 0;
$db->begin();
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 = $conf->global->ACCOUNTING_EXPENSEREPORT_JOURNAL;
$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)
{
// Fees
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 = '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 = $conf->global->ACCOUNTING_EXPENSEREPORT_JOURNAL;
$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"];
$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) {
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');
}
}
}
}
}
$db->begin();
// Thirdparty
if (! $errorforline)
{
$db->commit();
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 = 'expense_report';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = $val["fk_expensereportdet"];
$bookkeeping->subledger_account = $tabuser[$key]['user_accountancy_code'];
$bookkeeping->subledger_label = $tabuser[$key]['user_accountancy_code'];
$bookkeeping->numero_compte = $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT;
$bookkeeping->label_operation = $tabuser[$key]['name'];
$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->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
}
else
{
$error++;
$errorforline++;
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
}
}
}
// Fees
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 = 'expense_report';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = $val["fk_expensereportdet"];
$bookkeeping->subledger_account = '';
$bookkeeping->subledger_label = '';
$bookkeeping->numero_compte = $k;
$bookkeeping->label_operation = $accountingaccount->label;
$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->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
}
else
{
$error++;
$errorforline++;
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
}
}
}
}
// VAT
if (! $errorforline)
{
$listoftax=array(0, 1, 2);
foreach($listoftax as $numtax)
{
$arrayofvat = $tabtva;
if ($numtax == 1) $arrayofvat = $tablocaltax1;
if ($numtax == 2) $arrayofvat = $tablocaltax2;
foreach ( $arrayofvat[$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->subledger_account = '';
$bookkeeping->subledger_label = '';
$bookkeeping->numero_compte = $k;
$bookkeeping->label_operation = $langs->trans("VAT"). ' '.join(', ',$def_tva[$key][$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->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
}
else
{
$error++;
$errorforline++;
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
}
}
}
}
if (! $errorforline)
{
$db->commit();
}
else
{
$db->rollback();
$db->rollback();
if ($error >= 10)
{
setEventMessages($langs->trans("ErrorTooManyErrorsProcessStopped"), null, 'errors');
break; // Break in the foreach
}
}
}
if (empty($error) && count($tabpay)) {
setEventMessages($langs->trans("GeneralLedgerIsWritten"), null, 'mesgs');
if (empty($error) && count($tabpay) > 0) {
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='';
// Must reload data, so we make a redirect
if (count($tabpay) != $error)
{
$param='id_journal='.$id_journal;
$param.='&date_startday='.$date_startday;
$param.='&date_startmonth='.$date_startmonth;
$param.='&date_startyear='.$date_startyear;
$param.='&date_endday='.$date_endday;
$param.='&date_endmonth='.$date_endmonth;
$param.='&date_endyear='.$date_endyear;
$param.='&in_bookeeping='.$in_bookeeping;
header("Location: ".$_SERVER['PHP_SELF'].($param?'?'.$param:''));
exit;
}
}
/*
@@ -326,9 +382,8 @@ $form = new Form($db);
$userstatic = new User($db);
// Export
if ($action == 'export_csv') {
/*if ($action == 'exportcsv') {
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
$journal = $conf->global->ACCOUNTING_EXPENSEREPORT_JOURNAL;
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
@@ -433,36 +488,45 @@ 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 = '';
$builddate = time();
$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);
$listofchoices=array('already'=>$langs->trans("AlreadyInGeneralLedger"), 'notyet'=>$langs->trans("NotYetInGeneralLedger"));
$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). ' - ' .$langs->trans("AlreadyInGeneralLedger").' '. $form->selectarray('in_bookkeeping', $listofchoices, $in_bookkeeping, 1);
report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''));
$varlink = 'id_journal=' . $id_journal;
/*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();" />';
}*/
journalHead($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''), '', $varlink);
// Button to write into Ledger
if (empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) || $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT == '-1') {
print img_warning().' '.$langs->trans("SomeMandatoryStepsOfSetupWereNotDone");
print ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
}
print '<div class="tabsAction tabsActionNoBottom">';
if (empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) || $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT == '-1') {
print '<input type="button" class="butActionRefused" title="'.dol_escape_htmltag($langs->trans("SomeMandatoryStepsOfSetupWereNotDone")).'" value="' . $langs->trans("WriteBookKeeping") . '" />';
}
else {
print '<input type="button" class="butAction" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
}
//print '<input type="button" class="butAction" value="' . $langs->trans("ExportDraftJournal") . '" onclick="launch_export();" />';
print '</div>';
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("exportcsv");
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
}
@@ -484,13 +548,13 @@ if (empty($action) || $action == 'view') {
print "<td></td>";
print "<td>" . $langs->trans("Date") . "</td>";
print "<td>" . $langs->trans("Piece") . ' (' . $langs->trans("ExpenseReportRef") . ")</td>";
print "<td>" . $langs->trans("Account") . "</td>";
print "<td>" . $langs->trans("AccountAccounting") . "</td>";
print "<td>" . $langs->trans("SubledgerAccount") . "</td>";
print "<td>" . $langs->trans("Label") . "</td>";
print "<td align='right'>" . $langs->trans("Debit") . "</td>";
print "<td align='right'>" . $langs->trans("Credit") . "</td>";
print "</tr>\n";
$var = true;
$r = '';
$expensereportstatic = new ExpenseReport($db);
@@ -509,12 +573,13 @@ 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>";
$userstatic->id = $tabuser[$key]['id'];
$userstatic->name = $tabuser[$key]['name'];
// Account
print "<td>";
$accountoshow = length_accountg($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
@@ -522,7 +587,10 @@ if (empty($action) || $action == 'view') {
print '<span class="error">'.$langs->trans("FeeAccountNotDefined").'</span>';
}
else print $accountoshow;
print "</td>";
print '</td>';
// Subledger account
print "<td>";
print '</td>';
$userstatic->id = $tabuser[$key]['id'];
$userstatic->name = $tabuser[$key]['name'];
print "<td>" . $userstatic->getNomUrl(0, 'user', 16) . ' - ' . $accountingaccount->label . "</td>";
@@ -532,51 +600,71 @@ if (empty($action) || $action == 'view') {
}
}
// VAT
foreach ( $tabtva[$key] as $k => $mt ) {
if ($mt) {
print "<tr " . $bc[$var] . " >";
print "<td><!-- VAT --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $expensereportstatic->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;
print "</td>";
print "<td>" . $userstatic->getNomUrl(0, 'user', 16) . ' - ' . $langs->trans("VAT"). ' '.$def_tva[$key]. "</td>";
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td align="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print "</tr>";
}
}
// Third party
foreach ( $tabttc[$key] as $k => $mt ) {
print "<tr " . $bc[$var] . ">";
print "<td><!-- Thirdparty --></td>";
print "<td>" . $date . "</td>";
print '<tr class="oddeven">';
print "<td><!-- Thirdparty --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $expensereportstatic->getNomUrl(1) . "</td>";
$userstatic->id = $tabuser[$key]['id'];
$userstatic->name = $tabuser[$key]['name'];
// Account
print "<td>";
$accountoshow = length_accounta($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("MainAccountForUsersNotDefined").'</span>';
}
else print $accountoshow;
print "</td>";
// Subledger account
print "<td>";
$accountoshow = length_accounta($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
print '<span class="error">'.$langs->trans("UserAccountNotDefined").'</span>';
}
else print $accountoshow;
print "</td>";
print "<td>" . $userstatic->getNomUrl(0, 'user', 16) . ' - ' . $langs->trans("Code_tiers") . "</td>";
print '</td>';
print "<td>" . $userstatic->getNomUrl(0, 'user', 16) . ' - ' . $langs->trans("SubledgerAccount") . "</td>";
print '<td align="right">' . ($mt < 0 ? - price(- $mt) : '') . "</td>";
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print "</tr>";
print "</tr>";
}
// VAT
$listoftax = array(0, 1, 2);
foreach ($listoftax as $numtax) {
$arrayofvat = $tabtva;
if ($numtax == 1) $arrayofvat = $tablocaltax1;
if ($numtax == 2) $arrayofvat = $tablocaltax2;
foreach ( $arrayofvat[$key] as $k => $mt ) {
if ($mt) {
print '<tr class="oddeven">';
print "<td><!-- VAT --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $expensereportstatic->getNomUrl(1) . "</td>";
// Account
print "<td>";
$accountoshow = length_accountg($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("VATAccountNotDefined").'</span>';
}
else print $accountoshow;
print "</td>";
// Subledger account
print "<td>";
print '</td>';
print "<td>" . $userstatic->getNomUrl(0, 'user', 16) . ' - ' . $langs->trans("VAT"). ' '.join(', ',$def_tva[$key][$k]).($numtax?' - Localtax '.$numtax:'');
print "</td>";
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td align="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
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.houssin@capnetworks.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>
* 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,27 +22,24 @@
*/
/**
* \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");
$langs->loadLangs(array("commercial", "compta","bills","other","accountancy","errors"));
$id_journal = GETPOST('id_journal', 'int');
$action = GETPOST('action','aZ09');
$date_startmonth = GETPOST('date_startmonth');
$date_startday = GETPOST('date_startday');
@@ -50,6 +47,8 @@ $date_startyear = GETPOST('date_startyear');
$date_endmonth = GETPOST('date_endmonth');
$date_endday = GETPOST('date_endday');
$date_endyear = GETPOST('date_endyear');
$in_bookkeeping = GETPOST('in_bookkeeping');
if ($in_bookkeeping == '') $in_bookkeeping = 'notyet';
$now = dol_now();
@@ -57,13 +56,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;
@@ -81,64 +83,76 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end
$date_end = dol_get_last_day($pastmonthyear, $pastmonth, false);
}
$p = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY);
$idpays = $p[0];
$idpays = $mysoc->country_id;
$sql = "SELECT f.rowid, f.ref, f.type, f.datef as df, f.libelle,f.ref_supplier,";
$sql .= " fd.rowid as fdid, fd.description, fd.total_ttc, fd.tva_tx, fd.total_ht, fd.tva as total_tva, fd.product_type,";
$sql .= " fd.rowid as fdid, fd.description, fd.product_type, fd.total_ht, fd.tva as total_tva, fd.total_localtax1, fd.total_localtax2, fd.tva_tx, fd.total_ttc, fd.vat_src_code,";
$sql .= " s.rowid as socid, s.nom as name, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,";
$sql .= " p.accountancy_code_buy , ct.accountancy_code_buy as account_tva, aa.rowid as fk_compte, aa.account_number as compte, aa.label as label_compte";
$sql .= " p.accountancy_code_buy , aa.rowid as fk_compte, aa.account_number as compte, aa.label as label_compte";
//$sql .= " ct.accountancy_code_buy as account_tva";
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as fd";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_tva as ct ON fd.tva_tx = ct.taux AND ct.fk_pays = '" . $idpays . "'";
//$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_tva as ct ON fd.tva_tx = ct.taux AND ct.fk_pays = '" . $idpays . "'";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = fd.fk_product";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = fd.fk_code_ventilation";
$sql .= " JOIN " . MAIN_DB_PREFIX . "facture_fourn as f ON f.rowid = fd.fk_facture_fourn";
$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
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS))
$sql .= " AND f.type IN (0,1,2)";
else
$sql .= " AND f.type IN (0,1,2,3)";
$sql .= " WHERE f.fk_statut > 0"; // TODO Facture annulée ?
$sql .= " AND fd.fk_code_ventilation > 0";
$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 (" . FactureFournisseur::TYPE_STANDARD . "," . FactureFournisseur::TYPE_REPLACEMENT . "," . FactureFournisseur::TYPE_CREDIT_NOTE . "," . FactureFournisseur::TYPE_SITUATION . ")";
} else {
$sql .= " AND f.type IN (" . FactureFournisseur::TYPE_STANDARD . "," . FactureFournisseur::TYPE_REPLACEMENT . "," . FactureFournisseur::TYPE_CREDIT_NOTE . "," . FactureFournisseur::TYPE_DEPOSIT . "," . FactureFournisseur::TYPE_SITUATION . ")";
}
if ($date_start && $date_end)
$sql .= " AND f.datef >= '" . $db->idate($date_start) . "' AND f.datef <= '" . $db->idate($date_end) . "'";
if ($in_bookkeeping == 'already')
$sql .= " AND f.rowid IN (SELECT fk_doc FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab WHERE ab.doc_type='supplier_invoice')";
if ($in_bookkeeping == 'notyet')
$sql .= " AND f.rowid NOT IN (SELECT fk_doc FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab WHERE ab.doc_type='supplier_invoice')";
$sql .= " ORDER BY f.datef";
dol_syslog('accountancy/journal/purchasesjournal.php:: $sql=' . $sql);
dol_syslog('accountancy/journal/purchasesjournal.php', LOG_DEBUG);
$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");
$tabfac = array ();
$tabht = array ();
$tabtva = array ();
$def_tva = array ();
$tabttc = array ();
$tablocaltax1 = array ();
$tablocaltax2 = array ();
$tabcompany = array ();
$num = $db->num_rows($result);
// Variables
$cptfour = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER)) ? $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER : 'NotDefined';
$cpttva = (! empty($conf->global->ACCOUNTING_VAT_BUY_ACCOUNT)) ? $conf->global->ACCOUNTING_VAT_BUY_ACCOUNT : 'NotDefined';
$i = 0;
while ( $i < $num ) {
$obj = $db->fetch_object($result);
// contrôles
// Controls
$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)
$compta_prod = (! empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT)) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef");
$compta_prod = (! empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT)) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : 'NotDefined';
else
$compta_prod = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT)) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef");
$compta_prod = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT)) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : 'NotDefined';
}
$compta_tva = (! empty($obj->account_tva) ? $obj->account_tva : $cpttva);
//Define array for display vat tx
$def_tva[$obj->rowid]=price($obj->tva_tx);
$vatdata = getTaxesFromId($obj->tva_tx.($obj->vat_src_code?' ('.$obj->vat_src_code.')':''), $mysoc, $mysoc, 0);
$compta_tva = (! empty($vatdata['accountancy_code_buy']) ? $vatdata['accountancy_code_buy'] : $cpttva);
// Define array to display all VAT rates that use this accounting account $compta_tva
if (price2num($obj->tva_tx) || ! empty($obj->vat_src_code))
{
$def_tva[$obj->rowid][$compta_tva][vatrate($obj->tva_tx).($obj->vat_src_code?' ('.$obj->vat_src_code.')':'')]=(vatrate($obj->tva_tx).($obj->vat_src_code?' ('.$obj->vat_src_code.')':''));
}
$tabfac[$obj->rowid]["date"] = $db->jdate($obj->df);
$tabfac[$obj->rowid]["ref"] = $obj->ref_supplier . ' (' . $obj->ref . ')';
@@ -148,15 +162,19 @@ if ($result) {
$tabfac[$obj->rowid]["type"] = $obj->type;
$tabfac[$obj->rowid]["description"] = $obj->description;
//$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;
// 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;
if (! isset($tablocaltax1[$obj->rowid][$compta_localtax1])) $tablocaltax1[$obj->rowid][$compta_localtax1] = 0;
if (! isset($tablocaltax2[$obj->rowid][$compta_localtax2])) $tablocaltax2[$obj->rowid][$compta_localtax2] = 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;
$tablocaltax1[$obj->rowid][$compta_localtax1] += $obj->total_localtax1;
$tablocaltax2[$obj->rowid][$compta_localtax2] += $obj->total_localtax2;
$tabcompany[$obj->rowid] = array (
'id' => $obj->socid,
'name' => $obj->name,
@@ -175,21 +193,14 @@ if ($action == 'writebookkeeping') {
$now = dol_now();
$error = 0;
foreach ($tabfac as $key => $val) // Loop on each invoice
{
$errorforline = 0;
$db->begin();
foreach ($tabfac as $key => $val) { // Loop on each invoice
$errorforline = 0;
$db->begin();
$companystatic = new Societe($db);
$invoicestatic = new FactureFournisseur($db);
$invoicestatic->id = $key;
$invoicestatic->ref = (string) $val["refsologest"];
$invoicestatic->refsupplier = $val["refsuppliersologest"];
$invoicestatic->type = $val["type"];
$invoicestatic->description = html_entity_decode(dol_trunc($val["description"], 32));
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
$companystatic->code_compta = $tabcompany[$key]['code_compta'];
@@ -198,161 +209,201 @@ if ($action == 'writebookkeeping') {
$companystatic->code_fournisseur = $tabcompany[$key]['code_fournisseur'];
$companystatic->client = $tabcompany[$key]['code_client'];
if (! $errorforline)
{
foreach ( $tabttc[$key] as $k => $mt ) {
// get compte id and label
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 = 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->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');
}
}
}
}
}
$invoicestatic->id = $key;
$invoicestatic->ref = (string) $val["refsologest"];
$invoicestatic->refsupplier = $val["refsuppliersologest"];
$invoicestatic->type = $val["type"];
$invoicestatic->description = html_entity_decode(dol_trunc($val["description"], 32));
// 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 = 'supplier_invoice';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add
$bookkeeping->thirdparty_code = $companystatic->code_fournisseur;
$bookkeeping->subledger_account = $tabcompany[$key]['code_compta_fournisseur'];
$bookkeeping->subledger_label = ''; // TODO To complete
$bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER;
$bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("SubledgerAccount");
$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->fk_doc.', '.$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 = $conf->global->ACCOUNTING_PURCHASE_JOURNAL;
$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)
{
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 = 'supplier_invoice';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add
$bookkeeping->thirdparty_code = $companystatic->code_fournisseur;
$bookkeeping->subledger_account = '';
$bookkeeping->subledger_label = '';
$bookkeeping->numero_compte = $k;
$bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $accountingaccount->label;
$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->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
}
else
{
$error++;
$errorforline++;
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
}
}
}
}
// VAT
// var_dump($tabtva);
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 = $conf->global->ACCOUNTING_PURCHASE_JOURNAL;
$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)
{
$listoftax=array(0, 1, 2);
foreach($listoftax as $numtax)
{
$arrayofvat = $tabtva;
if ($numtax == 1) $arrayofvat = $tablocaltax1;
if ($numtax == 2) $arrayofvat = $tablocaltax2;
foreach ( $arrayofvat[$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 = 'supplier_invoice';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add
$bookkeeping->thirdparty_code = $companystatic->code_fournisseur;
$bookkeeping->subledger_account = '';
$bookkeeping->subledger_label = '';
$bookkeeping->numero_compte = $k;
$bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("VAT").' '.join(', ',$def_tva[$key][$k]) . ($numtax?' - Localtax '.$numtax:'');
$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->fk_doc.', '.$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 ($error >= 10)
{
setEventMessages($langs->trans("ErrorTooManyErrorsProcessStopped"), null, 'errors');
break; // Break in the foreach
}
}
}
if (empty($error) && count($tabpay)) {
setEventMessages($langs->trans("GeneralLedgerIsWritten"), null, 'mesgs');
if (empty($error) && count($tabpay) > 0) {
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='';
// Must reload data, so we make a redirect
if (count($tabpay) != $error)
{
$param='id_journal='.$id_journal;
$param.='&date_startday='.$date_startday;
$param.='&date_startmonth='.$date_startmonth;
$param.='&date_startyear='.$date_startyear;
$param.='&date_endday='.$date_endday;
$param.='&date_endmonth='.$date_endmonth;
$param.='&date_endyear='.$date_endyear;
$param.='&in_bookeeping='.$in_bookeeping;
header("Location: ".$_SERVER['PHP_SELF'].($param?'?'.$param:''));
exit;
}
}
/*
@@ -361,124 +412,92 @@ if ($action == 'writebookkeeping') {
$form = new Form($db);
$companystatic = new Fournisseur($db);
// Export
if ($action == 'export_csv') {
if ($action == 'exportcsv') {
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
$journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL;
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
// Model Cegid Expert Export
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) {
$sep = ";";
$companystatic = new Fournisseur($db);
$invoicestatic = new FactureFournisseur($db);
foreach ( $tabfac as $key => $val ) {
$date = dol_print_date($val["date"], '%d%m%Y');
// Product / Service
foreach ( $tabht[$key] as $k => $mt ) {
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
$companystatic->client = $tabcompany[$key]['code_client'];
if ($mt) {
print $date . $sep;
print $purchase_journal . $sep;
print length_accountg(html_entity_decode($k)) . $sep;
print $sep;
print ($mt < 0 ? 'C' : 'D') . $sep;
print ($mt <= 0 ? price(- $mt) : $mt) . $sep;
print dol_trunc($val["description"], 32) . $sep;
print $val["ref"];
print "\n";
}
}
// VAT
foreach ( $tabtva[$key] as $k => $mt ) {
if ($mt) {
print $date . $sep;
print $purchase_journal . $sep;
print length_accountg(html_entity_decode($k)) . $sep;
print $sep;
print ($mt < 0 ? 'C' : 'D') . $sep;
print ($mt <= 0 ? price(- $mt) : $mt) . $sep;
print $langs->trans("VAT") . $sep;
print $val["ref"];
print "\n";
}
}
foreach ( $tabttc[$key] as $k => $mt ) {
print $date . $sep;
print $purchase_journal . $sep;
print length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER) . $sep;
print length_accounta(html_entity_decode($k)) . $sep;
print ($mt < 0 ? 'D' : 'C') . $sep;
print ($mt <= 0 ? price(- $mt) : $mt) . $sep;
print $companystatic->name . $sep;
print $val["ref"];
print "\n";
}
}
} elseif ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 1) {
// Model Classic Export
foreach ( $tabfac as $key => $val ) {
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->ref = $val["refsologest"];
$invoicestatic->refsupplier = $val["refsuppliersologest"];
$invoicestatic->type = $val["type"];
$invoicestatic->description = html_entity_decode(dol_trunc($val["description"], 32));
$invoicestatic->description = dol_trunc($val["description"], 32);
$date = dol_print_date($val["date"], 'day');
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
$companystatic->client = $tabcompany[$key]['code_client'];
// Third party
foreach ( $tabttc[$key] as $k => $mt ) {
print '"' . $key . '"' . $sep;
print '"' . $date . '"' . $sep;
print '"' . $val["refsuppliersologest"] . '"' . $sep;
print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ). '"' . $sep;
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
print '"' . $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER . '"' . $sep;
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
print '"' . $langs->trans("Code_tiers") . '"' . $sep;
print '"' . utf8_decode ( dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("Code_tiers") . '"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"'. $sep;
print '"' . $journal . '"' ;
print "\n";
}
// Product / Service
foreach ( $tabht[$key] as $k => $mt ) {
$accountingaccount = new AccountingAccount($db);
$accountingaccount->fetch(null, $k, true);
if ($mt) {
print '"' . $key . '"' . $sep;
print '"' . $date . '"' . $sep;
print '"' . $val["ref"] . '"' . $sep;
print '"' . $val["refsuppliersologest"] . '"' . $sep;
print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ) . '"' . $sep;
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
print '"' . dol_trunc($companystatic->name, 16) . ' - ' . $val["refsuppliersologest"] . ' - ' . dol_trunc($accountingaccount->label, 32) . '"' . $sep;
// print '"' . dol_trunc($accountingaccount->label, 32) . '"' . $sep;
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
print " " . $sep;
print '"' . utf8_decode ( dol_trunc($accountingaccount->label, 32) ) . '"' . $sep;
print '"' . utf8_decode ( dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . dol_trunc($accountingaccount->label, 32) . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"';
print '"' . ($mt < 0 ? price(- $mt) : '') . '"'. $sep;
print '"' . $journal . '"' ;
print "\n";
}
}
// VAT
foreach ( $tabtva[$key] as $k => $mt ) {
$listoftax = array(0, 1, 2);
foreach ($listoftax as $numtax) {
$arrayofvat = $tabtva;
if ($numtax == 1) $arrayofvat = $tablocaltax1;
if ($numtax == 2) $arrayofvat = $tablocaltax2;
foreach ($arrayofvat[$key] as $k => $mt) {
if ($mt) {
print '"' . $key . '"' . $sep;
print '"' . $date . '"' . $sep;
print '"' . $val["ref"] . '"' . $sep;
print '"' . $val["refsuppliersologest"] . '"' . $sep;
print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ) . '"' . $sep;
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
// print '"' . $langs->trans("VAT") . '"' . $sep;
print '"' . dol_trunc($companystatic->name, 16) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("VAT") . '"' . $sep;
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
print " " . $sep;
print '"' . $langs->trans("VAT") . ' - ' . $def_tva[$key] . '"' . $sep;
print '"' . utf8_decode(dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("VAT") . join(', ',$def_tva[$key][$k]) . ($numtax?' - Localtax '.$numtax:'') . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"';
print '"' . ($mt < 0 ? price(- $mt) : '') . '"'. $sep;
print '"' . $journal . '"' ;
print "\n";
}
}
// Third party
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) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("Code_tiers") . '"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"';
}
print "\n";
}
}
}
@@ -487,12 +506,11 @@ if (empty($action) || $action == 'view') {
llxHeader('', $langs->trans("PurchasesJournal"));
$nom = $langs->trans("PurchasesJournal");
$nom = $langs->trans("PurchasesJournal") . ' - ' . $accountingjournalstatic->getNomUrl(1);
$nomlink = '';
$periodlink = '';
$exportlink = '';
$builddate = time();
//$description = $langs->trans("DescPurchasesJournal") . '<br>';
$description.= $langs->trans("DescJournalOnlyBindedVisible").'<br>';
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$description .= $langs->trans("DepositsAreNotIncluded");
@@ -500,31 +518,39 @@ if (empty($action) || $action == 'view') {
$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' => ''));
$listofchoices=array('already'=>$langs->trans("AlreadyInGeneralLedger"), 'notyet'=>$langs->trans("NotYetInGeneralLedger"));
$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). ' - ' .$langs->trans("AlreadyInGeneralLedger").' '. $form->selectarray('in_bookkeeping', $listofchoices, $in_bookkeeping, 1);
/*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();" />';
}*/
$varlink = 'id_journal=' . $id_journal;
journalHead($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''), '', $varlink);
// Button to write into Ledger
if (empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER) || $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == '-1') {
print img_warning().' '.$langs->trans("SomeMandatoryStepsOfSetupWereNotDone");
print ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
}
print '<div class="tabsAction tabsActionNoBottom">';
if (empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1') {
print '<input type="button" class="butActionRefused" title="'.dol_escape_htmltag($langs->trans("SomeMandatoryStepsOfSetupWereNotDone")).'" value="' . $langs->trans("WriteBookKeeping") . '" />';
}
else {
print '<input type="button" class="butAction" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
}
print '<input type="button" class="butAction" value="' . $langs->trans("ExportDraftJournal") . '" onclick="launch_export();" />';
print '</div>';
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("exportcsv");
$("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>';
@@ -536,105 +562,129 @@ if (empty($action) || $action == 'view') {
$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("SubledgerAccount") . "</td>";
print "<td>" . $langs->trans("Label") . "</td>";
print "<td align='right'>" . $langs->trans("Debit") . "</td>";
print "<td align='right'>" . $langs->trans("Credit") . "</td>";
print "</tr>\n";
$r = '';
$invoicestatic = new FactureFournisseur($db);
$companystatic = new Fournisseur($db);
foreach ( $tabfac as $key => $val ) {
$invoicestatic->id = $key;
$invoicestatic->ref = $val["ref"];
$invoicestatic->type = $val["type"];
$invoicestatic->ref = $val["refsologest"];
$invoicestatic->refsupplier = $val["refsuppliersologest"];
$invoicestatic->type = $val["type"];
$invoicestatic->description = html_entity_decode(dol_trunc($val["description"], 32));
$date = dol_print_date($val["date"], 'day');
// Third party
foreach ( $tabttc[$key] as $k => $mt ) {
print '<tr class="oddeven">';
print "<td><!-- Thirdparty --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
$companystatic->supplier_code = $tabcompany[$key]['code_supplier'];
// Account
print "<td>";
$accountoshow = length_accounta($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("MainAccountForCustomersNotDefined").'</span>';
}
else print $accountoshow;
print '</td>';
// Subledger account
print "<td>";
$accountoshow = length_accounta($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
}
else print $accountoshow;
print '</td>';
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("SubledgerAccount") . "</td>";
print '<td align="right">' . ($mt < 0 ? - price(- $mt) : '') . "</td>";
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print "</tr>";
}
// Product / Service
foreach ( $tabht[$key] as $k => $mt ) {
$accountingaccount = new AccountingAccount($db);
$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>";
// Account
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>";
// Subledger account
print "<td>";
print '</td>';
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $accountingaccount->label . "</td>";
// print "<td>" . $accountingaccount->label . "</td>";
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td align="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print "</tr>";
}
}
// VAT
foreach ( $tabtva[$key] as $k => $mt ) {
if ($mt) {
print "<tr " . $bc[$var] . " >";
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;
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>";
print '<td align="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print "</tr>";
}
}
// Third party
foreach ( $tabttc[$key] as $k => $mt ) {
print "<tr " . $bc[$var] . ">";
print "<td><!-- Thirdparty --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
print "<td>";
$accountoshow = length_accounta($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
// VAT
$listoftax = array(0, 1, 2);
foreach ($listoftax as $numtax) {
$arrayofvat = $tabtva;
if ($numtax == 1) $arrayofvat = $tablocaltax1;
if ($numtax == 2) $arrayofvat = $tablocaltax2;
foreach ( $arrayofvat[$key] as $k => $mt ) {
if ($mt) {
print '<tr class="oddeven">';
print "<td><!-- VAT --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
// Account
print "<td>";
$accountoshow = length_accountg($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("VATAccountNotDefined").'</span>';
}
else print $accountoshow;
print "</td>";
// Subledger account
print "<td>";
print '</td>';
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("VAT"). ' '.join(', ',$def_tva[$key][$k]).($numtax?' - Localtax '.$numtax:'');
print "</td>";
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td align="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print "</tr>";
}
}
else print $accountoshow;
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>";
}
$var = ! $var;
}
print "</table>";

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2016 Jamal Elbaz <jamelbaz@gmail.pro>
/* Copyright (C) 2016/17 Jamal Elbaz <jamelbaz@gmail.com>
* Copyright (C) 2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
@@ -25,6 +25,7 @@ require '../../main.inc.php';
// Class
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 . '/accountancy/class/accountancycategory.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
@@ -35,12 +36,14 @@ $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');
$rowid = GETPOST('rowid', 'int');
$cancel = GETPOST('cancel');
$simple_report = GETPOST('simple_report');
// Filter
$year = GETPOST('year','int');
@@ -77,7 +80,14 @@ $form = new Form($db);
$textprevyear = '<a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current - 1) . '">' . img_previous() . '</a>';
$textnextyear = '&nbsp;<a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current + 1) . '">' . img_next() . '</a>';
print load_fiche_titre($langs->trans('ReportInOut'), $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear, 'title_accountancy');
$nom = $langs->trans("ReportInOut").', '.$langs->trans("ByAccounts");
$nomlink = '';
$periodlink = '';
$exportlink = '';
$builddate = time();
$description = '';
$period = $langs->trans("Detail").' '. $form->selectyesno('simple_report',$simple_report,0) . " " .$textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear ;
report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''));
$moreforfilter='';
@@ -108,31 +118,89 @@ foreach($months as $k => $v){
}
print '</tr>';
$cats = $AccCat->getCatsCpts();
if ($cats < 0) dol_print_error($db, $AccCat->error, $AccCat->errors);
$catsCalcule = $AccCat->getCatsCal();
//All categories
$cats = $AccCat->getCats();
if ($catsCalcule < 0) dol_print_error($db, $AccCat->error, $AccCat->errors);
$j=1;
$sommes = array();
if (!empty($cats))
{
foreach ($cats as $name_cat => $cpts)
{
foreach($cats as $cat ){
if(!empty($cat['category_type'])){ // category calculed
$formula = $cat['formula'];
print "<tr class='liste_titre'>";
print '<td colspan="17">' . $name_cat . '</td>';
print '<td colspan="2">' . $cat['label'] . '</td>';
$vars = array();
// Previous Fiscal year (N-1)
foreach($sommes as $code => $det){
$vars[$code] = $det['NP'];
}
$result = strtr($formula, $vars);
$r = $AccCat->calculate($result);
print '<td align="right"><font color="blue">' . price($r) . '</td>';
$code = $cat['code']; // code categorie de calcule
$sommes[$code]['NP'] += $r;
// Current fiscal year (N)
if (is_array($sommes) && ! empty($sommes)){
foreach($sommes as $code => $det){
$vars[$code] = $det['N'];
}
}
$result = strtr($formula, $vars);
$r = $AccCat->calculate($result);
print '<td align="right"><font color="blue">' . price($r) . '</td>';
$sommes[$code]['N'] += $r;
// Detail by month
foreach($months as $k => $v){
foreach($sommes as $code => $det){
$vars[$code] = $det['M'][$k];
}
$result = strtr($formula, $vars);
$r = $AccCat->calculate($result);
print '<td align="right"><font color="blue">' . price($r) . '</td>';
$sommes[$code]['M'][$k] += $r;
}
print "</tr>\n";
$position = -1;
$code = -1;
}else{ // normal category
$totCat = array();
$totCat['M'] = array();
// get cpts of category
$cpts = $AccCat->getCptsCat($cat['rowid']);
print "<tr class='liste_titre'>";
print '<td colspan="2">' . $cat['label'] . '</td>';
foreach($cpts as $i => $cpt){
$var = ! $var;
$position = $cpt['position'];
$code = $cpt['code'];
$code = $cat['code'];
// N-1
$return = $AccCat->getResult($cpt['account_number'], 0, $year_current -1, $cpt['dc']);
if ($return < 0) {
setEventMessages(null, $AccCat->errors, 'errors');
$resultNP=0;
@@ -140,6 +208,7 @@ if (!empty($cats))
$resultNP=$AccCat->sdc;
}
//N
$return = $AccCat->getResult($cpt['account_number'], 0, $year_current, $cpt['dc']);
if ($return < 0) {
setEventMessages(null, $AccCat->errors, 'errors');
@@ -147,13 +216,64 @@ if (!empty($cats))
} else {
$resultN=$AccCat->sdc;
}
$totCat['NP'] += $resultNP;
$totCat['N'] += $resultN;
foreach($months as $k => $v){
$return = $AccCat->getResult($cpt['account_number'], $k+1, $year_current, $cpt['dc']);
if ($return < 0) {
setEventMessages(null, $AccCat->errors, 'errors');
$resultM=0;
} else {
$resultM=$AccCat->sdc;
}
$totCat['M'][$k] += $resultM;
}
}
print '<td align="right">' . price($totCat['NP']) . '</td>';
print '<td align="right">' . price($totCat['N']) . '</td>';
foreach($totCat['M'] as $k => $v){
print '<td align="right">' . price($v) . '</td>';
}
print "</tr>\n";
foreach($cpts as $i => $cpt){
$var = ! $var;
$code = $cat['code'];
// N-1
$return = $AccCat->getResult($cpt['account_number'], 0, $year_current -1, $cpt['dc']);
if ($return < 0) {
setEventMessages(null, $AccCat->errors, 'errors');
$resultNP=0;
} else {
$resultNP=$AccCat->sdc;
}
//N
$return = $AccCat->getResult($cpt['account_number'], 0, $year_current, $cpt['dc']);
if ($return < 0) {
setEventMessages(null, $AccCat->errors, 'errors');
$resultN=0;
} else {
$resultN=$AccCat->sdc;
}
$sommes[$code]['NP'] += $resultNP;
$sommes[$code]['N'] += $resultN;
print '<tr'. $bc[$var].'>';
print '<td>' . $cpt['account_number'] . '</td>';
if ($simple_report == 'yes') {
print '<td>' . length_accountg($cpt['account_number']) . '</td>';
print '<td>' . $cpt['name_cpt'] . '</td>';
print '<td>' . price($resultNP) . '</td>';
print '<td>' . price($resultN) . '</td>';
print '<td align="right">' . price($resultNP) . '</td>';
print '<td align="right">' . price($resultN) . '</td>';
}
foreach($months as $k => $v){
$return = $AccCat->getResult($cpt['account_number'], $k+1, $year_current, $cpt['dc']);
@@ -164,102 +284,15 @@ if (!empty($cats))
$resultM=$AccCat->sdc;
}
$sommes[$code]['M'][$k] += $resultM;
if ($simple_report == 'yes') {
print '<td align="right">' . price($resultM) . '</td>';
}
print "</tr>\n";
}
// If it's a calculated catgory
$p = $position + 1;
if(array_key_exists($p, $catsCalcule)){
$formula = $catsCalcule[$p]['formula'];
print "<tr class='liste_titre'>";
print '<td colspan="2">' . $catsCalcule[$p]['label'] . '</td>';
$vars = array();
// Previous Fiscal year (N-1)
foreach($sommes as $code => $det){
$vars[$code] = $det['NP'];
}
$result = strtr($formula, $vars);
eval( '$result = (' . $result . ');' );
print '<td align="right">' . price($result) . '</td>';
$code = $catsCalcule[$p]['code']; // code categorie de calcule
$sommes[$code]['NP'] += $result;
// Current fiscal year (N)
foreach($sommes as $code => $det){
$vars[$code] = $det['N'];
}
$result = strtr($formula, $vars);
eval( '$result = (' . $result . ');' );
print '<td align="right">' . price($result) . '</td>';
$sommes[$code]['N'] += $result;
// Detail by month
foreach($months as $k => $v){
foreach($sommes as $code => $det){
$vars[$code] = $det['M'][$k];
}
$result = strtr($formula, $vars);
eval( '$result = (' . $result . ');' );
print '<td align="right">' . price($result) . '</td>';
$sommes[$code]['M'][$k] += $result;
}
//print '<td colspan="15">' . $catsCalcule[$p]['formula'] . '</td>';
print "</tr>\n";
unset($catsCalcule[$p]); // j'élimine la catégorie calculée après affichage
}
$j++;
}
// Others calculed category
foreach($catsCalcule as $p => $catc)
{
$formula = $catsCalcule[$p]['formula'];
print "<tr class='liste_titre'>";
print '<td colspan="2">' . $catsCalcule[$p]['label'] . '</td>';
$vars = array();
// Previous Fiscal year (N-1)
foreach($sommes as $code => $det){
$vars[$code] = $det['NP'];
}
$result = strtr($formula, $vars);
eval( '$result = (' . $result . ');' );
print '<td align="right">' . price($result) . '</td>';
$code = $catsCalcule[$p]['code']; // code categorie de calcule
$sommes[$code]['NP'] += $result;
// Current fiscal year (N)
foreach($sommes as $code => $det){
$vars[$code] = $det['N'];
}
$result = strtr($formula, $vars);
eval( '$result = (' . $result . ');' );
print '<td align="right">' . price($result) . '</td>';
$sommes[$code]['N'] += $result;
// Detail by month
foreach($months as $k => $v){
foreach($sommes as $code => $det){
$vars[$code] = $det['M'][$k];
}
$result = strtr($formula, $vars);
eval( '$result = (' . $result . ');' );
print '<td align="right">' . price($result) . '</td>';
$sommes[$code]['M'][$k] += $result;
}
//print '<td colspan="15">' . $catsCalcule[$p]['formula'] . '</td>';
print "</tr>\n";
}
}
print "</table>";

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

@@ -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-2015 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
@@ -21,12 +21,13 @@
/**
* \file htdocs/accountancy/supplier/index.php
* \ingroup Advanced accountancy
* \brief Home supplier ventilation
* \brief Home supplier journalization page
*/
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 . '/fourn/class/fournisseur.facture.class.php';
// Langs
$langs->load("compta");
@@ -55,7 +56,7 @@ if ($year == 0) {
}
// Validate History
$action = GETPOST('action', 'alpha');
$action = GETPOST('action', 'aZ09');
/*
@@ -69,14 +70,14 @@ if ($action == 'validatehistory') {
// First clean corrupted data
$sqlclean = "UPDATE " . MAIN_DB_PREFIX . "facturedet as fd";
$sqlclean .= " SET fd.fk_code_ventilation = 0";
$sqlclean .= " SET fk_code_ventilation = 0";
$sqlclean .= ' WHERE fd.fk_code_ventilation NOT IN ';
$sqlclean .= ' (SELECT accnt.rowid ';
$sqlclean .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
$sqlclean .= ' INNER JOIN ' . MAIN_DB_PREFIX . 'accounting_system as syst';
$sqlclean .= ' ON accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=' . $conf->global->CHARTOFACCOUNTS . ')';
$resql = $db->query($sqlclean);
// Now make the binding. Bind automatically only for product with a dedicated account that exists into chart of account, others need a manual bind
if ($db->type == 'pgsql') {
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det";
@@ -87,12 +88,14 @@ if ($action == 'validatehistory') {
$sql1 .= " AND " . MAIN_DB_PREFIX . "facture_fourn_det.fk_code_ventilation = 0";
} else {
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det as fd, " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
$sql1 .= " SET fd.fk_code_ventilation = accnt.rowid";
$sql1 .= " SET fk_code_ventilation = accnt.rowid";
$sql1 .= " WHERE fd.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS;
$sql1 .= " AND accnt.active = 1 AND p.accountancy_code_buy=accnt.account_number";
$sql1 .= " AND fd.fk_code_ventilation = 0";
}
dol_syslog('htdocs/accountancy/supplier/index.php');
$resql1 = $db->query($sql1);
if (! $resql1) {
$error ++;
@@ -107,7 +110,7 @@ if ($action == 'validatehistory') {
$db->begin();
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det as fd";
$sql1 .= " SET fd.fk_code_ventilation = 0";
$sql1 .= " SET fk_code_ventilation = 0";
$sql1 .= ' WHERE fd.fk_code_ventilation NOT IN ';
$sql1 .= ' (SELECT accnt.rowid ';
$sql1 .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
@@ -130,13 +133,13 @@ if ($action == 'validatehistory') {
$db->begin();
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det as fd";
$sql1.= " SET fd.fk_code_ventilation = 0";
$sql1.= " SET fk_code_ventilation = 0";
$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);
$resql1 = $db->query($sql1);
@@ -159,65 +162,71 @@ llxHeader('', $langs->trans("SuppliersVentilation"));
$textprevyear = '<a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current - 1) . '">' . img_previous() . '</a>';
$textnextyear = '&nbsp;<a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current + 1) . '">' . img_next() . '</a>';
print load_fiche_titre($langs->trans("SuppliersVentilation") . "&nbsp;" . $textprevyear . "&nbsp;" . $langs->trans("Year") . "&nbsp;" . $year_start . "&nbsp;" . $textnextyear, '', 'title_accountancy');
print load_fiche_titre($langs->trans("SuppliersVentilation") . " " . $textprevyear . "&nbsp;" . $langs->trans("Year") . "&nbsp;" . $year_start . "&nbsp;" . $textnextyear, '', 'title_accountancy');
print $langs->trans("DescVentilSupplier") . '<br>';
print $langs->trans("DescVentilMore", $langs->transnoentitiesnoconv("ValidateHistory"), $langs->transnoentitiesnoconv("ToBind")) . '<br>';
print '<br>';
//print '<div class="inline-block divButAction">';
// TODO Remove this. Should be done always.
// TODO Remove this. Should be done always or into the repair.php script.
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>';
$y = $year_current;
$buttonbind = '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=validatehistory">' . $langs->trans("ValidateHistory") . '</a>';
$buttonreset = '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=cleanaccountancycode">' . $langs->trans("CleanHistory", $year_current) . '</a>';
$y = $year_current;
$var = true;
print '<br>';
print_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td width="200" align="left">' . $langs->trans("Account") . '</td>';
print '<tr class="liste_titre"><td width="200">' . $langs->trans("Account") . '</td>';
print '<td width="200" align="left">' . $langs->trans("Label") . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.account_number') ." AS codecomptable,";
$sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.label') . " AS intitule,";
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'tobind'", 'aa.account_number') ." AS codecomptable,";
$sql .= " " . $db->ifsql('aa.label IS NULL', "'tobind'", 'aa.label') . " AS intitule,";
for($i = 1; $i <= 12; $i ++) {
$sql .= " SUM(" . $db->ifsql('MONTH(ff.datef)=' . $i, 'ffd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
}
$sql .= " ROUND(SUM(ffd.total_ht),2) as total";
$sql .= " SUM(ffd.total_ht) as total";
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as ffd";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture_fourn as ff ON ff.rowid = ffd.fk_facture_fourn";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = ffd.fk_code_ventilation";
$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";
dol_syslog('/accountancy/supplier/index.php:: sql=' . $sql);
dol_syslog('htdocs/accountancy/supplier/index.php');
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
while ( $row = $db->fetch_row($resql)) {
$var = ! $var;
print '<tr ' . $bc[$var] . '><td>' . length_accountg($row[0]) . '</td>';
print '<td align="left">' . $row[1] . '</td>';
print '<tr class="oddeven"><td>';
if ($row[0] == 'tobind')
{
print $langs->trans("Unknown");
}
else print length_accountg($row[0]);
print '</td>';
print '<td align="left">';
if ($row[0] == 'tobind')
{
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/supplier/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
}
else print $row[1];
print '</td>';
for($i = 2; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';
}
@@ -240,40 +249,51 @@ print '<br>';
print_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), $buttonreset, '');
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td width="200" align="left">' . $langs->trans("Account") . '</td>';
print '<tr class="liste_titre"><td width="200">' . $langs->trans("Account") . '</td>';
print '<td width="200" align="left">' . $langs->trans("Label") . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.account_number') ." AS codecomptable,";
$sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.label') . " AS intitule,";
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'tobind'", 'aa.account_number') ." AS codecomptable,";
$sql .= " " . $db->ifsql('aa.label IS NULL', "'tobind'", 'aa.label') . " AS intitule,";
for($i = 1; $i <= 12; $i ++) {
$sql .= " SUM(" . $db->ifsql('MONTH(ff.datef)=' . $i, 'ffd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
}
$sql .= " ROUND(SUM(ffd.total_ht),2) as total";
$sql .= " SUM(ffd.total_ht) as total";
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as ffd";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture_fourn as ff ON ff.rowid = ffd.fk_facture_fourn";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = ffd.fk_code_ventilation";
$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";
dol_syslog('/accountancy/supplier/index.php:: sql=' . $sql);
dol_syslog('htdocs/accountancy/supplier/index.php');
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
while ( $row = $db->fetch_row($resql)) {
$var = ! $var;
print '<tr ' . $bc[$var] . '><td>' . length_accountg($row[0]) . '</td>';
print '<td align="left">' . $row[1] . '</td>';
for($i = 2; $i <= 12; $i ++) {
print '<tr class="oddeven"><td>';
if ($row[0] == 'tobind')
{
print $langs->trans("Unknown");
}
else print length_accountg($row[0]);
print '</td>';
print '<td align="left">';
if ($row[0] == 'tobind')
{
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/supplier/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
}
else print $row[1];
print '</td>';
for($i = 2; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';
}
print '<td align="right">' . price($row[13]) . '</td>';
@@ -293,9 +313,9 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
{
print '<br>';
print '<br>';
print_fiche_titre($langs->trans("OtherInfo"), '', '');
print "<br>\n";
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td width="400" align="left">' . $langs->trans("Total") . '</td>';
@@ -303,27 +323,27 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT '" . $langs->trans("CAHTF") . "' AS label,";
for($i = 1; $i <= 12; $i ++) {
$sql .= " SUM(" . $db->ifsql('MONTH(ff.datef)=' . $i, 'ffd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
}
$sql .= " ROUND(SUM(ffd.total_ht),2) as total";
$sql .= " SUM(ffd.total_ht) as total";
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as ffd";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture_fourn as ff ON ff.rowid = ffd.fk_facture_fourn";
$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
dol_syslog('/accountancy/supplier/index.php:: sql=' . $sql);
$sql .= " AND ff.entity IN (" . getEntity('facture_fourn', 0) . ")"; // We don't share object for accountancy
dol_syslog('htdocs/accountancy/supplier/index.php');
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
while ( $row = $db->fetch_row($resql)) {
print '<tr><td>' . $row[0] . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';
@@ -331,7 +351,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
print '<td align="right"><b>' . price($row[13]) . '</b></td>';
print '</tr>';
}
$db->free($resql);
} else {
print $db->lasterror(); // Show last sql error

View File

@@ -1,10 +1,10 @@
<?php
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.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
* the Free Software Foundation; either version 3 of the License, or
@@ -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');
@@ -51,9 +52,11 @@ $search_desc = GETPOST('search_desc', 'alpha');
$search_amount = GETPOST('search_amount', 'alpha');
$search_account = GETPOST('search_account', 'alpha');
$search_vat = GETPOST('search_vat', 'alpha');
$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');
@@ -75,7 +78,7 @@ if ($user->societe_id > 0)
if (! $user->rights->accounting->bind->write)
accessforbidden();
$formventilation = new FormVentilation($db);
$formaccounting = new FormAccounting($db);
/*
@@ -83,8 +86,9 @@ $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
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers
{
$search_lineid = '';
$search_ref = '';
$search_invoice = '';
$search_label = '';
@@ -92,17 +96,19 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP
$search_amount = '';
$search_account = '';
$search_vat = '';
$search_country = '';
$search_tvaintra = '';
}
if (is_array($changeaccount) && count($changeaccount) > 0) {
$error = 0;
$db->begin();
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det as l";
$sql1 .= " SET l.fk_code_ventilation=" . GETPOST('account_parent');
$sql1 .= ' WHERE l.rowid IN (' . implode(',', $changeaccount) . ')';
dol_syslog('accountancy/supplier/lines.php::changeaccount sql= ' . $sql1);
$resql1 = $db->query($sql1);
if (! $resql1) {
@@ -147,15 +153,21 @@ 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.= " 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";
$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 = "SELECT f.rowid as facid, f.ref as facnumber, f.ref_supplier, f.libelle as invoice_label, f.datef, f.fk_soc,";
$sql.= " l.rowid, l.fk_product, l.description, l.total_ht , l.qty, l.tva_tx, l.vat_src_code,";
$sql.= " 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, co.label as country, s.tva_intra";
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as l";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = l.fk_code_ventilation";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn as f ON f.rowid = l.fk_facture_fourn";
$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 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 +189,13 @@ 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
if (strlen(trim($search_country))) {
$sql .= " AND (co.label like'" . $search_country . "%')";
}
if (strlen(trim($search_tvaintra))) {
$sql .= " AND (s.tva_intra like'" . $search_tvaintra . "%')";
}
$sql .= " AND f.entity IN (" . getEntity('facture_fourn', 0) . ")"; // We don't share object for accountancy
$sql .= $db->order($sortfield, $sortorder);
@@ -197,7 +215,7 @@ $result = $db->query($sql);
if ($result) {
$num_lines = $db->num_rows($result);
$i = 0;
$param='';
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
@@ -216,8 +234,8 @@ if ($result) {
if ($search_country)
$param .= "&search_country=" . $search_country;
if ($search_tvaintra)
$param .= "&search_tvaintra=" . $search_tvaintra;
$param .= "&search_tvaintra=" . $search_tvaintra;
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.'">';
@@ -225,113 +243,119 @@ 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 = '';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\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);
print_liste_field_titre($langs->trans("InvoiceLabel"), $_SERVER["PHP_SELF"], "f.libelle", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Date"), $_SERVER["PHP_SELF"], "f.datef, f.ref, l.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("ProductRef"), $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
//print_liste_field_titre($langs->trans("ProductLabel"), $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Description"), $_SERVER["PHP_SELF"], "l.description", "", $param, '', $sortfield, $sortorder);
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 '<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="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="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" align="center"><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;
$searchpicto=$form->showFilterButtons();
print $searchpicto;
print '</td>';
print "</tr>\n";
print '<tr class="liste_titre">';
print_liste_field_titre("LineId", $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("InvoiceLabel", $_SERVER["PHP_SELF"], "f.libelle", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "f.datef, f.ref, l.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("ProductRef", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
//print_liste_field_titre("ProductLabel", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "l.description", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "l.total_ht", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "aa.account_number", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("Country", $_SERVER["PHP_SELF"], "co.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("VATIntra", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder);
$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;
$facturefournisseur_static->id = $objp->facid;
$product_static->ref = $objp->product_ref;
$product_static->id = $objp->product_id;
$product_static->type = $objp->type;
$product_static->label = $objp->product_label;
print '<tr '. $bc[$var].'>';
print '<tr class="oddeven">';
print '<td>' . $objp->rowid . '</td>';
// Ref Invoice
print '<td>' . $facturefournisseur_static->getNomUrl(1) . '</td>';
print '<td>';
print $objp->invoice_label;
print '</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>';
$text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->description));
$trunclength = defined('ACCOUNTING_LENGTH_DESCRIPTION') ? ACCOUNTING_LENGTH_DESCRIPTION : 32;
$trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION;
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 align="center">' . vatrate($objp->tva_tx.($objp->vat_src_code?' ('.$objp->vat_src_code.')':'')) . '</td>';
print '<td align="left">';
print $codecompta . ' <a href="./card.php?id=' . $objp->rowid . '">';
print img_edit();
print '</a></td>';
print '<td align="right"><input type="checkbox" class="checkforaction" name="changeaccount[]" value="' . $objp->rowid . '"/></td>';
print '<td align="right">' . $objp->country .'</td>';
print '<td align="center">' . $objp->tva_intra . '</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);
}
print '</form>';
} else {
print $db->error();

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@zendsi.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,10 @@ if ($user->societe_id > 0)
if (! $user->rights->accounting->bind->write)
accessforbidden();
$formventilation = new FormVentilation($db);
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('accountancysupplierlist'));
$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);
@@ -98,25 +102,32 @@ $aarowid_p = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUN
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_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_ref = '';
$search_invoice = '';
$search_label = '';
$search_desc = '';
$search_amount = '';
$search_account = '';
$search_vat = '';
}
$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');
// Mass actions
$objectclass='Skeleton';
$objectlabel='Skeleton';
$permtoread = $user->rights->accounting->read;
$permtodelete = $user->rights->accounting->delete;
$uploaddir = $conf->accounting->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
if (empty($reshook))
{
// Purge search criteria
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers
{
$search_lineid = '';
$search_ref = '';
$search_invoice = '';
$search_label = '';
$search_desc = '';
$search_amount = '';
$search_account = '';
$search_vat = '';
}
// Mass actions
$objectclass='AccountingAccount';
$permtoread = $user->rights->accounting->read;
$permtodelete = $user->rights->accounting->delete;
$uploaddir = $conf->accounting->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
if ($massaction == 'ventil') {
$msg='';
@@ -144,10 +155,10 @@ if ($massaction == 'ventil') {
$sql = " UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det";
$sql .= " SET fk_code_ventilation = " . $monCompte;
$sql .= " WHERE rowid = " . $monId;
$accountventilated = new AccountingAccount($db);
$accountventilated->fetch($monCompte, '');
dol_syslog('accountancy/supplier/list.php:: sql=' . $sql, LOG_DEBUG);
if ($db->query($sql)) {
$msg.= '<div><font color="green">' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' - ' . $langs->trans("VentilatedinAccount") . ' : ' . length_accountg($accountventilated->account_number) . '</font></div>';
@@ -157,7 +168,7 @@ if ($massaction == 'ventil') {
$ko++;
}
}
$cpt++;
}
$msg.='</div>';
@@ -179,9 +190,12 @@ 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, l.vat_src_code,";
$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";
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
$sql.=$hookmanager->resPrint;
$sql.= " FROM " . MAIN_DB_PREFIX . "facture_fourn as f";
$sql.= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn_det as l ON f.rowid = l.fk_facture_fourn";
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
@@ -189,8 +203,12 @@ $sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accountan
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_system as accsys ON accsys.pcg_version = aa.fk_pcg_version";
$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 ='')";
$sql.= " AND (accsys.rowid='" . $conf->global->CHARTOFACCOUNTS . "' OR p.accountancy_code_buy IS NULL OR p.accountancy_code_buy =''OR p.accountancy_code_buy NOT IN
(SELECT aa.account_number FROM " . MAIN_DB_PREFIX . "accounting_account as aa , " . MAIN_DB_PREFIX . "accounting_system as asy WHERE fk_pcg_version = asy.pcg_version AND asy.rowid ='" . $conf->global->CHARTOFACCOUNTS . "'))";
// 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 +230,12 @@ 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
// Add where from hooks
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook
$sql.=$hookmanager->resPrint;
$sql .= $db->order($sortfield, $sortorder);
@@ -233,11 +256,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 +269,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,53 +277,56 @@ 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 '<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);
print_liste_field_titre($langs->trans("InvoiceLabel"), $_SERVER["PHP_SELF"], "f.libelle", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Date"), $_SERVER["PHP_SELF"], "f.datef, f.ref, l.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("ProductRef"), $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
//print_liste_field_titre($langs->trans("ProductLabel"), $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Description"), $_SERVER["PHP_SELF"], "l.description", "", $param, '', $sortfield, $sortorder);
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="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"');
print "</tr>\n";
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
// We add search filter
print '<tr class="liste_titre">';
print '<td class="liste_titre"></td>';
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="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" 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="right" class="liste_titre">';
$searchpitco=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, '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("LineId", $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("InvoiceLabel", $_SERVER["PHP_SELF"], "f.libelle", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "f.datef, f.ref, l.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("ProductRef", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
//print_liste_field_titre("ProductLabel", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "l.description", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "l.total_ht", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("AccountAccountingSuggest", '', '', '', '', 'align="center"');
print_liste_field_titre("IntoAccount", '', '', '', '', 'align="center"');
$checkpicto='';
if ($massactionbutton) $checkpicto=$form->showCheckAddButtons('checkforselect', 1);
print_liste_field_titre($checkpicto, '', '', '', '', 'align="center"');
print "</tr>\n";
$facturefourn_static = new FactureFournisseur($db);
$productfourn_static = new ProductFournisseur($db);
$form = new Form($db);
@@ -309,7 +334,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,11 +346,11 @@ 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;
$code_buy_p_notset = '';
$objp->aarowid_suggest = $objp->aarowid;
@@ -340,42 +364,42 @@ 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));
$trunclength = defined('ACCOUNTING_LENGTH_DESCRIPTION') ? ACCOUNTING_LENGTH_DESCRIPTION : 32;
$trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION;
print $form->textwithtooltip(dol_trunc($text,$trunclength), $objp->description);
print '</td>';
@@ -387,7 +411,7 @@ if ($result) {
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 vatrate($objp->tva_tx_line.($objp->vat_src_code?' ('.$objp->vat_src_code.')':''));
print '</td>';
// Current account
@@ -402,11 +426,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>';
@@ -416,7 +440,7 @@ if ($result) {
print '</table>';
print "</div>";
print '</form>';
} else {
print $db->error();

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