2
0
forked from Wavyzz/dolibarr

Compare commits

...

1092 Commits
9.0.1 ... 9.0

Author SHA1 Message Date
Laurent Destailleur
90854dc2bf FIX Use the wrong logo size on PDF 2023-07-30 19:53:56 +02:00
Laurent Destailleur
b44ddaa696 FIX Use the wrong logo size on PDF 2023-07-30 18:04:03 +02:00
Laurent Destailleur
4569cb82b2 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2022-03-10 15:52:04 +01:00
Laurent Destailleur
04d33f4594 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2022-03-10 15:51:42 +01:00
Laurent Destailleur
af6e95aa79 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/core/class/utils.class.php
2022-03-10 15:49:51 +01:00
Laurent Destailleur
5d942c9d1a Fix infinit logs 2022-03-10 15:46:00 +01:00
Laurent Destailleur
1541e20870 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/core/class/utils.class.php
2022-01-07 15:43:28 +01:00
Laurent Destailleur
53709cf509 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0
Conflicts:
	htdocs/core/class/utils.class.php
2022-01-07 15:40:05 +01:00
Laurent Destailleur
10e32c056e FIX avoid infinite loop on dump with popen 2022-01-07 15:35:33 +01:00
Laurent Destailleur
0a72aed3d7 Fix missing space before union 2021-12-23 13:35:38 +01:00
Laurent Destailleur
5e1cd459b1 Fix travis 2020-11-15 23:47:53 +01:00
Laurent Destailleur
0f435f9901 Merge pull request #15098 from atm-gauthier/9.0_fix_worklow_order_auto_validated_with_shipping_validate_must_no_consider_services
FIX : WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING must not consider serv…
2020-10-22 16:18:11 +02:00
Laurent Destailleur
a9117fe864 Update interface_20_modWorkflow_WorkflowManager.class.php 2020-10-22 16:18:00 +02:00
Laurent Destailleur
8ce929d509 Merge pull request #15069 from ATM-Consulting/fix/9.0_linked_object_on_supplier_proposal_events
FIX 9.0 - when users create an event from a supplier proposal, the "linked objects" section says "Deleted"
2020-10-22 16:10:49 +02:00
Got2be
c2ad40043f FIX : WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING must not consider services while STOCK_SUPPORTS_SERVICES is empty 2020-10-22 16:10:47 +02:00
Florian Mortgat
529dfb8dfb FIX 9.0 - supplier proposals as linked objects of events are not correctly fetched 2020-10-20 16:37:15 +02:00
Laurent Destailleur
74eac1d06a Fix include regression 2020-08-23 19:22:01 +02:00
Laurent Destailleur
03557b69c2 Merge pull request #14486 from atm-john/9.0_fix_infinite_fetch_loop
FIX : infinite fetch object linked loop
2020-08-23 19:14:08 +02:00
Laurent Destailleur
7a183ea026 Update pdf.lib.php 2020-08-23 19:13:30 +02:00
Laurent Destailleur
b44d6744f9 Update pdf.lib.php 2020-08-23 19:11:40 +02:00
Laurent Destailleur
7eb003c684 Update pdf.lib.php 2020-08-23 19:11:19 +02:00
John Botella
6e1702c1a5 Fix infinite fetch object linked loop 2020-08-17 15:00:31 +02:00
Laurent Destailleur
73ea5b0e2d Fix function to convert price to string 2020-08-06 02:50:24 +02:00
Laurent Destailleur
9cb5735165 FIX Bad address used for vendor on PDF standard of supplier payment 2020-08-06 02:05:55 +02:00
Laurent Destailleur
c8bff3a71e FIX Cannot redeclare class 2020-08-06 02:05:04 +02:00
Laurent Destailleur
9dc904f0a5 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2020-07-29 16:03:03 +02:00
Laurent Destailleur
491f72accc Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2020-07-29 16:02:07 +02:00
Laurent Destailleur
4a291f181f Fix regression 2020-07-29 13:47:04 +02:00
Laurent Destailleur
454a804b4e Merge pull request #14299 from atm-gauthier/9.0_hidden_unit
FIX : We need to see unit line on PDF even though it's an option
2020-07-29 13:18:17 +02:00
VERDOL Gauthier
25994e61bc FIX : We need to see unit line on PDF even though it's an option 2020-07-27 16:04:21 +02:00
Laurent Destailleur
4f5c5356c5 Merge pull request #14150 from atm-gauthier/9.0_deposit_amount_with_comma
FIX : create a deposit with amount using comma didn't work
2020-07-03 00:38:59 +02:00
Laurent Destailleur
18fa4c4105 Update card.php 2020-07-03 00:38:31 +02:00
gauthier
6553c40bea FIX : create a deposit with amount using comma didn't work 2020-06-30 11:23:55 +02:00
Laurent Destailleur
eb7dd74026 Revert error 2020-06-04 16:05:40 +02:00
Laurent Destailleur
88f6c71e88 Add tuto for live streaming 2020-06-04 16:05:04 +02:00
Laurent Destailleur
afacfa702d Merge pull request #13943 from atm-maxime/fix_pgsql_if
Fix SQL IF for PGSQL
2020-05-23 13:41:18 +02:00
Maxime Kohlhaas
f89195e39f Fix SQL IF for PGSQL 2020-05-21 23:23:59 +02:00
Laurent Destailleur
ca14f9a0fa Merge pull request #13901 from atm-maxime/fix_cron_globals
Fix cron globals reload, missing mysoc and langs
2020-05-18 15:02:00 +02:00
Laurent Destailleur
18a19dafe5 Update cron_run_jobs.php 2020-05-18 15:01:29 +02:00
Laurent Destailleur
3d385dd378 Merge pull request #13903 from atm-maxime/fix_actioncomm_fetch_entity
Fix : entity was missing in actioncomm fetch
2020-05-18 14:59:10 +02:00
Laurent Destailleur
2d1f151fb2 Merge pull request #13905 from atm-maxime/fix_expedition_fetch_entity
Fix : entity was missing in expedition fetch
2020-05-18 14:58:57 +02:00
Maxime Kohlhaas
3d9d5d0ad5 Fix : entity was missing in expedition fetch 2020-05-18 11:03:32 +02:00
Maxime Kohlhaas
cf96383bf9 Fix : entity was missing in actioncomm fetch 2020-05-18 10:44:55 +02:00
Maxime Kohlhaas
54af917afb Fix cron globals reload, missing mysoc and langs 2020-05-16 20:13:47 +02:00
Laurent Destailleur
e327d609d7 Merge pull request #13891 from aspangaro/9.0p1
FIX Site ec.europa.eu has moved to https://
2020-05-15 14:01:28 +02:00
Alexandre SPANGARO
3811586cd0 FIX Site ec.europa.eu has moved to https:// 2020-05-14 20:34:48 +02:00
Laurent Destailleur
cf039b26f9 Merge pull request #13887 from atm-florianm/FIX_9.0_fatal_during_migration_from_dolibarr_3.1_if_php7
FIX 9.0 - fatal during migration from 3.1 using PHP 7
2020-05-14 15:49:08 +02:00
Florian Mortgat
bd3504c473 FIX 9.0 - delete unused mandatory argument from migrate_clean_association: argument count mismatch causes a fatal error since php7 2020-05-13 10:26:44 +02:00
Laurent Destailleur
4a9c85ae39 Merge pull request #13869 from frederic34/patch-6
Fix dolistore search with csrf active
2020-05-12 02:59:06 +02:00
Frédéric FRANCE
4d50ba5e37 Fix dolistore search with csrf active 2020-05-11 20:42:47 +02:00
Laurent Destailleur
385f998254 Fix restore param --quick 2020-05-01 21:01:40 +02:00
Laurent Destailleur
8ed100ca87 Merge pull request #13776 from ATM-Consulting/9.0_backport_FIX_document_export
FIX Several pb in export of documents
2020-05-01 20:48:15 +02:00
Laurent Destailleur
82ace4b4ef FIX Several pb in export of documents
FIX Must escape shell
FIX Must exclude logs and some dirs for compressed backup
FIX gzip and bzip2 must use option -f
2020-04-30 11:52:30 +02:00
Laurent Destailleur
f4df3d01b2 Merge pull request #13733 from frederic34/patch-1
fix countable php7 warning
2020-04-24 14:51:45 +02:00
Frédéric FRANCE
1aafd4667b fix countable php7 warning 2020-04-24 11:57:23 +02:00
Laurent Destailleur
afbfd66ee9 Merge pull request #13581 from atm-maxime/fix_expedition_warning_count
Fix warning on shipment because of count func
2020-04-12 17:21:28 +02:00
Laurent Destailleur
e9ee7a23e6 Merge pull request #13573 from frederic34/patch-11
Update actioncomm.class.php
2020-04-12 16:42:07 +02:00
Maxime Kohlhaas
3ca0d48b37 Fix warning on shipment because of count func 2020-04-12 10:45:30 +02:00
Frédéric FRANCE
e2660fd31c Update actioncomm.class.php 2020-04-11 22:38:28 +02:00
Laurent Destailleur
c4d898e155 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/societe/class/societe.class.php
2020-04-10 02:01:31 +02:00
Laurent Destailleur
2ec60c9d55 Merge pull request #13508 from hregis/8.0_mc3
FIX missing member entity
2020-04-07 21:14:06 +02:00
Regis Houssin
34e434a17e FIX missing member entity 2020-04-06 16:36:11 +02:00
Laurent Destailleur
683ddac0d4 Merge pull request #13493 from ptibogxiv/patch-320
FIX child categories only with good entity rights
2020-04-05 02:40:43 +02:00
ptibogxiv
c7cdb64087 FIX child categories only with good entity rights
fix v9 to develop
display only categories with good entity rights ( intradolibarr or via REST API)
2020-04-04 11:07:48 +02:00
Laurent Destailleur
a923ef5a6d Merge pull request #13456 from atm-gauthier/9.0_fix_migrate_picture_path_script
FIX : picture migration script from doli 9.0
2020-04-02 12:50:23 +02:00
gauthier
04564e83ea FIX : picture migration script from doli 9.0 2020-03-31 10:31:18 +02:00
Laurent Destailleur
878c4fb106 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2020-03-30 19:53:40 +02:00
Laurent Destailleur
fbce8fcfe3 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/product/class/product.class.php
2020-03-30 19:53:31 +02:00
Laurent Destailleur
125e964352 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0
Conflicts:
	htdocs/product/class/product.class.php
2020-03-30 19:50:47 +02:00
Laurent Destailleur
b081cf5cba Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/product/class/product.class.php
2020-03-30 19:48:41 +02:00
Laurent Destailleur
3ea9c297ea Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2020-03-30 19:46:23 +02:00
Laurent Destailleur
474260e526 Merge pull request #13447 from c3do/patch-1
Fix can set desiredstock to (int) 0 from API Rest
2020-03-30 19:46:02 +02:00
Laurent Destailleur
06ad21f2e8 Merge pull request #13442 from fappels/9.0_newToken
Improve modulebuilder compatiblity with maintained versions.
2020-03-30 19:35:45 +02:00
Cédric
eead9a93d3 Fix can set desiredstock to (int) 0 from API Rest
When you set desiredstock to 0 as an integer from the API, it registers to null in the database. Using is_numeric() fixes this.
2020-03-30 13:03:13 +02:00
Francis Appels
3eda785ca5 Add newline end of file 2020-03-30 10:36:49 +02:00
Francis Appels
076caa11ab Add token functions to improve modulebuilder compatiblity with maintained versions. 2020-03-30 10:28:20 +02:00
Laurent Destailleur
81ae6c45ea composer is a big mess 2020-03-26 03:47:58 +01:00
Laurent Destailleur
39f7742387 Update travis config 2020-03-26 03:46:39 +01:00
Laurent Destailleur
5fdf23bba8 Fix exclude fucking composer dependencies 2020-03-26 03:36:16 +01:00
Laurent Destailleur
84fc394e6f Fix exclude fucking composer dependencies 2020-03-26 03:29:29 +01:00
Laurent Destailleur
a7ba23d845 Merge pull request #13419 from atm-gauthier/9.0_search_status_on_bookmarks
FIX : when we filter a list on a view status, we want this filter to …
2020-03-25 18:44:40 +01:00
gauthier
81af385259 FIX : when we filter a list on a view status, we want this filter to be on bookmark that we create 2020-03-25 10:27:59 +01:00
Laurent Destailleur
7afbb5ce9c Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2020-03-11 17:00:01 +01:00
Laurent Destailleur
467dc2da7a Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2020-03-11 16:59:35 +01:00
Laurent Destailleur
4bdf10c995 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2020-03-11 16:44:03 +01:00
Laurent Destailleur
7f759c6ff5 Merge pull request #13322 from atm-lena/6.0_FIX_FournCommandClone_ExtrafieldsLines
FIX - Clone Fourn Command, add line's extrafields
2020-03-11 16:36:27 +01:00
atm-lena
20aa51f26b FIX - Clone Fourn Command, add line's extrafields Part 2 2020-03-11 15:26:49 +01:00
atm-lena
35f32391a0 FIX - Clone Fourn Command, add line's extrafields 2020-03-10 14:46:15 +01:00
Laurent Destailleur
d39820d1ac Merge pull request #13286 from ATM-Nicolas/fix_unexisting_link
FIX : Remove unexisting link
2020-03-06 14:14:00 +01:00
ATM-Nicolas
a9d7bbc2ed FIX : Remove unexisting link 2020-03-06 09:52:19 +01:00
Laurent Destailleur
52a92924de Merge pull request #13230 from atm-gauthier/fix_round_accountancy
FIX : round MT in accountancy books
2020-02-29 12:35:33 +01:00
gauthier
284a4189b3 FIX : round MT in accountancy books 2020-02-28 14:32:35 +01:00
Laurent Destailleur
530930b7aa Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2020-02-23 23:30:38 +01:00
Laurent Destailleur
ac2f6bdc42 Merge pull request #13178 from gmilad/patch-2
Update note.php
2020-02-23 22:45:00 +01:00
Laurent Destailleur
5648205beb Merge pull request #13181 from atm-maxime/8.0
Fix #10179 discount split
2020-02-23 22:43:21 +01:00
Maxime Kohlhaas
0ab16ed5ae Fix #10179 discount split 2020-02-23 16:50:24 +01:00
gmilad
559fc9f61e Update note.php
Fix : #13168
2020-02-22 13:07:25 +01:00
Laurent Destailleur
d6917b6b08 Merge pull request #13152 from fmarcet/9.0
FIX: Visualization rights correction on last modified contacts box
2020-02-21 18:14:09 +01:00
Ferran Marcet
9ff424e23b FIX: Visualization rights correction on last modified contacts box 2020-02-20 11:45:46 +01:00
Laurent Destailleur
88f0cc1331 Merge pull request #13113 from aspangaro/9.0_FEC
FIX: Force FEC export to txt format
2020-02-14 18:56:31 +01:00
Alexandre SPANGARO
72e59e6fe2 FIX: Force FEC export to txt format 2020-02-14 16:07:06 +01:00
Laurent Destailleur
102428a503 Merge pull request #13056 from atm-lena/FIX_cabyprodlist_filter
FIX CA by prod list filter
2020-02-08 16:09:18 +01:00
Laurent Destailleur
4b6276ff92 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2020-02-08 15:28:59 +01:00
Laurent Destailleur
14531bf160 Fix #13046 - Bad parenthesis on test 2020-02-08 15:28:40 +01:00
atm-lena
ecea726323 FIX CA by prod list filter 2020-02-07 15:01:37 +01:00
Laurent Destailleur
387db16217 FIX Filenames must not contains non ascii char or we will get non ascii
char into the SMTP header.

Conflicts:
	htdocs/core/class/CMailFile.class.php
2020-02-06 13:03:10 +01:00
Laurent Destailleur
b6efd098dd Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2020-02-05 19:37:03 +01:00
Laurent Destailleur
bf4fca0c7e Fix warning 2020-02-03 22:09:21 +01:00
Laurent Destailleur
42769e2e7d Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2020-01-23 17:30:30 +01:00
Laurent Destailleur
7ee37ddd3f FIX Error in log for email sending with smtps was not complete 2020-01-23 17:30:05 +01:00
Laurent Destailleur
3a9ef7c5e7 Merge pull request #12911 from aspangaro/9.0_FEC
FIX: FEC export format
2020-01-23 12:04:55 +01:00
Laurent Destailleur
cbe396b97c Update functions2.lib.php 2020-01-23 12:04:14 +01:00
Laurent Destailleur
1487158082 Update functions2.lib.php 2020-01-23 12:02:29 +01:00
Alexandre SPANGARO
7f47b48559 Move function to functions2.lib.php 2020-01-23 11:47:30 +01:00
Alexandre SPANGARO
5eeef771fa FIX: FEC export format 2020-01-23 06:20:31 +01:00
Laurent Destailleur
b513ad90eb Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2020-01-10 19:48:33 +01:00
Laurent Destailleur
e0a12edf31 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2020-01-10 19:48:10 +01:00
Laurent Destailleur
0625a7194f Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2020-01-10 19:47:32 +01:00
Laurent Destailleur
ec6e933f66 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2020-01-10 19:47:00 +01:00
Laurent Destailleur
e0c8ccb9fb Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2020-01-10 19:45:35 +01:00
Laurent Destailleur
ef00cb0736 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0
Conflicts:
	htdocs/fourn/class/fournisseur.commande.class.php
2020-01-10 19:44:52 +01:00
Laurent Destailleur
d7f7f5bf3d Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2020-01-10 19:42:34 +01:00
Laurent Destailleur
7c0a6946a7 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2020-01-10 19:42:15 +01:00
Laurent Destailleur
1ecc1afa9e Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.8 2020-01-10 19:41:49 +01:00
Laurent Destailleur
ceb1e699b7 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.7 2020-01-10 19:37:16 +01:00
Laurent Destailleur
c028819cab FIX clone of purchase order 2020-01-10 19:35:49 +01:00
Laurent Destailleur
4f2f2f0d73 Merge pull request #12815 from artis-auxilium/fix_massaction_checkbox
Fix massaction checkbox when product module disable
2020-01-10 00:22:02 +01:00
Dev2a
57c954f2e8 Fix Check array of action after kooks 2020-01-07 21:41:36 +01:00
Dev2a
2d67c2365f Fix Check right for service for arrayofmassaction
if product module disable, threre is no action for service
2020-01-07 18:59:58 +01:00
Laurent Destailleur
36e6036e9e Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-12-23 14:01:00 +01:00
Laurent Destailleur
76d23141fd Merge pull request #12727 from fappels/patch-1
Update 6.0.0-7.0.0.sql
2019-12-23 14:00:15 +01:00
Laurent Destailleur
cc8a291f28 Merge pull request #12730 from atm-maxime/fix_shipment_close
Fix prevent double action on shipment close
2019-12-17 19:35:25 +01:00
Maxime Kohlhaas
3e19702e39 Fix prevent double action on shipment close 2019-12-17 18:05:59 +01:00
Francis Appels
95b56f0518 Update 6.0.0-7.0.0.sql
timestamp NOT NULL can cause SQL error.
2019-12-17 12:19:35 +01:00
Laurent Destailleur
cdb730cf4a Merge pull request #12724 from atm-florian/9.0
fix: task document tab FATAL without thirdparty
2019-12-17 12:14:55 +01:00
Laurent Destailleur
03bb395ad8 Update document.php 2019-12-17 12:14:30 +01:00
florian HENRY
bb6523b75d fix task document banner without thirdparty FATAL 2019-12-17 10:49:56 +01:00
Laurent Destailleur
31a60ff30b Fix $db 2019-12-14 14:41:27 +01:00
Laurent Destailleur
d1daf94b81 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-12-14 14:34:14 +01:00
Laurent Destailleur
a8de7b850a Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/admin/system/filecheck.php
2019-12-14 14:33:46 +01:00
Laurent Destailleur
9f2a628c3b Remove bak file 2019-12-14 13:25:21 +01:00
Laurent Destailleur
3a4b4e1559 Merge pull request #12706 from frederic34/patch-22
Update generate_filelist_xml.php
2019-12-14 13:23:36 +01:00
Frédéric FRANCE
bac5c3800e Update api_setup.class.php 2019-12-13 14:46:27 +01:00
Frédéric FRANCE
50937f8ca1 Update filecheck.php 2019-12-13 12:56:48 +01:00
Frédéric FRANCE
18e3a4bcbb Update generate_filelist_xml.php 2019-12-13 12:56:02 +01:00
Frédéric FRANCE
6e64a20f9e Update filecheck.php 2019-12-13 11:16:46 +01:00
Frédéric FRANCE
030b78d79f Update generate_filelist_xml.php 2019-12-13 11:16:04 +01:00
Frédéric FRANCE
a923a48e64 Update filecheck.php 2019-12-13 10:44:12 +01:00
Frédéric FRANCE
cad54c6d7a Update generate_filelist_xml.php 2019-12-13 10:42:49 +01:00
Laurent Destailleur
22a297ed47 Merge pull request #12680 from glelarge/90/12665-mass_invoice_validation_with_stock_management
FIX #12665 Mass invoice validation with stock management (branch 9.0)
2019-12-10 19:27:36 +01:00
Laurent Destailleur
2103cacf9e Merge pull request #12679 from glelarge/80/12665-mass_invoice_validation_with_stock_management
FIX #12665 Mass invoice validation with stock management (branch 8.0)
2019-12-10 19:26:24 +01:00
Gérald Lelarge
97ec8b8e02 FIX #12665 Mass invoice validation with stock management
Normally the mass invoice validation is not authorized due to the need to choose the warehouse where to increase
or decrease the stock.
A message ErrorMassValidationNotAllowedWhenStockIncreaseOnAction is displayed to inform the user to do this
validation manually one by one.
The invoices should not be validated.
2019-12-10 14:23:48 +01:00
Gérald Lelarge
5d61e53140 FIX #12665 Mass invoice validation with stock management
Normally the mass invoice validation is not authorized due to the need to choose the warehouse where to increase
or decrease the stock.
A message ErrorMassValidationNotAllowedWhenStockIncreaseOnAction is displayed to inform the user to do this
validation manually one by one.
The invoices should not be validated.
2019-12-10 14:16:15 +01:00
Laurent Destailleur
e66013275d Merge pull request #12675 from frederic34/patch-6
doxygen and $db not defined
2019-12-10 11:35:46 +01:00
Frédéric FRANCE
f4674a7558 doxygen and $db bot defined 2019-12-10 07:51:39 +01:00
Laurent Destailleur
c0e23c7b71 Merge pull request #12670 from frederic34/patch-7
The variable $id seems to be never defined
2019-12-10 05:53:46 +01:00
Laurent Destailleur
7ba5c2e9d8 Merge pull request #12669 from frederic34/patch-6
typo
2019-12-10 05:53:13 +01:00
Frédéric FRANCE
de741f5dd0 The variable $id seems to be never defined 2019-12-09 23:22:13 +01:00
Frédéric FRANCE
a16e342af6 typo 2019-12-09 23:15:15 +01:00
Laurent Destailleur
314a13a8df Merge pull request #12668 from frederic34/patch-6
missing $db for line 711
2019-12-09 17:33:20 +01:00
Frédéric FRANCE
407fe902b4 missing $db for line 711 2019-12-09 16:42:57 +01:00
Laurent Destailleur
94ae8e07af Merge pull request #12642 from frederic34/patch-11
fix #12628
2019-12-09 13:54:20 +01:00
Laurent Destailleur
63a26ed436 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-12-09 13:25:49 +01:00
Laurent Destailleur
f2c7d3de2e Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0
Conflicts:
	htdocs/core/lib/functions.lib.php
2019-12-09 13:25:23 +01:00
Laurent Destailleur
5dbf060f00 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/core/lib/functions.lib.php
2019-12-09 13:24:01 +01:00
Laurent Destailleur
53149bb7cd Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2019-12-08 04:22:50 +01:00
Laurent Destailleur
394104291a Fix function not found when creating a payment of an expense report 2019-12-08 04:22:09 +01:00
Frédéric FRANCE
cafe26cfc3 Update card.php 2019-12-06 23:23:57 +01:00
Laurent Destailleur
13acb8537d Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-12-03 22:38:10 +01:00
Laurent Destailleur
a75915a7a8 Fix regression 2019-12-03 22:37:58 +01:00
Laurent Destailleur
8006d08e6b Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-12-03 22:36:37 +01:00
Laurent Destailleur
60d3bd0fe9 Fix regression 2019-12-03 22:36:26 +01:00
Laurent Destailleur
d4e20bb3a4 Merge pull request #12616 from atm-gauthier/8.0_fix_bill_orders_with_unit
FIX : when we need to bill several orders, order lines unit is not on bill lines
2019-12-03 19:10:00 +01:00
gauthier
cec54d6ce0 FIX : when we need to bill several orders, order lines unit is not on bill lines 2019-12-03 16:40:35 +01:00
Laurent Destailleur
d6ef77e895 Merge pull request #12603 from atm-florianm/NEW_9.0_mysqldump_export_enable_using_--quick_option
NEW 9.0: enable user to use the mysqldump '--quick' option
2019-12-03 14:36:01 +01:00
Laurent Destailleur
072db96b11 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-12-03 13:48:38 +01:00
Laurent Destailleur
b5ce6131fb Merge pull request #12599 from atm-john/9.0_fix_user_comma_input
Fix user card : use comma in amounts inputs
2019-12-03 13:45:02 +01:00
Florian Mortgat
4846885eea NEW 9.0: enable user to use the mysqldump '--quick' option
(useful if the server has low RAM or large tables)
2019-12-02 16:54:05 +01:00
John Botella
4a33ee60f8 Fix user card : use comma in amounts inputs 2019-12-02 10:34:14 +01:00
Laurent Destailleur
87e81f1afd Merge pull request #12583 from atm-maxime/fix_supplier_proddesc
Fix #12044 : with replenish function, use product supplier desc in order
2019-12-01 11:51:22 +01:00
Laurent Destailleur
aa5dff9aae Merge pull request #12582 from atm-maxime/fix_remise_split
Fix #11849 : missing price2num in discount split
2019-12-01 10:54:30 +01:00
Laurent Destailleur
e1d4e14075 Merge pull request #12587 from atm-maxime/fix_expense_qtyupdate
Fix #12569 : update qty on expensereport prevented decimals
2019-12-01 10:53:57 +01:00
Maxime Kohlhaas
d76608729b Fix #12569 : update qty on expensereport prevented decimals 2019-12-01 10:50:28 +01:00
Laurent Destailleur
bf99e8af5d Fix phpcs 2019-12-01 10:33:55 +01:00
Maxime Kohlhaas
270f4c2500 Fix #12044 : with replenish function, use product supplier desc in order 2019-12-01 09:26:54 +01:00
Maxime Kohlhaas
a220d43bd6 Fix #11849 : missing price2num in discount split 2019-12-01 01:41:13 +01:00
Laurent Destailleur
1d564c2a39 Merge branch '8.0' of https://github.com/dolibarr/dolibarr into 9.0
Conflicts:
	htdocs/core/class/notify.class.php
2019-12-01 00:58:01 +01:00
Laurent Destailleur
bfb8a4e8da Merge pull request #12578 from Dolibarr/revert-12577-#12482
Revert "FIX#12482"
2019-12-01 00:55:13 +01:00
Laurent Destailleur
199b0c11af Merge pull request #12572 from atm-maxime/fix_deposit
Fix deposit line was not translated in deposit invoice
2019-12-01 00:44:17 +01:00
Laurent Destailleur
ec67fa4877 Merge pull request #12573 from atm-maxime/fix_vat_fiscal
Fix #11228 : VAT dates regarding fiscal year
2019-11-30 23:30:41 +01:00
Laurent Destailleur
47b35e9011 Merge pull request #12570 from atm-maxime/fix_margin_rights
Fix margin rights
2019-11-30 23:28:26 +01:00
Laurent Destailleur
20e941c585 Merge pull request #12579 from atm-maxime/fix_pdf_rouget
Fix PDF rouget for SHIPPING_PDF_HIDE_WEIGHT_AND_VOLUME
2019-11-30 23:26:43 +01:00
Maxime Kohlhaas
edb8bcb598 Fix PDF rouget for SHIPPING_PDF_HIDE_WEIGHT_AND_VOLUME 2019-11-30 22:58:32 +01:00
Laurent Destailleur
a352fd5a6e Revert "FIX#12482" 2019-11-30 21:00:56 +01:00
Laurent Destailleur
639e258140 Merge pull request #12577 from inoveaconseil/#12482
FIX#12482
2019-11-30 20:54:08 +01:00
Nicolas
f2ff443641 FIX #12482 2019-11-30 20:04:27 +01:00
Inovea Conseil
7077457d50 Merge remote-tracking branch 'Dolibarr/8.0' into 8.0 2019-11-30 19:59:42 +01:00
Maxime Kohlhaas
3c639772d9 Fix #11228 : VAT dates regarding fiscal year 2019-11-30 17:16:16 +01:00
Maxime Kohlhaas
558669dd88 Fix #6497 : deposit lines were not translated 2019-11-30 16:14:16 +01:00
Maxime Kohlhaas
2c165d0a61 Fix deposit date display in PDF 2019-11-30 15:53:50 +01:00
Maxime Kohlhaas
916954b301 Fix #12371 : access rights on contacts 2019-11-30 14:48:05 +01:00
Maxime Kohlhaas
9095482113 Fix margins access + menu display 2019-11-30 14:47:48 +01:00
Laurent Destailleur
7b828d1f0b Merge pull request #12563 from atm-maxime/fix_notification_user_diabled
Fix #12448 : notifications were sent to disabled user or contacts
2019-11-30 01:18:35 +01:00
Laurent Destailleur
f0cc559f4c Merge pull request #12562 from atm-maxime/fix_loan_update_rate
Fix #12502 : loan rate wasn't updatable
2019-11-30 01:11:00 +01:00
Maxime Kohlhaas
02b5da5db1 Fix #12448 : notifications were sent to disabled user or contacts 2019-11-30 00:57:21 +01:00
Maxime Kohlhaas
9116110737 Fix #12502 : loan rate wasn't updatable 2019-11-30 00:35:32 +01:00
Laurent Destailleur
8656143050 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-11-24 18:13:02 +01:00
Laurent Destailleur
98a7a5559f Fix bad fix 2019-11-24 18:12:40 +01:00
Laurent Destailleur
f2e01834a5 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-11-24 18:11:46 +01:00
Laurent Destailleur
27e4c66dd5 Fix empty 2019-11-24 18:11:11 +01:00
Laurent Destailleur
ece35538f0 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-11-22 14:49:29 +01:00
Laurent Destailleur
eeaef48349 Merge pull request #12488 from atm-gauthier/8.0_fix_recalcultva_only_if_not_ventil
FIX : we need to be able to recalculate tva only if invoice not ventil
2019-11-22 14:25:40 +01:00
Laurent Destailleur
4043356f3a Update card.php 2019-11-22 14:25:32 +01:00
gauthier
a8d02615a8 FIX : we need to be able to recalculate tva only if invoice not ventil 2019-11-21 14:58:20 +01:00
Laurent Destailleur
5b6f0cb101 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/core/class/extrafields.class.php
2019-11-18 21:19:10 +01:00
Laurent Destailleur
f696998093 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-11-18 19:02:25 +01:00
Laurent Destailleur
918f476c2b Fix backport fix not checking mandatory extrafields of type select 2019-11-18 19:02:12 +01:00
Laurent Destailleur
bb493c6515 Merge pull request #12438 from atm-gauthier/8.0_invoice_createfromclone
FIX : wrong invoice id for fetchObjetctLinked
2019-11-16 00:43:18 +01:00
Laurent Destailleur
ee800189a6 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-11-14 12:45:00 +01:00
Laurent Destailleur
9d963a7ca6 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-11-14 12:44:32 +01:00
gauthier
a5635825f3 FIX : wrong invoice id for fetchObjetctLinked 2019-11-14 12:09:32 +01:00
Laurent Destailleur
6b1d7f5382 Merge pull request #12432 from frederic34/patch-7
FIX #12385
2019-11-14 08:51:23 +01:00
Frédéric FRANCE
3ec7568559 FIX #12385 2019-11-13 20:44:21 +01:00
Laurent Destailleur
dae39e25d2 Merge pull request #12422 from aspangaro/9.0_p20191113
Missing language key
2019-11-13 18:33:30 +01:00
Alexandre SPANGARO
85e2546019 Missing language key 2019-11-13 15:25:23 +01:00
Alexandre SPANGARO
0497c399d7 Missing language key 2019-11-13 14:59:07 +01:00
Laurent Destailleur
f8e8d15606 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-11-12 10:19:01 +01:00
Laurent Destailleur
5f7b09c97f Merge pull request #12406 from atm-gauthier/8.0_useless_limit_on_select_conf
FIX : limit 20 prevent to see all products/services
2019-11-12 09:49:00 +01:00
gauthier
e2680f7637 FIX : limit 20 prevent to see all products/services 2019-11-12 09:42:27 +01:00
Laurent Destailleur
2b7a813e98 Merge pull request #12267 from ATM-Marc/FIX_8.0_trigger_closedir
FIX: triggers: directories read with opendir() never closed
2019-11-02 13:06:54 +01:00
Marc de Lima Lucio
85cef09e83 FIX: triggers: directories read with opendir() never closed 2019-10-30 14:46:46 +01:00
Laurent Destailleur
c2638f4148 Merge pull request #12238 from atm-maxime/fix_fetch_contact
Fix missing contact fetch on card
2019-10-30 03:04:01 +01:00
Laurent Destailleur
b7e81c5396 Merge pull request #12247 from frederic34/patch-21
HOLIDAY_APPROVEInDolibarr
2019-10-30 02:44:50 +01:00
Laurent Destailleur
149d63757f Space 2019-10-29 11:43:56 +01:00
Laurent Destailleur
e58ecaaa64 Merge branch '8.0' of https://github.com/dolibarr/dolibarr into 9.0
Conflicts:
	htdocs/product/stock/replenishorders.php
2019-10-29 11:43:35 +01:00
Laurent Destailleur
21d15c3bcb FIX Set unpaid of expense report 2019-10-29 11:35:33 +01:00
Laurent Destailleur
5e06fe0712 FIX Avoid fatal error when creating thumb from PDF 2019-10-29 11:11:13 +01:00
Frédéric FRANCE
30d416f8c0 Update agenda.lang 2019-10-28 20:16:27 +01:00
Maxime Kohlhaas
fced9ec690 Fix missing contact fetch on card 2019-10-27 12:04:01 +01:00
Juanjo Menent
7e9d6dc153 Fix With pagination it is possible that the searched product does not appear if there are many open supplier orders 2019-10-24 10:58:29 +02:00
Laurent Destailleur
40135e043e Merge pull request #12166 from frederic34/patch-13
fix cant add bookmark with csrf active
2019-10-20 12:43:39 +02:00
Laurent Destailleur
b5390bfb3c Merge pull request #12167 from frederic34/patch-14
Update main.lang
2019-10-20 12:41:06 +02:00
Laurent Destailleur
ce1b443212 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-10-18 14:26:09 +02:00
Frédéric FRANCE
f9c0e63f16 Update main.lang 2019-10-17 22:59:52 +02:00
Frédéric FRANCE
aeafdae34c Update main.lang 2019-10-17 22:58:47 +02:00
Frédéric FRANCE
d442134a51 fix cant add bookmark with csrf active 2019-10-17 21:15:34 +02:00
Laurent Destailleur
373d6d60e7 Add a message 2019-10-17 21:13:18 +02:00
Laurent Destailleur
9cd2406d50 Merge pull request #12156 from ATM-Marc/FIX_8.0_replenish_resql
FIX: stock replenish: fetching and freeing non existing SQL result set
2019-10-17 17:40:24 +02:00
Marc de Lima Lucio
d79340a632 FIX: stock replenish: fetching and freeing non existing SQL result set 2019-10-17 09:55:02 +02:00
Laurent Destailleur
93aa7e208d Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-10-16 17:10:19 +02:00
Laurent Destailleur
b47ebcca2b Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-10-16 17:10:10 +02:00
Laurent Destailleur
cb29133a3d Merge pull request #12142 from frederic34/patch-18
fix propal list for external user
2019-10-16 13:22:29 +02:00
Frédéric FRANCE
6a8e8907ef Update list.php 2019-10-15 17:55:07 +02:00
Laurent Destailleur
6662b00575 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-10-14 23:50:40 +02:00
Laurent Destailleur
2d1bc90e57 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-10-14 23:50:06 +02:00
Laurent Destailleur
94aa98beed Merge pull request #12131 from frederic34/patch-21
FIX Sort on total without tax on supplier invoices list
2019-10-14 21:25:13 +02:00
Frédéric FRANCE
45b3d623bb Update list.php 2019-10-14 20:30:31 +02:00
Laurent Destailleur
a35173973c Merge pull request #12102 from frederic34/patch-13
fix translation for showemailing
2019-10-12 03:26:46 +02:00
Frédéric FRANCE
c3e8aec07c fix translation for showemailing
in lang files, it's ShowEMailing not ShowEmailing
2019-10-11 23:54:05 +02:00
Laurent Destailleur
7ea0af4067 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-10-11 15:53:38 +02:00
Laurent Destailleur
2a07ecf659 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-10-11 15:53:30 +02:00
Laurent Destailleur
a6fd864145 Merge pull request #12075 from frederic34/patch-13
doxygen
2019-10-11 15:52:11 +02:00
Frédéric FRANCE
0c8331b6d7 doxygen 2019-10-09 18:47:25 +02:00
Laurent Destailleur
b847eb1b7e Merge pull request #12056 from atm-florianm/FIX_7.0_email_addresses_in_email_sending_error_message
FIX 7.0: addresses not displayed in e-mail sending error messages
2019-10-07 20:25:01 +02:00
Florian Mortgat
2aee62ea28 FIX: $from and $sendto variables are unescaped in the sending error message
This causes addresses like Tom <tom@examp.le> not to be shown in the message.
2019-10-07 17:32:52 +02:00
Laurent Destailleur
bb84e4a236 Merge pull request #12037 from frederic34/patch-14
Fix list of expense report list for user when he has extrafields
2019-10-07 13:10:02 +02:00
Laurent Destailleur
611b045676 Merge pull request #12053 from atm-lena/9.0_fix_link_fetch
FIX : missing "$this->id" in "fetch" function
2019-10-07 12:38:05 +02:00
Laurent Destailleur
55508e25ec Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-10-07 12:27:06 +02:00
atm-lena
8c024b3786 FIX : missing "$this->id" in "fetch" function 2019-10-07 11:26:10 +02:00
Laurent Destailleur
3d20766392 Merge pull request #12047 from frederic34/patch-15
translation for holidays actioncomm
2019-10-07 10:23:29 +02:00
Frédéric FRANCE
37f6aa3395 Update list.php 2019-10-06 15:52:33 +02:00
Frédéric FRANCE
52da21912b Update agenda.lang 2019-10-06 13:21:04 +02:00
Frédéric FRANCE
21dcc549fa translation for holidays actioncomm 2019-10-06 10:09:06 +02:00
Frédéric FRANCE
55410a55ef Update list.php 2019-10-04 00:45:57 +02:00
Laurent Destailleur
d9aa816197 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-10-03 17:52:06 +02:00
Laurent Destailleur
75be637b0b Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-10-03 17:50:57 +02:00
Laurent Destailleur
7412335217 Merge pull request #12031 from atm-lena/8.0_fix_missingbegin
FIX missing begin()
2019-10-03 17:50:35 +02:00
atm-lena
ae01bd8f07 FIX missing begin() 2019-10-03 17:23:16 +02:00
Laurent Destailleur
03614536f9 Merge pull request #12018 from frederic34/patch-12
backport commit for setmulticurrency
2019-10-03 15:54:01 +02:00
Frédéric FRANCE
ad3cbd17c2 backport commit for setmulticurrency
a489207122 (diff-48f18024fb928ce21b76ef02fc967c67)
2019-10-02 11:12:30 +02:00
Laurent Destailleur
4928a999a0 Merge pull request #11933 from atm-gauthier/fix_conf_to_allow_changeproducttype
FIX : change product type must be allowed if we activate hidden conf
2019-10-01 14:41:52 +02:00
Laurent Destailleur
d448998762 Update card.php 2019-10-01 14:41:25 +02:00
gauthier
2167e7ed98 FIX : hidden conf to prevent from changing product_type 2019-10-01 09:12:51 +02:00
Laurent Destailleur
4f356fa412 Merge pull request #11859 from altatof/avoir
FIX : allow standalone credit note even if no invoice
2019-09-30 18:12:55 +02:00
Laurent Destailleur
945dd0ae89 Update card.php 2019-09-30 18:12:43 +02:00
Laurent Destailleur
29d941cb6e Merge pull request #11918 from atm-gauthier/8.0_fix_discount_visibility_follows_invoice_sharing
FIX : If we share invoice, we need to see discount created from a deposit on each entity
2019-09-30 18:04:07 +02:00
Laurent Destailleur
5d45638248 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-09-27 14:02:23 +02:00
Laurent Destailleur
7f9ea2e223 Merge pull request #11929 from atm-florian/9.0
fix regex main.inc.php warning
2019-09-27 12:26:24 +02:00
Laurent Destailleur
de11801792 Merge pull request #11971 from ATM-Marc/FIX_8.0_shipping_errors
FIX: shipping card: missing user error messages when classifying closed or billed
2019-09-27 11:56:43 +02:00
Laurent Destailleur
59a099b176 Merge pull request #11954 from frederic34/patch-18
add missing error code in price parser
2019-09-27 11:35:42 +02:00
Laurent Destailleur
fe15871fe3 Merge pull request #11935 from atm-gauthier/8.0_chargesociale
FIX : wrong test
2019-09-27 11:35:00 +02:00
Laurent Destailleur
99cfea1ff4 Update paiement_charge.php 2019-09-27 11:34:50 +02:00
Marc de Lima Lucio
13f5decdf7 FIX: shipping card: missing user error messages when classifying closed or billed 2019-09-27 11:00:17 +02:00
Laurent Destailleur
ba1275332d Fix thousand separator for fr_NC 2019-09-25 13:03:43 +02:00
Frédéric FRANCE
26cd418320 Update price_parser.class.php 2019-09-24 10:28:27 +02:00
gauthier
575e4d11d0 FIX : wrong test 2019-09-19 17:28:51 +02:00
gauthier
d40534e8fa FIX : change product type must be allowed if we activate hidden conf 2019-09-19 15:21:52 +02:00
florian HENRY
3b555797d1 fix regex 2019-09-19 12:32:26 +02:00
florian HENRY
536e99e3c9 fix regex main.inc.php fatal 2019-09-19 09:59:05 +02:00
Laurent Destailleur
00d5cff00d Fix XSS injection into textarea 2019-09-18 14:44:31 +02:00
Laurent Destailleur
e52788eb75 Fix xss 2019-09-18 14:31:03 +02:00
Laurent Destailleur
771104bc68 Fix XSS 2019-09-18 14:25:53 +02:00
Laurent Destailleur
345ac28c89 Fix js injection
Conflicts:
	htdocs/core/lib/functions.lib.php
	htdocs/user/group/card.php
2019-09-18 14:21:02 +02:00
Laurent Destailleur
7b512587aa FIX XSS 2019-09-18 14:15:20 +02:00
Laurent Destailleur
2da5071642 Fix VAT in New caledonia is now called TGC 2019-09-18 13:12:22 +02:00
Laurent Destailleur
ab9dee631b Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-09-17 12:20:05 +02:00
Laurent Destailleur
64c53e2e85 Fix "project i am contact for" filter 2019-09-17 12:19:33 +02:00
gauthier
2ac8bd4e16 FIX : If we share invoice, we need to see discount created from a deposit on each entity 2019-09-17 11:59:58 +02:00
Laurent Destailleur
697b25aa82 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-09-14 18:24:00 +02:00
Laurent Destailleur
56e070cd7f Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0
Conflicts:
	htdocs/accountancy/index.php
2019-09-14 18:23:20 +02:00
Laurent Destailleur
7aac67f79c Merge pull request #11884 from frederic34/patch-10
fix colspan in show_project
2019-09-14 16:33:02 +02:00
Laurent Destailleur
935e84d985 Merge pull request #11885 from frederic34/patch-12
Create .stickler.yml
2019-09-14 16:32:25 +02:00
Laurent Destailleur
fbb8808f29 Merge pull request #11887 from frederic34/patch-14
Update index.php
2019-09-14 16:32:11 +02:00
Laurent Destailleur
7b73e2d57a FIX label of thirdparty is wrong on open project list 2019-09-13 11:05:50 +02:00
Frédéric FRANCE
00394493eb Update index.php 2019-09-12 22:02:39 +02:00
Frédéric FRANCE
6db7414f88 Create .stickler.yml 2019-09-12 21:45:04 +02:00
Frédéric FRANCE
0d3a2f800b fix colspan in show_project 2019-09-12 21:39:57 +02:00
Christophe Battarel
c8cb5886f4 correction 2019-09-10 17:04:09 +02:00
Christophe Battarel
95417d4c86 allow standalone credit note even if no invoice 2019-09-10 16:24:04 +02:00
Laurent Destailleur
48aedcee20 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/core/lib/functions.lib.php
2019-09-10 15:31:29 +02:00
Laurent Destailleur
d4e26fcc55 FIX missing include (dol_convert_file not found) 2019-09-10 15:29:33 +02:00
Laurent Destailleur
f2b9517dac FIX #11834 2019-09-09 13:16:31 +02:00
Laurent Destailleur
ffc49705d3 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-09-03 17:42:04 +02:00
Laurent Destailleur
1a8f271bf4 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-09-03 17:41:56 +02:00
Laurent Destailleur
f1a16a68dc Merge pull request #11787 from aspangaro/9.0_balance
FIX Sens of the balance (Debit - Credit in accountancy not contrary)
2019-09-03 17:41:35 +02:00
Laurent Destailleur
4a76dfa6ff Fix link to setup 2019-08-30 18:23:43 +02:00
Alexandre SPANGARO
14b9460de0 FIX Sens of the balance (Debit - Credit in accountancy not contrary) 2019-08-29 16:27:25 +02:00
Laurent Destailleur
55505604c1 Merge pull request #11397 from atm-josselin/FIX_product_document_and_special_characters
FIX : filepath of generated documents doesn't handle products with sp…
2019-08-27 14:12:48 +02:00
Laurent Destailleur
8a4ac2cb07 Merge pull request #11760 from atm-john/FIX_module_product_disabled
FIX: remove disabled product type from product list
2019-08-27 12:38:21 +02:00
John Botella
c2f570ae60 FIX: remove disabled product type from product list 2019-08-27 11:54:20 +02:00
Laurent Destailleur
047298cded Merge pull request #11511 from atm-florianm/9.0_FIX_dispatched-products-array-bug
9.0 fix dispatched products array bug
2019-08-26 23:58:40 +02:00
Laurent Destailleur
c7f06fe50e Fix phpcs 2019-08-26 23:56:17 +02:00
Laurent Destailleur
b6db04a727 Fix add missing filter on entity on stock listing for product combo 2019-08-26 22:42:04 +02:00
Laurent Destailleur
952e395943 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-08-26 22:34:51 +02:00
Laurent Destailleur
76bd9a09a6 FIX #11570 2019-08-26 22:34:41 +02:00
Laurent Destailleur
f07d99ed9a Merge pull request #11730 from atm-ph/fix_9.0_missing_hooks
Fix wrong placement to print title and missing hook to print value
2019-08-26 17:14:50 +02:00
Laurent Destailleur
9d2942bb88 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-08-26 16:41:14 +02:00
Laurent Destailleur
dcfbba9af5 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/compta/sociales/class/chargesociales.class.php
2019-08-26 16:41:06 +02:00
Laurent Destailleur
60b8982a74 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-08-26 16:39:39 +02:00
Laurent Destailleur
bdd57ecce7 Merge pull request #11727 from hregis/7.0_price
FIX avoid sql error if fk_project is empty during update
2019-08-26 16:38:57 +02:00
Laurent Destailleur
11acedbe59 Merge pull request #11735 from ptibogxiv/patch-235
Fix load langs in takepos
2019-08-26 16:35:42 +02:00
Laurent Destailleur
238970c069 Merge pull request #11734 from hregis/8.0_mc2
FIX wrong parameters
2019-08-26 16:28:39 +02:00
ptibogxiv
73a6b45e23 Fix load langs in takepos 2019-08-24 13:26:01 +02:00
Regis Houssin
064ab389ed FIX wrong parameters (same error in branch 9, 10, develop) 2019-08-24 12:44:23 +02:00
atm-ph
f14f1c9190 Fix wrong placement to print title and missing hook to print value 2019-08-23 09:15:15 +02:00
Regis Houssin
2d59f6bb3d FIX avoid sql error if fk_project is empty during update 2019-08-23 07:59:36 +02:00
Florian Mortgat
fa29415e6a Moved repair payload from a specific script to install/repair.php 2019-08-22 14:06:18 +02:00
Laurent Destailleur
a35f010e55 FIX name and position of hook FIX #11710 2019-08-22 12:30:14 +02:00
Laurent Destailleur
b06dab6930 Fix add option to restore backward compatibility 2019-08-22 00:44:28 +02:00
Laurent Destailleur
ed7480ddbb Fix phpcs 2019-08-21 16:03:49 +02:00
Laurent Destailleur
1b21905c55 Fix test on uploaded modules
Conflicts:
	htdocs/admin/modules.php
2019-08-21 14:53:58 +02:00
Laurent Destailleur
3a0057f6a3 FIX too many record in sql request. Whena criteria is a filter, we must
use an inner join.
2019-08-18 23:59:24 +02:00
Laurent Destailleur
b1be6bf4f2 FIX #11422 Can't edit his own events with standard rights 2019-08-18 01:24:54 +02:00
Laurent Destailleur
18eb2a83fe FIX #11671 CVE-2019-15062 2019-08-17 22:17:27 +02:00
Laurent Destailleur
d21e557100 FIX #11671 CVE-2019-15062 2019-08-17 22:16:27 +02:00
Laurent Destailleur
b8406f842d Merge pull request #10655 from atm-quentin/FIX_credit_note_used_on_list
Fix total on list and amount opened on thirdparty card (for supplier)
2019-08-15 21:14:03 +02:00
Laurent Destailleur
a8afb4549a Merge pull request #11634 from fmarcet/9.0
FIX: Not showing MAIN_INVERT_SENDER_RECIPIENT when edit field
2019-08-15 20:22:27 +02:00
Laurent Destailleur
31fa26c2be Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-08-10 01:36:50 +02:00
Laurent Destailleur
c647195689 Merge pull request #11632 from atm-greg/FIX_delivery_Extrafields
FIX delivery extrafields
2019-08-10 01:28:46 +02:00
Laurent Destailleur
049a08f435 Merge pull request #11631 from frederic34/patch-9
Update admin.lang
2019-08-10 01:15:28 +02:00
Laurent Destailleur
cee92356c6 Merge pull request #11644 from frederic34/patch-11
Update price_parser.class.php
2019-08-10 01:11:02 +02:00
Laurent Destailleur
2a726441a0 Merge pull request #11635 from frederic34/patch-10
FIX Return code of pdf_einstein.modules.php and proformat
2019-08-10 01:09:48 +02:00
Frédéric FRANCE
69985339d8 Update price_parser.class.php 2019-08-06 11:47:34 +02:00
Frédéric FRANCE
7f23b77cbe Update pdf_proforma.modules.php 2019-08-05 15:00:06 +02:00
Frédéric FRANCE
fde526f59d Update pdf_einstein.modules.php 2019-08-05 14:58:50 +02:00
Ferran Marcet
32220dde2e FIX: Wrong variable. Must be PROJECT_HIDE_UNSELECTABLES 2019-08-05 14:12:19 +02:00
Ferran Marcet
cda8b15c7f FIX: Not showing MAIN_INVERT_SENDER_RECIPIENT when edit field 2019-08-05 14:00:15 +02:00
atm-greg
1d4fc32c20 fix second bad test 2019-08-05 13:13:56 +02:00
atm-greg
41c07b9b43 fix bad test in delivery card 2019-08-05 13:10:26 +02:00
Frédéric FRANCE
baa2e870d0 Update admin.lang
found in admin/company.php
2019-08-05 11:01:58 +02:00
Laurent Destailleur
5339bb71ac FIX Fatal situation if payment removed on expense report. Action
set_unpaid was not available.
2019-08-03 20:57:21 +02:00
Laurent Destailleur
7f42380f83 FIX Fatal situation if payment removed on expense report. Action
set_unpaid was not available.
2019-08-03 20:53:57 +02:00
Laurent Destailleur
e4f2728494 Merge pull request #11608 from atm-arnaud/8.0_FIX_workflow_propal_and_order_billed
FIX order or proposals billed if both workflow conf activated
2019-08-01 16:37:48 +02:00
Laurent Destailleur
cd0d5c41f5 Update interface_20_modWorkflow_WorkflowManager.class.php 2019-08-01 16:37:40 +02:00
atm-arnaud
f64092a1e8 FIX order or proposals billed if both workflow conf activated 2019-08-01 11:00:49 +02:00
Florian Mortgat
3ef257f4f2 Removed commented out code from the new migration script 2019-07-31 09:21:00 +02:00
Laurent Destailleur
9baf21f492 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-07-30 22:03:13 +02:00
Laurent Destailleur
754ed1b93b Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php
2019-07-30 22:03:02 +02:00
Laurent Destailleur
6b789a13a1 Merge pull request #11562 from atm-quentin/FIX_pdf_cheque
FIX name was able to be in field but went back to new line
2019-07-30 22:00:58 +02:00
Laurent Destailleur
ed7a57e3ef Merge pull request #11571 from atm-john/9.0_fix_showOutputField
Fix sellist showOuputField
2019-07-30 21:40:37 +02:00
Laurent Destailleur
9a87e27176 Merge pull request #11566 from atm-florianm/FIX_workflow_amount_comparison_fails_due_to_floating_point_val_precision_arithmetic_drift
FIX: floating point precision errors in the triggers of the workflow module
2019-07-30 21:23:43 +02:00
Laurent Destailleur
fe8ced58c8 Update interface_20_modWorkflow_WorkflowManager.class.php 2019-07-30 21:19:33 +02:00
Laurent Destailleur
64118a4ae3 Merge pull request #11573 from atm-maxime/8.0
Fix var declaration #11429
2019-07-30 20:56:23 +02:00
Laurent Destailleur
cb07d80681 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-07-30 20:37:55 +02:00
Laurent Destailleur
5f2439bf0a Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-07-30 20:37:44 +02:00
Laurent Destailleur
9e622fe042 Merge pull request #11572 from atm-maxime/fix_holiday_update_solde
Fix holiday counter auto update
2019-07-30 20:12:30 +02:00
Laurent Destailleur
ea92ba2a78 Update holiday.class.php 2019-07-30 20:11:43 +02:00
Laurent Destailleur
a5e0dd56f4 Merge pull request #11580 from aspangaro/9.0_FEC
FIX FEC Format - Save translation of the journal label in database & nowrap on amount
2019-07-30 16:10:32 +02:00
Laurent Destailleur
941b2c5325 Merge pull request #11581 from aspangaro/9.0_adh
FIX Language key
2019-07-30 15:58:30 +02:00
Laurent Destailleur
c080878083 Merge pull request #11585 from ATM-Marc/FIX_9.0_expedition_printObjectLine_loop
FIX: expedition card: infinite loop for printObjectLine hook if return > 0
2019-07-30 15:58:09 +02:00
Laurent Destailleur
24695a9112 Merge pull request #11595 from ATM-Marc/FIX_8.0_import_bad_categories
FIX: categories import: prevent mismatch between category type and object type
2019-07-30 15:56:36 +02:00
Laurent Destailleur
bb885cadf2 Merge pull request #11563 from atm-quentin/FIX_sociales_redirect_index
FIX wrong path sociales/index.php doesnt exist anymore
2019-07-30 15:43:42 +02:00
Laurent Destailleur
5ef5c5521f Merge pull request #11597 from atm-florianm/8.0-FIX_missing_prefix_replacement_in_database_function_initialization
FIX issue #9300: install error with PostgreSQL using custom table prefix
2019-07-30 15:38:22 +02:00
Marc de Lima Lucio
703506c0e2 FIX: import filter error 2019-07-30 14:11:21 +02:00
Florian Mortgat
de293c4ef2 FIX issue #9300: install error with PostgreSQL when using custom table prefix 2019-07-30 14:09:03 +02:00
Laurent Destailleur
6aefa648e7 FIX CVE-2019-11199 2019-07-30 14:00:43 +02:00
Marc de Lima Lucio
449ef92007 FIX: categories import: prevent mismatch between category type and object type 2019-07-30 12:31:03 +02:00
Marc de Lima Lucio
87fc3c3968 FIX: expedition card: infinite loop for printObjectLine hook if return > 0 2019-07-29 13:56:35 +02:00
Florian Mortgat
858e8a826f FIX: use rounding to compare the amounts 2019-07-29 09:47:28 +02:00
Alexandre SPANGARO
7a9f2b43c5 FIX Language key 2019-07-29 07:05:18 +02:00
Alexandre SPANGARO
bb168d7f54 Merge branch '9.0' into 9.0_FEC 2019-07-29 06:54:48 +02:00
Alexandre SPANGARO
cd22cc70c8 FIX FEC Format - Save translation of the journal 2019-07-29 06:41:51 +02:00
Alexandre SPANGARO
a2fc3689da Nowrap on amount 2019-07-28 22:59:43 +02:00
Maxime Kohlhaas
43adb51932 Fix var declaration #11429 2019-07-27 22:06:08 +02:00
Maxime Kohlhaas
37ad5308e6 Fix holiday counter auto update 2019-07-27 19:19:13 +02:00
ATM john
581ae226ff Fix sellist showOuputField 2019-07-27 18:25:25 +02:00
Laurent Destailleur
471a947e8a FIX Attachment was lost when we validate an expense report
Conflicts:
	htdocs/expensereport/class/expensereport.class.php
2019-07-26 16:33:32 +02:00
Laurent Destailleur
8b81702dd7 Fix API 404 errors 2019-07-26 13:23:42 +02:00
Laurent Destailleur
c61f8e965d Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-07-26 13:16:59 +02:00
Laurent Destailleur
e92c6c87a0 FIX API return 404 sometimes even if API exists 2019-07-26 13:16:49 +02:00
atm-quentin
f7c739bba9 FIX wrong path sociales/index.php doesnt exist anymore 2019-07-26 12:12:08 +02:00
atm-quentin
1f7cd1a3f8 FIX name was able to be in field but went back to new line 2019-07-26 11:05:16 +02:00
Laurent Destailleur
0d79905b0a Merge pull request #11539 from hregis/9.0_bug2
FIX duplicate on the check (TODO field $onetrtd not used ?)
2019-07-25 17:56:42 +02:00
Laurent Destailleur
8241bc414a Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/core/lib/files.lib.php
2019-07-25 17:52:17 +02:00
Laurent Destailleur
fe9ddd7649 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0
Conflicts:
	htdocs/core/lib/files.lib.php
2019-07-25 17:50:07 +02:00
Laurent Destailleur
e8932335aa Merge pull request #11544 from atm-josselin/FIX_upload_file_with_multiple_spaces
FIX : correct error in files with multiple spaces
2019-07-25 17:48:26 +02:00
Laurent Destailleur
6e3fad8f83 Fix phpcs 2019-07-25 17:42:44 +02:00
Laurent Destailleur
27c6bfe9db Merge pull request #11548 from aspangaro/9.0pa
FIX FEC Format - Missing date_creation in general ledger when you add a new transaction
2019-07-25 17:37:05 +02:00
Laurent Destailleur
2f08715d5a Merge pull request #11559 from atm-florianm/FIX_product.lib.php_needed_for_pdf_generation
FIX: tk9877 - PDF rouget requires product.lib.php
2019-07-25 17:34:25 +02:00
Florian Mortgat
65e9d8f239 FIX: tk9877 - PDF rouget requires product.lib.php (otherwise measuring_units_string() is not defined) 2019-07-25 11:14:59 +02:00
Alexandre SPANGARO
2162f2331d Try to fix travis 2019-07-24 06:57:42 +02:00
atm-josselin
0a1f4b7931 FIX : correct error in files with multiple spaces 2019-07-23 09:45:17 +02:00
Laurent Destailleur
47ec88c8b5 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-07-22 19:06:57 +02:00
Laurent Destailleur
5dcf4d6646 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-07-22 19:06:48 +02:00
Laurent Destailleur
b4e0c5ef6c Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-07-22 18:51:32 +02:00
Laurent Destailleur
4c4a0b796e Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2019-07-22 18:50:59 +02:00
Laurent Destailleur
891eaf50e1 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2019-07-22 18:50:49 +02:00
Laurent Destailleur
f39f710fd9 Merge pull request #11538 from atm-maxime/fix_agenda_list_filter
Fix lost filter in action list
2019-07-22 18:44:22 +02:00
Laurent Destailleur
45ea80a336 Merge pull request #11530 from atm-florianm/FIX_if_MAIN_USE_COMPANY_NAME_OF_CONTACT_set_socobject_is_a_contact
FIX: extrafield loading bug due to assumption that an object is a thi…
2019-07-22 18:43:51 +02:00
Laurent Destailleur
56851f475e Merge pull request #11529 from atm-ph/fix_9.0_missing_hook
Fix missing hook
2019-07-22 18:41:55 +02:00
Laurent Destailleur
9c2527535b Merge pull request #11536 from atm-florian/9.0
fix warining message
2019-07-22 18:33:23 +02:00
Laurent Destailleur
a872b7d42f Merge pull request #11532 from atm-gauthier/6.0_fix_phone_search
FIX : search by phone pro
2019-07-22 18:30:07 +02:00
Alexandre SPANGARO
7bdfd83288 FIX FEC Format - Missing date_creation in general ledger when you add a new transaction 2019-07-22 15:15:08 +02:00
Regis Houssin
6409cc06ae FIX duplicate on the check (TODO field $onetrtd not used ?) 2019-07-22 11:44:56 +02:00
Florian Mortgat
c9e70ed1c1 Fix problems detected by travis-ci 2019-07-22 09:30:43 +02:00
Maxime Kohlhaas
7ec8b48b18 Fix lost filter in action list 2019-07-21 22:21:11 +02:00
florian HENRY
b046bcc197 fix warning php 2019-07-20 15:19:25 +02:00
florian HENRY
d03d79222e fix warning php 2019-07-20 15:15:48 +02:00
florian HENRY
d88fec52bf fix warining message 2019-07-20 15:07:59 +02:00
gauthier
cd7d3f1a36 FIX : search by phone pro 2019-07-19 15:41:44 +02:00
Laurent Destailleur
98ae66b387 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-07-19 13:31:25 +02:00
Laurent Destailleur
1f308915ee Fix trans 2019-07-19 13:23:17 +02:00
Florian Mortgat
b100cdb9db FIX: extrafield loading bug due to assumption that an object is a third party while it may be a contact if MAIN_USE_COMPANY_NAME_OF_CONTACT is set. 2019-07-19 11:58:21 +02:00
atm-ph
a03bb00254 Fix missing hook 2019-07-19 11:26:21 +02:00
Laurent Destailleur
9b8b3b1ffc Merge pull request #11527 from atm-ph/fix_9.0_missing_trigger
Fix missing trigger call
2019-07-19 04:06:35 +02:00
Laurent Destailleur
e5801c0b68 Update bonprelevement.class.php 2019-07-19 04:06:22 +02:00
atm-ph
fcd95ce073 Fix missing trigger call 2019-07-18 18:07:17 +02:00
Laurent Destailleur
5e204f0f67 Merge 2019-07-18 17:51:32 +02:00
Laurent Destailleur
b044d95acf Merge 2019-07-18 17:50:15 +02:00
Laurent Destailleur
b0baba3293 Merge pull request #11526 from atm-ph/fix_9.0_missing_hook
Fix missing hook then can't interact with actions
2019-07-18 17:24:08 +02:00
Laurent Destailleur
b3182f65bc Update create.php 2019-07-18 17:23:52 +02:00
Laurent Destailleur
e548872133 Update prelevement.php 2019-07-18 17:23:05 +02:00
Laurent Destailleur
a20a121558 Merge pull request #11522 from atm-john/9.0_fix_action_list_contact_assigned
FIX: socpeople assigned list in action com list
2019-07-18 17:20:41 +02:00
Florian Mortgat
dbd68027f8 New script that links "orphaned" dispatch lines to order lines
(the "orphans" are dispatch lines that were created in old versions of Dolibarr which didn’t have fk_commandefourndet in llx_commande_fournisseur_dispatch)
2019-07-18 17:03:16 +02:00
Florian Mortgat
e404069d26 Revert "FIX: calculation of $products_dispatched"
This reverts commit 75ae611f9e.
2019-07-18 17:00:57 +02:00
Florian Mortgat
770b419769 Revert "FIX: wrong display (and hidden input) for already dispatched quantity"
This reverts commit b155fdc014.
2019-07-18 17:00:46 +02:00
atm-ph
984fe98342 Fix missing hook 2019-07-18 16:12:42 +02:00
atm-ph
c961a397c4 Fix missing hook then can't interact with actions 2019-07-18 15:40:50 +02:00
John Botella
b5d348356d Fix socpeople assigned list in action com list 2019-07-17 16:49:41 +02:00
Laurent Destailleur
a3b746bcb9 Merge pull request #11517 from hregis/9.0_bug2
FIX better compatibility with Multicompany
2019-07-16 17:10:47 +03:00
Laurent Destailleur
77300e1210 Merge pull request #11518 from ATM-Marc/FIX_9.0_propal_clone_hook
FIX: propal createFrom hook: undefined parameter attached
2019-07-16 17:04:53 +03:00
Laurent Destailleur
a03a8da2fd Merge pull request #11519 from atm-gauthier/8.0_fix_addline_cmdfourn_qty_inf_0
FIX : we need to be able to add freeline with qty between 0 & 1 in su…
2019-07-16 17:02:59 +03:00
gauthier
c72a59ad36 FIX : we need to be able to add freeline with qty between 0 & 1 in supplierorder line 2019-07-16 14:55:19 +02:00
Marc de Lima Lucio
464bda996c FIX: propal createFrom hook: undefined parameter attached 2019-07-16 13:59:00 +02:00
Laurent Destailleur
917799914e Merge pull request #11433 from atm-florianm/FIX_increase_stock_on_shipment_delete_when_STOCK_CALCULATE_ON_SHIPMENT_CLOSE_is_set
FIX: stock increase on shipment deletion if STOCK_CALCULATE_ON_SHIPMENT_CLOSE is set
2019-07-16 13:52:50 +03:00
Regis Houssin
c9fe91138d FIX better compatibility with Multicompany 2019-07-16 12:39:43 +02:00
Laurent Destailleur
617d10bf2a Merge pull request #11512 from atm-florianm/9.0_FIX_missing-hooks-in-supplier-product-list-and-supplier-product-dispatch
9.0 fix missing hooks in supplier product list and supplier product dispatch
2019-07-16 13:27:53 +03:00
Laurent Destailleur
de2c189138 Merge pull request #11516 from atm-john/9.0_fix_fourn_code_preload
FIX The proposed new supplier code does not work
2019-07-16 13:25:41 +03:00
John Botella
70ff806fdf fix fourn code preload 2019-07-16 10:46:58 +02:00
Laurent Destailleur
5d74c81941 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-07-15 23:48:40 +02:00
Laurent Destailleur
d694360c66 Fix warning 2019-07-15 23:46:54 +02:00
Laurent Destailleur
41d9e93b3f Merge pull request #11510 from hregis/9.0_bug2
FIX avoid conflict with "$classname" in card.php
2019-07-15 17:03:24 +03:00
Florian Mortgat
b155fdc014 FIX: wrong display (and hidden input) for already dispatched quantity 2019-07-15 12:00:06 +02:00
atm-florian.m
75ae611f9e FIX: calculation of $products_dispatched
After the DB retrieval method was changed from fetch_row to fetch_object, the indices used became wrong.
2019-07-15 12:00:06 +02:00
atm-florian.m
8aa147a4e5 # missing hooks from dispatch.php and list.php 2019-07-15 11:59:22 +02:00
atm-florian.m
ae540cb25e FIX: add missing hook calls 2019-07-15 11:59:22 +02:00
Regis Houssin
294bc5dcb5 FIX avoid conflict with "$classname" in card.php 2019-07-15 10:19:06 +02:00
Laurent Destailleur
3bfc1938d3 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/core/class/commonobject.class.php
2019-07-14 00:13:16 +02:00
Laurent Destailleur
b66ad24d85 Fix save of doc template for recuring invoices. 2019-07-14 00:10:15 +02:00
Laurent Destailleur
8090a8abb6 Fix param [] -> null 2019-07-14 00:07:27 +02:00
Laurent Destailleur
39e77dbdc6 Merge pull request #11461 from ATM-Nicolas/fix_template_invoice_edit_modelpdf
FIX : We must save code instead of value in database…
2019-07-14 00:19:13 +03:00
Laurent Destailleur
5ccb397af9 Merge pull request #11473 from hregis/9.0_security
FIX better compatibility with multicompany transverse mode
2019-07-13 23:42:36 +03:00
Laurent Destailleur
f285bed2ff Merge pull request #11479 from atm-gauthier/8.0_fix_report_by_tva
FIX : accounting mode must be taken from global conf, because there's…
2019-07-13 23:40:15 +03:00
Laurent Destailleur
b6571d9fc3 Update byratecountry.php 2019-07-13 22:39:25 +02:00
Laurent Destailleur
edd51bb150 Merge pull request #11469 from atm-maxime/fix_prelevement_rum
Fix : use RUM if defined in bank account
2019-07-13 23:34:31 +03:00
Laurent Destailleur
f34d96b5fb Merge pull request #11475 from atm-lena/9.0_fix_help_text
FIX help text
2019-07-13 23:32:35 +03:00
Laurent Destailleur
4dabdfa5ac Merge pull request #11483 from inoveaconseil/FIX_update_price
FIX element name in update_price
2019-07-13 23:30:17 +03:00
Laurent Destailleur
f041110a7e Update commonobject.class.php 2019-07-13 22:29:50 +02:00
Laurent Destailleur
db2e1d88a3 Merge pull request #11499 from hregis/9.0_bug2
FIX __INFOS__ tag not exists
2019-07-13 22:48:05 +03:00
Regis Houssin
332abd2a9f FIX __INFOS__ tag not exists 2019-07-13 11:02:45 +02:00
atm-florian.m
4f03165806 FIX: outdated phpdoc 2019-07-11 12:28:24 +02:00
Nicolas ZABOURI
abd0abf115 FIX element name in update_price 2019-07-10 18:36:12 +02:00
gauthier
cce8f98afc FIX : accounting mode must be taken from global conf, because there's no way to choose a mode with interface 2019-07-10 16:33:03 +02:00
atm-lena
a3f5397988 FIX help text 2 2019-07-10 15:55:50 +02:00
atm-lena
cebf81a514 FIX helpp text 2019-07-10 15:18:25 +02:00
Regis Houssin
41b004c2b8 FIX better compatibility with multicompany transverse mode 2019-07-10 12:16:32 +02:00
Maxime Kohlhaas
0aa42fefae Fix : use RUM if defined in bank account 2019-07-09 18:13:11 +02:00
ATM-Nicolas
3d076d8bf9 FIX : We must save code instead of value in database for template invoice modelpdf 2019-07-05 11:16:12 +02:00
atm-florian.m
8030735ded Merge branch 'FIX_add_checkbox_on_shipment_delete_confirm_dialog_to_ask_if_stock_should_be_incremented' into FIX_increase_stock_on_shipment_delete_when_STOCK_CALCULATE_ON_SHIPMENT_CLOSE_is_set
(taking PR comments into account)
2019-07-04 15:35:22 +02:00
atm-florian.m
64d1ebf59c FIX: on shipment delete confirm dialog, a new checkbox allows the user to choose if they want their stock re-incremented after the deletion. 2019-07-04 15:06:39 +02:00
Laurent Destailleur
8b0b824471 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-07-04 12:22:48 +02:00
Laurent Destailleur
ee0a65e7fa Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/comm/action/card.php
2019-07-04 12:22:40 +02:00
Laurent Destailleur
f8de11492e Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-07-04 12:21:25 +02:00
Laurent Destailleur
bc309ace38 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-07-04 12:21:16 +02:00
Laurent Destailleur
d04b19549e Merge pull request #11453 from atm-greg/FIX_9.0_selectForFormsList_for_invoices
fix case objecttmp is an invoice in selectForFormsList
2019-07-04 12:20:56 +02:00
Laurent Destailleur
63c93be94e Update html.form.class.php 2019-07-04 12:20:34 +02:00
Laurent Destailleur
a9dfca70cf Merge pull request #11452 from atm-florianm/FIX_minor_spelling_issues
FIX: minor spelling issues
2019-07-04 12:19:26 +02:00
Laurent Destailleur
554c76e232 Merge pull request #11451 from fmarcet/8.0
FIX: When saving an action it didn't save the label based on the type of event
2019-07-04 12:18:08 +02:00
Laurent Destailleur
125c2a65c0 Merge pull request #11445 from atm-john/9.0_fix_dictionary
Fix missing hidden input and short label
2019-07-04 10:54:16 +02:00
Laurent Destailleur
2035cbaee1 Merge pull request #11440 from atm-maxime/7.0
Fix wrong column for filters on invoice template list
2019-07-04 10:46:49 +02:00
Laurent Destailleur
5fde7da183 Merge pull request #11439 from atm-quentin/FIX_empty_product_use_units
FIX empty product_use_units in product configuration
2019-07-04 10:38:15 +02:00
atm-greg
2f5b9ccb22 fix case objecttmp is an invoice 2019-07-03 17:00:18 +02:00
atm-florian.m
3e53a06b2e minor spelling issues 2019-07-03 16:17:47 +02:00
Ferran Marcet
433835860c FIX: When saving an action it didn't save the label based on the type of event if the label is empty and the type is customized 2019-07-03 13:12:41 +02:00
Laurent Destailleur
9d50c67208 FIX option EXPORT_LABEL_FOR_SELECT to restore compatibility in export 2019-07-02 18:06:51 +02:00
John Botella
a75a2ae8e4 Fix missing hidden input and short label 2019-07-02 15:44:42 +02:00
Maxime Kohlhaas
6b43c325c7 Fix wrong column for filters on invoice template list 2019-07-02 10:53:47 +02:00
atm-quentin
8cdb251ca5 FIX product_use_units was set to 0 each time a conf in block other was set 2019-07-02 10:18:03 +02:00
Laurent Destailleur
ef27e32f53 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/filefunc.inc.php
2019-07-01 13:27:57 +02:00
Laurent Destailleur
3abaecfd77 Prepare 8.0.7 2019-07-01 13:27:18 +02:00
atm-florian.m
c45b191330 FIX: when STOCK_CALCULATE_ON_SHIPMENT_CLOSE is set, deleting a "closed" shipment now increases stock as expected 2019-07-01 10:26:03 +02:00
atm-josselin
c24a95b7ad Sanitize at creation of the product instead of the creation of the filepath 2019-07-01 09:31:01 +02:00
Laurent Destailleur
6537faa35e Fix merge 2019-06-29 23:26:14 +02:00
Laurent Destailleur
0aeb27ba97 Fix merge 2019-06-29 23:25:07 +02:00
Laurent Destailleur
fb42333b3e Merge branch '9.0' of github.com:Dolibarr/dolibarr into 9.0 2019-06-29 23:20:07 +02:00
Laurent Destailleur
81bb85c4df Merge 2019-06-29 23:19:47 +02:00
Laurent Destailleur
fdc958a172 Fix launch of ISCC.ex if not into path 2019-06-29 23:17:36 +02:00
Laurent Destailleur
854bbf8405 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-06-28 14:09:00 +02:00
Laurent Destailleur
58a7640dc3 Merge pull request #11417 from atm-maxime/7.0
Fix invoice list filter on withdrawal card
2019-06-28 12:41:13 +02:00
Laurent Destailleur
a8837f5645 Merge pull request #11413 from atm-quentin/FIX_ending_slash
FIX ending slash
2019-06-27 20:23:22 +02:00
Maxime Kohlhaas
fc1d4704a5 Fix invoice list filter on withdrawal card 2019-06-27 17:33:47 +02:00
Laurent Destailleur
abbc9062ef Merge 2019-06-27 13:54:31 +02:00
Laurent Destailleur
fa986e311d Merge 2019-06-27 13:45:21 +02:00
Laurent Destailleur
d69b20311b FIX If the replacement invoice has been deleted we can reopen 2019-06-27 01:13:46 +02:00
Laurent Destailleur
be695a8e1a Fix link for situations 2019-06-27 00:51:03 +02:00
Laurent Destailleur
244d21bd2b Fix trans 2019-06-27 00:45:17 +02:00
Laurent Destailleur
12d3a7021f Prepare 8.0.5 2019-06-26 18:50:31 +02:00
atm-quentin
49db277368 FIX ending slash 2019-06-26 16:42:14 +02:00
Laurent Destailleur
f2ea78f2ec Removed useless files 2019-06-25 23:26:55 +02:00
Laurent Destailleur
70319031ba Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-06-25 23:21:10 +02:00
Laurent Destailleur
07fb930a79 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-06-25 23:20:27 +02:00
Laurent Destailleur
e1ee079254 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2019-06-25 23:20:07 +02:00
Laurent Destailleur
c5572e0176 Add info on signature generator 2019-06-25 23:19:00 +02:00
Laurent Destailleur
162498d2f8 Add info on signature generator 2019-06-25 23:18:20 +02:00
Laurent Destailleur
1ae9d94de9 Add info on signature generator 2019-06-25 23:15:30 +02:00
Laurent Destailleur
6790930283 Add info on signature generator 2019-06-25 23:11:49 +02:00
Laurent Destailleur
d5479cd9ae Fix import of ledger 2019-06-25 22:37:13 +02:00
Laurent Destailleur
ad725b3bb0 Doc 2019-06-25 22:27:35 +02:00
Laurent Destailleur
20471c54e1 Fix import code (regex of data imported + import of constant)
Conflicts:
	htdocs/core/modules/import/import_csv.modules.php
	htdocs/core/modules/import/import_xlsx.modules.php
2019-06-25 22:27:00 +02:00
Laurent Destailleur
d41850c7cd Fix purge of old files 2019-06-25 20:02:14 +02:00
Laurent Destailleur
4696d35bcb Fix we need to keep temp dir 2019-06-25 19:02:24 +02:00
Laurent Destailleur
1277e36179 Prepare 9.0.4 2019-06-25 13:30:18 +02:00
Laurent Destailleur
c9883eecd2 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/fichinter/list.php
2019-06-25 13:23:19 +02:00
Laurent Destailleur
144f2a5159 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0
Conflicts:
	htdocs/fichinter/list.php
2019-06-25 13:15:57 +02:00
Laurent Destailleur
de3ec5682c Merge pull request #11403 from fmarcet/7.0
FIX: Not showing Contract and Project columns on ficheinter list
2019-06-25 13:07:03 +02:00
Ferran Marcet
7f127989b2 FIX: Not showing Contract and Project columns on ficheinter list 2019-06-25 09:55:34 +02:00
Laurent Destailleur
d85ec982e5 Fix do not output log in arhived log for draft documents 2019-06-24 23:39:44 +02:00
Laurent Destailleur
862e20e820 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/core/actions_massactions.inc.php
2019-06-24 16:37:29 +02:00
Laurent Destailleur
ae1ad80994 Fix count 2019-06-24 16:32:42 +02:00
Laurent Destailleur
70f19b3a3d Fix counter of record 2019-06-24 16:31:56 +02:00
Laurent Destailleur
43123d6a87 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-06-24 16:13:36 +02:00
Laurent Destailleur
b98874848f Fix backport 9.0 2019-06-24 16:12:54 +02:00
Laurent Destailleur
84575df7e6 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-06-24 16:12:29 +02:00
Laurent Destailleur
3d185b6818 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/adherents/class/adherent.class.php
	htdocs/core/actions_massactions.inc.php
	htdocs/core/tpl/massactions_pre.tpl.php
2019-06-24 16:12:20 +02:00
atm-josselin
7a17c43b26 FIX : filepath of generated documents doesn't handle products with special characters 2019-06-24 16:05:24 +02:00
Laurent Destailleur
3c4956838e Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0
Conflicts:
	htdocs/core/actions_massactions.inc.php
	htdocs/core/tpl/massactions_pre.tpl.php
2019-06-24 15:44:44 +02:00
Laurent Destailleur
04606ec6a3 Merge pull request #11384 from ATM-Consulting/7.0_fix_mass_send_mail
FIX mass send mail
2019-06-24 15:34:06 +02:00
Laurent Destailleur
7bbbe49b70 Merge pull request #11389 from atm-john/9.0_fix_ancor
Fix send mail ancor
2019-06-24 15:29:36 +02:00
Laurent Destailleur
7e10208619 Merge pull request #11380 from atm-florian/9.0
fix depending extrafeilds list
2019-06-24 15:23:48 +02:00
Laurent Destailleur
0854984a08 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/holiday/card.php
2019-06-23 18:09:49 +02:00
Laurent Destailleur
b153019000 FIX security (a user can read leave or holiday of other without perm. 2019-06-23 18:08:24 +02:00
John Botella
ec7ebe9f39 redo backported fix and update adherent substitution methode 2019-06-21 15:32:38 +02:00
John Botella
200b66d11f Remove a backported fix because failling at init test 2019-06-21 14:52:12 +02:00
Laurent Destailleur
c725db166d Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-06-21 11:26:44 +02:00
Laurent Destailleur
70c950bd7c Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0
Conflicts:
	htdocs/core/modules/modAdherent.class.php
2019-06-21 11:26:25 +02:00
Laurent Destailleur
9093be2f0a FIX Add missing end date of subscription in export 2019-06-21 11:23:49 +02:00
John Botella
e5298d0666 Fix send mail ancor 2019-06-21 11:20:04 +02:00
florian HENRY
0865bdb60f fix depending extrafeilds list 2019-06-20 12:16:48 +02:00
John Botella
b21006614c Fix substitutions null 2019-06-20 12:00:44 +02:00
John Botella
6a68c8cd99 Fix display option email per participient 2019-06-20 11:09:37 +02:00
John Botella
9305403bea Fix duplicate pdf in mass sendmail 2019-06-20 10:32:32 +02:00
John Botella
252bd6d9ba FIX condition 2019-06-20 09:48:08 +02:00
John Botella
7c29fb614c Fix replacement and vars names 2019-06-20 09:21:35 +02:00
Laurent Destailleur
26c12c61a7 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-06-20 03:39:56 +02:00
Laurent Destailleur
4574ad2eeb Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/core/actions_massactions.inc.php
2019-06-20 03:39:48 +02:00
Laurent Destailleur
53688e2d0f Merge pull request #11353 from fmarcet/8.0
FIX: Wrong stock movement on supplier credit notes
2019-06-20 03:11:28 +02:00
Laurent Destailleur
d840c8f831 Merge pull request #11348 from frederic34/patch-5
Update companies.lang
2019-06-20 03:05:43 +02:00
Laurent Destailleur
4c7a689fb5 Merge pull request #11373 from atm-john/8.0_fix_var_name
FIX var name
2019-06-20 02:57:39 +02:00
Laurent Destailleur
33f39bdfcb Merge pull request #11368 from atm-gauthier/8.0_fix_facfourn_fetch_in_right_entity
FIX : we need to fetch fourn invoice with ref in current entity
2019-06-20 02:48:42 +02:00
John Botella
31a53b72ae FIX var name 2019-06-19 16:55:45 +02:00
gauthier
3ad13adf31 FIX : better syntax 2019-06-19 10:43:42 +02:00
gauthier
7331e43db8 FIX : we need to fetch fourn invoice with ref in current entity 2019-06-19 10:19:33 +02:00
Laurent Destailleur
20e00ca290 FIX if last char of customercode is accent making the truncate of first
chars wrong.
2019-06-18 19:41:16 +02:00
Laurent Destailleur
ae00743590 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-06-18 16:04:48 +02:00
Laurent Destailleur
81bca34a08 FIX A user may read holiday and expense report without permissions 2019-06-18 16:04:25 +02:00
Laurent Destailleur
6e9874b95a FIX A user may read holiday and expense report without permissions 2019-06-18 16:01:24 +02:00
Laurent Destailleur
6afda6a47a FIX invalid link on user.fk_user 2019-06-18 15:57:22 +02:00
Laurent Destailleur
27f52dd0bd Fix columns in csv 2019-06-18 14:32:35 +02:00
Laurent Destailleur
f6f66f2a77 Fix syntax error 2019-06-17 18:11:38 +02:00
Ferran Marcet
c62f370959 FIX: Wrong stock movement on supplier credit notes 2019-06-17 16:30:56 +02:00
Frédéric FRANCE
a399e3f63d Update companies.lang 2019-06-17 13:33:44 +02:00
Laurent Destailleur
c0a30d1ff5 FIX #11325 FIX #5249
Conflicts:
	htdocs/projet/tasks/time.php
2019-06-16 22:21:38 +02:00
Laurent Destailleur
5a4f2fa0b3 Merge pull request #11342 from simnandez/9.0
FIX: #11335
2019-06-16 17:25:02 +02:00
Juanjo Menent
a73ae49c4d FIX: #11296 2019-06-14 18:56:30 +02:00
Juanjo Menent
8afffc8762 FIX: #11335 2019-06-14 18:28:01 +02:00
Laurent Destailleur
239e41f6c4 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-06-14 13:57:49 +02:00
Laurent Destailleur
1d2c9c9df4 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-06-14 13:57:23 +02:00
Laurent Destailleur
a163623dc6 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-06-14 13:57:17 +02:00
Laurent Destailleur
e6b6246fea Merge pull request #11334 from atm-florianm/8.0_FIX-print-dictionaries-escape
FIX: in edit mode, dictionary inputs do not escape the string inside …
2019-06-14 13:36:06 +02:00
Laurent Destailleur
5bac3d4d2b Merge pull request #11332 from atm-gauthier/7.0_fix_syntax_error
FIX : syntax error
2019-06-14 13:35:40 +02:00
atm-florian.m
787e1319b9 FIX: in edit mode, dictionary inputs do not escape the string inside the 'value' attribute, causing errors if there are any double quotes 2019-06-13 16:21:07 +02:00
Laurent Destailleur
9a5ac7d1c7 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-06-13 12:12:57 +02:00
Laurent Destailleur
3e6b7208cc Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-06-13 12:12:37 +02:00
Laurent Destailleur
319bc7ec8a Fix syntax error 2019-06-13 12:12:20 +02:00
Laurent Destailleur
4b1f0d1ac2 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/core/actions_massactions.inc.php
	htdocs/core/class/html.formother.class.php
2019-06-13 12:11:31 +02:00
Laurent Destailleur
b6f477fc83 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-06-13 12:07:24 +02:00
gauthier
28218a00b3 FIX : syntax error 2019-06-13 11:01:12 +02:00
Laurent Destailleur
1318e26cda Merge pull request #11298 from hregis/7.0_price
FIX missing compatibility with multicompany transverse mode
2019-06-13 10:01:05 +02:00
Laurent Destailleur
4cbfb67d63 Update html.formother.class.php 2019-06-13 09:59:10 +02:00
Laurent Destailleur
4f5f03b893 Merge pull request #11326 from atm-greg/FIX_massaction_presend
Fix massaction presend
2019-06-12 12:37:03 +02:00
Laurent Destailleur
0bf7512f28 Update actions_massactions.inc.php 2019-06-12 12:33:31 +02:00
atm-greg
47746fd17d fix template type 2019-06-12 12:30:49 +02:00
atm-greg
9ba102b6b9 bad object used 2019-06-12 12:08:16 +02:00
atm-greg
25031e534d fix massaction presend 2019-06-12 12:05:02 +02:00
Laurent Destailleur
afe1ec633b Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-06-12 10:07:21 +02:00
Laurent Destailleur
2d52537106 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-06-12 10:07:08 +02:00
Laurent Destailleur
1b6b471cb7 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-06-12 10:06:43 +02:00
Laurent Destailleur
8447259f25 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-06-12 10:06:34 +02:00
Laurent Destailleur
420f3bbdab FIX #11316 2019-06-12 10:05:53 +02:00
Laurent Destailleur
8f612bc1b2 Merge pull request #11314 from atm-maxime/fix_missing_hookparam
Fix missing massaction hook params
2019-06-12 09:21:15 +02:00
Maxime Kohlhaas
0ce2c2aab5 Fix missing massaction hook params 2019-06-10 10:11:26 +02:00
Laurent Destailleur
91a5547362 Merge pull request #11307 from frederic34/patch-7
Warning: A non-numeric value encountered
2019-06-07 18:11:09 +02:00
Laurent Destailleur
b36f80ab2e Merge pull request #11306 from frederic34/patch-6
Parameter must be array or object that implements Countable
2019-06-07 18:10:03 +02:00
Laurent Destailleur
b73d287953 Update agenda.lib.php 2019-06-07 18:09:43 +02:00
Laurent Destailleur
4ed7e281c5 Merge pull request #11301 from frederic34/patch-5
avoid warning with php 7.2
2019-06-07 15:08:49 +02:00
Laurent Destailleur
63d9e963b8 Merge pull request #11310 from atm-josselin/FIX_display_intervention_model_button
Display the intervention button only in develop mode
2019-06-07 15:08:07 +02:00
Laurent Destailleur
2e201abac0 Merge pull request #11308 from atm-maxime/8.0
Fix multicurrency setup page
2019-06-07 15:07:42 +02:00
Laurent Destailleur
deb9ac25a8 Merge branch '9.0' of https://github.com/dolibarr/dolibarr into 9.0 2019-06-06 19:08:26 +02:00
Laurent Destailleur
3ff154c1d0 Fix sql error 2019-06-06 19:05:47 +02:00
atm-josselin
c8ab7dee45 Display the intervention button only in develop mode 2019-06-06 16:34:44 +02:00
Maxime Kohlhaas
9c7c1ddceb Fix multicurrency setup page 2019-06-06 11:20:10 +02:00
Frédéric FRANCE
ad95b66842 Warning: A non-numeric value encountered 2019-06-06 10:12:01 +02:00
Frédéric FRANCE
f11db8396a Parameter must be array or object that implements Countable
warning with php 7.2
2019-06-06 09:49:32 +02:00
Frédéric FRANCE
ca6a624112 avoid warning with php 7.2 2019-06-05 13:55:47 +02:00
Laurent Destailleur
ab77051317 Fix time delay for purge 2019-06-04 20:03:27 +02:00
Laurent Destailleur
ba68e3d7ff Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/website/class/website.class.php
2019-06-04 18:47:22 +02:00
Laurent Destailleur
36df2f1026 Fix css 2019-06-04 18:45:01 +02:00
Laurent Destailleur
7b3242693b FIX default value for duration of validity can be set from generic
feature.
2019-06-04 18:17:07 +02:00
Regis Houssin
5726b40a10 FIX try to use WHERE EXISTS instead DISTINCT 2019-06-03 17:26:03 +02:00
Regis Houssin
7fd1051efc FIX missing compatibility with multicompany transverse mode
Conflicts:
	htdocs/core/class/html.formother.class.php
2019-06-03 17:22:15 +02:00
Laurent Destailleur
094719e099 Fix prefix 2019-06-02 15:53:16 +02:00
Laurent Destailleur
fc37c393ce Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/core/actions_massactions.inc.php
2019-06-02 12:36:48 +02:00
Laurent Destailleur
57cfb4b007 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/core/actions_massactions.inc.php
	htdocs/website/class/website.class.php
2019-06-02 12:36:07 +02:00
Laurent Destailleur
a20d824b97 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-06-02 12:30:34 +02:00
Laurent Destailleur
300f46cb01 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-06-02 12:30:25 +02:00
Laurent Destailleur
a1a9313487 Merge pull request #11292 from atm-maxime/fix_invoice_from_contract2
Fix : only invoice active lines of a contract
2019-06-02 12:29:13 +02:00
Laurent Destailleur
4bbef9b478 Update card.php 2019-06-02 12:29:05 +02:00
Laurent Destailleur
7020e1ef29 Update card.php 2019-06-02 12:27:32 +02:00
Laurent Destailleur
db7ea5f52a Merge pull request #11284 from atm-maxime/fix_buld_invoice_refclient
Fix : add refclient on bulk invoicing
2019-06-02 12:21:24 +02:00
Laurent Destailleur
2b3c5902e6 Merge pull request #11281 from atm-maxime/fix_warning_resource
Fix : warnings in resource module
2019-06-02 12:17:19 +02:00
Laurent Destailleur
cb927847ab Update dolresource.class.php 2019-06-02 12:16:12 +02:00
Laurent Destailleur
40b212d5cc Merge pull request #11280 from atm-maxime/fix_warning_page_var
Fix : avoid warning and uniformize $page var use
2019-06-02 12:14:47 +02:00
Laurent Destailleur
190cf8aba5 Merge pull request #11279 from atm-maxime/fix_tag_missing_right
Fix : missing rights test to display tag create link
2019-06-02 12:14:22 +02:00
Laurent Destailleur
3e9fbf0148 Update index.php 2019-06-02 12:14:07 +02:00
Laurent Destailleur
b40041146b Merge pull request #11276 from atm-maxime/fix_db_table_prefix
Fix : remove hardcoded llx_ prefix
2019-06-02 12:13:33 +02:00
Maxime Kohlhaas
916d3ce931 Fix : only invoice active lines of a contract 2019-06-02 11:00:58 +02:00
Maxime Kohlhaas
d47913ed19 Fix : add refclient on bulk invoicing 2019-05-31 16:33:32 +02:00
Maxime Kohlhaas
0372276a7b Fix : warnings in resource module 2019-05-31 16:04:12 +02:00
Maxime Kohlhaas
6dd01e86e9 Fix : avoid warning and uniformize var use 2019-05-31 15:53:23 +02:00
Maxime Kohlhaas
9ab2f44946 Fix : missing rights test to display tag create link 2019-05-31 15:14:56 +02:00
Maxime Kohlhaas
15fd24a511 Fix : remove hardcoded llx_ prefix 2019-05-31 12:14:51 +02:00
Laurent Destailleur
f2088a084f Fix error management 2019-05-31 11:53:30 +02:00
Laurent Destailleur
12c1531b3b Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-05-31 11:39:06 +02:00
Laurent Destailleur
cd75794aaa FIX #11169 #11202 2019-05-31 11:38:54 +02:00
Laurent Destailleur
dedd85c8b5 Merge pull request #11271 from hregis/9.0_security
FIX missing llx_const encrypt
2019-05-31 10:56:24 +02:00
Regis Houssin
bdd54ae245 FIX missing llx_const encrypt 2019-05-30 11:42:28 +02:00
Laurent Destailleur
69efc54fb6 Merge pull request #11263 from atm-arnaud/9.0_FIX_productaccount_buy_page
FIX productaccount buylist with pages
2019-05-29 13:52:53 +02:00
Laurent Destailleur
e11bd8c70d Merge pull request #11257 from atm-ph/fix_7.0_create_bills_multicurrency
Fix create bills on mass action does not retrieve the original currency
2019-05-29 13:51:57 +02:00
Laurent Destailleur
912e29a746 FIX #11244 2019-05-29 11:06:01 +02:00
Laurent Destailleur
3c05cfe690 Fix useless test 2019-05-29 10:50:33 +02:00
Laurent Destailleur
b46b675b7c Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-05-29 10:36:00 +02:00
Laurent Destailleur
a491de01b3 Merge pull request #11244 from altatof/8.0
FIX : do not include tpl from disabled modules
2019-05-29 10:35:39 +02:00
Laurent Destailleur
a26c8c0714 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-05-29 09:55:55 +02:00
Laurent Destailleur
6e9cd819c1 Fix phpcs 2019-05-29 09:55:09 +02:00
Laurent Destailleur
35b021f203 Fix phpcs 2019-05-29 09:53:54 +02:00
atm-arnaud
a853764f6d FIX productaccount buylist with pages 2019-05-28 15:03:36 +02:00
Laurent Destailleur
2352463c21 Fix link to change validator is on validate status only 2019-05-28 13:23:12 +02:00
Laurent Destailleur
666e4fdb5f Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-05-27 20:22:21 +02:00
Laurent Destailleur
991e247e30 Fix edit of validator 2019-05-27 20:21:50 +02:00
Laurent Destailleur
f5d51dab5f Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/holiday/card.php
2019-05-27 20:14:37 +02:00
Laurent Destailleur
02fc896612 FIX Even with permission, can't validate leave once validator defined. 2019-05-27 20:12:33 +02:00
Laurent Destailleur
1c6ddd25c4 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-05-27 19:23:54 +02:00
Laurent Destailleur
7db643fff0 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-05-27 19:23:09 +02:00
Laurent Destailleur
93c395fe10 FIX confirmation of mass email sending + option MAILING_NO_USING_PHPMAIL 2019-05-27 19:22:51 +02:00
Laurent Destailleur
7964bb12ce FIX Use of cron with multicompany 2019-05-27 18:13:33 +02:00
Laurent Destailleur
4596ec7d38 FIX Use of cron with multicompany 2019-05-27 18:11:15 +02:00
Laurent Destailleur
71da27f333 Add error message 2019-05-27 16:40:06 +02:00
atm-ph
c79b9b9704 Fix create bills on mass action does not retrieve the original currency code 2019-05-27 11:18:29 +02:00
Laurent Destailleur
08a731ab39 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-05-26 15:25:37 +02:00
Laurent Destailleur
45aaafd4d6 Fix email not set in paybox payment 2019-05-26 15:25:26 +02:00
Laurent Destailleur
a40e5ca66c Fix phpcs 2019-05-26 11:36:16 +02:00
Laurent Destailleur
c04d082ad1 FIX Import of chart of account 2019-05-24 18:14:15 +02:00
Laurent Destailleur
bad565cc64 Fix syntax error 2019-05-24 18:13:24 +02:00
Laurent Destailleur
0fc7ad7c1f Add one param to fetch of accounting account to solve chart import 2019-05-24 18:05:29 +02:00
Laurent Destailleur
769fbdb429 FIX the id was not loaded in fetch of accounting system 2019-05-24 17:39:37 +02:00
Laurent Destailleur
49991eabf8 Fix import of accounting account from ref in import profiles 2019-05-24 17:09:18 +02:00
Laurent Destailleur
63824861a6 Fix import of chart of account. The account parent was not managed. 2019-05-24 16:58:06 +02:00
Christophe Battarel
83d883c36a finally eldy is always right 2019-05-24 15:14:34 +02:00
Christophe Battarel
4863ddcb00 Merge branch '8.0' of https://github.com/Dolibarr/dolibarr into 8.0 2019-05-24 15:13:23 +02:00
Laurent Destailleur
89455672a2 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/compta/facture/class/facture.class.php
	htdocs/core/modules/facture/doc/pdf_crabe.modules.php
2019-05-24 14:58:21 +02:00
Laurent Destailleur
7a0c6859bd Merge pull request #11240 from ATM-Marc/FIX_8.0_crabe_situation_vat
FIX: crabe pdf: bad detailed VAT for situation invoices, in situations S2 and above
2019-05-24 12:57:01 +02:00
Christophe Battarel
545cdd0762 test include return on FALSE 2019-05-24 12:54:24 +02:00
Laurent Destailleur
5d6e4a444a Merge pull request #11237 from ATM-Marc/FIX_8.0_situation_discount
FIX: situation invoices: block progress percentage change for discount lines
2019-05-24 12:53:34 +02:00
Christophe Battarel
abc7c2f0f8 test include return on TRUE 2019-05-24 12:33:40 +02:00
Christophe Battarel
aaaad71347 FIX : do not include disabled modules tpl 2019-05-24 12:10:58 +02:00
Marc de Lima Lucio
49385fcab3 FIX: situation invoices: bad detailed VAT in situations following the first one 2019-05-23 14:37:40 +02:00
Marc de Lima Lucio
54f8c98b27 FIX: remove isolated transaction commit 2019-05-22 11:12:02 +02:00
Marc de Lima Lucio
66dd7e30ae FIX: situation invoices: block progress percentage change for discount lines 2019-05-22 10:46:38 +02:00
Laurent Destailleur
f99f1d83c2 Merge pull request #11229 from frederic34/patch-7
target _blank depend of mime
2019-05-21 22:42:36 +02:00
Laurent Destailleur
16f7d96ed1 Merge pull request #11231 from ATM-Marc/FIX_8.0_extrafields_search
FIX: extrafield list search: SQL error when field is multiselect
2019-05-21 22:38:14 +02:00
Laurent Destailleur
a7f5f3fb94 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-05-21 21:16:54 +02:00
Laurent Destailleur
dcf77520ea FIX Error management when MAILING_NO_USING_PHPMAIL is set 2019-05-21 21:16:06 +02:00
Marc de Lima Lucio
18a6ed17cf FIX: extrafield list search: SQL error when field is multiselect 2019-05-21 14:49:23 +02:00
Laurent Destailleur
5131e7a5b7 Fix SQL injection 2019-05-21 14:39:38 +02:00
Laurent Destailleur
61ead06950 Fix Injection 2019-05-21 14:35:05 +02:00
Laurent Destailleur
479f8616e1 Fix sanitize data 2019-05-21 14:03:28 +02:00
Laurent Destailleur
f283e24b48 Fix the noexe must be added for dangerous extension like js and shells 2019-05-21 13:53:12 +02:00
Frédéric FRANCE
84781cabac target _blank depend of mime
target _blank is added in the previous line depending on mimtype
2019-05-21 13:11:17 +02:00
Laurent Destailleur
ebf252f8a3 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-05-20 15:40:50 +02:00
Laurent Destailleur
2a2fcf6784 FIX only profid1 to 4 were editable for pdf option to show. Not 5 and 6. 2019-05-20 15:38:33 +02:00
Laurent Destailleur
ea5ffbb0bf Merge pull request #11216 from atm-florian/8.0
fix:  #11187
2019-05-19 02:19:12 +02:00
Laurent Destailleur
71ef8c881b Merge branch '8.0' of https://github.com/dolibarr/dolibarr into 9.0
Conflicts:
	htdocs/modulebuilder/template/class/myobject.class.php
2019-05-19 02:06:20 +02:00
florian HENRY
e4d87ab2e7 fix: #11189 2019-05-19 02:05:13 +02:00
Laurent Destailleur
7738787729 Merge branch '7.0' of https://github.com/dolibarr/dolibarr into 8.0
Conflicts:
	htdocs/core/actions_sendmails.inc.php
2019-05-19 02:03:16 +02:00
florian HENRY
6e7fe1a6c2 Merge branch '8.0' of https://github.com/Dolibarr/dolibarr into 8.0 2019-05-19 01:58:38 +02:00
florian HENRY
4311a1ece8 fix: #11187 2019-05-19 01:58:20 +02:00
Laurent Destailleur
0f3ae6dc39 Merge pull request #11215 from ATM-Marc/FIX_8.0_invoice_default_product_type
FIX: invoice class: bad SQL request if product type not set
2019-05-19 01:58:13 +02:00
Laurent Destailleur
2fd3eb8bdf Update facture.class.php 2019-05-19 01:58:01 +02:00
Laurent Destailleur
684cbbdddb Merge pull request #11212 from ATM-Marc/FIX_8.0_modulebuilder_foreignkey
FIX: modulebuilder: hardcoded llx_
2019-05-19 01:55:02 +02:00
Laurent Destailleur
234ad4c76a Merge pull request #11214 from atm-maxime/7.0
Fix #8344
2019-05-19 01:53:13 +02:00
Laurent Destailleur
32485c2782 Fix phpcs 2019-05-19 01:45:33 +02:00
ATM-Marc
83c38570e9 FIX: invoice class: bad SQL request if product type not set 2019-05-19 01:01:21 +02:00
Maxime Kohlhaas
1d980342ec Fix #8344 2019-05-19 00:05:23 +02:00
Laurent Destailleur
3e3ed6f9e7 Fix phpcs 2019-05-18 20:11:51 +02:00
ATM-Marc
9b805f742b FIX: modulebuilder: hardcoded llx_ 2019-05-18 20:09:00 +02:00
Laurent Destailleur
34b5399329 Merge pull request #11209 from atm-maxime/fix_holiday_missing_stats
Fix holiday missing stats
2019-05-18 19:33:36 +02:00
Maxime Kohlhaas
4f64250ad6 Fix menu links for holidays 2019-05-18 17:12:25 +02:00
Maxime Kohlhaas
ea4dcbc77a Add translation 2019-05-18 17:07:55 +02:00
Maxime Kohlhaas
6c195d7bdf Add warning delay for holidays 2019-05-18 17:07:29 +02:00
Maxime Kohlhaas
ea1efa5e88 Fix missing dashboard stats for holidays 2019-05-18 17:06:33 +02:00
Maxime Kohlhaas
28a4785b3a Fix missing TOKEN 2019-05-18 17:06:23 +02:00
Laurent Destailleur
6c4a4c34c4 Merge branch '8.0' of https://github.com/dolibarr/dolibarr into 9.0 2019-05-18 02:26:40 +02:00
Laurent Destailleur
d4f356c8f6 Merge pull request #11200 from atm-maxime/fix_project_beluga
Fix project beluga order status
2019-05-18 02:16:50 +02:00
Maxime Kohlhaas
095fd2769a Fix project beluga order status 2019-05-18 01:11:34 +02:00
Laurent Destailleur
92dbc3ec1f Merge pull request #11199 from atm-maxime/fix_resource_deletefile
Fix resource delete with attached file
2019-05-18 00:59:35 +02:00
Laurent Destailleur
b5187db6d0 Merge pull request #11198 from atm-maxime/fix_api_varname
Fix varnames in invoice api
2019-05-18 00:59:03 +02:00
Laurent Destailleur
68118e55dc Update api_invoices.class.php 2019-05-18 00:58:43 +02:00
Laurent Destailleur
ba88d89ff5 Merge pull request #11195 from ATM-Marc/FIX_7.0_presend_file_overwrite
FIX: mail presend: can overwrite a file previously uploaded (Issue #11056)
2019-05-18 00:52:29 +02:00
Laurent Destailleur
590ee589c1 Merge pull request #11192 from atm-maxime/fix_usertab_hr
Fix : display hr tab on user if rights to read all
2019-05-18 00:48:06 +02:00
Maxime Kohlhaas
aed71be7f1 Fix resource delete with attached file 2019-05-18 00:47:32 +02:00
Maxime Kohlhaas
1af69d4c8f Fix varnames in invoice api 2019-05-18 00:40:29 +02:00
ATM-Marc
b85ed3e0b7 FIX: mail presend: can overwrite a file previously uploaded 2019-05-18 00:11:15 +02:00
Maxime Kohlhaas
2a2f0557cf Fix : display hr tab on user if rights to read all 2019-05-17 17:07:38 +02:00
Laurent Destailleur
e2408fb54d Merge pull request #11170 from atm-greg/Fix_margin_calculation_on_display
fix useless calculation
2019-05-13 20:20:01 +02:00
Laurent Destailleur
9242c1a630 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	ChangeLog
	htdocs/contrat/services_list.php
	htdocs/core/lib/files.lib.php
	htdocs/filefunc.inc.php
	htdocs/product/list.php
2019-05-13 12:22:14 +02:00
atm-greg
644f247910 fix useless calculation 2019-05-13 12:02:46 +02:00
Laurent Destailleur
1626c9fb6e Merge pull request #11145 from atm-gauthier/8.0_fix_filename_with_two_spaces
FIX : use dol_sanitizeFileName() function to remove double spaces in …
2019-05-13 12:01:05 +02:00
Laurent Destailleur
c67d79a4e2 Update files.lib.php 2019-05-13 12:00:13 +02:00
Juanjo Menent
072a455ca4 Prepare 8.0.6 2019-05-11 22:55:42 +02:00
Juanjo Menent
7041c3246e Prepare 8.0.5 2019-05-11 22:35:56 +02:00
Juanjo Menent
40229c9d96 Merge pull request #11166 from simnandez/8.0
Merge branch '7.0' into 8.0
2019-05-11 18:06:20 +02:00
Juanjo Menent
f4ca6916cd Merge remote-tracking branch 'upstream/7.0' into 8.0
# Conflicts:
#	htdocs/contrat/services_list.php
#	htdocs/expensereport/list.php
#	htdocs/projet/list.php
2019-05-11 17:31:23 +02:00
Juanjo Menent
3a99ef7319 Fix: missing GETPOST params 2019-05-11 17:04:05 +02:00
Juanjo Menent
3ae2d71ea6 Fix: missing GETPOST params 2019-05-11 17:00:55 +02:00
Juanjo Menent
91ae365588 Fix: missing GETPOST params 2019-05-11 16:58:00 +02:00
Juanjo Menent
6206519456 Fix: missing GETPOST params 2019-05-11 16:54:56 +02:00
Juanjo Menent
2e6cb2afaa Fix: missing GETPOST params 2019-05-11 16:53:16 +02:00
Juanjo Menent
dc9f8a349f Fix: missing GETPOST params 2019-05-11 16:50:31 +02:00
Juanjo Menent
80ef97e215 FIX: #11025 2019-05-11 16:41:01 +02:00
Juanjo Menent
759427f6ac FIX: #11025 2019-05-11 16:36:35 +02:00
Juanjo Menent
81bf7d07e3 Merge remote-tracking branch 'upstream/7.0' into 7.0 2019-05-11 16:32:02 +02:00
Laurent Destailleur
eed2b97913 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-05-10 17:40:53 +02:00
Laurent Destailleur
069df82380 FIX javascript error when ckeditor module not enabled 2019-05-10 17:40:34 +02:00
Laurent Destailleur
46ecdb8d4d Merge pull request #11155 from simnandez/9.0
FIX: #11097
2019-05-10 16:27:59 +02:00
Laurent Destailleur
95326c3d63 Update list.php 2019-05-10 16:27:38 +02:00
Laurent Destailleur
22c548e80b Fix sql 2019-05-10 14:46:43 +02:00
Laurent Destailleur
14b11b3cc5 Prepare 9.0.4 2019-05-10 14:43:01 +02:00
Laurent Destailleur
5625c94c44 Fix missing label on project tooltip 2019-05-10 14:40:15 +02:00
Juanjo Menent
72dd3705ed Merge remote-tracking branch 'upstream/7.0' into 7.0 2019-05-10 09:13:33 +02:00
Juanjo Menent
2df026b903 FIX: #11032 2019-05-09 20:59:22 +02:00
Juanjo Menent
e36df726a1 Merge remote-tracking branch 'upstream/9.0' into 9.0 2019-05-09 20:42:04 +02:00
Juanjo Menent
2b182c1cc1 FIX: #11097 2019-05-09 20:39:30 +02:00
Laurent Destailleur
6b626ab12c Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-05-09 15:41:30 +02:00
Laurent Destailleur
d53117da3f Update log 2019-05-09 15:34:42 +02:00
Laurent Destailleur
1e970fa8d7 Merge pull request #11151 from atm-arnaud/FIX_linkedfiles_in_attached_files_was_broked
FIX attached files list with link file was broked
2019-05-09 15:05:51 +02:00
Laurent Destailleur
bf3de83c5d Fix typo 2019-05-09 12:45:14 +02:00
Laurent Destailleur
677b333d0a FIX: Add hidden option MAIN_PDF_HIDE_SITUATION to hide situation (quick
hack to fix output pb).
2019-05-09 12:38:00 +02:00
Laurent Destailleur
af8d2e0e1a Fix error message when module disabled 2019-05-09 12:31:51 +02:00
Laurent Destailleur
d3bbb93ada Fix template for situation
Conflicts:
	htdocs/core/modules/facture/doc/pdf_crabe.modules.php
2019-05-09 12:16:43 +02:00
atm-arnaud
4c90ba1a64 FIX attached files list with link file was broked 2019-05-09 12:11:18 +02:00
Laurent Destailleur
50563ab126 Prepare 9.0.3 2019-05-08 22:03:16 +02:00
Laurent Destailleur
7883ac4a8d Merge branch '9.0' of https://github.com/dolibarr/dolibarr into 9.0 2019-05-08 22:01:46 +02:00
Laurent Destailleur
08fcfded76 Prepare 9.0.3 2019-05-08 22:00:13 +02:00
Laurent Destailleur
541da011a4 Prepare 9.0.2 2019-05-08 21:59:55 +02:00
Laurent Destailleur
c2abedeb24 Merge branch '9.0' of https://github.com/dolibarr/dolibarr into 9.0 2019-05-08 21:43:57 +02:00
Laurent Destailleur
f6de2d091d FIX Sending email to mass actions send same email on same customer 2019-05-08 19:07:12 +02:00
Laurent Destailleur
b5d8bc732d Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-05-08 18:22:11 +02:00
Laurent Destailleur
af436b6559 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-05-08 18:21:17 +02:00
Laurent Destailleur
f2e24ed96e Fix bad contact used 2019-05-08 18:20:28 +02:00
Laurent Destailleur
21c355dd9d Merge pull request #11133 from aspangaro/9.0_lettering
FIX sortfield on lettering function
2019-05-08 01:59:27 +02:00
Laurent Destailleur
12409e944c Fix duplicate error message 2019-05-07 22:57:27 +02:00
gauthier
f661b926fa FIX : use dol_sanitizeFileName() function to remove double spaces in filenames, as well as done on document.php when we want to download pdf
Example : if you upload a file like "my  file.pdf" (with 2 spaces), it's impossible to download it after. then we have to remove at least 1 space
2019-05-07 14:33:17 +02:00
Laurent Destailleur
c4798c34b0 Fix autocompletion of product on stock correction 2019-05-07 00:26:31 +02:00
Alexandre SPANGARO
c86318ea66 fix 2019-05-05 21:49:04 +02:00
Alexandre SPANGARO
99b068b625 FIX sortfield on lettering function 2019-05-05 21:46:56 +02:00
Laurent Destailleur
6797c95164 Fix syntax error 2019-05-03 12:10:29 +02:00
Laurent Destailleur
e694d0b2c2 Merge pull request #11101 from aspangaro/9.0_lettering
FIX Massive debug in lettering function
2019-05-03 11:39:45 +02:00
Laurent Destailleur
6a5af0511d Merge pull request #11105 from atm-greg/FIX_stock_movement_link_to_project
fix project link for stock correction
2019-05-03 11:27:17 +02:00
atm-greg
e0c3cf8360 fix project link for stock correction 2019-05-03 10:24:49 +02:00
Laurent Destailleur
4e94d92b70 Fix link 2019-05-02 17:24:05 +02:00
Laurent Destailleur
9b21c827c3 Fix remove var_dump 2019-05-02 17:17:52 +02:00
Laurent Destailleur
4899d03ff8 FIX Confusion between expired and late 2019-05-02 17:15:24 +02:00
Laurent Destailleur
8d7f24a6d9 FIX Default value on form to send email 2019-05-02 15:34:29 +02:00
Laurent Destailleur
79754eb326 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/comm/remx.php
2019-05-02 14:39:30 +02:00
Laurent Destailleur
45d618cd7a Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-05-02 14:37:54 +02:00
Laurent Destailleur
ae7ba162f2 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-05-02 14:37:46 +02:00
Alexandre SPANGARO
7bd99c0eee fix 2019-05-02 14:08:28 +02:00
Alexandre SPANGARO
cbe23741eb FIX Massive debug in lettering function 2019-05-02 14:06:55 +02:00
Laurent Destailleur
1a16dc1166 Merge pull request #11089 from frederic34/patch-5
Fix do not delete all discount when splitting (supplier)
2019-05-02 14:05:49 +02:00
Laurent Destailleur
50b1a54dca FIX Update/delete currency on same languages 2019-05-01 14:06:30 +02:00
Laurent Destailleur
3bda9be775 Fix error 500 2019-05-01 13:46:45 +02:00
Laurent Destailleur
2136bce4b0 FIX missing situation invoice in list 2019-04-30 15:10:38 +02:00
Frédéric FRANCE
d9a1c2b235 Fix do not delete all discount when splitting 2019-04-30 13:54:50 +02:00
Laurent Destailleur
b13bc0e698 Fix loading of website page object not done for home page 2019-04-30 13:51:31 +02:00
Laurent Destailleur
f2ecdac454 Fix idempotency_key
Conflicts:
	htdocs/stripe/class/stripe.class.php
2019-04-30 03:12:03 +02:00
Laurent Destailleur
d55c440740 Fix some product and services export profiles 2019-04-29 21:23:01 +02:00
Laurent Destailleur
ef8bb1f5ca Add MAIN_DOLEDITOR_HEIGHT as quick hack to fix pb of too small area 2019-04-29 20:55:45 +02:00
Laurent Destailleur
101f6a5af3 FIX Several fixes on import of services/products 2019-04-29 20:41:36 +02:00
Laurent Destailleur
5d40124b22 Fix import of product price with multilevel prices 2019-04-29 20:15:03 +02:00
Laurent Destailleur
627ef14454 FIX The autocopy feature was ko for suppliers 2019-04-29 18:51:15 +02:00
Laurent Destailleur
899f41d68c Fix bad constant MAIN_MAIL_AUTOCOPY into email form of project page. 2019-04-29 18:26:27 +02:00
Laurent Destailleur
5253c759af Fix overwrite feature 2019-04-27 21:42:52 +02:00
Laurent Destailleur
70975b36c7 Fix link 2019-04-27 19:46:53 +02:00
Laurent Destailleur
789a76320a Fix info message 2019-04-27 19:43:48 +02:00
Laurent Destailleur
6b2b996935 Missing translation 2019-04-27 19:41:47 +02:00
Laurent Destailleur
c43bc63d2e Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-04-27 13:49:13 +02:00
Laurent Destailleur
a7530b7eff Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-04-27 13:28:36 +02:00
Laurent Destailleur
0532598ecf Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2019-04-27 13:28:05 +02:00
Laurent Destailleur
410a3801da Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2019-04-27 13:27:52 +02:00
Laurent Destailleur
143cbec281 Fix test 2019-04-26 13:23:33 +02:00
Laurent Destailleur
9760ed5c8d FIX CVE-2019-11199 2019-04-25 23:36:19 +02:00
Laurent Destailleur
63c0ab93fb FIX CVE-2019-11201 2019-04-25 23:21:25 +02:00
Laurent Destailleur
01075081cb FIX CVE-2019-11200 2019-04-25 22:25:19 +02:00
Laurent Destailleur
5259547b96 Merge pull request #11069 from atm-gauthier/6.0_fix_select_prev_situ
Fix prev situation invoice selection (backport fix 8.0)
2019-04-25 18:59:48 +02:00
gauthier
31897f54ac Fix prev situation invoice selection (backport fix 8.0) 2019-04-25 12:37:05 +02:00
Laurent Destailleur
a15f1350be Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-04-25 01:39:02 +02:00
Laurent Destailleur
50a4d54d8a Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-04-25 01:37:32 +02:00
Laurent Destailleur
07caf22647 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-04-25 01:37:25 +02:00
Laurent Destailleur
becf096bf8 FIX ref for table without ref manager are set to NULL. 2019-04-25 01:37:08 +02:00
Laurent Destailleur
82093f5891 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-04-25 01:27:02 +02:00
Laurent Destailleur
560b026d68 Fix CSS 2019-04-25 01:26:29 +02:00
Laurent Destailleur
b62323939e Merge pull request #11064 from atm-greg/FIX_create_supplier_invoice_button
FIX test to display create invoice button on supplier_order card
2019-04-24 21:07:15 +02:00
atm-greg
70017da95a testing if customer invoice module is activated doesn't make sense on supplier commande card... 2019-04-24 14:59:54 +02:00
Laurent Destailleur
287b8ebe53 Merge pull request #11060 from hregis/9.0_mc
FIX missing compatibility with multicompany
2019-04-24 11:33:16 +02:00
Laurent Destailleur
f0bb9288bf FIX #11013 2019-04-24 11:23:49 +02:00
Laurent Destailleur
f5fb8363d8 FIX #11041 2019-04-24 10:26:57 +02:00
Laurent Destailleur
1264857211 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/core/js/timesheet.js
2019-04-24 10:24:32 +02:00
Laurent Destailleur
fb01f550f4 Merge pull request #11016 from ATM-Nicolas/fix_activity_perweek
FIX : Total per day in timespent per week
2019-04-24 10:21:08 +02:00
Laurent Destailleur
e0b71fd258 Fix size of column 2019-04-24 10:07:34 +02:00
Laurent Destailleur
21b79d314a Merge pull request #11059 from atm-greg/FIX_actioncomm_for_long_trigger_name
fix actioncomm module for long trigger names
2019-04-24 10:06:55 +02:00
atm-greg
6e425d1895 add origin of line in fourn orderstoinvoice.php 2019-04-24 08:56:06 +02:00
Regis Houssin
740fddcd42 FIX missing global $user 2019-04-24 08:22:00 +02:00
Regis Houssin
41a82023e3 FIX missing compatibility with multicompany 2019-04-24 08:17:10 +02:00
atm-greg
3231e54abd fix actioncomm module for long trigger names 2019-04-23 16:19:58 +02:00
Laurent Destailleur
84ec39f043 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-04-23 12:25:53 +02:00
Laurent Destailleur
bf7fcce1b2 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-04-23 12:24:25 +02:00
Laurent Destailleur
09914f31f9 Trans 2019-04-23 12:14:50 +02:00
Laurent Destailleur
11d737f23a Merge pull request #11029 from ATM-Marc/FIX_7.0_sort_events
FIX: actioncomm: sort events by date after external calendars and hook (into 7.0)
2019-04-19 13:06:09 +02:00
Laurent Destailleur
83205e6963 Merge pull request #11030 from atm-florian/9.0
fix #11023
2019-04-19 13:05:38 +02:00
Laurent Destailleur
c9445ee700 Merge pull request #11038 from atm-john/FIX_error_messages_not_displayed
FIX error messages not displayed
2019-04-19 12:55:30 +02:00
florian HENRY
83cf08f2eb fix php warning 2019-04-18 20:37:27 +02:00
John BOTELLA
0855d84ccf FIX error messages not displayed 2019-04-18 10:40:34 +02:00
florian HENRY
2b6cdd2e33 Fix workfolow module launch trigger on order close 2019-04-18 10:01:05 +02:00
florian HENRY
f412ce6a9c fix #11023 2019-04-17 10:49:39 +02:00
Laurent Destailleur
113c2dd717 Merge pull request #11002 from atm-arnaud/9.0_FIX_CURSOR_IN_PAYMENT_SCREEN
FIX Cursor pointer in payment screen for autofill
2019-04-17 01:36:13 +02:00
Laurent Destailleur
91af1f8702 Merge pull request #11011 from ATM-Nicolas/fix_search_contact_list
FIX : Wrong variable name
2019-04-16 23:43:58 +02:00
Laurent Destailleur
c0defe3965 Update index.php 2019-04-16 23:27:45 +02:00
Marc de Lima Lucio
1669d497b4 FIX: actioncomm: sort events by date after external calendars and hook 2019-04-16 17:36:27 +02:00
ATM-Nicolas
93365addd1 FIX : Total per day shows 00:00 if the total time spent is equal to 12:00 2019-04-15 11:40:58 +02:00
ATM-Nicolas
d4a7c0abc6 FIX : Wrong variable name 2019-04-15 10:05:46 +02:00
Juanjo Menent
1b5cabad71 Fix: #10956 2019-04-12 18:50:48 +02:00
atm-quentin
6deba39c6a FIX credit note can be split 2019-04-12 10:16:13 +02:00
atm-arnaud
3d5006f8fc FIX Cursor pointer in payment screen for autofill 2019-04-12 09:51:01 +02:00
atm-quentin
7ae6472e36 Merge branch '8.0' of github.com:Dolibarr/dolibarr into FIX_credit_note_used_on_list 2019-04-12 09:20:16 +02:00
Laurent Destailleur
54b3acc997 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/product/class/product.class.php
2019-04-11 16:23:56 +02:00
Laurent Destailleur
6cd24ab210 Merge pull request #10998 from atm-gauthier/8.0_fix_ProductAccountancySellIntraCode_is_feature_level_1
FIX : Product accountancey sell intra code must be visible if main feature level 1
2019-04-11 16:20:11 +02:00
Laurent Destailleur
8fa8d7fa08 FIX Combo list was limited to 20 in stock correction 2019-04-11 16:13:44 +02:00
gauthier
9a24007c0a FIX : better test 2019-04-11 15:32:50 +02:00
gauthier
524b186959 FIX : Product accountancey sell intra code must be visible if main feature level 1 2019-04-11 15:19:40 +02:00
Laurent Destailleur
36aa53e88d Missing trans 2019-04-08 19:40:52 +02:00
Laurent Destailleur
dccad0b19d Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-04-08 14:05:23 +02:00
Laurent Destailleur
f4efc86dd3 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-04-08 14:05:14 +02:00
Laurent Destailleur
ffca289bff Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-04-08 14:04:42 +02:00
Laurent Destailleur
125796b0f5 Merge pull request #10967 from atm-ph/fix_7.0_timesheet_init_hook
Fix no init hook on timesheet
2019-04-08 13:49:21 +02:00
Laurent Destailleur
c1f0826005 Update perweek.php 2019-04-08 13:49:16 +02:00
Laurent Destailleur
153e563c9f Update perday.php 2019-04-08 13:49:05 +02:00
Laurent Destailleur
47acbf4f54 Merge pull request #10961 from aspangaro/9.0_lettering
FIX: MultiEntity in lettering functionality
2019-04-08 13:33:01 +02:00
Laurent Destailleur
cd1322de79 Merge pull request #10959 from atm-arnaud/8.0_fix_shipping_default_warehouse_if_one
FIX shipping default warehouse if only one warehouse
2019-04-08 13:32:34 +02:00
Laurent Destailleur
b23f74eab1 FIX Status of opportunity should never be -1 2019-04-08 12:17:57 +02:00
Laurent Destailleur
81ccf4d1f0 Update doc 2019-04-07 18:43:30 +02:00
Laurent Destailleur
66142cef76 Prepare 9.0.2 2019-04-07 18:40:37 +02:00
Laurent Destailleur
becefeebff Fix upload of files without extension 2019-04-05 19:39:49 +02:00
Laurent Destailleur
163665e4b5 FIX A page of a site replaced with another when switching in edit mode
Conflicts:
	htdocs/website/index.php
2019-04-05 11:36:48 +02:00
atm-ph
ea87b2ddb6 Fix no init hook on timesheet 2019-04-05 11:26:11 +02:00
Laurent Destailleur
fa95f5575c Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/product/list.php
2019-04-04 17:41:22 +02:00
Laurent Destailleur
eaf9a2402a Fix length of label 2019-04-04 17:39:51 +02:00
Laurent Destailleur
e79204e81a Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/product/list.php
2019-04-04 17:13:52 +02:00
Laurent Destailleur
4489db2a70 Fix field surface/weight not loaded 2019-04-04 17:06:26 +02:00
Alexandre SPANGARO
ba34b601b3 FIX: MultiEntity in lettering functionality 2019-04-04 16:44:36 +02:00
Laurent Destailleur
1ac51b6e06 More complete example to fix migration error from v8 2019-04-04 13:46:01 +02:00
atm-arnaud
0b6c7d2d63 FIX shipping default warehouse if only one warehouse 2019-04-04 11:17:44 +02:00
Laurent Destailleur
21b9836508 FIX default value of language of thirdparty
Conflicts:
	htdocs/societe/card.php
2019-04-04 11:08:13 +02:00
Laurent Destailleur
9e5d87e821 Fix warning 2019-04-03 18:39:27 +02:00
Laurent Destailleur
82c19a6372 FIX Avoid error 500 when extension php-intl not loaded 2019-04-03 18:38:27 +02:00
Laurent Destailleur
83cf0dabae NEW Add more complete error messages in log on stripe payments 2019-04-03 17:54:55 +02:00
Laurent Destailleur
ebd3a04f7f Fix translation 2019-04-02 19:48:58 +02:00
Laurent Destailleur
c5348be337 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-04-02 19:35:42 +02:00
Laurent Destailleur
17a61b3232 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-04-02 19:34:49 +02:00
Laurent Destailleur
26fbd6e2ec Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2019-04-02 19:34:16 +02:00
Laurent Destailleur
cb1489e2fa Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2019-04-02 19:34:10 +02:00
Laurent Destailleur
9b77cc4db8 Translation of currency 2019-04-02 19:33:14 +02:00
Laurent Destailleur
2302c5ef1f Merge pull request #10943 from OPEN-DSI/v9-fix-fichinter-list-project-contract
Fix project and contract fields in fichinter list
2019-03-31 19:08:03 +02:00
Laurent Destailleur
24fef25fd8 Update list.php 2019-03-31 19:07:25 +02:00
Laurent Destailleur
b3f81d2c1a Update list.php 2019-03-31 19:06:44 +02:00
Laurent Destailleur
48ce60dd17 Update list.php 2019-03-31 19:04:28 +02:00
Laurent Destailleur
2f51221660 Merge pull request #10933 from atm-greg/Add_final_hooks_on_replenish
Add all missing hooks on replenish
2019-03-31 18:50:34 +02:00
Laurent Destailleur
f671b8bce7 Merge pull request #10945 from aspangaro/7_p1
FIX: Don't show accountingjournal:getNomUrl without data
2019-03-31 18:49:50 +02:00
Laurent Destailleur
143cbba09b Update card.php 2019-03-31 18:49:38 +02:00
Laurent Destailleur
5dfc1c0897 Merge pull request #10921 from atm-greg/Fix_hook_in_margins_heads
FIX missing hook completeTabsHead in margins module
2019-03-31 18:21:48 +02:00
Alexandre SPANGARO
5588fe5b81 FIX: Don't show journal:getNomUrl without data
ErrorBadValueForParamNotAString
2019-03-30 09:42:13 +01:00
Lionel VESSILLER
59c41105a2 Fix project and contract fields in fichinter list 2019-03-29 17:03:23 +01:00
atm-greg
957fae1081 missing params 2019-03-28 11:07:27 +01:00
atm-greg
11343e986c add all missing hooks on replenish 2019-03-28 10:47:32 +01:00
atm-greg
83d7750274 FIX missing hook completeTabsHead in margins module 2019-03-27 09:33:51 +01:00
Laurent Destailleur
aad3867b9b Fix translation 2019-03-26 14:00:01 +01:00
Laurent Destailleur
29fe65ed75 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-03-26 12:37:21 +01:00
Laurent Destailleur
e5f54bd14c FIX Remane of project 2019-03-26 12:35:44 +01:00
Laurent Destailleur
1787b31932 FIX setup of module export 2019-03-26 12:18:28 +01:00
Laurent Destailleur
524f171168 FIX old export models was not visible 2019-03-26 12:12:16 +01:00
Laurent Destailleur
2034ac61ef Fix phpcs 2019-03-24 15:05:02 +01:00
Laurent Destailleur
b54b687464 FIX bad check on type of expense report (mandatory status not working) 2019-03-24 11:05:07 +01:00
Laurent Destailleur
79ed4bc80b Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/core/actions_massactions.inc.php
2019-03-23 22:36:04 +01:00
Laurent Destailleur
3ede626932 FIX If we build one invoice for several orders, we must put the ref of
order on the line to not lose information.

Conflicts:
	htdocs/commande/list.php
	htdocs/core/actions_massactions.inc.php
2019-03-23 22:34:10 +01:00
Laurent Destailleur
5666fbedac FIX If we build one invoice for several orders, we must put the ref of
order on the line to not lose information.
2019-03-23 22:30:52 +01:00
Laurent Destailleur
37cc5b7d35 Merge pull request #10901 from fmarcet/8.0
FIX: The minimum amount filter does not work in VAT report by customer
2019-03-22 12:27:30 +01:00
Laurent Destailleur
52d3e89276 FIX function not found 2019-03-22 12:21:31 +01:00
Ferran Marcet
f37c1b9287 FIX: The minimum amount filter does not work in the VAT report per customer 2019-03-22 09:28:50 +01:00
Laurent Destailleur
75b94d373f Merge pull request #10897 from frederic34/patch-4
Update extrafields.class.php
2019-03-21 18:27:04 +01:00
Laurent Destailleur
55d64d441f Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-03-21 18:26:02 +01:00
Laurent Destailleur
1075ef8cf2 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-03-21 18:25:43 +01:00
Mathieu Pellegrin
e0d89101df #9480 Password link broken if login contains space 2019-03-21 18:25:00 +01:00
Laurent Destailleur
f7f20df323 Merge pull request #10891 from atm-greg/Add_hook_on_replenish
Add hook on replenish
2019-03-21 18:23:06 +01:00
Laurent Destailleur
2995f9c49d Merge pull request #10890 from frederic34/patch-2
phpcs fix v9
2019-03-21 18:22:36 +01:00
Frédéric FRANCE
d10b94e72b Update extrafields.class.php 2019-03-21 14:08:49 +01:00
Laurent Destailleur
a1fe1bb58c FIX when 2 extra fields are mandatory in 2 different entities 2019-03-21 12:33:39 +01:00
Laurent Destailleur
a7fdd34973 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-03-21 12:17:50 +01:00
Laurent Destailleur
032aa869e4 FIX Can't insert if there is extrafields mandatory on another entity.
FIX Can't set default value of extrafield of type varchar
2019-03-21 12:14:15 +01:00
Laurent Destailleur
4c85068a85 FIX Can't insert if there is extrafields mandatory on another entity. 2019-03-21 11:53:04 +01:00
Frédéric FRANCE
89e8889c5c phpcs fix v9 2019-03-19 16:33:34 +01:00
Laurent Destailleur
3c1d7bfbf0 FIX counter of permissions in badge was wrong 2019-03-19 16:30:40 +01:00
Laurent Destailleur
e4e085e332 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-03-19 13:10:24 +01:00
Laurent Destailleur
dbe15d3685 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-03-19 13:10:17 +01:00
Laurent Destailleur
b11403103b Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-03-19 13:09:48 +01:00
Laurent Destailleur
8664594fc8 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-03-19 13:09:39 +01:00
Laurent Destailleur
a61ee00a7a Merge pull request #10877 from ATM-Nicolas/9.0
FIX : Duplicate executeHook function
2019-03-19 12:04:46 +01:00
Laurent Destailleur
775aa5ff91 Merge pull request #10870 from hregis/8.0_mc2
FIX missing entity filter and wrong var name
2019-03-19 11:11:22 +01:00
Laurent Destailleur
41c737a213 Fix, Oops, test was inverted 2019-03-18 20:16:19 +01:00
Laurent Destailleur
aa013ff753 Fix do we really must copy notes when creating an object from another
source object? Add a hack with hidden option to be able to change this.
2019-03-18 20:09:09 +01:00
ATM-Nicolas
1cf42726ff FIX : Duplicate executeHook function 2019-03-18 15:19:39 +01:00
Laurent Destailleur
0c101f3d1b Fix translation 2019-03-18 11:21:51 +01:00
Laurent Destailleur
89087c6847 Merge pull request #10800 from atm-quentin/FIX_wrong_vat_deposit_invoice
Wrong vat if deposit from propal with multiple vat
2019-03-18 11:14:11 +01:00
Regis Houssin
57091f08b0 FIX missing entity filter and wrong var name 2019-03-18 10:53:43 +01:00
Laurent Destailleur
34034787af FIX problem with sign of various payment in project preview 2019-03-18 10:16:08 +01:00
Laurent Destailleur
227f5f8f92 Code is cleaner 2019-03-18 09:08:53 +01:00
Laurent Destailleur
e4ed5999eb Merge pull request #10867 from aspangaro/9.0_various
FIX: Error with various & salary payment on project
2019-03-18 09:00:26 +01:00
Alexandre SPANGARO
350f77db2b FIX: Error with various & salary payment on project 2019-03-17 23:00:13 +01:00
Laurent Destailleur
8adc333823 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-03-16 19:41:50 +01:00
Laurent Destailleur
468af5380f Merge pull request #10857 from atm-maxime/fix_creditnote_refund
Fix #9961 : deal with supplier credit note refund like with customers
2019-03-16 19:40:22 +01:00
Maxime Kohlhaas
46b39dd6a9 Fix #9961 : deal with supplier credit note refund like with customers 2019-03-16 18:13:43 +01:00
Laurent Destailleur
ae35c982af Merge pull request #9652 from atm-gauthier/7.0_fix_round_debitcredit
FIX : need to round with 2 decimals to avoid movements not correctly balanced
2019-03-16 14:27:03 +01:00
Laurent Destailleur
55718cc7da Merge pull request #10855 from atm-maxime/fix_missing_lang
Fix #9311
2019-03-16 13:43:35 +01:00
Laurent Destailleur
efeb7b0c22 Merge pull request #10854 from atm-maxime/fix_civility_third_creation
Fix #10177
2019-03-16 13:41:29 +01:00
Maxime Kohlhaas
21e2d36421 Fix #9311 2019-03-16 09:28:47 +01:00
Maxime Kohlhaas
68945c7d51 Fix #10177 2019-03-16 09:11:43 +01:00
Laurent Destailleur
04424ed882 FIX Bad label of status for members (must be short version in list)
Conflicts:
	htdocs/adherents/class/adherent.class.php
2019-03-15 20:07:42 +01:00
Laurent Destailleur
39e24d30aa Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-03-15 19:18:30 +01:00
Laurent Destailleur
681d626284 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-03-15 19:17:31 +01:00
Laurent Destailleur
4bb45ad1c1 Merge pull request #10824 from atm-gauthier/7.0_fix_nocreateline_deposit_if_amount_zero
FIX : when we create deposit with multi tva, we mustn't add line if a…
2019-03-15 19:16:56 +01:00
Laurent Destailleur
b33c366b02 Update card.php 2019-03-15 19:16:49 +01:00
Laurent Destailleur
2e94f8043f Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-03-15 19:14:02 +01:00
Laurent Destailleur
abf529770d Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-03-15 19:13:23 +01:00
Laurent Destailleur
482a37a2c9 Merge pull request #10850 from atm-ph/fix_7.0_var_name
Fix var name
2019-03-15 19:12:55 +01:00
Laurent Destailleur
6f0fbc42c1 FIX Param keepn must be 1 when dol_escape_htmltag used for textarea
Conflicts:
	htdocs/expensereport/card.php
	htdocs/projet/card.php
	htdocs/public/members/new.php
	htdocs/public/opensurvey/studs.php
2019-03-15 15:16:29 +01:00
atm-ph
2da60fb885 Fix var name 2019-03-15 15:15:03 +01:00
Laurent Destailleur
074ba0729a Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-03-15 11:00:52 +01:00
Laurent Destailleur
84bff41543 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-03-15 11:00:24 +01:00
Laurent Destailleur
6c2cad3d48 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/core/lib/security.lib.php
2019-03-15 11:00:00 +01:00
Laurent Destailleur
8711e51bce Merge pull request #10841 from atm-gauthier/6.0_notest_tab_documents_on_expensereport
FIX : no need to test anything to display documents tabs on expense report
2019-03-15 10:56:53 +01:00
gauthier
8375b47e74 FIX : in fact expensereport must be in $check array 2019-03-15 10:21:50 +01:00
Laurent Destailleur
c44d9bf8e2 Fix phpcs 2019-03-14 23:27:50 +01:00
Laurent Destailleur
51de29458f Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-03-14 19:06:31 +01:00
Laurent Destailleur
a35a2faacb Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/expedition/card.php
	htdocs/livraison/card.php
2019-03-14 19:06:21 +01:00
Laurent Destailleur
a8bd8a2101 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2019-03-14 18:49:24 +01:00
Laurent Destailleur
5ec8adb7f5 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2019-03-14 18:48:35 +01:00
Laurent Destailleur
4f84a1614c Merge pull request #10808 from ATM-Marc/FIX_8.0_shipment_hooks
FIX: several hooks in shipping/delivery cards
2019-03-14 18:07:57 +01:00
gauthier
3fb6978bc8 FIX : no need to test anything to display documents tabs on expense report 2019-03-14 17:36:49 +01:00
Laurent Destailleur
eab1e13343 Merge pull request #10839 from atm-gauthier/6.0_fix_useless_join
FIX : useless join
2019-03-14 17:12:38 +01:00
gauthier
885797b748 FIX : useless join 2019-03-14 17:00:51 +01:00
Laurent Destailleur
42de3a0cde Merge pull request #10838 from atm-john/9.0_missing_hook_export_agenda
FIX missing hook in agenda export
2019-03-14 16:54:55 +01:00
Frédéric FRANCE
b67429218d Update html.formmail.class.php
Conflicts:
	htdocs/core/class/html.formmail.class.php
2019-03-14 16:52:16 +01:00
Laurent Destailleur
8410d59182 FIX Missing field "In sale" in list 2019-03-14 16:16:50 +01:00
John BOTELLA
31e588dbab fix hookmanager global 2019-03-14 16:13:32 +01:00
Laurent Destailleur
5ccfba1210 FIX Edit of personalized groups
Conflicts:
	htdocs/accountancy/admin/categories.php
2019-03-14 16:06:20 +01:00
John BOTELLA
8bc795c055 Fix missing hook for export agenda 2019-03-14 15:19:38 +01:00
Laurent Destailleur
feaca165ad Merge pull request #10809 from joanlouis/fix-extrafields-calls-from-cards-8
Fix extrafields calls from cards for Dolibarr 8 See #10803
2019-03-14 14:22:31 +01:00
Laurent Destailleur
3073567763 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-03-14 14:17:52 +01:00
Laurent Destailleur
b65c791043 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-03-14 14:15:45 +01:00
Laurent Destailleur
d7735ff272 FIX #10822 2019-03-14 14:15:35 +01:00
Laurent Destailleur
7b8b6bb02f Merge pull request #10804 from hregis/9.0_merge
FIX possibility to set up payment mode when invoice module is disabled
2019-03-14 14:09:00 +01:00
gauthier
a524bbc5c6 FIX : when we create deposit with multi tva, we mustn't add line if amount = 0 (example when we have a 100% reduc on one of origin invoice line) 2019-03-13 15:59:41 +01:00
Laurent Destailleur
9da84f68c7 Bad language file for civility order 2019-03-13 14:23:27 +01:00
Laurent Destailleur
c32551cb62 Fix size of varchar 2019-03-13 13:42:14 +01:00
Laurent Destailleur
88c02143fa Fix missing fields 2019-03-13 13:40:57 +01:00
Laurent Destailleur
c2063c5d0b Fix bad translation 2019-03-12 18:24:55 +01:00
Marc de Lima Lucio
36b44b1348 FIX: several hooks in shipping/delivery cards 2019-03-12 11:28:36 +01:00
Joan Louis
17647de4cc Fix extrafields calls from cards for Dolibarr 8 See #10803 2019-03-12 11:24:54 +01:00
Regis Houssin
47057b431d FIX translation 2019-03-12 07:56:22 +01:00
Regis Houssin
259fa0ac81 FIX check only if invoice module is enabled (bank is check after) 2019-03-12 07:42:25 +01:00
Regis Houssin
94c58072d7 FIX possibility to set up payment mode when invoice module is disabled 2019-03-12 07:29:29 +01:00
Joan Louis
f326c75be7 Update call to extrafields from cards 2019-03-11 21:34:16 +01:00
Laurent Destailleur
15cc21b89f Merge pull request #10783 from aspangaro/8.0_EBP_export-TXT
FIX: Accountancy - Format EBP import
2019-03-11 17:52:34 +01:00
Laurent Destailleur
717cfb350a Typo 2019-03-11 15:45:34 +01:00
atm-quentin
ab781c32c7 Wrong vat if deposit from propal with multiple vat 2019-03-11 11:28:25 +01:00
Laurent Destailleur
fa4467fb5f FIX Tooltip on click was ko on smartphone 2019-03-09 18:37:07 +01:00
Laurent Destailleur
441b577599 Add missing trans 2019-03-09 12:58:52 +01:00
Alexandre SPANGARO
49f72b6a9a Merge remote-tracking branch 'upstream/8.0' into 8.0_EBP_export-TXT 2019-03-09 05:50:16 +01:00
Laurent Destailleur
57b9be53b3 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/contrat/class/contrat.class.php
2019-03-09 00:44:31 +01:00
Laurent Destailleur
5596b2e9bf Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0
Conflicts:
	htdocs/fourn/class/fournisseur.facture.class.php
2019-03-09 00:02:56 +01:00
Laurent Destailleur
520387c03d Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/holiday/card.php
2019-03-09 00:01:29 +01:00
Laurent Destailleur
4022d5f529 FIX Can not create contract with numbering module without autogen rule 2019-03-08 23:58:04 +01:00
Laurent Destailleur
233bd4374a Fix phpcs 2019-03-08 19:52:26 +01:00
Laurent Destailleur
1a96a7a88f FIX More complete auto setup of barcode module
Add tooltip help on member setup module
2019-03-08 11:31:12 +01:00
Alexandre SPANGARO
d926657534 FIX: Accountancy - Format EBP import
Add doc
2019-03-08 10:57:14 +01:00
Laurent Destailleur
f82f29737e Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-03-07 20:46:14 +01:00
Laurent Destailleur
4135e11138 Merge pull request #10774 from frederic34/patch-3
phpcs fix v9
2019-03-07 20:46:02 +01:00
Frédéric FRANCE
d02cec9579 phpcs fix v9 2019-03-07 18:13:21 +01:00
Laurent Destailleur
d88fc8cf91 Fix bad link 2019-03-07 17:32:10 +01:00
Laurent Destailleur
0729a3b571 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-03-07 14:11:12 +01:00
Laurent Destailleur
9a9fd15077 Fix doxygen 2019-03-07 14:10:33 +01:00
Laurent Destailleur
02b8bc94e7 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-03-07 14:06:31 +01:00
Laurent Destailleur
d2f1d0cc33 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0
Conflicts:
	htdocs/fourn/class/fournisseur.facture.class.php
2019-03-07 14:06:11 +01:00
Laurent Destailleur
e96f84a3d6 Merge pull request #10765 from altatof/sd8
FIX : supplier discount was not retrieved when choosing a product
2019-03-07 13:26:44 +01:00
Laurent Destailleur
0349f9bfaa Update objectline_create.tpl.php 2019-03-07 13:26:25 +01:00
Laurent Destailleur
8685f82a41 Merge pull request #10767 from Toumaniere/9.0
Update libelle of user (making Mailman working correctly)
2019-03-07 12:44:40 +01:00
Laurent Destailleur
a0bc6672d8 Try to avoid to make subquery when not necessary 2019-03-07 12:43:17 +01:00
Laurent Destailleur
2ae3d75df4 Merge pull request #10752 from atm-gauthier/7.0_fix_fourninvoice_specialcode
FIX : we need to keep originline special_code
2019-03-07 12:29:00 +01:00
Laurent Destailleur
e3fb228a4d Update fournisseur.facture.class.php 2019-03-07 12:28:19 +01:00
Laurent Destailleur
96d4e28473 FIX Vat src code lost after editing expense report line 2019-03-07 11:08:01 +01:00
Laurent Destailleur
2cd09aaf09 Prepare version 9.0.2 2019-03-07 10:57:15 +01:00
Laurent Destailleur
c513116717 FIX missing vat_src_code when inserting an expense report line 2019-03-07 10:56:48 +01:00
Timoté Fallais
c31318f29d Update libelle of user (making Mailman working correctly) 2019-03-07 09:15:43 +01:00
Christophe Battarel
96b8da0d62 fix supllier discount 2019-03-06 22:04:01 +01:00
Laurent Destailleur
b15e00cae7 FIX Autodetect buy price for invoices autogenerated with templates. 2019-03-06 21:39:09 +01:00
Laurent Destailleur
31c296f44b Fix bad tooltip to rm file 2019-03-06 20:01:21 +01:00
Laurent Destailleur
ddc3478156 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2019-03-06 19:14:15 +01:00
Laurent Destailleur
e163849d05 Fix label 2019-03-06 19:13:59 +01:00
gauthier
0ff2905180 FIX : we need to keep originline special_code 2019-03-06 12:10:24 +01:00
Laurent Destailleur
9ad1597fcc Merge pull request #10747 from atm-gauthier/9.0_fix_extrafields_always_visible_in_view_mode
FIX : extrafields always visible on view mode
2019-03-05 18:54:51 +01:00
Laurent Destailleur
22bb62d900 Merge pull request #10737 from atm-gauthier/6.0_fix_wrong_redirect_link
FIX : wrong redirect link on holiday refuse
2019-03-05 18:43:57 +01:00
Laurent Destailleur
3db8218cba Merge pull request #10745 from frederic34/patch-6
add session newtoken
2019-03-05 18:41:50 +01:00
Laurent Destailleur
c06d2f6c3b Remove warning 2019-03-05 18:22:03 +01:00
gauthier
598d1fc914 FIX : extrafields always visible on view mode 2019-03-05 16:53:36 +01:00
Frédéric FRANCE
1bbf6737ec add session newtoken 2019-03-05 15:27:31 +01:00
gauthier
dada8c8ff5 FIX : wrong redirect link on holiday refuse 2019-03-04 17:23:29 +01:00
atm-quentin
dc7a2fbb30 FIX placement function 2019-02-25 10:01:26 +01:00
atm-quentin
7850925441 FIX amount opened on thirdparty card dont care of credit note not converted 2019-02-22 15:10:41 +01:00
atm-quentin
57fff10766 Merge branch '8.0' of https://github.com/Dolibarr/dolibarr into FIX_credit_note_used_on_list 2019-02-22 15:10:29 +01:00
atm-quentin
b6deda1111 FIX credit note used on list 2019-02-18 12:28:18 +01:00
gauthier
2142ccee8a FIX : better method 2019-02-08 15:17:40 +01:00
Laurent Destailleur
d59b1bb0c6 Merge 2018-11-23 11:44:07 +01:00
Laurent Destailleur
9d582a53ca Fix compatibility with new mysql versions 2018-11-23 11:28:28 +01:00
gauthier
d6a9da57e1 FIX : need to round with 2 decimals to avoid movements not correctly balanced 2018-10-01 14:11:19 +02:00
337 changed files with 7896 additions and 5608 deletions

10
.stickler.yml Normal file
View File

@@ -0,0 +1,10 @@
---
linters:
phpcs:
standard: 'dev/setup/codesniffer/ruleset.xml'
extensions: 'php'
tab_width: 4
fixer: true
fixers:
enable: true

View File

@@ -3,6 +3,7 @@
# For syntax, see http://about.travis-ci.org/docs/user/languages/php/
# We use dist: trusty to have php 5.4+ available
os: linux
dist: trusty
sudo: required
@@ -119,6 +120,7 @@ install:
composer self-update
composer -n init
composer -n config vendor-dir htdocs/includes
composer -n config -g vendor-dir htdocs/includes
echo
- |
@@ -299,7 +301,7 @@ script:
# Ensure we catch errors
set -e
#parallel-lint --exclude htdocs/includes --blame .
parallel-lint --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared --exclude htdocs/includes/sebastian --exclude htdocs/includes/squizlabs/php_codesniffer/tests --exclude htdocs/includes/jakub-onderka/php-parallel-lint/tests --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/php-token-stream/tests --exclude htdocs/includes/composer/autoload_static.php --blame .
parallel-lint --exclude htdocs/includes/myclabs --exclude htdocs/includes/webmozart --exclude htdocs/includes/phpspec --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared --exclude htdocs/includes/sebastian --exclude htdocs/includes/squizlabs/php_codesniffer/tests --exclude htdocs/includes/jakub-onderka/php-parallel-lint/tests --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/php-token-stream/tests --exclude htdocs/includes/composer/autoload_static.php --blame .
set +e
echo

253
ChangeLog
View File

@@ -3,6 +3,140 @@ English Dolibarr ChangeLog
--------------------------------------------------------------
***** ChangeLog for 9.0.4 compared to 9.0.3 *****
FIX: #5249
FIX: #11025
FIX: #11032
FIX: #11097
FIX: #11169
FIX: #11202
FIX: #11244
FIX: #11296
FIX: #11316
FIX: #11335
FIX: Add missing end date of subscription in export
FIX: A user may read holiday and expense report without permissions
FIX: better syntax
FIX: condition
FIX: confirmation of mass email sending + option MAILING_NO_USING_PHPMAIL
FIX: crabe pdf: bad detailed VAT for situation invoices, in situations S2 and above
FIX: default value for duration of validity can be set from generic
FIX: do not include tpl from disabled modules
FIX: Error management when MAILING_NO_USING_PHPMAIL is set
FIX: Even with permission, can't validate leave once validator defined.
FIX: extrafield list search: SQL error when field is multiselect
FIX: if last char of customercode is accent making the truncate of first
FIX: Import of chart of account
FIX: in edit mode, dictionary inputs do not escape the string inside the 'value' attribute, causing errors if there are any double quotes
FIX: invalid link on user.fk_user
FIX: invoice class: bad SQL request if product type not set
FIX: javascript error when ckeditor module not enabled
FIX: mail presend: can overwrite a file previously uploaded (Issue #11056)
FIX: mass send mail
FIX: missing compatibility with multicompany transverse mode
FIX: missing llx_const encrypt
FIX: modulebuilder: hardcoded llx_
FIX: Not showing Contract and Project columns on ficheinter list
FIX: only profid1 to 4 were editable for pdf option to show. Not 5 and 6.
FIX: productaccount buylist with pages
FIX: remove isolated transaction commit
FIX: security (a user can read leave or holiday of other without perm.
FIX: situation invoices: bad detailed VAT in situations following the first one
FIX: situation invoices: block progress percentage change for discount lines
FIX: syntax error
FIX: the id was not loaded in fetch of accounting system
FIX: try to use WHERE EXISTS instead of DISTINCT
FIX: use dol_sanitizeFileName() function to remove double spaces in filenames, as well as done on document.php when we want to download pdf
FIX: Use of cron with multicompany
FIX: var name
FIX: we need to fetch fourn invoice with ref in current entity
FIX: Wrong stock movement on supplier credit notes
FIX: Import of record in ledger
***** ChangeLog for 9.0.3 compared to 9.0.2 *****
FIX: #11013
FIX: #11041
FIX: actioncomm: sort events by date after external calendars and hook (into 7.0)
FIX: better test
FIX: Combo list was limited to 20 in stock correction
FIX: Confusion between expired and late
FIX: Cursor pointer in payment screen for autofill
FIX: CVE-2019-11199
FIX: CVE-2019-11200
FIX: CVE-2019-11201
FIX: Default value on form to send email
FIX: error messages not displayed
FIX: Massive debug in lettering function
FIX: missing compatibility with multicompany
FIX: missing global $user
FIX: missing situation invoice in list
FIX: MultiEntity in lettering functionality
FIX: Product accountancey sell intra code must be visible if main feature level 1
FIX: ref for table without ref manager are set to NULL.
FIX: Sending email to mass actions send same email on same customer
FIX: Several fixes on import of services/products
FIX: shipping default warehouse if only one warehouse
FIX: sortfield on lettering function
FIX: Status of opportunity should never be -1
FIX: test to display create invoice button on supplier_order card
FIX: The autocopy feature was ko for suppliers
FIX: Total per day in timespent per week
FIX: Total per day shows 00:00 if the total time spent is equal to 12:00
FIX: Update/delete currency on same languages
FIX: Wrong variable name make contact of supplier order not used on PDF.
FIX: Add hidden option MAIN_PDF_HIDE_SITUATION to hide situation (quick hack to fix output pb).
FIX: attached files list with link file was broked
***** ChangeLog for 9.0.2 compared to 9.0.1 *****
FIX: #10822
FIX: Accountancy - Format EBP import
FIX: A page of a site replaced with another when switching in edit mode
FIX: Autodetect buy price for invoices autogenerated with templates.
FIX: Avoid error 500 when extension php-intl not loaded
FIX: bad check on type of expense report (mandatory status not working)
FIX: Bad label of status for members (must be short version in list)
FIX: Can not create contract with numbering module without autogen rule
FIX: Can't set default value of extrafield of type varchar
FIX: check only if invoice module is enabled (bank is check after)
FIX: counter of permissions in badge was wrong
FIX: default value of language of thirdparty
FIX: Don't show accountingjournal:getNomUrl without data
FIX: Duplicate executeHook function
FIX: Edit of personalized groups
FIX: Error with various & salary payment on project
FIX: extrafields always visible on view mode
FIX: function not found
FIX: If we build one invoice for several orders, we must put the ref of
orders on lines.
FIX: expensereport must be in $check array
FIX: missing entity filter and wrong var name
FIX: Missing field "In sale" in list
FIX: missing hook completeTabsHead in margins module
FIX: missing hook in agenda export
FIX: missing vat_src_code when inserting an expense report line
FIX: More complete auto setup of barcode module
FIX: need to round with 2 decimals to avoid movements not correctly balanced
FIX: no need to test anything to display documents tabs on expense report
FIX: old export models was not visible
FIX: Param keepn must be 1 when dol_escape_htmltag used for textarea
FIX: possibility to set up payment mode when invoice module is disabled
FIX: problem with sign of various payment in project preview
FIX: Remane of project
FIX: setup of module export
FIX: several hooks in shipping/delivery cards
FIX: supplier discount was not retrieved when choosing a product
FIX: The minimum amount filter does not work in the VAT report per customer
FIX: Tooltip on click was ko on smartphone
FIX: translation
FIX: useless join
FIX: Vat src code lost after editing expense report line
FIX: we need to keep originline special_code
FIX: Can't insert if there is extrafields mandatory on another entity.
FIX: error in create object when 2 extra fields are mandatory in 2 different entities
FIX: when we create deposit with multi tva, we mustn't add line if amount = 0 (example when we have a 100% reduc on one of origin invoice line)
FIX: wrong redirect link on holiday refuse
NEW: Add more complete error messages in log on stripe payments
***** ChangeLog for 9.0.1 compared to 9.0.0 *****
FIX: #10381
FIX: #10460 compatibility with MariaDB 10.4
@@ -171,6 +305,125 @@ Following changes may create regressions for some external modules, but were nec
* Remove the no more used and deprecated dol_print_graph function
***** ChangeLog for 8.0.6 compared to 8.0.5 *****
FIX: #11244
FIX: #11316
FIX: Add missing end date of subscription in export
FIX: A user may read holiday and expense report without permissions
FIX: better syntax
FIX: condition
FIX: confirmation of mass email sending + option MAILING_NO_USING_PHPMAIL
FIX: crabe pdf: bad detailed VAT for situation invoices, in situations S2 and above
FIX: default value for duration of validity can be set from generic
FIX: do not include tpl from disabled modules
FIX: Error management when MAILING_NO_USING_PHPMAIL is set
FIX: Even with permission, can't validate leave once validator defined.
FIX: extrafield list search: SQL error when field is multiselect
FIX: if last char of customercode is accent making the truncate of first
FIX: in edit mode, dictionary inputs do not escape the string inside the 'value' attribute, causing errors if there are any double quotes
FIX: invalid link on user.fk_user
FIX: invoice class: bad SQL request if product type not set
FIX: mail presend: can overwrite a file previously uploaded
FIX: mail presend: can overwrite a file previously uploaded (Issue #11056)
FIX: mass send mail
FIX: missing compatibility with multicompany transverse mode
FIX: modulebuilder: hardcoded llx_
FIX: Not showing Contract and Project columns on ficheinter list
FIX: remove isolated transaction commit
FIX: security (a user can read leave or holiday of other without perm.
FIX: situation invoices: bad detailed VAT in situations following the first one
FIX: situation invoices: block progress percentage change for discount lines
FIX: syntax error
FIX: try to use WHERE EXISTS instead DISTINCT
FIX: use dol_sanitizeFileName() function to remove double spaces in filenames, as well as done on document.php when we want to download pdf
FIX: var name
FIX: we need to fetch fourn invoice with ref in current entity
FIX: Wrong stock movement on supplier credit notes
***** ChangeLog for 8.0.5 compared to 8.0.4 *****
FIX: #10381
FIX: #10460 compatibility with MariaDB 10.4
FIX: #11025
FIX: Accountancy - Add transaction with multicompany use all the time 1st entity
FIX: Accountancy - Format EBP import
FIX: actioncomm export: ORDER BY clause is in wrong export property + event type filter does not work
FIX: actioncomm: sort events by date after external calendars and hook
FIX: action list: add printFieldListSelect and printFieldListWhere hooks
FIX: add fk_unit on addline action
FIX: avoid php warning
FIX: bad sql request
FIX: better method
FIX: better test
FIX: better test on fetch
FIX: broken external authentication module feature and avoid warning
FIX: Can not create contract with numbering module without autogen rule
FIX: can't add lines on invoices
FIX: Can't generate invoice pdf
FIX: Can't insert if there is extrafields mandatory on another entity.
FIX: Can't insert if there is extrafields mandatory on another entity. FIX: Can't set default value of extrafield of type varchar
FIX: Check for old picture name if the new one was not found
FIX: Civility not saved when creating a member.
FIX: $conf->fournisseur->commande->enabled doesn't exist, we must use $conf->fournisseur->enabled
FIX: could not create several superadmin in transversal mode
FIX: credit note can have negative value
FIX: Default value on sales representative on third party creation
FIX: Don't show journal:getNomUrl without data
FIX: Erreur dans le Total
FIX: error messages not displayed
FIX: expedition: reset status on rollback + replace hardcoded status with const
FIX: Fix PHP warning "count(): Parameter must be an array..."
FIX: fk_default_warehouse missing in group by
FIX: function sendEmailsReminder isn't completely developed, then MAIN_FEATURES_LEVEL must be 2 to "use" it
FIX: holidays get natural_search if search params are set only
FIX: if empty error message, we just see "error" displayed
FIX: if(!method_exists(dol_loginfunction))
FIX: If we build one invoice for several orders, we must put the ref of order on the line to not lose information.
FIX: in fact expensereport must be in $check array
FIX: Interface regression for bind people. Fix option MAIN_OPTIMIZEFORTEXTBROWSER
FIX: line edit template: keep fk_parent_line
FIX: Loan impossible to account
FIX: Mark credit note as available for credit note in other currency
FIX: missing access security checking with multicompany
FIX: missing entity filter and wrong var name
FIX: missing entity filter in function "build_filterField()" (export)
FIX: Missing field in import/export of users
FIX: missing hook completeTabsHead in margins module
FIX: missing $ismultientitymanaged for previous/next ref
FIX: Missing province in export of invoice
FIX: multicompany compatibility
FIX: must fetch member in current entity
FIX: need an order by in case we found other invoice with same number but not same date
FIX: need to round with 2 decimals to avoid movements not correctly balanced
FIX: no need to test anything to display documents tabs on expense report
FIX: positive values creating diff on addline rounding
FIX: problem with multicompany transverse mode
FIX: Product accountancey sell intra code must be visible if main feature level 1
FIX: project_title for display of getNomUrl()
FIX: quick search for supplier orders
FIX: Remane of project
FIX: same thing here
FIX: Selection of email recipient with option MAIN_OPTIMIZEFORTEXTBROWSER
FIX: several hooks in shipping/delivery cards
FIX: shipping default warehouse if only one warehouse
FIX: SQL injection on rowid of dict.php
FIX: 'statut' is ignored when updating a user with the REST API.
FIX: supplier invoice payment total dont care about deposit or credit
FIX: supplier invoice product stats total ht is line total not invoice total
FIX: The minimum amount filter does not work in the VAT report per customer
FIX: Total per day shows 00:00 if the total time spent is equal to 12:00
FIX: Update/delete currency on same languages
FIX: [URGENT] broken feature, "$usercancreate" is for Dolibarr 9
FIX: useless join
FIX: we need to keep originline special_code
FIX: we want to be able to reopen fourn credit note
FIX: when 2 extra fields are mandatory in 2 different entities
FIX: when we add a payment on an invoice which already has payments with credit note or deposit amount, and then we get an excess received, discount amount must be $total_paiements + $total_creditnote_and_deposit - $object->total_ttc;
FIX: when we create deposit with multi tva, we mustn't add line if amount = 0 (example when we have a 100% reduc on one of origin invoice line)
FIX: wrong redirect link on holiday refuse
FIX: wrong test enabled
FIX: Wrong variable name
FIX: XSS
***** ChangeLog for 8.0.4 compared to 8.0.3 *****
FIX: #10030 better german chart
FIX: #10036

View File

@@ -47,7 +47,7 @@ You can use a Web server and a supported database (MariaDB, MySQL or PostgreSQL)
git clone https://github.com/dolibarr/dolibarr -b x.y (where x.y is main version like 3.6, 9.0, ...)
- Set up your web server to use "*dolibarr/htdocs*" as root if you'r web server does not have directory to point to already defined.
- Set up your web server to use "*dolibarr/htdocs*" as root if your web server does not have an already defined directory to point to.
- Create an empty `htdocs/conf/conf.php` file and set *write* permissions for your web server user (*write* permission will be removed once install is finished)

View File

@@ -72,7 +72,7 @@ while ($i < $argc)
if (empty($release))
{
print "Error: Missing release paramater\n";
print "Error: Missing release parameter\n";
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
exit -1;
}
@@ -121,6 +121,7 @@ else
}
print "Release : ".$release."\n";
print "Working on files into : ".DOL_DOCUMENT_ROOT."\n";
print "Include custom in signature : ".$includecustom."\n";
print "Include constants in signature : ";
foreach ($includeconstants as $countrycode => $tmp)
@@ -163,7 +164,7 @@ $iterator1 = new RecursiveIteratorIterator($dir_iterator1);
// 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)$';
$regextoinclude='\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
$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='';

View File

@@ -357,16 +357,16 @@ if ($nboftargetok) {
}
else
{
print "ChangeLog for $MAJOR.$MINOR\.$BUILD was found into '$SOURCE/ChangeLog. But you can regenerate it with command:'\n";
print "ChangeLog for $MAJOR.$MINOR\.$BUILD was found into '$SOURCE/ChangeLog'. But you can regenerate it with command:\n";
}
if (! $BUILD || $BUILD eq '0-rc') # For a major version
{
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 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 `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\|CLOSE\' | 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';
}
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).'.. | 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 '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\|CLOSE\' | 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";
@@ -387,6 +387,8 @@ if ($nboftargetok) {
#-----------------------
if ($CHOOSEDTARGET{'-CHKSUM'})
{
chdir("$SOURCE");
$ret=`git ls-files . --exclude-standard --others`;
if ($ret)
{

View File

@@ -60,8 +60,8 @@ $accountingcategory = new AccountancyCategory($db);
// si ajout de comptes
if (! empty($selectcpt)) {
$cpts = array ();
foreach ( $selectcpt as $selectedoption ) {
$cpts = array();
foreach ($selectcpt as $selectedoption) {
if (! array_key_exists($selectedoption, $cpts))
$cpts[$selectedoption] = "'" . $selectedoption . "'";
}
@@ -71,13 +71,13 @@ if (! empty($selectcpt)) {
if ($return<0) {
setEventMessages($langs->trans('errors'), $accountingcategory->errors, 'errors');
} else {
setEventMessages($langs->trans('SetupSaved'), null, 'mesgs');
setEventMessages($langs->trans('RecordModifiedSuccessfully'), null, 'mesgs');
}
}
if ($action == 'delete') {
if ($cpt_id) {
if ($accountingcategory->deleteCptCat($cpt_id)) {
setEventMessages($langs->trans('CategoryDeleted'), null, 'mesgs');
setEventMessages($langs->trans('AccountRemovedFromGroup'), null, 'mesgs');
} else {
setEventMessages($langs->trans('errors'), null, 'errors');
}
@@ -173,8 +173,9 @@ if ($action == 'display' || $action == 'delete') {
print '<td>' . $cpt->label . '</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 $langs->trans("DeleteFromCat");
print img_picto($langs->trans("DeleteFromCat"), 'unlink');
print "</a>";
print "</td>";
print "</tr>\n";
}

View File

@@ -65,6 +65,8 @@ $accounting_product_mode = GETPOST('accounting_product_mode', 'alpha');
$btn_changeaccount = GETPOST('changeaccount', 'alpha');
$btn_changetype = GETPOST('changetype', 'alpha');
if (empty($accounting_product_mode)) $accounting_product_mode='ACCOUNTANCY_SELL';
$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');
@@ -112,8 +114,6 @@ if ($action == 'update') {
'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)) {
@@ -279,7 +279,8 @@ 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);
if ($accounting_product_mode) $param.="&accounting_product_mode=".urlencode($accounting_product_mode);
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'].'">';

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-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2016-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
@@ -164,7 +164,7 @@ if ($action == 'export_csv')
print $object->get_compte_desc($line->numero_compte) . $sep;
print price($line->debit) . $sep;
print price($line->credit) . $sep;
print price($line->credit - $line->debit) . $sep;
print price($line->debit - $line->credit) . $sep;
print "\n";
}
@@ -235,7 +235,7 @@ if ($action != 'export_csv')
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">';
print '<td class="liste_titre right">';
$searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto;
print '</td>';
@@ -274,7 +274,7 @@ if ($action != 'export_csv')
{
// 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(price2num($sous_total_credit - $sous_total_debit)) . '</td>';
print '<tr class="liste_total"><td class="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap right">' . price($sous_total_debit) . '</td><td class="nowrap right">' . price($sous_total_credit) . '</td><td class="nowrap right">' . price(price2num($sous_total_credit - $sous_total_debit)) . '</td>';
print "<td>&nbsp;</td>\n";
print '</tr>';
}
@@ -293,10 +293,10 @@ if ($action != 'export_csv')
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 class="nowrap right">' . price($line->debit) . '</td>';
print '<td class="nowrap right">' . price($line->credit) . '</td>';
print '<td class="nowrap right">' . price($line->debit - $line->credit) . '</td>';
print '<td class="center">' . $link;
print '</td>';
print "</tr>\n";
@@ -305,11 +305,11 @@ if ($action != 'export_csv')
$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(price2num($sous_total_credit - $sous_total_debit)) . '</td>';
print '<tr class="liste_total"><td class="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap right">' . price($sous_total_debit) . '</td><td class="nowrap right">' . price($sous_total_credit) . '</td><td class="nowrap right">' . price(price2num($sous_total_debit - $sous_total_credit)) . '</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(price2num($total_credit - $total_debit)) . '</td>';
print '<tr class="liste_total"><td class="right" colspan="2">' . $langs->trans("AccountBalance") . ':</td><td class="nowrap right">' . price($total_debit) . '</td><td class="nowrap right">' . price($total_credit) . '</td><td class="nowrap right">' . price(price2num($total_debit - $total_credit)) . '</td>';
print "<td>&nbsp;</td>\n";
print '</tr>';

View File

@@ -641,8 +641,8 @@ if ($action == 'create')
print '<td>' . $accountingaccount->getNomUrl(0,1,1,'',0) . '</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 class="nowrap right">' . price($line->debit) . '</td>';
print '<td class="nowrap right">' . price($line->credit) . '</td>';
print '<td align="center">';
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=update&id=' . $line->id . '&piece_num=' . $line->piece_num . '&mode='.$mode.'">';
@@ -661,8 +661,8 @@ if ($action == 'create')
print "</tr>\n";
}
$total_debit = price2num($total_debit);
$total_credit = price2num($total_credit);
$total_debit = price2num($total_debit, 'MT');
$total_credit = price2num($total_credit, 'MT');
if ($total_debit != $total_credit)
{
@@ -675,7 +675,7 @@ if ($action == 'create')
print $formaccounting->select_account($accountingaccount_number, 'accountingaccount_number', 1, array (), 1, 1, '');
print '</td>';
print '<td>';
// TODO For the moment we keep a fre input text instead of a combo. The select_auxaccount has problem because it does not
// TODO For the moment we keep a free 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))
{

View File

@@ -683,7 +683,7 @@ if ($num > 0)
// Amount debit
if (! empty($arrayfields['t.debit']['checked']))
{
print '<td align="right">' . ($line->debit ? price($line->debit) : ''). '</td>';
print '<td class="nowrap right">' . ($line->debit ? price($line->debit) : ''). '</td>';
if (! $i) $totalarray['nbfield']++;
if (! $i) $totalarray['totaldebitfield']=$totalarray['nbfield'];
$totalarray['totaldebit'] += $line->debit;
@@ -692,7 +692,7 @@ if ($num > 0)
// Amount credit
if (! empty($arrayfields['t.credit']['checked']))
{
print '<td align="right">' . ($line->credit ? price($line->credit) : '') . '</td>';
print '<td class="nowrap right">' . ($line->credit ? price($line->credit) : '') . '</td>';
if (! $i) $totalarray['nbfield']++;
if (! $i) $totalarray['totalcreditfield']=$totalarray['nbfield'];
$totalarray['totalcredit'] += $line->credit;
@@ -754,8 +754,8 @@ if ($num > 0)
if ($num < $limit && empty($offset)) print '<td align="left">'.$langs->trans("Total").'</td>';
else print '<td align="left">'.$langs->trans("Totalforthispage").'</td>';
}
elseif ($totalarray['totaldebitfield'] == $i) print '<td align="right">'.price($totalarray['totaldebit']).'</td>';
elseif ($totalarray['totalcreditfield'] == $i) print '<td align="right">'.price($totalarray['totalcredit']).'</td>';
elseif ($totalarray['totaldebitfield'] == $i) print '<td class="nowrap right">'.price($totalarray['totaldebit']).'</td>';
elseif ($totalarray['totalcreditfield'] == $i) print '<td class="nowrap right">'.price($totalarray['totalcredit']).'</td>';
else print '<td></td>';
}
print '</tr>';

View File

@@ -3,8 +3,8 @@
* 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-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2013-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.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,17 +30,19 @@ 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 . '/accountancy/class/accountingjournal.class.php';
require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
// Load translation files required by the page
$langs->loadLangs(array("compta","accountancy"));
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action', 'aZ09');
$massaction = GETPOST('massaction', 'alpha');
$show_files = GETPOST('show_files', 'int');
$confirm = GETPOST('confirm', 'alpha');
$toselect = GETPOST('toselect', 'array');
$confirm = GETPOST('confirm', 'alpha');
$toselect = GETPOST('toselect', 'array');
$socid = GETPOST('socid','int')?GETPOST('socid','int'):GETPOST('id','int');
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
@@ -53,26 +55,31 @@ $offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if ($sortorder == "")
$sortorder = "DESC";
$sortorder = "ASC";
if ($sortfield == "")
$sortfield = "bk.doc_date";
$search_year = GETPOST("search_year", 'int');
$search_doc_type = GETPOST("search_doc_type", 'alpha');
/*
$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');
$search_doc_ref = GETPOST("search_doc_ref", 'alpha');
*/
$lettering = GETPOST('lettering', 'alpha');
if (! empty($lettering)) {
$action = $lettering;
}
// Did we click on purge search criteria ?
// 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')) {
$search_year = '';
$search_doc_type = '';
/*
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_date_start = '';
$search_date_end = '';
//$search_doc_type = '';
$search_doc_ref = '';
}
*/
// Security check
$socid = GETPOST("socid", 'int');
@@ -102,6 +109,7 @@ if ($action == 'lettering') {
}
}
/*
if ($action == 'autolettrage') {
$result = $lettering->letteringThirdparty($socid);
@@ -111,9 +119,9 @@ if ($action == 'autolettrage') {
$error++;
}
}
*/
/*
/*
* View
*/
@@ -136,20 +144,19 @@ dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'n
dol_fiche_end();
print '<br>';
$sql = "SELECT bk.rowid, bk.doc_date, bk.doc_type, bk.doc_ref, ";
$sql .= " bk.subledger_account, bk.numero_compte , bk.label_compte, bk.debit, ";
$sql .= " 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.subledger_account = '" . $object->code_compta . "' AND bk.numero_compte = '" . $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER . "' )";
if (dol_strlen($search_year)) {
$date_start = dol_mktime(0, 0, 0, 1, 1, $search_year);
$date_end = dol_mktime(23, 59, 59, 12, 31, $search_year);
$sql .= " AND ( bk.doc_date BETWEEN '" . $db->idate($date_start) . "' AND '" . $db->idate($date_end) . "' )";
/*
if (dol_strlen($search_date_start) || dol_strlen($search_date_end)) {
$sql .= " AND ( bk.doc_date BETWEEN '" . $db->idate($search_date_start) . "' AND '" . $db->idate($search_date_end) . "' )";
}
*/
$sql.= ' AND bk.entity IN ('.getEntity('accountingbookkeeping').')';
$sql .= $db->order($sortfield, $sortorder);
$debit = 0;
@@ -180,92 +187,123 @@ if (! $resql) {
exit();
}
$param='';
$param.="&socid=".urlencode($socid);
$num = $db->num_rows($resql);
dol_syslog("/accountancy/bookkeeping/thirdparty_lettering_customer.php", LOG_DEBUG);
if ($resql) {
$i = 0;
$param="&socid=".$socid;
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '?socid=' . $object->id . '" method="POST">';
print '<input type="hidden" name="socid" value="' . $object->id . '">';
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies', 0, '', '', $limit);
$letteringbutton = '<a class="divButAction"><span class="valignmiddle"><input class="butAction" type="submit" value="lettering" name="lettering" id="lettering"></span></a>';
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies', 0, $letteringbutton, '', $limit);
print '<div class="div-table-responsive-no-min">';
print '<table class="liste" width="100%">'."\n";
/*
print '<tr class="liste_titre">';
//print '<td><input type="text" name="search_doc_type" value="' . $search_doc_type . '"></td>';
// Date
print '<td class="liste_titre center">';
print '<div class="nowrap">';
print $langs->trans('From') . ' ';
print $form->selectDate($search_date_start, 'date_creation_start', 0, 0, 1);
print '</div>';
print '<div class="nowrap">';
print $langs->trans('to') . ' ';
print $form->selectDate($search_date_end, 'date_creation_end', 0, 0, 1);
print '</div>';
print '</td>';
// Piece
print '<td><input type="text" name="search_doc_ref" value="' . $search_doc_ref . '"></td>';
print '<td colspan="6">&nbsp;</td>';
print '<td class="right">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';
print '</tr>';
*/
print "<table class=\"noborder\" width=\"100%\">";
print '<tr class="liste_titre">';
print_liste_field_titre("Doctype", $_SERVER["PHP_SELF"], "bk.doc_type", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Docdate", $_SERVER["PHP_SELF"], "bk.doc_date", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Docref", $_SERVER["PHP_SELF"], "bk.doc_ref", "", $param, "", $sortfield, $sortorder);
//print_liste_field_titre("Doctype", $_SERVER["PHP_SELF"], "bk.doc_type", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Docdate", $_SERVER["PHP_SELF"], "bk.doc_date", "", $param, "", $sortfield, $sortorder, 'center ');
print_liste_field_titre("Piece", $_SERVER["PHP_SELF"], "bk.doc_ref", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("LabelAccount", $_SERVER["PHP_SELF"], "bk.label_compte", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Debit", $_SERVER["PHP_SELF"], "bk.debit", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Credit", $_SERVER["PHP_SELF"], "bk.credit", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Balancing", $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Codejournal", $_SERVER["PHP_SELF"], "bk.code_journal", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("LetteringCode", $_SERVER["PHP_SELF"], "bk.lettering_code", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Codejournal", $_SERVER["PHP_SELF"], "bk.code_journal", "", $param, "", $sortfield, $sortorder, 'center ');
print_liste_field_titre("LetteringCode", $_SERVER["PHP_SELF"], "bk.lettering_code", "", $param, "", $sortfield, $sortorder, 'center ');
print_liste_field_titre("", "","",'','',"",$sortfield,$sortorder,'maxwidthsearch center ');
print "</tr>\n";
print '<tr class="liste_titre">';
print '<td><input type="text" name="search_doc_type" value="' . $search_doc_type . '"></td>';
print '<td><input type="text" name="search_year" value="' . $search_year . '"></td>';
print '<td><input type="text" name="search_doc_refe" value="' . $search_doc_ref . '"></td>';
print '<td colspan="5">&nbsp;</td>';
print '<td align="right">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';
print '</tr>';
$solde = 0;
$tmp = '';
while ( $obj = $db->fetch_object($resql) ) {
while ( $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))*/ $solde += ($obj->credit - $obj->debit);
print '<tr class="oddeven">';
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_type . '</td>' . "\n";
print '<td class="center">' . dol_print_date($db->jdate($obj->doc_date), 'day') . '</td>';
print '<td>' . $obj->doc_ref . '</td>';
print '<td>' . $obj->label_compte . '</td>';
print '<td align="right">' . price($obj->debit) . '</td>';
print '<td align="right">' . price($obj->credit) . '</td>';
print '<td align="right">' . price(round($solde, 2)) . '</td>';
print '<td align="center">' . $obj->code_journal . '</td>';
print '<td class="right">' . price($obj->debit) . '</td>';
print '<td class="right">' . price($obj->credit) . '</td>';
print '<td class="right">' . price(round($solde, 2)) . '</td>';
if (empty($obj->lettering_code)) {
print '<td class="nowrap" align="center"><input type="checkbox" class="flat checkforselect" name="toselect[]" id="toselect[]" value="' . $obj->rowid . '" /></td>';
} else
print '<td align="center">' . $obj->lettering_code . '</td>';
// Journal
$accountingjournal = new AccountingJournal($db);
$result = $accountingjournal->fetch('',$obj->code_journal);
$journaltoshow = (($result > 0)?$accountingjournal->getNomUrl(0,0,0,'',0) : $obj->code_journal);
print '<td class="center">' . $journaltoshow . '</td>';
if (empty($obj->lettering_code)) {
print '<td class="nowrap center"><input type="checkbox" class="flat checkforselect" name="toselect[]" id="toselect[]" value="' . $obj->rowid . '" /></td>';
print '<td><a href="' . dol_buildpath('/accountancy/bookkeeping/card.php', 1) . '?piece_num=' . $obj->piece_num . '">';
print img_edit();
print '</a></td>' . "\n";
} else {
print '<td class="center">' . $obj->lettering_code . '</td>';
print '<td></td>';
}
print "</tr>\n";
}
print '<tr class="oddeven">';
print '<td align="right" colspan="4">'.$langs->trans("Total").':</td>' . "\n";
print '<td align="right"><strong>' . price($debit) . '</strong></td>';
print '<td align="right"><strong>' . price($credit) . '</strong></td>';
print '<td colspan="5"></td>';
print '<td class="right" colspan="3">'.$langs->trans("Total").':</td>' . "\n";
print '<td class="right"><strong>' . price($debit) . '</strong></td>';
print '<td class="right"><strong>' . price($credit) . '</strong></td>';
print '<td colspan="4"></td>';
print "</tr>\n";
print '<tr class="oddeven">';
print '<td align="right" colspan="4">'.$langs->trans("Balancing").':</td>' . "\n";
print '<td class="right" colspan="3">'.$langs->trans("Balancing").':</td>' . "\n";
print '<td colspan="2">&nbsp;</td>';
print '<td align="right"><strong>' . price($credit - $debit) . '</strong></td>';
print '<td colspan="3"></td>';
print '<td class="right"><strong>' . price($credit - $debit) . '</strong></td>';
print '<td colspan="6"></td>';
print "</tr>\n";
print "</table>";
print '<input class="butAction" type="submit" value="lettering" name="lettering" id="lettering">';
//print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?socid=' . $object->id . '&action=autolettering">' . $langs->trans('AccountancyAutoLettering') . '</a>';
print '<div class="tabsAction tabsActionNoBottom">'."\n";
print $letteringbutton;
print '</div>';
print "</form>";
$db->free($resql);
} else {

View File

@@ -3,8 +3,8 @@
* 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-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2013-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.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,17 +30,19 @@ 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 . '/accountancy/class/accountingjournal.class.php';
require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
// Load translation files required by the page
$langs->loadLangs(array("compta","accountancy"));
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action', 'aZ09');
$massaction = GETPOST('massaction', 'alpha');
$show_files = GETPOST('show_files', 'int');
$confirm = GETPOST('confirm', 'alpha');
$toselect = GETPOST('toselect', 'array');
$confirm = GETPOST('confirm', 'alpha');
$toselect = GETPOST('toselect', 'array');
$socid = GETPOST('socid','int')?GETPOST('socid','int'):GETPOST('id','int');
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
@@ -53,27 +55,31 @@ $offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if ($sortorder == "")
$sortorder = "DESC";
$sortorder = "ASC";
if ($sortfield == "")
$sortfield = "bk.doc_date";
$search_year = GETPOST("search_year",'int');
$search_doc_type = GETPOST("search_doc_type",'alpha');
/*
$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');
$search_doc_ref = GETPOST("search_doc_ref",'alpha');
*/
$lettering = GETPOST('lettering', 'alpha');
if (!empty($lettering)) {
$action=$lettering;
}
// Did we click on purge search criteria ?
// 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'))
/*
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_year='';
$search_doc_type='';
$search_date_start = '';
$search_date_end = '';
//$search_doc_type='';
$search_doc_ref='';
}
*/
// Security check
@@ -103,6 +109,7 @@ if ($action == 'lettering') {
}
}
/*
if ($action == 'autolettrage') {
$result = $lettering->letteringThirdparty($socid);
@@ -112,7 +119,7 @@ if ($action == 'autolettrage') {
$error++;
}
}
*/
/*
* View
@@ -143,12 +150,11 @@ $sql .= " bk.credit, bk.montant , bk.sens , bk.code_journal , bk.piece_num, bk.l
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk";
$sql .= " WHERE (bk.subledger_account = '" . $object->code_compta_fournisseur . "' AND bk.numero_compte = '" . $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER . "' )";
if (dol_strlen($search_year)) {
$date_start = dol_mktime(0, 0, 0, 1, 1, $search_year);
$date_end = dol_mktime(23, 59, 59, 12, 31, $search_year);
$sql .= " AND ( bk.doc_date BETWEEN '".$db->idate($date_start)."' AND '".$db->idate($date_end)."' )";
if (dol_strlen($search_date_start) || dol_strlen($search_date_end)) {
$sql .= " AND (bk.doc_date BETWEEN '".$db->idate($search_date_start)."' AND '".$db->idate($search_date_end)."' )";
}
$sql.= ' AND bk.entity IN ('.getEntity('accountingbookkeeping').')';
$sql.= $db->order($sortfield,$sortorder);
$debit = 0;
@@ -173,7 +179,7 @@ while ($obj = $db->fetch_object($resql)) {
$sql.= $db->plimit($limit+1, $offset);
dol_syslog ( "/accountancy/bookkeeping/thirdparty_lettrage_supplier.php", LOG_DEBUG );
dol_syslog ( "/accountancy/bookkeeping/thirdparty_lettering_supplier.php", LOG_DEBUG );
$resql = $db->query($sql);
if (! $resql)
{
@@ -181,43 +187,68 @@ if (! $resql)
exit;
}
$param='';
$param.="&socid=".urlencode($socid);
$num = $db->num_rows($resql);
dol_syslog ( "/accountancy/bookkeeping/thirdparty_lettrage_supplier.php", LOG_DEBUG );
dol_syslog ( "/accountancy/bookkeeping/thirdparty_lettering_supplier.php", LOG_DEBUG );
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
$param="&socid=".$socid;
print '<form name="add" action="'.$_SERVER["PHP_SELF"].'?socid=' . $object->id . '" method="POST">';
print '<input type="hidden" name="socid" value="' . $object->id . '">';
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies', 0, '', '', $limit);
$letteringbutton = '<a class="divButAction"><span class="valignmiddle"><input class="butAction" type="submit" value="lettering" name="lettering" id="lettering"></span></a>';
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies', 0, $letteringbutton, '', $limit);
print '<div class="div-table-responsive-no-min">';
print '<table class="liste" width="100%">'."\n";
/*
print '<tr class="liste_titre">';
//print '<td><input type="text" name="search_doc_type" value="' . $search_doc_type . '"></td>';
// Date
print '<td class="liste_titre center">';
print '<div class="nowrap">';
print $langs->trans('From') . ' ';
print $form->selectDate($search_date_start, 'date_creation_start', 0, 0, 1);
print '</div>';
print '<div class="nowrap">';
print $langs->trans('to') . ' ';
print $form->selectDate($search_date_end, 'date_creation_end', 0, 0, 1);
print '</div>';
print '</td>';
// Piece
print '<td><input type="text" name="search_doc_ref" value="' . $search_doc_ref . '"></td>';
print '<td colspan="6">&nbsp;</td>';
print '<td class="right">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';
print '</tr>';
*/
print "<table class=\"noborder\" width=\"100%\">";
print '<tr class="liste_titre">';
print_liste_field_titre("Doctype", $_SERVER["PHP_SELF"], "bk.doc_type","",$param,"",$sortfield,$sortorder);
print_liste_field_titre("Docdate", $_SERVER["PHP_SELF"], "bk.doc_date","",$param,"",$sortfield,$sortorder);
print_liste_field_titre("Docref", $_SERVER["PHP_SELF"], "bk.doc_ref","",$param,"",$sortfield,$sortorder);
print_liste_field_titre("LabelAccount", $_SERVER["PHP_SELF"], "bk.label_compte","",$param,"",$sortfield,$sortorder);
print_liste_field_titre("Debit", $_SERVER["PHP_SELF"], "bk.debit","",$param,"",$sortfield,$sortorder);
print_liste_field_titre("Credit", $_SERVER["PHP_SELF"], "bk.credit","",$param,"",$sortfield,$sortorder);
print_liste_field_titre("Balancing", $_SERVER["PHP_SELF"], "","",$param,"",$sortfield,$sortorder);
print_liste_field_titre("Codejournal", $_SERVER["PHP_SELF"], "bk.code_journal","",$param,"",$sortfield,$sortorder);
print_liste_field_titre("LetteringCode", $_SERVER["PHP_SELF"], "bk.lettering_code", "", $param, "", $sortfield, $sortorder);
//print_liste_field_titre("Doctype", $_SERVER["PHP_SELF"], "bk.doc_type", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Docdate", $_SERVER["PHP_SELF"], "bk.doc_date", "", $param, "", $sortfield, $sortorder, 'center ');
print_liste_field_titre("Piece", $_SERVER["PHP_SELF"], "bk.doc_ref", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("LabelAccount", $_SERVER["PHP_SELF"], "bk.label_compte", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Debit", $_SERVER["PHP_SELF"], "bk.debit", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Credit", $_SERVER["PHP_SELF"], "bk.credit", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Balancing", $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Codejournal", $_SERVER["PHP_SELF"], "bk.code_journal", "", $param, "", $sortfield, $sortorder, 'center ');
print_liste_field_titre("LetteringCode", $_SERVER["PHP_SELF"], "bk.lettering_code", "", $param, "", $sortfield, $sortorder, 'center ');
print_liste_field_titre("", "","",'','',"",$sortfield,$sortorder,'maxwidthsearch center ');
print "</tr>\n";
print '<tr class="liste_titre">';
print '<td><input type="text" name="search_doc_type" value="' . $search_doc_type . '"></td>';
print '<td><input type="text" name="search_year" value="' . $search_year . '"></td>';
print '<td><input type="text" name="search_doc_refe" value="' . $search_doc_ref . '"></td>';
print '<td colspan="6">&nbsp;</td>';
print '<td align="right">';
$searchpicto=$form->showFilterButtons();
print $searchpicto;
print '</td>';
print '</tr>';
$solde = 0;
$tmp = '';
while ($obj = $db->fetch_object($resql)) {
@@ -227,48 +258,53 @@ if ($resql) {
print '<tr class="oddeven">';
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_type . '</td>' . "\n";
print '<td class="center">' . dol_print_date($db->jdate($obj->doc_date), 'day') . '</td>';
print '<td>' . $obj->doc_ref . '</td>';
print '<td>' . $obj->label_compte . '</td>';
print '<td align="right">' . price($obj->debit) . '</td>';
print '<td align="right">' . price($obj->credit) . '</td>';
print '<td align="right">' . price(round($solde, 2)) . '</td>';
print '<td align="center">' . $obj->code_journal . '</td>';
print '<td class="right">' . price($obj->debit) . '</td>';
print '<td class="right">' . price($obj->credit) . '</td>';
print '<td class="right">' . price(round($solde, 2)) . '</td>';
// Journal
$accountingjournal = new AccountingJournal($db);
$result = $accountingjournal->fetch('',$obj->code_journal);
$journaltoshow = (($result > 0)?$accountingjournal->getNomUrl(0,0,0,'',0) : $obj->code_journal);
print '<td class="center">' . $journaltoshow . '</td>';
if (empty($obj->lettering_code)) {
print '<td class="nowrap" align="center"><input type="checkbox" class="flat checkforselect" name="toselect[]" id="toselect[]" value="' . $obj->rowid . '" /></td>';
} else
print '<td align="center">' . $obj->lettering_code . '</td>';
print '<td class="nowrap center"><input type="checkbox" class="flat checkforselect" name="toselect[]" id="toselect[]" value="' . $obj->rowid . '" /></td>';
print '<td><a href="' . dol_buildpath('/accountancy/bookkeeping/card.php', 1) . '?piece_num=' . $obj->piece_num . '">';
print img_edit();
print '</a></td>' . "\n";
} else {
print '<td class="center">' . $obj->lettering_code . '</td>';
print '<td></td>';
}
print "</tr>\n";
}
print '<tr class="oddeven">';
print '<td align="right" colspan="4">'.$langs->trans("Total").':</td>' . "\n";
print '<td align="right"><strong>' . price($debit) . '</strong></td>';
print '<td align="right"><strong>' . price($credit) . '</strong></td>';
print '<td colspan="5"></td>';
print '<td class="right" colspan="3">'.$langs->trans("Total").':</td>' . "\n";
print '<td class="right"><strong>' . price($debit) . '</strong></td>';
print '<td class="right"><strong>' . price($credit) . '</strong></td>';
print '<td colspan="6"></td>';
print "</tr>\n";
print '<tr class="oddeven">';
print '<td align="right" colspan="4">'.$langs->trans("Balancing").':</td>' . "\n";
print '<td class="right" colspan="3">'.$langs->trans("Balancing").':</td>' . "\n";
print '<td colspan="2">&nbsp;</td>';
print '<td align="right"><strong>' . price($credit - $debit) . '</strong></td>';
print '<td colspan="3"></td>';
print '<td class="right"><strong>' . price($credit - $debit) . '</strong></td>';
print '<td colspan="4"></td>';
print "</tr>\n";
print "</table>";
print '<input class="butAction" type="submit" value="' . $langs->trans('AccountancyLettering') . '" name="lettering" id="lettering">';
//print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?socid=' . $object->id . '&action=autolettrage">'.$langs->trans('AccountancyAutoLettering').'</a>';
print '<div class="tabsAction tabsActionNoBottom">'."\n";
print $letteringbutton;
print '</div>';
print "</form>";
$db->free($resql);
} else {

View File

@@ -514,7 +514,7 @@ class AccountancyCategory // extends CommonObject
/**
* Function to select accounting category of an accounting account present in chart of accounts
*
* @param int $id Id category
* @param int $id Id of category to know which account to exclude
*
* @return int <0 if KO, 0 if not found, >0 if OK
*/
@@ -569,12 +569,13 @@ class AccountancyCategory // extends CommonObject
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
$sql = "SELECT aa.rowid,aa.account_number ";
$sql = "SELECT aa.rowid, aa.account_number";
$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 .= " AND aa.entity = " . $conf->entity;
$sql .= " ORDER BY LENGTH(aa.account_number) DESC;"; // LENGTH is ok with mysql and postgresql
$this->db->begin();
@@ -587,10 +588,16 @@ class AccountancyCategory // extends CommonObject
return -1;
}
while ( $obj = $this->db->fetch_object($resql))
$accountincptsadded=array();
while ($obj = $this->db->fetch_object($resql))
{
if (array_key_exists(length_accountg($obj->account_number), $cpts))
$account_number_formated=length_accountg($obj->account_number);
if (! empty($accountincptsadded[$account_number_formated])) continue;
if (array_key_exists($account_number_formated, $cpts))
{
$accountincptsadded[$account_number_formated]=1;
// We found an account number that is in list $cpts of account to add
$sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account";
$sql .= " SET fk_accounting_category=" . $id_cat;
$sql .= " WHERE rowid=".$obj->rowid;

View File

@@ -38,6 +38,7 @@
*/
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
class AccountancyExport
{
@@ -535,14 +536,19 @@ class AccountancyExport
print $line->id . $separator;
print $date . $separator;
print $line->code_journal . $separator;
print length_accountg($line->numero_compte) . $separator;
print substr(length_accountg($line->numero_compte),0,2) . $separator;
if (empty($line->subledger_account)) {
print $line->numero_compte . $separator;
} else {
print $line->subledger_account . $separator;
}
//print substr(length_accountg($line->numero_compte),0,2) . $separator;
print '"'.dol_trunc($line->label_operation,40,'right','UTF-8',1).'"' . $separator;
print '"'.dol_trunc($line->piece_num,15,'right','UTF-8',1).'"'.$separator;
print price2num($line->montant).$separator;
print $line->sens.$separator;
print $date . $separator;
print 'EUR';
//print 'EUR';
print $end_line;
}
}
@@ -653,9 +659,9 @@ class AccountancyExport
print $end_line;
foreach ( $objectLines as $line ) {
$date_creation = dol_print_date($line->date_creation, '%d%m%Y');
$date_doc = dol_print_date($line->doc_date, '%d%m%Y');
$date_valid = dol_print_date($line->date_validated, '%d%m%Y');
$date_creation = dol_print_date($line->date_creation, '%Y%m%d');
$date_doc = dol_print_date($line->doc_date, '%Y%m%d');
$date_valid = dol_print_date($line->date_validated, '%Y%m%d');
// FEC:JournalCode
print $line->code_journal . $separator;
@@ -691,10 +697,10 @@ class AccountancyExport
print $line->label_operation . $separator;
// FEC:Debit
print price2num($line->debit) . $separator;
print price2fec($line->debit) . $separator;
// FEC:Credit
print price2num($line->credit) . $separator;
print price2fec($line->credit) . $separator;
// FEC:EcritureLet
print $line->lettering_code . $separator;

View File

@@ -83,13 +83,13 @@ class AccountancySystem
if ($rowid > 0 || $ref)
{
$sql = "SELECT a.pcg_version, a.label, a.active";
$sql = "SELECT a.rowid, a.pcg_version, a.label, a.active";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_system as a";
$sql .= " WHERE";
if ($rowid) {
$sql .= " a.rowid = '" . $rowid . "'";
} elseif ($ref) {
$sql .= " a.pcg_version = '" . $ref . "'";
$sql .= " a.pcg_version = '" . $this->db->escape($ref) . "'";
}
dol_syslog(get_class($this) . "::fetch sql=" . $sql, LOG_DEBUG);

View File

@@ -149,12 +149,13 @@ class AccountingAccount extends CommonObject
/**
* Load record in memory
*
* @param int $rowid Id
* @param string $account_number Account number
* @param int $limittocurrentchart 1=Do not load record if it is into another accounting system
* @return int <0 if KO, 0 if not found, Id of record if OK and found
* @param int $rowid Id
* @param string $account_number Account number
* @param int|boolean $limittocurrentchart 1 or true=Load record only if it is into current active char of account
* @param string $limittoachartaccount 'ABC'=Load record only if it is into chart account with code 'ABC'.
* @return int <0 if KO, 0 if not found, Id of record if OK and found
*/
function fetch($rowid = null, $account_number = null, $limittocurrentchart = 0)
function fetch($rowid = null, $account_number = null, $limittocurrentchart = 0, $limittoachartaccount = '')
{
global $conf;
@@ -172,6 +173,9 @@ class AccountingAccount extends CommonObject
if (! empty($limittocurrentchart)) {
$sql .= ' AND a.fk_pcg_version IN (SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $this->db->escape($conf->global->CHARTOFACCOUNTS) . ')';
}
if (! empty($limittoachartaccount)) {
$sql .= " AND a.fk_pcg_version = '".$this->db->escape($limittoachartaccount)."'";
}
dol_syslog(get_class($this) . "::fetch sql=" . $sql, LOG_DEBUG);
$result = $this->db->query($sql);

View File

@@ -324,8 +324,8 @@ class BookKeeping extends CommonObject
$sql .= ", piece_num";
$sql .= ', entity';
$sql .= ") VALUES (";
$sql .= "'" . $this->db->idate($this->doc_date) . "'";
$sql .= ", ".(! isset($this->date_lim_reglement) || dol_strlen($this->date_lim_reglement) == 0 ? 'NULL' : "'" . $this->db->idate($this->date_lim_reglement) . "'");
$sql .= "'".$this->db->idate($this->doc_date)."'";
$sql .= ", ".(! isset($this->date_lim_reglement) || dol_strlen($this->date_lim_reglement) == 0 ? 'NULL' : "'".$this->db->idate($this->date_lim_reglement)."'");
$sql .= ",'" . $this->db->escape($this->doc_type) . "'";
$sql .= ",'" . $this->db->escape($this->doc_ref) . "'";
$sql .= "," . $this->fk_doc;
@@ -341,7 +341,7 @@ class BookKeeping extends CommonObject
$sql .= "," . $this->montant;
$sql .= ",'" . $this->db->escape($this->sens) . "'";
$sql .= ",'" . $this->db->escape($this->fk_user_author) . "'";
$sql .= ",'" . $this->db->idate($now). "'";
$sql .= ",'".$this->db->idate($now)."'";
$sql .= ",'" . $this->db->escape($this->code_journal) . "'";
$sql .= ",'" . $this->db->escape($this->journal_label) . "'";
$sql .= "," . $this->db->escape($this->piece_num);
@@ -472,14 +472,15 @@ class BookKeeping extends CommonObject
*/
public function createStd(User $user, $notrigger = false, $mode='')
{
global $conf;
global $conf, $langs;
$langs->loadLangs(array("accountancy", "bills", "compta"));
dol_syslog(__METHOD__, LOG_DEBUG);
$error = 0;
// Clean parameters
if (isset($this->doc_type)) {
$this->doc_type = trim($this->doc_type);
}
@@ -546,10 +547,10 @@ class BookKeeping extends CommonObject
$now = dol_now();
// Check parameters
// Put here code to add control on parameters values
$this->journal_label = $langs->trans($this->journal_label);
// Insert request
$sql = 'INSERT INTO ' . MAIN_DB_PREFIX . $this->table_element . $mode.'(';
$sql = 'INSERT INTO ' . MAIN_DB_PREFIX . $this->table_element . $mode.' (';
$sql .= 'doc_date,';
$sql .= 'date_lim_reglement,';
$sql .= 'doc_type,';
@@ -573,7 +574,7 @@ class BookKeeping extends CommonObject
$sql .= 'piece_num,';
$sql .= 'entity';
$sql .= ') VALUES (';
$sql .= ' ' . (! isset($this->doc_date) || dol_strlen($this->doc_date) == 0 ? 'NULL' : "'" . $this->db->idate($this->doc_date) . "'") . ',';
$sql .= ' ' . (! isset($this->doc_date) || dol_strlen($this->doc_date) == 0 ? 'NULL' : "'".$this->db->idate($this->doc_date)."'") . ',';
$sql .= ' ' . (! isset($this->date_lim_reglement) || dol_strlen($this->date_lim_reglement) == 0 ? 'NULL' : "'" . $this->db->idate($this->date_lim_reglement) . "'") . ',';
$sql .= ' ' . (! isset($this->doc_type) ? 'NULL' : "'" . $this->db->escape($this->doc_type) . "'") . ',';
$sql .= ' ' . (! isset($this->doc_ref) ? 'NULL' : "'" . $this->db->escape($this->doc_ref) . "'") . ',';
@@ -590,7 +591,7 @@ class BookKeeping extends CommonObject
$sql .= ' ' . (! isset($this->montant) ? 'NULL' : $this->montant ). ',';
$sql .= ' ' . (! isset($this->sens) ? 'NULL' : "'" . $this->db->escape($this->sens) . "'") . ',';
$sql .= ' ' . $user->id . ',';
$sql .= ' ' . "'" . $this->db->idate($now) . "',";
$sql .= ' ' . "'".$this->db->idate($now)."',";
$sql .= ' ' . (empty($this->code_journal) ? 'NULL' : "'" . $this->db->escape($this->code_journal) . "'") . ',';
$sql .= ' ' . (empty($this->journal_label) ? 'NULL' : "'" . $this->db->escape($this->journal_label) . "'") . ',';
$sql .= ' ' . (empty($this->piece_num) ? 'NULL' : $this->db->escape($this->piece_num)).',';
@@ -1163,7 +1164,7 @@ class BookKeeping extends CommonObject
// Update request
$sql = 'UPDATE ' . MAIN_DB_PREFIX . $this->table_element . $mode.' SET';
$sql .= ' doc_date = ' . (! isset($this->doc_date) || dol_strlen($this->doc_date) != 0 ? "'" . $this->db->idate($this->doc_date) . "'" : 'null') . ',';
$sql .= ' doc_date = ' . (! isset($this->doc_date) || dol_strlen($this->doc_date) != 0 ? "'".$this->db->idate($this->doc_date)."'" : 'null') . ',';
$sql .= ' doc_type = ' . (isset($this->doc_type) ? "'" . $this->db->escape($this->doc_type) . "'" : "null") . ',';
$sql .= ' doc_ref = ' . (isset($this->doc_ref) ? "'" . $this->db->escape($this->doc_ref) . "'" : "null") . ',';
$sql .= ' fk_doc = ' . (isset($this->fk_doc) ? $this->fk_doc : "null") . ',';
@@ -1687,34 +1688,36 @@ class BookKeeping extends CommonObject
* @param string $piece_num Piece num
* @return int int <0 if KO, >0 if OK
*/
public function transformTransaction($direction=0,$piece_num='')
public function transformTransaction($direction = 0, $piece_num = '')
{
$error = 0;
$this->db->begin();
if ($direction==0)
if ($direction==0)
{
$next_piecenum=$this->getNextNumMvt();
$now = dol_now();
if ($next_piecenum < 0) {
$error++;
}
$sql = 'INSERT INTO ' . MAIN_DB_PREFIX . $this->table_element.'(doc_date, doc_type,';
$sql = 'INSERT INTO ' . MAIN_DB_PREFIX . $this->table_element . ' (doc_date, doc_type,';
$sql .= ' doc_ref, fk_doc, fk_docdet, entity, thirdparty_code, subledger_account, subledger_label,';
$sql .= ' numero_compte, label_compte, label_operation, debit, credit,';
$sql .= ' montant, sens, fk_user_author, import_key, code_journal, journal_label, piece_num)';
$sql .= 'SELECT doc_date, doc_type,';
$sql .= ' montant, sens, fk_user_author, import_key, code_journal, journal_label, piece_num, date_creation)';
$sql .= ' SELECT doc_date, doc_type,';
$sql .= ' doc_ref, fk_doc, fk_docdet, entity, thirdparty_code, subledger_account, subledger_label,';
$sql .= ' numero_compte, label_compte, label_operation, debit, credit,';
$sql .= ' montant, sens, fk_user_author, import_key, code_journal, journal_label, '.$next_piecenum.'';
$sql .= ' FROM '.MAIN_DB_PREFIX . $this->table_element.'_tmp WHERE piece_num = '.$piece_num;
$sql .= ' montant, sens, fk_user_author, import_key, code_journal, journal_label, ' . $next_piecenum . ", '".$this->db->idate($now)."'";
$sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . '_tmp WHERE piece_num = ' . $this->db->escape($piece_num);
$resql = $this->db->query($sql);
if (! $resql) {
$error ++;
$this->errors[] = 'Error ' . $this->db->lasterror();
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
}
$sql = 'DELETE FROM '.MAIN_DB_PREFIX . $this->table_element.'_tmp WHERE piece_num = '.$piece_num;
$sql = 'DELETE FROM ' . MAIN_DB_PREFIX . $this->table_element . '_tmp WHERE piece_num = ' . $this->db->escape($piece_num);
$resql = $this->db->query($sql);
if (! $resql) {
$error ++;
@@ -1722,29 +1725,29 @@ class BookKeeping extends CommonObject
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
}
} elseif ($direction==1) {
$sql = 'DELETE FROM ' . MAIN_DB_PREFIX . $this->table_element.'_tmp WHERE piece_num = '.$piece_num;
$sql = 'DELETE FROM ' . MAIN_DB_PREFIX . $this->table_element . '_tmp WHERE piece_num = ' . $piece_num;
$resql = $this->db->query($sql);
if (! $resql) {
$error ++;
$this->errors[] = 'Error ' . $this->db->lasterror();
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
}
$sql = 'INSERT INTO ' . MAIN_DB_PREFIX . $this->table_element.'_tmp(doc_date, doc_type,';
$sql = 'INSERT INTO ' . MAIN_DB_PREFIX . $this->table_element . '_tmp (doc_date, doc_type,';
$sql .= ' doc_ref, fk_doc, fk_docdet, thirdparty_code, subledger_account, subledger_label,';
$sql .= ' numero_compte, label_compte, label_operation, debit, credit,';
$sql .= ' montant, sens, fk_user_author, import_key, code_journal, journal_label, piece_num)';
$sql .= 'SELECT doc_date, doc_type,';
$sql .= ' SELECT doc_date, doc_type,';
$sql .= ' doc_ref, fk_doc, fk_docdet, thirdparty_code, subledger_account, subledger_label,';
$sql .= ' numero_compte, label_compte, label_operation, debit, credit,';
$sql .= ' montant, sens, fk_user_author, import_key, code_journal, journal_label, piece_num';
$sql .= ' FROM '.MAIN_DB_PREFIX . $this->table_element.' WHERE piece_num = '.$piece_num;
$sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element.' WHERE piece_num = ' . $piece_num;
$resql = $this->db->query($sql);
if (! $resql) {
$error ++;
$this->errors[] = 'Error ' . $this->db->lasterror();
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
}
$sql = 'DELETE FROM '.MAIN_DB_PREFIX . $this->table_element.'_tmp WHERE piece_num = '.$piece_num;
$sql = 'DELETE FROM ' . MAIN_DB_PREFIX . $this->table_element . '_tmp WHERE piece_num = ' . $piece_num;
$resql = $this->db->query($sql);
if (! $resql) {
$error ++;

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
@@ -66,13 +66,13 @@ class Lettering extends BookKeeping
$sql .= " , 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 ( ";
$sql .= " WHERE ( ";
if (! empty($object->code_compta))
$sql .= " bk.subledger_account = '" . $object->code_compta . "' ";
$sql .= " bk.subledger_account = '" . $object->code_compta . "' ";
if (! empty($object->code_compta) && ! empty($object->code_compta_fournisseur))
$sql .= " OR ";
$sql .= " OR ";
if (! empty($object->code_compta_fournisseur))
$sql .= " bk.subledger_account = '" . $object->code_compta_fournisseur . "' ";
$sql .= " bk.subledger_account = '" . $object->code_compta_fournisseur . "' ";
$sql .= " ) AND (bk.date_lettering ='' OR bk.date_lettering IS NULL) ";
$sql .= " AND (bk.lettering_code != '' OR bk.lettering_code IS NULL) ";
@@ -128,15 +128,15 @@ class Lettering extends BookKeeping
$sql .= " AND facf.entity = ".$conf->entity;
$sql .= " AND ( ";
if (! empty($object->code_compta)) {
$sql .= " bk.subledger_account = '" . $object->code_compta . "' ";
$sql .= " bk.subledger_account = '" . $object->code_compta . "' ";
}
if (! empty($object->code_compta) && ! empty($object->code_compta_fournisseur)) {
$sql .= " OR ";
$sql .= " OR ";
}
if (! empty($object->code_compta_fournisseur)) {
$sql .= " bk.subledger_account = '" . $object->code_compta_fournisseur . "' ";
$sql .= " bk.subledger_account = '" . $object->code_compta_fournisseur . "' ";
}
$sql .= " ) ";
$sql .= ") ";
$resql2 = $this->db->query($sql);
if ($resql2) {
@@ -253,7 +253,7 @@ class Lettering extends BookKeeping
$error++;
}
$sql = "SELECT SUM(ABS(debit)) as deb, SUM(ABS(credit)) as cred FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping WHERE ";
$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) {

View File

@@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2016-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.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
@@ -47,6 +48,7 @@ if ($user->societe_id > 0)
llxHeader('', $langs->trans("AccountancyArea"));
print load_fiche_titre($langs->trans("AccountancyArea"), '', 'title_accountancy');
dol_fiche_head();
$step = 0;
@@ -165,6 +167,7 @@ else
{
print $langs->trans("Module10Desc")."<br>\n";
}
dol_fiche_end();
// End of page
llxFooter();

View File

@@ -719,7 +719,7 @@ if (! $error && $action == 'writebookkeeping') {
}
}
if (price2num($totaldebit) != price2num($totalcredit))
if (price2num($totaldebit, 'MT') != price2num($totalcredit, 'MT'))
{
$error++;
$errorforline++;

View File

@@ -359,7 +359,7 @@ if ($action == 'writebookkeeping') {
}
// Protection against a bug on line before
if (price2num($totaldebit) != price2num($totalcredit))
if (price2num($totaldebit, 'MT') != price2num($totalcredit, 'MT'))
{
$error++;
$errorforline++;

View File

@@ -519,7 +519,7 @@ if ($action == 'writebookkeeping') {
}
// Protection against a bug on lines before
if (! $errorforline && (price2num($totaldebit) != price2num($totalcredit)))
if (! $errorforline && (price2num($totaldebit, 'MT') != price2num($totalcredit, 'MT')))
{
$error++;
$errorforline++;

View File

@@ -478,7 +478,7 @@ if ($action == 'writebookkeeping') {
}
// Protection against a bug on lines before
if (! $errorforline && (price2num($totaldebit) != price2num($totalcredit)))
if (! $errorforline && (price2num($totaldebit, 'MT') != price2num($totalcredit, 'MT')))
{
$error++;
$errorforline++;

View File

@@ -55,7 +55,7 @@ if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == "11" && $type_export == "genera
$endaccountingperiod = dol_print_date(dol_get_last_day($tmparray['year'], $tmparray['mon']), 'dayxcard');
$completefilename = $siren . "FEC" . $endaccountingperiod . "." . $format;
$completefilename = $siren . "FEC" . $endaccountingperiod . ".txt";
}
else
{

View File

@@ -183,6 +183,10 @@ if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! emp
if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $arraychoices['bankviainvoice']=$langs->trans("MoreActionBankViaInvoice");
print '<td>';
print $form->selectarray('ADHERENT_BANK_USE',$arraychoices,$conf->global->ADHERENT_BANK_USE,0);
if ($conf->global->ADHERENT_BANK_USE == 'bankdirect' || $conf->global->ADHERENT_BANK_USE == 'bankviainvoice')
{
print '<br><div style="padding-top: 5px;"><span class="opacitymedium">'.$langs->trans("ABankAccountMustBeDefinedOnPaymentModeSetup").'</span></div>';
}
print '</td>';
print "</tr>\n";
@@ -208,7 +212,7 @@ if ($conf->facture->enabled)
{
print '<tr class="oddeven"><td>'.$langs->trans("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS").'</td>';
print '<td>';
$form->select_produits($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS, 'ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS');
$form->select_produits($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS, 'ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', '', 0);
print '</td>';
}
print "</tr>\n";

View File

@@ -646,7 +646,7 @@ if (empty($reshook))
if (empty($labeltouse) || (int) $labeltouse === -1) {
//fallback on the old configuration.
setEventMessages('WarningMandatorySetupNotComplete', [], 'errors');
setEventMessages('WarningMandatorySetupNotComplete', null, 'errors');
$error++;
}
else {
@@ -1161,7 +1161,7 @@ else
}
// Morphy
$morphys["phy"] = $langs->trans("Physical");
$morphys["mor"] = $langs->trans("Morale");
$morphys["mor"] = $langs->trans("Moral");
print '<tr><td><span class="fieldrequired">'.$langs->trans("Nature").'</span></td><td>';
print $form->selectarray("morphy", $morphys, (GETPOSTISSET("morphy")?GETPOST("morphy",'alpha'):$object->morphy));
print "</td></tr>";

View File

@@ -563,6 +563,22 @@ class Adherent extends CommonObject
$sql.= ", fk_user_mod = ".($user->id>0?$user->id:'null'); // Can be null because member can be create by a guest
$sql.= " WHERE rowid = ".$this->id;
// If we change the type of membership, we set also label of new type
if (! empty($this->oldcopy) && $this->typeid != $this->oldcopy->typeid)
{
$sql2 = "SELECT libelle as label";
$sql2.= " FROM ".MAIN_DB_PREFIX."adherent_type";
$sql2.= " WHERE rowid = ".$this->typeid;
$resql2 = $this->db->query($sql2);
if ($resql2)
{
while ($obj=$this->db->fetch_object($resql2))
{
$this->type=$obj->label;
}
}
}
dol_syslog(get_class($this)."::update update member", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
@@ -2115,7 +2131,7 @@ class Adherent extends CommonObject
* @param int $statut Id statut
* @param int $need_subscription 1 if member type need subscription, 0 otherwise
* @param int $date_end_subscription Date fin adhesion
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto
* @return string Label
*/
function LibStatut($statut,$need_subscription,$date_end_subscription,$mode=0)
@@ -2175,7 +2191,7 @@ class Adherent extends CommonObject
}
elseif ($mode == 5)
{
if ($statut == -1) return $langs->trans("MemberStatusDraft").' '.img_picto($langs->trans('MemberStatusDraft'),'statut0');
if ($statut == -1) return $langs->trans("MemberStatusDraftShort").' '.img_picto($langs->trans('MemberStatusDraft'), 'statut0');
elseif ($statut >= 1) {
if (! $date_end_subscription) return '<span class="hideonsmartphone">'.$langs->trans("MemberStatusActiveShort").' </span>'.img_picto($langs->trans('MemberStatusActive'),'statut1');
elseif ($date_end_subscription < time()) return '<span class="hideonsmartphone">'.$langs->trans("MemberStatusActiveLateShort").' </span>'.img_picto($langs->trans('MemberStatusActiveLate'),'statut3');

View File

@@ -75,7 +75,7 @@ if ($id)
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'rowid', $linkback);
dol_banner_tab($object, 'id', $linkback);
print '<div class="fichecenter">';

View File

@@ -44,7 +44,12 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
if ($action == 'setbarcodeproducton')
{
$res=dolibarr_set_const($db, "BARCODE_PRODUCT_ADDON_NUM", GETPOST('value'), 'chaine', 0, '', $conf->entity);
$barcodenumberingmodule = GETPOST('value', 'alpha');
$res=dolibarr_set_const($db, "BARCODE_PRODUCT_ADDON_NUM", $barcodenumberingmodule, 'chaine', 0, '', $conf->entity);
if ($barcodenumberingmodule == 'mod_barcode_product_standard' && empty($conf->global->BARCODE_STANDARD_PRODUCT_MASK))
{
$res=dolibarr_set_const($db, "BARCODE_STANDARD_PRODUCT_MASK", '020{000000000}', 'chaine', 0, '', $conf->entity);
}
}
elseif ($action == 'setbarcodeproductoff')
{
@@ -406,14 +411,14 @@ if ($conf->produit->enabled)
if ($conf->global->BARCODE_PRODUCT_ADDON_NUM == "$file")
{
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproductoff&amp;value='.$file.'">';
print img_picto($langs->trans("Activated"),'switch_on');
print '<td align="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproductoff&amp;value='.$file.'">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>';
}
else
{
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproducton&amp;value='.$file.'">';
print img_picto($langs->trans("Disabled"),'switch_off');
print '<td align="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproducton&amp;value='.$file.'">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>';
}
print '<td align="center">';

View File

@@ -120,6 +120,12 @@ $modules=array(
'img' => 'trip'
)*/
),
'holiday' => array(
array(
'code' => 'MAIN_DELAY_HOLIDAYS',
'img' => 'holiday'
),
),
);
$labelmeteo = array(0=>$langs->trans("No"), 1=>$langs->trans("Yes"), 2=>$langs->trans("OnMobileOnly"));

View File

@@ -1889,6 +1889,9 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
{
print '<textarea cols="30" rows="'.ROWS_2.'" class="flat" name="'.$fieldlist[$field].'">'.(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'</textarea>';
}
else{
print '<input type="hidden" name="'.$fieldlist[$field].'" value="'.$transkey.'">';
}
print '</td>';
}
elseif ($fieldlist[$field] == 'price' || preg_match('/^amount/i',$fieldlist[$field])) {
@@ -1951,7 +1954,13 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
}
else
{
if ($fieldlist[$field]=='sortorder') $fieldlist[$field]='position';
$fieldValue = isset($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'';
if ($fieldlist[$field]=='sortorder')
{
$fieldlist[$field]='position';
}
$classtd=''; $class='';
if ($fieldlist[$field]=='code') $classtd='width100';
@@ -1972,7 +1981,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
}
if ($tabname == MAIN_DB_PREFIX.'c_payment_term') {
$langs->load("bills");
$transkey="PaymentCondition".strtoupper($obj->code);
$transkey="PaymentConditionShort".strtoupper($obj->code);
}
if ($transkey && $langs->trans($transkey) != $transkey)
{
@@ -1982,8 +1991,11 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
}
if (! $transfound)
{
print '<input type="text" class="flat'.($class?' '.$class:'').'" value="'.(isset($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'" name="'.$fieldlist[$field].'">';
print '<input type="text" class="flat'.($class?' '.$class:'').'" value="'.dol_escape_htmltag($fieldValue).'" name="'.$fieldlist[$field].'">';
}
else{
print '<input type="hidden" name="'.$fieldlist[$field].'" value="'.$transkey.'">';
}
print '</td>';
}
}

View File

@@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2017 Oscss-Shop <support@oscss-shop.fr>.
* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2020 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modifyion 2.0 (the "License");
* it under the terms of the GNU General Public License as published bypliance with the License.
@@ -17,6 +18,9 @@
*/
if (!defined('REQUIRE_JQUERY_BLOCKUI')) define('REQUIRE_JQUERY_BLOCKUI', 1);
if (!defined('NOTOKENRENEWAL')) {
define('NOTOKENRENEWAL', 1);
}
/**

View File

@@ -17,7 +17,10 @@
*/
include_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
include_once DOL_DOCUMENT_ROOT.'/admin/dolistore/class/PSWebServiceLibrary.class.php';
if (! class_exists('PrestaShopWebservice')) // We keep this because some modules add this lib too into a different path. This is to avoid "Cannot declare class PrestaShopWebservice" errors.
{
include_once DOL_DOCUMENT_ROOT.'/admin/dolistore/class/PSWebServiceLibrary.class.php';
}
/**

View File

@@ -33,8 +33,8 @@ include_once DOL_DOCUMENT_ROOT.'/emailcollector/class/emailcollectorfilter.class
include_once DOL_DOCUMENT_ROOT.'/emailcollector/class/emailcollectoraction.class.php';
include_once DOL_DOCUMENT_ROOT.'/emailcollector/lib/emailcollector.lib.php';
if (!$user->admin)
accessforbidden();
if (!$user->admin) accessforbidden();
if (empty($conf->emailcollector->enabled)) accessforbidden();
// Load traductions files requiredby by page
$langs->loadLangs(array("admin", "mails", "other"));

View File

@@ -32,6 +32,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
dol_include_once('/emailcollector/class/emailcollector.class.php');
if (!$user->admin) accessforbidden();
if (empty($conf->emailcollector->enabled)) accessforbidden();
// Load traductions files requiredby by page
$langs->loadLangs(array("admin", "other"));
@@ -450,10 +451,10 @@ while ($i < min($num, $limit))
$cssforfield='';
if (in_array($val['type'], array('date','datetime','timestamp'))) $cssforfield.=($cssforfield?' ':'').'center';
elseif ($key == 'status') $cssforfield.=($cssforfield?' ':'').'center';
if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
elseif ($key == 'ref') $cssforfield.=($cssforfield?' ':'').'nowrap';
if (! empty($arrayfields['t.'.$key]['checked']))
{
print '<td';

View File

@@ -51,37 +51,37 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
* View
*/
$form=new Form($db);
$page_name = "ExportSetup";
llxHeader('', $langs->trans($page_name));
// Subheader
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">'
. $langs->trans("BackToModuleList") . '</a>';
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
print_fiche_titre($langs->trans($page_name), $linkback);
// Configuration header
//$head = export_admin_prepare_head();
$h=0;
$head = array();
$head[$h][0] = DOL_URL_ROOT.'/admin/export.php';
$head[$h][1] = $langs->trans("Setup");
$head[$h][2] = 'setup';
$h++;
dol_fiche_head(
$head,
'settings',
$langs->trans("ExportsArea"),
0,
"exports"
);
dol_fiche_head($head, 'setup', $langs->trans("ExportsArea"), -1, "exports");
// Setup page goes here
$form=new Form($db);
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("ExportModel").'</td>'."\n";
print '<td>'.$langs->trans("Parameters").'</td>'."\n";
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="center" width="100"></td>'."\n";
// Example with a yes / no select
print '<tr class="oddeven">';
print '<td>'.$langs->trans("set_EXPORTS_SHARE_MODELS").'</td>';
print '<td>'.$langs->trans("EXPORTS_SHARE_MODELS").'</td>';
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="center" width="100">';
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
@@ -93,6 +93,8 @@ print '</td></tr>';
print '</table>';
dol_fiche_end();
// End of page
llxFooter();
$db->close();

View File

@@ -66,8 +66,8 @@ else
if ($action == 'add' || GETPOST("modify"))
{
$external_rss_title = "external_rss_title_" . GETPOST("norss");
$external_rss_urlrss = "external_rss_urlrss_" . GETPOST("norss");
$external_rss_title = "external_rss_title_" . GETPOST("norss", 'int');
$external_rss_urlrss = "external_rss_urlrss_" . GETPOST("norss", 'int');
if (! empty($_POST[$external_rss_urlrss]))
{
@@ -95,7 +95,7 @@ if ($action == 'add' || GETPOST("modify"))
{
// Ajoute boite box_external_rss dans definition des boites
$sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes_def (file, note)";
$sql.= " VALUES ('box_external_rss.php','".$db->escape(GETPOST("norss").' ('.GETPOST($external_rss_title)).")')";
$sql.= " VALUES ('box_external_rss.php','".$db->escape(GETPOST("norss", 'int').' ('.GETPOST($external_rss_title, 'alpha')).")')";
if (! $db->query($sql))
{
dol_print_error($db);
@@ -103,8 +103,8 @@ if ($action == 'add' || GETPOST("modify"))
}
}
$result1=dolibarr_set_const($db, "EXTERNAL_RSS_TITLE_" . GETPOST("norss"),GETPOST($external_rss_title),'chaine',0,'',$conf->entity);
if ($result1) $result2=dolibarr_set_const($db, "EXTERNAL_RSS_URLRSS_" . GETPOST("norss"),GETPOST($external_rss_urlrss),'chaine',0,'',$conf->entity);
$result1=dolibarr_set_const($db, "EXTERNAL_RSS_TITLE_" . GETPOST("norss", 'int'), GETPOST($external_rss_title, 'alpha'), 'chaine', 0, '', $conf->entity);
if ($result1) $result2=dolibarr_set_const($db, "EXTERNAL_RSS_URLRSS_" . GETPOST("norss", 'int'), GETPOST($external_rss_urlrss, 'alpha'), 'chaine', 0, '', $conf->entity);
if ($result1 && $result2)
{
@@ -122,13 +122,13 @@ if ($action == 'add' || GETPOST("modify"))
if ($_POST["delete"])
{
if(GETPOST("norss"))
if (GETPOST("norss", 'int'))
{
$db->begin();
// Supprime boite box_external_rss de definition des boites
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."boxes_def";
$sql.= " WHERE file = 'box_external_rss.php' AND note LIKE '".$db->escape(GETPOST("norss"))." %'";
$sql.= " WHERE file = 'box_external_rss.php' AND note LIKE '".$db->escape(GETPOST("norss", 'int'))." %'";
$resql=$db->query($sql);
if ($resql)
@@ -168,8 +168,8 @@ if ($_POST["delete"])
}
$result1=dolibarr_del_const($db,"EXTERNAL_RSS_TITLE_" . GETPOST("norss"),$conf->entity);
if ($result1) $result2=dolibarr_del_const($db,"EXTERNAL_RSS_URLRSS_" . GETPOST("norss"),$conf->entity);
$result1=dolibarr_del_const($db,"EXTERNAL_RSS_TITLE_" . GETPOST("norss", 'int'), $conf->entity);
if ($result1) $result2=dolibarr_del_const($db,"EXTERNAL_RSS_URLRSS_" . GETPOST("norss", 'int'), $conf->entity);
if ($result1 && $result2)
{
@@ -270,13 +270,13 @@ if ($resql)
print '<tr class="oddeven">';
print "<td width=\"100px\">".$langs->trans("Title")."</td>";
print "<td><input type=\"text\" class=\"flat minwidth300\" name=\"external_rss_title_" . $idrss . "\" value=\"" . $conf->global->$keyrsstitle . "\"></td>";
print "<td><input type=\"text\" class=\"flat minwidth300\" name=\"external_rss_title_" . $idrss . "\" value=\"" . dol_escape_htmltag($conf->global->$keyrsstitle) . "\"></td>";
print "</tr>";
print '<tr class="oddeven">';
print "<td>".$langs->trans("URL")."</td>";
print "<td><input type=\"text\" class=\"flat minwidth300\" name=\"external_rss_urlrss_" . $idrss . "\" value=\"" . $conf->global->$keyrssurl . "\"></td>";
print "<td><input type=\"text\" class=\"flat minwidth300\" name=\"external_rss_urlrss_" . $idrss . "\" value=\"" . dol_escape_htmltag($conf->global->$keyrssurl) . "\"></td>";
print "</tr>";

View File

@@ -78,7 +78,7 @@ if ($action == 'updateMask')
}
}
if ($action == 'specimen')
else if ($action == 'specimen')
{
$modele=GETPOST('module','alpha');
@@ -164,7 +164,7 @@ else if ($action == 'setmod')
dolibarr_set_const($db, "FACTURE_ADDON",$value,'chaine',0,'',$conf->entity);
}
if ($action == 'setribchq')
else if ($action == 'setribchq')
{
$rib = GETPOST('rib','alpha');
$chq = GETPOST('chq','alpha');
@@ -184,7 +184,7 @@ if ($action == 'setribchq')
}
}
if ($action == 'set_FACTURE_DRAFT_WATERMARK')
else if ($action == 'set_FACTURE_DRAFT_WATERMARK')
{
$draft = GETPOST('FACTURE_DRAFT_WATERMARK','alpha');
@@ -202,7 +202,7 @@ if ($action == 'set_FACTURE_DRAFT_WATERMARK')
}
}
if ($action == 'set_INVOICE_FREE_TEXT')
else if ($action == 'set_INVOICE_FREE_TEXT')
{
$freetext = GETPOST('INVOICE_FREE_TEXT','none'); // No alpha here, we want exact string
@@ -220,7 +220,7 @@ if ($action == 'set_INVOICE_FREE_TEXT')
}
}
if ($action == 'setforcedate')
else if ($action == 'setforcedate')
{
$forcedate = GETPOST('forcedate','alpha');
@@ -238,20 +238,20 @@ if ($action == 'setforcedate')
}
}
if ($action == 'setDefaultPDFModulesByType')
else if ($action == 'setDefaultPDFModulesByType')
{
$invoicetypemodels = GETPOST('invoicetypemodels');
if(!empty($invoicetypemodels) && is_array($invoicetypemodels))
{
$error = 0;
foreach ($invoicetypemodels as $type => $value)
{
$res = dolibarr_set_const($db, 'FACTURE_ADDON_PDF_'.intval($type),$value,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
}
if (! $error)
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
@@ -621,7 +621,7 @@ if(!empty($conf->global->INVOICE_USE_DEFAULT_DOCUMENT)) // Hidden conf
print '<td>'.$langs->trans("Name").'</td>';
print '<td align="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
print "</tr>\n";
$listtype=array(
Facture::TYPE_STANDARD=>$langs->trans("InvoiceStandard"),
Facture::TYPE_REPLACEMENT=>$langs->trans("InvoiceReplacement"),
@@ -632,7 +632,7 @@ if(!empty($conf->global->INVOICE_USE_DEFAULT_DOCUMENT)) // Hidden conf
{
$listtype[Facture::TYPE_SITUATION] = $langs->trans("InvoiceSituation");
}
foreach ($listtype as $type => $trans)
{
$thisTypeConfName = 'FACTURE_ADDON_PDF_'.$type;
@@ -642,7 +642,7 @@ if(!empty($conf->global->INVOICE_USE_DEFAULT_DOCUMENT)) // Hidden conf
print '<td colspan="2" >'.$form->selectarray('invoicetypemodels['.$type.']', ModelePDFFactures::liste_modeles($db), $current,0,0, 0).'</td>';
print "</tr>\n";
}
print '</table>';
print "</form>";
}

View File

@@ -1,8 +1,8 @@
<?php
/* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
/* Copyright (C) 2011-2019 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.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
@@ -55,7 +55,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
if ($action == 'updateMask')
{
$maskconst = GETPOST('maskconstholidaty','alpha');
$maskconst = GETPOST('maskconstholiday','alpha');
$maskvalue = GETPOST('maskholiday','alpha');
if ($maskconst) $res = dolibarr_set_const($db,$maskconst,$maskvalue,'chaine',0,'',$conf->entity);

View File

@@ -50,7 +50,7 @@ $confirm = GETPOST('confirm','alpha'); // Result of a confirmation
$id = GETPOST('id','int');
$rowid = GETPOST('rowid','alpha');
$search_label=GETPOST('search_label','alpha');
$search_label=GETPOST('search_label', 'alphanohtml'); // Must allow value like 'Abc Def' or '(MyTemplateName)'
$search_type_template=GETPOST('search_type_template','alpha');
$search_lang=GETPOST('search_lang','alpha');
$search_fk_user=GETPOST('search_fk_user','intcomma');
@@ -262,6 +262,7 @@ if (empty($reshook))
{
//var_dump($i.' - '.$listfieldvalue[$i].' - '.$_POST[$listfieldvalue[$i]].' - '.$value);
$keycode=$listfieldvalue[$i];
if ($value == 'label') $_POST[$keycode] = dol_escape_htmltag($_POST[$keycode]);
if ($value == 'lang') $keycode='langcode';
if ($value == 'entity') $_POST[$keycode] = $conf->entity;
if ($i) $sql.=",";
@@ -666,8 +667,6 @@ if ($resql)
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;
@@ -694,7 +693,7 @@ if ($resql)
if ($fieldlist[$field]=='content') { $valuetoshow=$langs->trans("Content"); $showfield=0;}
if ($fieldlist[$field]=='content_lines') { $valuetoshow=$langs->trans("ContentLines"); $showfield=0; }
// Affiche nom du champ
// Show fields
if ($showfield)
{
if (! empty($tabhelp[$id][$value]))
@@ -812,6 +811,10 @@ if ($resql)
$showfield=1;
$align="left";
$valuetoshow=$obj->{$fieldlist[$field]};
if ($value == 'label' || $value == 'topic')
{
$valuetoshow = dol_escape_htmltag($valuetoshow);
}
if ($value == 'type_template')
{
$valuetoshow = isset($elementList[$valuetoshow])?$elementList[$valuetoshow]:$valuetoshow;

View File

@@ -130,13 +130,13 @@ if ($action=='install')
}
else
{
if (! preg_match('/\.zip$/i',$original_file))
if (! $error && ! preg_match('/\.zip$/i', $original_file))
{
$langs->load("errors");
setEventMessages($langs->trans("ErrorFileMustBeADolibarrPackage",$original_file), null, 'errors');
$error++;
}
if (! preg_match('/module_.*\-[\d]+\.[\d]+.*$/i',$original_file))
if (! $error && ! preg_match('/^(module[a-zA-Z0-9]*|theme)_.*\-([0-9][0-9\.]*)\.zip$/i', $original_file))
{
$langs->load("errors");
setEventMessages($langs->trans("ErrorFilenameDosNotMatchDolibarrPackageRules",$original_file, 'module_*-x.y*.zip'), null, 'errors');
@@ -180,13 +180,13 @@ if ($action=='install')
{
// Now we move the dir of the module
$modulename=preg_replace('/module_/', '', $original_file);
$modulename=preg_replace('/\-[\d]+\.[\d]+.*$/', '', $modulename);
$modulename=preg_replace('/\-([0-9][0-9\.]*)\.zip$/i', '', $modulename);
// Search dir $modulename
$modulenamedir=$conf->admin->dir_temp.'/'.$tmpdir.'/'.$modulename;
$modulenamedir=$conf->admin->dir_temp.'/'.$tmpdir.'/'.$modulename; // Example .../mymodule
//var_dump($modulenamedir);
if (! dol_is_dir($modulenamedir))
{
$modulenamedir=$conf->admin->dir_temp.'/'.$tmpdir.'/htdocs/'.$modulename;
$modulenamedir=$conf->admin->dir_temp.'/'.$tmpdir.'/htdocs/'.$modulename; // Example .../htdocs/mymodule
//var_dump($modulenamedir);
if (! dol_is_dir($modulenamedir))
{
@@ -195,10 +195,16 @@ if ($action=='install')
}
}
if (! $error)
{
// TODO Make more test
}
// Now we install the module
if (! $error)
{
//var_dump($dirins);
@dol_delete_dir_recursive($dirins.'/'.$modulename);
@dol_delete_dir_recursive($dirins.'/'.$modulename); // delete the zip file
dol_syslog("Uncompress of module file is a success. We copy it from ".$modulenamedir." into target dir ".$dirins.'/'.$modulename);
$result=dolCopyDir($modulenamedir, $dirins.'/'.$modulename, '0444', 1);
if ($result <= 0)

View File

@@ -49,15 +49,14 @@ $action = GETPOST('action', 'alpha');
if (preg_match('/set_([a-z0-9_\-]+)/i',$action,$reg))
{
$code=$reg[1];
$value=(GETPOST($code, 'alpha') ? GETPOST($code, 'alpha') : 1);
$value=GETPOST($code, 'alpha');
if (dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity) > 0)
{
header("Location: ".$_SERVER["PHP_SELF"]);
exit;
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
else
{
dol_print_error($db);
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -66,12 +65,11 @@ if (preg_match('/del_([a-z0-9_\-]+)/i',$action,$reg))
$code=$reg[1];
if (dolibarr_del_const($db, $code, 0) > 0)
{
header("Location: ".$_SERVER["PHP_SELF"]);
exit;
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
else
{
dol_print_error($db);
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -106,9 +104,7 @@ elseif ($action == 'update_currency')
{
$error = 0;
$submit = GETPOST('submit', 'alpha');
if ($submit == $langs->trans('Modify'))
if (GETPOST('updatecurrency', 'alpha'))
{
$fk_multicurrency = GETPOST('fk_multicurrency', 'int');
$rate = price2num(GETPOST('rate', 'alpha'));
@@ -127,7 +123,7 @@ elseif ($action == 'update_currency')
}
}
}
elseif ($submit == $langs->trans('Delete'))
elseif (GETPOST('deletecurrency', 'alpha'))
{
$fk_multicurrency = GETPOST('fk_multicurrency', 'int');
$currency = new MultiCurrency($db);
@@ -334,8 +330,8 @@ foreach ($TCurrency as &$currency)
print '<input type="hidden" name="fk_multicurrency" value="'.$currency->id.'">';
print '1 '.$conf->currency.' = ';
print '<input type="text" name="rate" value="'.($currency->rate->rate ? $currency->rate->rate : '').'" size="13" />&nbsp;'.$currency->code.'&nbsp;';
print '<input type="submit" name="submit" class="button" value="'.$langs->trans("Modify").'">&nbsp;';
print '<input type="submit" name="submit" class="button" value="'.$langs->trans("Delete").'">';
print '<input type="submit" name="updatecurrency" class="button" value="'.$langs->trans("Modify").'">&nbsp;';
print '<input type="submit" name="deletecurrency" class="button" value="'.$langs->trans("Delete").'">';
print '</form>';
print '</td></tr>';
}

View File

@@ -3,6 +3,7 @@
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2012-2107 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2019 Ferran Marcet <fmarcet@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
@@ -61,6 +62,8 @@ if ($action == 'update')
dolibarr_set_const($db, "MAIN_PROFID2_IN_ADDRESS", $_POST["MAIN_PROFID2_IN_ADDRESS"],'chaine',0,'', $conf->entity);
dolibarr_set_const($db, "MAIN_PROFID3_IN_ADDRESS", $_POST["MAIN_PROFID3_IN_ADDRESS"],'chaine',0,'', $conf->entity);
dolibarr_set_const($db, "MAIN_PROFID4_IN_ADDRESS", $_POST["MAIN_PROFID4_IN_ADDRESS"],'chaine',0,'', $conf->entity);
dolibarr_set_const($db, "MAIN_PROFID5_IN_ADDRESS", $_POST["MAIN_PROFID5_IN_ADDRESS"],'chaine',0,'', $conf->entity);
dolibarr_set_const($db, "MAIN_PROFID6_IN_ADDRESS", $_POST["MAIN_PROFID6_IN_ADDRESS"],'chaine',0,'', $conf->entity);
dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT", $_POST["MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT"],'chaine',0,'', $conf->entity);
dolibarr_set_const($db, "MAIN_TVAINTRA_NOT_IN_ADDRESS", $_POST["MAIN_TVAINTRA_NOT_IN_ADDRESS"],'chaine',0,'', $conf->entity);
@@ -177,76 +180,25 @@ if ($action == 'edit') // Edit
print $form->selectyesno('MAIN_TVAINTRA_NOT_IN_ADDRESS',(! empty($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS))?$conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS:0,1);
print '</td></tr>';
// Show prof id 1 in address into pdf
if (! $noCountryCode)
// Show prof id in address into pdf
for($i=1; $i<=6; $i++)
{
$pid1=$langs->transcountry("ProfId1",$mysoc->country_code);
if ($pid1 == '-') $pid1=false;
}
else
{
$pid1 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
}
if ($pid1)
{
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid1.'</td><td>';
print $form->selectyesno('MAIN_PROFID1_IN_ADDRESS',isset($conf->global->MAIN_PROFID1_IN_ADDRESS)?$conf->global->MAIN_PROFID1_IN_ADDRESS:0,1,$noCountryCode);
print '</td></tr>';
}
// Show prof id 2 in address into pdf
if (! $noCountryCode)
{
$pid2=$langs->transcountry("ProfId2",$mysoc->country_code);
if ($pid2 == '-') $pid2=false;
}
else
{
$pid2 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
}
if ($pid2)
{
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid2.'</td><td>';
print $form->selectyesno('MAIN_PROFID2_IN_ADDRESS',isset($conf->global->MAIN_PROFID2_IN_ADDRESS)?$conf->global->MAIN_PROFID2_IN_ADDRESS:0,1,$noCountryCode);
print '</td></tr>';
}
// Show prof id 3 in address into pdf
if (! $noCountryCode)
{
$pid3=$langs->transcountry("ProfId3",$mysoc->country_code);
if ($pid3 == '-') $pid3=false;
}
else
{
$pid3 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
}
if ($pid3)
{
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid3.'</td><td>';
print $form->selectyesno('MAIN_PROFID3_IN_ADDRESS',isset($conf->global->MAIN_PROFID3_IN_ADDRESS)?$conf->global->MAIN_PROFID3_IN_ADDRESS:0,1,$noCountryCode);
print '</td></tr>';
}
// Show prof id 4 in address into pdf
if (! $noCountryCode)
{
$pid4=$langs->transcountry("ProfId4",$mysoc->country_code);
if ($pid4 == '-') $pid4=false;
}
else
{
$pid4 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
}
if ($pid4)
{
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid4.'</td><td>';
print $form->selectyesno('MAIN_PROFID4_IN_ADDRESS',isset($conf->global->MAIN_PROFID4_IN_ADDRESS)?$conf->global->MAIN_PROFID4_IN_ADDRESS:0,1,$noCountryCode);
print '</td></tr>';
if (! $noCountryCode)
{
$pid=$langs->transcountry("ProfId".$i, $mysoc->country_code);
if ($pid == '-') $pid=false;
}
else
{
$pid = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
}
if ($pid)
{
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid.'</td><td>';
$keyforconstant = 'MAIN_PROFID'.$i.'_IN_ADDRESS';
print $form->selectyesno($keyforconstant, isset($conf->global->$keyforconstant)?$conf->global->$keyforconstant:0, 1, $noCountryCode);
print '</td></tr>';
}
}
print '</table>';
@@ -328,6 +280,12 @@ if ($action == 'edit') // Edit
print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS:0,1);
print '</td></tr>';
//Invert sender and recipient
print '<tr class="oddeven"><td>'.$langs->trans("SwapSenderAndRecipientOnPDF").'</td><td>';
print $form->selectyesno('MAIN_INVERT_SENDER_RECIPIENT',(! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT))?$conf->global->MAIN_INVERT_SENDER_RECIPIENT:0,1);
print '</td></tr>';
// Place customer adress to the ISO location
print '<tr class="oddeven"><td>'.$langs->trans("PlaceCustomerAddressToIsoLocation").'</td><td>';
@@ -419,77 +377,26 @@ else // Show
print yn($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS,1);
print '</td></tr>';
// Show prof id 1 in address into pdf
if (! $noCountryCode)
{
$pid1=$langs->transcountry("ProfId1",$mysoc->country_code);
if ($pid1 == '-') $pid1=false;
}
else
{
$pid1 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
}
if ($pid1)
{
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid1.'</td><td>';
print yn($conf->global->MAIN_PROFID1_IN_ADDRESS,1);
print '</td></tr>';
}
// Show prof id 2 in address into pdf
if (! $noCountryCode)
{
$pid2=$langs->transcountry("ProfId2",$mysoc->country_code);
if ($pid2 == '-') $pid2=false;
}
else
{
$pid2 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
}
if ($pid2)
{
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid2.'</td><td>';
print yn($conf->global->MAIN_PROFID2_IN_ADDRESS,1);
print '</td></tr>';
}
// Show prof id 3 in address into pdf
if (! $noCountryCode)
{
$pid3=$langs->transcountry("ProfId3",$mysoc->country_code);
if ($pid3 == '-') $pid3=false;
}
else
{
$pid3 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
}
if ($pid3)
{
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid3.'</td><td>';
print yn($conf->global->MAIN_PROFID3_IN_ADDRESS,1);
print '</td></tr>';
}
// Show prof id 4 in address into pdf
if (! $noCountryCode)
{
$pid4=$langs->transcountry("ProfId4",$mysoc->country_code);
if ($pid4 == '-') $pid4=false;
}
else
{
$pid4 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
}
if ($pid4)
{
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid4.'</td><td>';
print yn($conf->global->MAIN_PROFID4_IN_ADDRESS,1);
print '</td></tr>';
}
// Show prof id in address into pdf
for ($i=1; $i<=6; $i++)
{
if (! $noCountryCode)
{
$pid=$langs->transcountry("ProfId".$i, $mysoc->country_code);
if ($pid == '-') $pid=false;
}
else
{
$pid = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
}
if ($pid)
{
print '<tr class="oddeven"><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid.'</td><td>';
$keyforconstant = 'MAIN_PROFID'.$i.'_IN_ADDRESS';
print yn($conf->global->$keyforconstant, 1);
print '</td></tr>';
}
}
print '</table>'."\n";
print '</div>';

View File

@@ -70,7 +70,7 @@ if ($action == 'updateMask')
}
}
if ($action == 'specimen')
else if ($action == 'specimen')
{
$modele=GETPOST('module','alpha');
@@ -115,7 +115,27 @@ if ($action == 'specimen')
}
}
if ($action == 'set_PROPALE_DRAFT_WATERMARK')
else if ($action == 'setribchq')
{
$rib = GETPOST('rib','alpha');
$chq = GETPOST('chq','alpha');
$res = dolibarr_set_const($db, "FACTURE_RIB_NUMBER",$rib,'chaine',0,'',$conf->entity);
$res = dolibarr_set_const($db, "FACTURE_CHQ_NUMBER",$chq,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
if (! $error)
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
else
{
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
else if ($action == 'set_PROPALE_DRAFT_WATERMARK')
{
$draft = GETPOST('PROPALE_DRAFT_WATERMARK','alpha');
@@ -132,7 +152,7 @@ if ($action == 'set_PROPALE_DRAFT_WATERMARK')
}
}
if ($action == 'set_PROPOSAL_FREE_TEXT')
else if ($action == 'set_PROPOSAL_FREE_TEXT')
{
$freetext = GETPOST('PROPOSAL_FREE_TEXT','none'); // No alpha here, we want exact string
@@ -150,7 +170,7 @@ if ($action == 'set_PROPOSAL_FREE_TEXT')
}
}
if ($action == 'setdefaultduration')
else if ($action == 'setdefaultduration')
{
$res = dolibarr_set_const($db, "PROPALE_VALIDITY_DURATION",$value,'chaine',0,'',$conf->entity);
@@ -166,7 +186,7 @@ if ($action == 'setdefaultduration')
}
}
if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL')
else if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL')
{
$res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL",$value,'chaine',0,'',$conf->entity);
@@ -183,7 +203,7 @@ if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL')
}
// Activate a model
if ($action == 'set')
else if ($action == 'set')
{
$ret = addDocumentModel($value, $type, $label, $scandir);
}
@@ -499,6 +519,106 @@ foreach ($dirmodels as $reldir)
}
print '</table>';
/*
* Payment mode
*/
if (empty($conf->facture->enabled))
{
print '<br>';
print load_fiche_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInProposal"),'','');
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>';
print '<input type="hidden" name="action" value="setribchq">';
print $langs->trans("PaymentMode").'</td>';
print '<td align="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
print "</tr>\n";
print '<tr class="oddeven">';
print "<td>".$langs->trans("SuggestPaymentByRIBOnAccount")."</td>";
print "<td>";
if (! empty($conf->banque->enabled))
{
$sql = "SELECT rowid, label";
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account";
$sql.= " WHERE clos = 0";
$sql.= " AND courant = 1";
$sql.= " AND entity IN (".getEntity('bank_account').")";
$resql=$db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
$i = 0;
if ($num > 0)
{
print '<select name="rib" class="flat" id="rib">';
print '<option value="0">'.$langs->trans("DoNotSuggestPaymentMode").'</option>';
while ($i < $num)
{
$row = $db->fetch_row($resql);
print '<option value="'.$row[0].'"';
print $conf->global->FACTURE_RIB_NUMBER == $row[0] ? ' selected':'';
print '>'.$row[1].'</option>';
$i++;
}
print "</select>";
}
else
{
print "<i>".$langs->trans("NoActiveBankAccountDefined")."</i>";
}
}
}
else
{
print $langs->trans("BankModuleNotActive");
}
print "</td></tr>";
print '<tr class="oddeven">';
print "<td>".$langs->trans("SuggestPaymentByChequeToAddress")."</td>";
print "<td>";
print '<select class="flat" name="chq" id="chq">';
print '<option value="0">'.$langs->trans("DoNotSuggestPaymentMode").'</option>';
print '<option value="-1"'.($conf->global->FACTURE_CHQ_NUMBER?' selected':'').'>'.$langs->trans("MenuCompanySetup").' ('.($mysoc->name?$mysoc->name:$langs->trans("NotDefined")).')</option>';
$sql = "SELECT rowid, label";
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account";
$sql.= " WHERE clos = 0";
$sql.= " AND courant = 1";
$sql.= " AND entity IN (".getEntity('bank_account').")";
$resql=$db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
$i = 0;
while ($i < $num)
{
$row = $db->fetch_row($resql);
print '<option value="'.$row[0].'"';
print $conf->global->FACTURE_CHQ_NUMBER == $row[0] ? ' selected':'';
print '>'.$langs->trans("OwnerOfBankAccount",$row[1]).'</option>';
$i++;
}
}
print "</select>";
print "</td></tr>";
print "</table>";
print "</form>";
}
print '<br>';

View File

@@ -36,7 +36,13 @@ $action=GETPOST('action','alpha');
if ($action == 'convert')
{
$db->query("alter table ".$_GET["table"]." ENGINE=INNODB");
$sql="ALTER TABLE ".$db->escape(GETPOST("table", "aZ09"))." ENGINE=INNODB";
$db->query($sql);
}
if ($action == 'convertutf8')
{
$sql="ALTER TABLE ".$db->escape(GETPOST("table", "aZ09"))." CHARACTER SET utf8 COLLATE utf8_unicode_ci";
$db->query($sql);
}
@@ -111,9 +117,9 @@ else
print '<td><a href="dbtable.php?table='.$obj->Name.'">'.$obj->Name.'</a></td>';
print '<td>'.$obj->Engine.'</td>';
if (isset($row[1]) && $row[1] == "MyISAM")
if (isset($obj->Engine) && $obj->Engine == "MyISAM")
{
print '<td><a href="database-tables.php?action=convert&amp;table='.$row[0].'">'.$langs->trans("Convert").'</a></td>';
print '<td><a class="reposition" href="database-tables.php?action=convert&amp;table='.$obj->Name.'">'.$langs->trans("Convert").' InnoDB</a></td>';
}
else
{
@@ -127,7 +133,12 @@ else
print '<td align="right">'.$obj->Index_length.'</td>';
print '<td align="right">'.$obj->Auto_increment.'</td>';
print '<td align="right">'.$obj->Check_time.'</td>';
print '<td align="right">'.$obj->Collation.'</td>';
print '<td align="right">'.$obj->Collation;
if (isset($obj->Collation) && ($obj->Collation == "utf8mb4_general_ci" || $obj->Collation == "utf8mb4_unicode_ci"))
{
print '<br><a class="reposition" href="database-tables.php?action=convertutf8&amp;table='.$obj->Name.'">'.$langs->trans("Convert").' UTF8</a>';
}
print '</td>';
print '</tr>';
$i++;
}

View File

@@ -2,7 +2,7 @@
/* Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2007-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
* Copyright (C) 2015-2019 Frederic France <frederic.france@netlogic.fr>
* Copyright (C) 2017 Nicolas ZABOURI <info@inovea-conseil.com>
*
* This program is free software; you can redistribute it and/or modify
@@ -214,7 +214,7 @@ if (! $error && $xml)
$includecustom=(empty($xml->dolibarr_htdocs_dir[0]['includecustom'])?0:$xml->dolibarr_htdocs_dir[0]['includecustom']);
// Defined qualified files (must be same than into generate_filelist_xml.php)
$regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
$regextoinclude='\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
$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
$scanfiles = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude);
@@ -339,8 +339,8 @@ if (! $error && $xml)
$out.='<td>'.$i.'</td>' . "\n";
$out.='<td>'.$file['filename'];
if (! preg_match('/^win/i',PHP_OS)) {
$htmltext=$langs->trans("YouCanDeleteFileOnServerWith", 'rm '.DOL_DOCUMENT_ROOT.'/'.$file['filename']);
$out.=' '.$form->textwithpicto('', $htmltext, 1, 'help', '', 0, 2, 'helprm');
$htmltext=$langs->trans("YouCanDeleteFileOnServerWith", 'rm '.DOL_DOCUMENT_ROOT.$file['filename']); // The slash is included int file['filename']
$out.=' '.$form->textwithpicto('', $htmltext, 1, 'help', '', 0, 2, 'helprm'.$i);
}
$out.='</td>' . "\n";
$out.='<td align="center">'.$file['expectedmd5'].'</td>' . "\n";

View File

@@ -29,15 +29,15 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
$langs->load("admin");
$action=GETPOST('action','alpha');
$action=GETPOST('action', 'alpha');
$sortfield = GETPOST('sortfield','alpha');
$sortorder = GETPOST('sortorder','alpha');
$page = GETPOST('page','int');
$sortfield = GETPOST('sortfield', 'alpha');
$sortorder = GETPOST('sortorder', 'alpha');
$page = GETPOST('page', 'int');
if (! $sortorder) $sortorder="DESC";
if (! $sortfield) $sortfield="date";
if (empty($page) || $page == -1) { $page = 0; }
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit;
$offset = $limit * $page;
if (! $user->admin)
@@ -50,10 +50,20 @@ if (! $user->admin)
if ($action == 'delete')
{
$file=$conf->admin->dir_output.'/'.GETPOST('urlfile');
$ret=dol_delete_file($file, 1);
if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs');
else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors');
if (preg_match('/^backup\//', GETPOST('urlfile', 'alpha')))
{
$file=$conf->admin->dir_output.'/backup/'.basename(GETPOST('urlfile', 'alpha'));
$ret=dol_delete_file($file, 1);
if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs');
else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors');
}
else
{
$file=$conf->admin->dir_output.'/documents/'.basename(GETPOST('urlfile', 'alpha'));
$ret=dol_delete_file($file, 1);
if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs');
else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors');
}
$action='';
}
@@ -70,7 +80,7 @@ $type=$db->type;
//var_dump($db);
$help_url='EN:Backups|FR:Sauvegardes|ES:Copias_de_seguridad';
llxHeader('','',$help_url);
llxHeader('', '', $help_url);
?>
<script type="text/javascript">
@@ -110,11 +120,11 @@ jQuery(document).ready(function() {
</script>
<?php
print load_fiche_titre($langs->trans("Backup"),'','title_setup');
print load_fiche_titre($langs->trans("Backup"), '', 'title_setup');
//print_barre_liste($langs->trans("Backup"), '', '', '', '', '', $langs->trans("BackupDesc",DOL_DATA_ROOT), 0, 0, 'title_setup');
print '<div class="center">';
print $langs->trans("BackupDesc",DOL_DATA_ROOT);
print '<div class="center opacitymedium">';
print $langs->trans("BackupDesc", DOL_DATA_ROOT);
print '</div>';
print '<br>';
@@ -128,7 +138,7 @@ print '<br>';
<fieldset id="fieldsetexport"><legend class="legendforfieldsetstep" style="font-size: 3em">1</legend>
<?php
print $langs->trans("BackupDesc3",$dolibarr_main_db_name).'<br>';
print $langs->trans("BackupDesc3", $dolibarr_main_db_name).'<br>';
//print $langs->trans("BackupDescY").'<br>';
print '<br>';
?>
@@ -166,7 +176,7 @@ print '<tr '.$bc[false].'><td style="padding-left: 8px">';
</div>
<?php
}
else if (in_array($type, array('pgsql')))
elseif (in_array($type, array('pgsql')))
{
?>
<div class="formelementrow"><input type="radio" name="what" value="postgresql" id="radio_dump_postgresql" />
@@ -234,6 +244,14 @@ print '<tr '.$bc[false].'><td style="padding-left: 8px">';
<option value="ORACLE">ORACLE</option>
<option value="POSTGRESQL">POSTGRESQL</option>
</select> <br>
<input type="checkbox" name="use_mysql_quick_param" value="yes" id="checkbox_use_quick" />
<label for="checkbox_use_quick">
<?php echo $form->textwithpicto(
$langs->trans('ExportUseMySQLQuickParameter'),
$langs->trans('ExportUseMySQLQuickParameterHelp')
); ?>
</label>
<br/>
<!-- <input type="checkbox" name="drop_database" value="yes"
id="checkbox_drop_database" /> <label for="checkbox_drop_database"><?php echo $langs->trans("AddDropDatabase"); ?></label>
-->
@@ -446,8 +464,10 @@ print "\n";
<br>
<div align="center"><input type="submit" class="button"
value="<?php echo $langs->trans("GenerateBackup") ?>" id="buttonGo" /><br>
<div class="center">
<input type="submit" class="button reposition" value="<?php echo $langs->trans("GenerateBackup") ?>" id="buttonGo">
<input type="hidden" name="page_y" value="<?php echo GETPOST('page_y', 'int'); ?>">
<br>
<br>
<?php
@@ -459,7 +479,7 @@ if (! empty($_SESSION["commandbackuplastdone"]))
//print $paramclear;
// Now run command and show result
// Now show result
print '<b>'.$langs->trans("BackupResult").':</b> ';
print $_SESSION["commandbackupresult"];
@@ -469,7 +489,7 @@ if (! empty($_SESSION["commandbackuplastdone"]))
}
if (! empty($_SESSION["commandbackuptorun"]))
{
print '<br><font class="warning">'.$langs->trans("YouMustRunCommandFromCommandLineAfterLoginToUser",$dolibarr_main_db_user,$dolibarr_main_db_user).':</font><br>'."\n";
print '<br><font class="warning">'.$langs->trans("YouMustRunCommandFromCommandLineAfterLoginToUser", $dolibarr_main_db_user, $dolibarr_main_db_user).':</font><br>'."\n";
print '<textarea id="commandbackuptoruntext" rows="'.ROWS_2.'" class="centpercent">'.$_SESSION["commandbackuptorun"].'</textarea><br>'."\n";
print ajax_autoselect("commandbackuptoruntext", 0);
print '<br>';
@@ -498,8 +518,8 @@ print '</table>';
<div class="ficheaddleft">
<?php
$filearray=dol_dir_list($conf->admin->dir_output.'/backup','files',0,'','',$sortfield,(strtolower($sortorder)=='asc'?SORT_ASC:SORT_DESC),1);
$result=$formfile->list_of_documents($filearray,null,'systemtools','',1,'backup/',1,0,$langs->trans("NoBackupFileAvailable"),0,$langs->trans("PreviousDumpFiles"));
$filearray=dol_dir_list($conf->admin->dir_output.'/backup', 'files', 0, '', '', $sortfield, (strtolower($sortorder)=='asc'?SORT_ASC:SORT_DESC), 1);
$result=$formfile->list_of_documents($filearray, null, 'systemtools', '', 1, 'backup/', 1, 0, $langs->trans("NoBackupFileAvailable"), 0, $langs->trans("PreviousDumpFiles"));
print '<br>';
?>
@@ -519,7 +539,7 @@ print '<br>';
<fieldset><legend class="legendforfieldsetstep" style="font-size: 3em">2</legend>
<?php
print $langs->trans("BackupDesc2",DOL_DATA_ROOT).'<br>';
print $langs->trans("BackupDesc2", DOL_DATA_ROOT).'<br>';
print $langs->trans("BackupDescX").'<br><br>';
?>
@@ -575,7 +595,7 @@ print "\n";
?>
<br>
<div align="center"><input type="submit" class="button"
<div class="center"><input type="submit" class="button reposition"
value="<?php echo $langs->trans("GenerateBackup") ?>" id="buttonGo" /><br>
<br>
</div>
@@ -586,8 +606,8 @@ print "\n";
<div class="ficheaddleft">
<?php
$filearray=dol_dir_list($conf->admin->dir_output.'/documents','files',0,'','',$sortfield,(strtolower($sortorder)=='asc'?SORT_ASC:SORT_DESC),1);
$result=$formfile->list_of_documents($filearray,null,'systemtools','',1,'documents/',1,0,$langs->trans("NoBackupFileAvailable"),0,$langs->trans("PreviousDumpFiles"));
$filearray=dol_dir_list($conf->admin->dir_output.'/documents', 'files', 0, '', '', $sortfield, (strtolower($sortorder)=='asc'?SORT_ASC:SORT_DESC), 1);
$result=$formfile->list_of_documents($filearray, null, 'systemtools', '', 1, 'documents/', 1, 0, $langs->trans("NoBackupFileAvailable"), 0, $langs->trans("PreviousDumpFiles"));
print '<br>';
?>
@@ -598,9 +618,6 @@ print '<br>';
</fieldset>
</form>
<?php
// End of page

View File

@@ -133,7 +133,8 @@ if ($what == 'mysql')
dol_syslog("Command are restricted to ".$dolibarr_main_restrict_os_commands.". We check that one of this command is inside ".$cmddump);
foreach($arrayofallowedcommand as $allowedcommand)
{
if (preg_match('/'.preg_quote($allowedcommand,'/').'/', $cmddump))
$basenamecmddump=basename($cmddump);
if (preg_match('/^'.preg_quote($allowedcommand,'/').'$/', $basenamecmddump)) // the provided command $cmddump must be an allowed command
{
$ok=1;
break;

View File

@@ -30,20 +30,22 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
$langs->load("admin");
$action=GETPOST('action','alpha');
$what=GETPOST('what','alpha');
$export_type=GETPOST('export_type','alpha');
$file=GETPOST('zipfilename_template','alpha');
$action=GETPOST('action', 'alpha');
$what=GETPOST('what', 'alpha');
$export_type=GETPOST('export_type', 'alpha');
$file=GETPOST('zipfilename_template', 'alpha');
$compression = GETPOST('compression');
$sortfield = GETPOST('sortfield','alpha');
$sortorder = GETPOST('sortorder','alpha');
$page = GETPOST("page",'int');
$file = dol_sanitizeFileName($file);
$sortfield = GETPOST('sortfield', 'alpha');
$sortorder = GETPOST('sortorder', 'alpha');
$page = GETPOST("page", 'int');
if (! $sortorder) $sortorder="DESC";
if (! $sortfield) $sortfield="date";
if ($page < 0) { $page = 0; }
elseif (empty($page)) $page = 0;
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit;
$offset = $limit * $page;
if (! $user->admin) accessforbidden();
@@ -57,10 +59,11 @@ $errormsg='';
if ($action == 'delete')
{
$file=$conf->admin->dir_output.'/'.GETPOST('urlfile');
$ret=dol_delete_file($file, 1);
if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs');
else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors');
$filerelative = dol_sanitizeFileName(GETPOST('urlfile', 'alpha'));
$filepath=$conf->admin->dir_output.'/'.$filerelative;
$ret=dol_delete_file($filepath, 1);
if ($ret) setEventMessages($langs->trans("FileWasRemoved", $filerelative), null, 'mesgs');
else setEventMessages($langs->trans("ErrorFailToDeleteFile", $filerelative), null, 'errors');
$action='';
}
@@ -109,21 +112,27 @@ $utils = new Utils($db);
if ($compression == 'zip')
{
$ret = dol_compress_dir(DOL_DATA_ROOT, $outputdir."/".$file, $compression);
$ret = dol_compress_dir(DOL_DATA_ROOT, $outputdir."/".$file, $compression, '/(\.log|\/temp\/|documents\/admin\/documents\/)/');
if ($ret < 0)
{
$errormsg = $langs->trans("ErrorFailedToWriteInDir",$outputfile);
$errormsg = $langs->trans("ErrorFailedToWriteInDir", $outputdir);
}
}
elseif (in_array($compression, array('gz', 'bz')))
{
$file = substr($file, 0, strrpos($file, '.'));
$userlogin = ($user->login ? $user->login : 'unknown');
$outputfile = $conf->admin->dir_temp.'/export_files.'.$userlogin.'.out'; // File used with popen method
$file = substr($file, 0, strrpos($file, '.'));
$file .= '.tar';
$cmd = 'tar -cf '.$outputdir."/".$file." --exclude=documents/admin/documents -C ".DOL_DATA_ROOT." ".DOL_DATA_ROOT."/../documents/";
exec($cmd, $out, $retval);
//var_dump($cmd, DOL_DATA_ROOT);exit;
if ($retval != 0)
// We also exclude '/temp/' dir and 'documents/admin/documents'
$cmd = "tar -cf ".$outputdir."/".$file." --exclude-vcs --exclude 'temp' --exclude 'dolibarr.log' --exclude='documents/admin/documents' -C ".dirname(DOL_DATA_ROOT)." ".basename(DOL_DATA_ROOT);
$result = $utils->executeCLI($cmd, $outputfile);
$retval = $result['error'];
if ($result['result'] || ! empty($retval))
{
$langs->load("errors");
dol_syslog("Documents tar retval after exec=".$retval, LOG_ERR);
@@ -133,15 +142,17 @@ elseif (in_array($compression, array('gz', 'bz')))
{
if ($compression == 'gz')
{
$cmd = "gzip " . $outputdir."/".$file;
$cmd = "gzip -f " . $outputdir."/".$file;
}
if ($compression == 'bz')
{
$cmd = "bzip2 " . $outputdir."/".$file;
$cmd = "bzip2 -f " . $outputdir."/".$file;
}
exec($cmd, $out, $retval);
if ($retval != 0)
$result = $utils->executeCLI($cmd, $outputfile);
$retval = $result['error'];
if ($result['result'] || ! empty($retval))
{
$errormsg = 'Error '.$compression.' generation return '.$retval;
unlink($outputdir."/".$file);
@@ -163,4 +174,3 @@ header("Location: dolibarr_export.php");
$time_end = time();
$db->close();

View File

@@ -48,6 +48,17 @@ if (! empty($conf->syslog->enabled))
*/
if ($action=='purge' && ! preg_match('/^confirm/i',$choice) && ($choice != 'allfiles' || $confirm == 'yes') )
{
// Increase limit of time. Works only if we are not in safe mode
$ExecTimeLimit=600;
if (!empty($ExecTimeLimit))
{
$err=error_reporting();
error_reporting(0); // Disable all errors
//error_reporting(E_ALL);
@set_time_limit($ExecTimeLimit); // Need more than 240 on Windows 7/64
error_reporting($err);
}
require_once DOL_DOCUMENT_ROOT.'/core/class/utils.class.php';
$utils = new Utils($db);
$result = $utils->purgeFiles($choice);

View File

@@ -953,7 +953,7 @@ class Setup extends DolibarrApi
$includecustom=(empty($xml->dolibarr_htdocs_dir[0]['includecustom'])?0:$xml->dolibarr_htdocs_dir[0]['includecustom']);
// Defined qualified files (must be same than into generate_filelist_xml.php)
$regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
$regextoinclude='\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|bak|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
$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
$scanfiles = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude);

View File

@@ -88,18 +88,21 @@ if (preg_match('/api\/index\.php\/explorer/', $_SERVER["PHP_SELF"]) && ! empty($
// index.php/xxx called by any REST client to run API
$reg=array();
preg_match('/index\.php\/([^\/]+)(.*)$/', $_SERVER["PHP_SELF"], $reg);
// .../index.php/categories?sortfield=t.rowid&sortorder=ASC
// Set the flag to say to refresh (when we reload the explorer, production must be for API call only)
$refreshcache=false;
// When in production mode, a file api/temp/routes.php is created with the API available of current call.
// But, if we set $refreshcache to false, so it may have only one API in the routes.php file if we make a call for one API without
// using the explorer. And when we make another call for another API, the API is not into the api/temp/routes.php and a 404 is returned.
// So we force refresh to each call.
$refreshcache=(empty($conf->global->API_PRODUCTION_DO_NOT_ALWAYS_REFRESH_CACHE) ? true : false);
if (! empty($reg[1]) && $reg[1] == 'explorer' && ($reg[2] == '/swagger.json' || $reg[2] == '/swagger.json/root' || $reg[2] == '/resources.json' || $reg[2] == '/resources.json/root'))
{
$refreshcache=true;
}
$api = new DolibarrApi($db, '', $refreshcache);
//var_dump($api->r->apiVersionMap);
@@ -115,7 +118,7 @@ UploadFormat::$allowedMimeTypes = array('image/jpeg', 'image/png', 'text/plain',
// Call Explorer file for all APIs definitions
// Call Explorer file for all APIs definitions (this part is slow)
if (! empty($reg[1]) && $reg[1] == 'explorer' && ($reg[2] == '/swagger.json' || $reg[2] == '/swagger.json/root' || $reg[2] == '/resources.json' || $reg[2] == '/resources.json/root'))
{
// Scan all API files to load them
@@ -253,5 +256,6 @@ if (! empty($reg[1]) && ($reg[1] != 'explorer' || ($reg[2] != '/swagger.json' &&
//var_dump($api->r->apiVersionMap);
//exit;
// Call API (we suppose we found it)
// Call API (we suppose we found it).
// The handle will use the file api/temp/routes.php to get data to run the API. If the file exists and the entry for API is not found, it will return 404.
$api->r->handle();

View File

@@ -61,7 +61,7 @@ function printBookmarksList($aDb, $aLangs)
{
foreach($_POST as $key => $val)
{
if (preg_match('/^search_/', $key) && $val != '') $tmpurl.=($tmpurl?'&':'').$key.'='.$val;
if ((preg_match('/^search_/', $key) || in_array($key, array('viewstatut')) ) && $val != '') $tmpurl.=($tmpurl?'&':'').$key.'='.$val;
}
}
$url.=($tmpurl?'?'.$tmpurl:'');
@@ -72,6 +72,7 @@ function printBookmarksList($aDb, $aLangs)
$ret.= '<!-- form with POST method by default, will be replaced with GET for external link by js -->'."\n";
$ret.= '<form id="actionbookmark" name="actionbookmark" method="POST" action="">';
$ret.= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
$ret.= '<select name="bookmark" id="boxbookmark" class="flat boxcombo vmenusearchselectcombo" alt="Bookmarks">';
$ret.= '<option hidden value="listbookmarks" class="optiongrey" selected rel="'.DOL_URL_ROOT.'/bookmarks/list.php">'.$langs->trans('Bookmarks').'</option>';
$ret.= '<option value="listbookmark" class="optionblue" rel="'.dol_escape_htmltag(DOL_URL_ROOT.'/bookmarks/list.php').'" ';

View File

@@ -49,11 +49,11 @@ switch($action)
// Recuperation des donnees en fonction de la source (liste deroulante ou champ texte) ...
if ( $_POST['hdnSource'] == 'LISTE' )
{
$sql.= " AND p.rowid = ".$_POST['selProduit'];
$sql.= " AND p.rowid = ".((int) GETPOST('selProduit', 'int'));
}
else if ( $_POST['hdnSource'] == 'REF' )
{
$sql.= " AND p.ref = '".$_POST['txtRef']."'";
$sql.= " AND p.ref = '".$db->escape(GETPOST('txtRef', 'alpha'))."'";
}
$result = $db->query($sql);

View File

@@ -55,17 +55,6 @@ $langs->loadLangs(array("main","bills","cashdesk"));
onfocus="javascript: this.select();" />
</td>
<td class="select_design maxwidthonsmartphone">
<?php /*
$selected='';
$htmlname='idprod';
$status=-1;
$rice_level=$company->price_level;
print ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/product/ajax/products.php', 'outjson=1&price_level='.$price_level.'&type='.$filtertype.'&mode=1&status='.$status.'&finished='.$finished, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT);
if (! $hidelabel) print $langs->trans("RefOrLabel").' : ';
print '<input type="text" size="4" name="search_'.$htmlname.'" id="search_'.$htmlname.'" value="'.$selected_input_value.'" />';
*/
?>
<select id="selProduit" class="maxwidthonsmartphone" name="selProduit" onchange="javascript: setSource('LISTE');">
<?php
print '<option value="0">'.$top_liste_produits.'</option>'."\n";

View File

@@ -917,7 +917,8 @@ class Categorie extends CommonObject
{
// phpcs:enable
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."categorie";
$sql.= " WHERE fk_parent = ".$this->id;
$sql .= " WHERE fk_parent = ".$this->id;
$sql .= " AND entity IN (".getEntity('category').")";
$res = $this->db->query($sql);
if ($res)

View File

@@ -65,9 +65,12 @@ $arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css')
llxHeader('',$title,'','',0,0,$arrayofjs,$arrayofcss);
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/categories/card.php?action=create&type='.$type.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type='.$type).'"><span class="valignmiddle">'.$langs->trans("NewCategory").'</span>';
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
$newcardbutton.= '</a>';
$newcardbutton='';
if (! empty($user->rights->categorie->creer)) {
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/categories/card.php?action=create&type='.$type.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type='.$type).'"><span class="valignmiddle">'.$langs->trans("NewCategory").'</span>';
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
$newcardbutton.= '</a>';
}
print load_fiche_titre($title, $newcardbutton);

View File

@@ -7,7 +7,8 @@
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Cedric GROSS <c.gross@kreiz-it.fr>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2019 Ferran Marcet <fmarcet@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
@@ -248,7 +249,10 @@ if ($action == 'add')
{
$object->label = $langs->transnoentitiesnoconv("Action".$object->type_code)."\n";
}
else $object->label = $cactioncomm->libelle;
else {
$cactioncomm->fetch($object->type_code);
$object->label = $cactioncomm->label;
}
}
}
$object->fk_project = isset($_POST["projectid"])?$_POST["projectid"]:0;
@@ -268,7 +272,7 @@ if ($action == 'add')
$object->datep = $datep;
$object->datef = $datef;
$object->percentage = $percentage;
$object->duree=((float) (GETPOST('dureehour') * 60) + (float) GETPOST('dureemin')) * 60;
$object->duree=(((int) GETPOST('dureehour') * 60) + (int) GETPOST('dureemin')) * 60;
$transparency=(GETPOST("transparency")=='on'?1:0);

View File

@@ -572,6 +572,7 @@ class ActionComm extends CommonObject
$sql = "SELECT a.id,";
$sql.= " a.id as ref,";
$sql.= " a.entity,";
$sql.= " a.ref_ext,";
$sql.= " a.datep,";
$sql.= " a.datep2,";
@@ -608,6 +609,7 @@ class ActionComm extends CommonObject
$obj = $this->db->fetch_object($resql);
$this->id = $obj->id;
$this->entity = $obj->entity;
$this->ref = $obj->ref;
$this->ref_ext = $obj->ref_ext;
@@ -774,7 +776,7 @@ class ActionComm extends CommonObject
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
$res=$this->db->query($sql);
if ($res < 0) {
if (!$res) {
$this->error=$this->db->lasterror();
$error++;
}
@@ -785,7 +787,7 @@ class ActionComm extends CommonObject
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
$res=$this->db->query($sql);
if ($res < 0) {
if (!$res) {
$this->error=$this->db->lasterror();
$error++;
}
@@ -1262,10 +1264,12 @@ class ActionComm extends CommonObject
if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips
if ((!$user->rights->agenda->allactions->read && $this->author->id != $user->id) || (!$user->rights->agenda->myactions->read && $this->author->id == $user->id))
$option = 'nolink';
if ((!$user->rights->agenda->allactions->read && $this->authorid != $user->id) || (!$user->rights->agenda->myactions->read && $this->authorid == $user->id))
{
$option = 'nolink';
}
$label = $this->label;
$label = $this->label;
if (empty($label)) $label=$this->libelle; // For backward compatibility
$result='';
@@ -1391,6 +1395,8 @@ class ActionComm extends CommonObject
*/
function build_exportfile($format,$type,$cachedelay,$filename,$filters)
{
global $hookmanager;
// phpcs:enable
global $conf,$langs,$dolibarr_main_url_root,$mysoc;
@@ -1456,6 +1462,11 @@ class ActionComm extends CommonObject
$sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."actioncomm as a)";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_author"; // Link to get author of event for export
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = a.fk_soc";
$parameters=array('filters' => $filters);
$reshook=$hookmanager->executeHooks('printFieldListFrom', $parameters); // Note that $action and $object may have been modified by hook
$sql.=$hookmanager->resPrint;
// We must filter on assignement table
if ($filters['logint']) $sql.=", ".MAIN_DB_PREFIX."actioncomm_resources as ar";
$sql.= " WHERE a.fk_action=c.id";
@@ -1501,7 +1512,13 @@ class ActionComm extends CommonObject
elseif ($result < 0 || $condition == '=') $sql.= " AND ar.fk_element = 0";
}
}
$sql.= " AND a.datep IS NOT NULL"; // To exclude corrupted events and avoid errors in lightning/sunbird import
$parameters=array('filters' => $filters);
$reshook=$hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook
$sql.=$hookmanager->resPrint;
$sql.= " ORDER by datep";
//print $sql;exit;

View File

@@ -1009,6 +1009,11 @@ if (! empty($hookmanager->resArray['eventarray'])) {
}
}
// Sort events
foreach($eventarray as $keyDate => &$dateeventarray)
{
usort($dateeventarray, 'sort_events_by_date');
}
$maxnbofchar=0;
@@ -1703,3 +1708,22 @@ function dol_color_minus($color, $minus, $minusunit = 16)
}
return $newcolor;
}
/**
* Sort events by date
*
* @param object $a Event A
* @param object $b Event B
* @return int < 0 if event A should be before event B, > 0 otherwise, 0 if they have the exact same time slot
*/
function sort_events_by_date($a, $b)
{
if($a->datep != $b->datep)
{
return $a->datep - $b->datep;
}
// If both events have the same start time, longest first
return $b->datef - $a->datef;
}

View File

@@ -43,7 +43,7 @@ $action=GETPOST('action','alpha');
$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'actioncommlist'; // To manage different context of search
$resourceid=GETPOST("search_resourceid","int")?GETPOST("search_resourceid","int"):GETPOST("resourceid","int");
$pid=GETPOST("search_projectid",'int',3)?GETPOST("search_projectid",'int',3):GETPOST("projectid",'int',3);
$status=GETPOST("search_status",'alpha')?GETPOST("search_status",'alpha'):GETPOST("status",'alpha');
$status=(GETPOST("search_status",'alpha') != '')?GETPOST("search_status",'alpha'):GETPOST("status",'alpha');
$type=GETPOST('search_type','alphanohtml')?GETPOST('search_type','alphanohtml'):GETPOST('type','alphanohtml');
$optioncss = GETPOST('optioncss','alpha');
$year=GETPOST("year",'int');
@@ -92,7 +92,7 @@ $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 == null) { $page = 0 ; }
if (empty($page) || $page == -1) { $page = 0 ; }
$offset = $limit * $page ;
if (! $sortorder)
{
@@ -524,6 +524,7 @@ if ($resql)
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php';
$caction=new CActionComm($db);
$arraylist=$caction->liste_array(1, 'code', '', (empty($conf->global->AGENDA_USE_EVENT_TYPE)?1:0), '', 1);
$contactListCache = array();
while ($i < min($num,$limit))
{
@@ -634,7 +635,34 @@ if ($resql)
// Contact
if (! empty($arrayfields['a.fk_contact']['checked'])) {
print '<td>';
if ($obj->fk_contact > 0)
$actionstatic->fetchResources();
if(!empty($actionstatic->socpeopleassigned))
{
$contactList = array();
foreach ($actionstatic->socpeopleassigned as $socpeopleId => $socpeopleassigned)
{
if(!isset($contactListCache[$socpeopleassigned['id']]))
{
// if no cache found we fetch it
$contact = new Contact($db);
if($contact->fetch($socpeopleassigned['id'])>0)
{
$contactListCache[$socpeopleassigned['id']] = $contact->getNomUrl(1,'',28);
$contactList[] = $contact->getNomUrl(1,'',28);
}
}
else{
// use cache
$contactList[] = $contactListCache[$socpeopleassigned['id']];
}
}
if(!empty($contactList)){
print implode(', ', $contactList);
}
}
elseif ($obj->fk_contact > 0) //keep for retrocompatibility with faraway event
{
$contactstatic->id=$obj->fk_contact;
$contactstatic->email=$obj->email;

View File

@@ -1189,32 +1189,32 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
}
$ids1='';$ids2='';
if (count($cases1[$h]) && array_keys($cases1[$h])) $ids1=join(',',array_keys($cases1[$h]));
if (count($cases2[$h]) && array_keys($cases2[$h])) $ids2=join(',',array_keys($cases2[$h]));
if (is_array($cases1[$h]) && count($cases1[$h]) && array_keys($cases1[$h])) $ids1=join(',',array_keys($cases1[$h]));
if (is_array($cases2[$h]) && count($cases2[$h]) && array_keys($cases2[$h])) $ids2=join(',',array_keys($cases2[$h]));
if ($h == $begin_h) echo '<td class="'.$style.'_peruserleft cal_peruser'.($var?' cal_impair '.$style.'_impair':'').'">';
else echo '<td class="'.$style.' cal_peruser'.($var?' cal_impair '.$style.'_impair':'').'">';
if (count($cases1[$h]) == 1) // only 1 event
if (is_array($cases1[$h]) && count($cases1[$h]) == 1) // only 1 event
{
$output = array_slice($cases1[$h], 0, 1);
$title1=$langs->trans("Ref").' '.$ids1.($title1?' - '.$title1:'');
if ($output[0]['string']) $title1.=($title1?' - ':'').$output[0]['string'];
if ($output[0]['color']) $color1 = $output[0]['color'];
}
else if (count($cases1[$h]) > 1)
else if (is_array($cases1[$h]) && count($cases1[$h]) > 1)
{
$title1=$langs->trans("Ref").' '.$ids1.($title1?' - '.$title1:'');
$color1='222222';
}
if (count($cases2[$h]) == 1) // only 1 event
if (is_array($cases2[$h]) && count($cases2[$h]) == 1) // only 1 event
{
$output = array_slice($cases2[$h], 0, 1);
$title2=$langs->trans("Ref").' '.$ids2.($title2?' - '.$title2:'');
if ($output[0]['string']) $title2.=($title2?' - ':'').$output[0]['string'];
if ($output[0]['color']) $color2 = $output[0]['color'];
}
else if (count($cases2[$h]) > 1)
else if (is_array($cases2[$h]) && count($cases2[$h]) > 1)
{
$title2=$langs->trans("Ref").' '.$ids2.($title2?' - '.$title2:'');
$color2='222222';

View File

@@ -42,7 +42,7 @@ $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 == null) { $page = 0 ; }
if (empty($page) || $page == -1) { $page = 0 ; }
$offset = $limit * $page ;
if (! $sortorder) $sortorder="DESC";
if (! $sortfield) $sortfield="a.datep";

View File

@@ -477,7 +477,7 @@ if ($object->id > 0)
print '</td><td>';
if ($action == 'editshipping')
{
$form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->shipping_method_id,'shipping_method_id');
$form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->shipping_method_id,'shipping_method_id', 1);
}
else
{

View File

@@ -471,13 +471,13 @@ if (empty($reshook))
if ($result)
{
setEventMessages($langs->trans("MailSuccessfulySent",$mailfile->getValidAddress($object->email_from,2),$mailfile->getValidAddress($object->sendto,2)), null, 'mesgs');
$action = '';
}
else
{
setEventMessages($langs->trans("ResultKo").'<br>'.$mailfile->error.' '.$result, null, 'errors');
$action = 'test';
}
$action='';
}
}
@@ -835,7 +835,7 @@ else
{
// EMailing feature may be a spam problem, so when you host several users/instance, having this option may force each user to use their own SMTP agent.
// You ensure that every user is using its own SMTP server when using the mass emailing module.
$linktoadminemailbefore='<a href="'.DOL_URL_ROOT.'/admin/mails.php">';
$linktoadminemailbefore='<a href="'.DOL_URL_ROOT.'/admin/mails_emailing.php">';
$linktoadminemailend='</a>';
setEventMessages($langs->trans("MailSendSetupIs", $listofmethods[$sendingmode]), null, 'warnings');
setEventMessages($langs->trans("MailSendSetupIs2", $linktoadminemailbefore, $linktoadminemailend, $langs->transnoentitiesnoconv("MAIN_MAIL_SENDMODE"), $listofmethods['smtps']), null, 'warnings');
@@ -870,7 +870,7 @@ else
}
$text.=$langs->trans('ConfirmSendingEmailing').'<br>';
$text.=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,300);
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('SendMailing'), $text, 'sendallconfirmed', $formquestion, '', 1, 330, 600);
}
}

View File

@@ -548,7 +548,7 @@ class Mailing extends CommonObject
$result = '';
$companylink = '';
$label = '<u>' . $langs->trans("ShowEmailing") . '</u>';
$label = '<u>' . $langs->trans("ShowEMailing") . '</u>';
$label.= '<br>';
$label.= '<b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
@@ -567,7 +567,7 @@ class Mailing extends CommonObject
{
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
{
$label=$langs->trans("ShowEmailing");
$label=$langs->trans("ShowEMailing");
$linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"';
}
$linkclose.=' title="'.dol_escape_htmltag($label, 1).'"';

View File

@@ -321,7 +321,7 @@ if (empty($reshook))
$datep = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
$date_delivery = dol_mktime(12, 0, 0, GETPOST('date_livraisonmonth'), GETPOST('date_livraisonday'), GETPOST('date_livraisonyear'));
$duration = GETPOST('duree_validite');
$duration = GETPOST('duree_validite', 'int');
if (empty($datep)) {
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors');
@@ -759,11 +759,12 @@ if (empty($reshook))
$qty = GETPOST('qty' . $predef);
$remise_percent = GETPOST('remise_percent' . $predef);
if (empty($remise_percent)) $remise_percent=0;
// Extrafields
$extrafieldsline = new ExtraFields($db);
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
$array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline, $predef);
$array_options = $extrafieldsline->getOptionalsFromPost($object->table_element_line, $predef);
// Unset extrafield
if (is_array($extralabelsline)) {
// Get extra fields
@@ -1131,7 +1132,7 @@ if (empty($reshook))
// Extrafields
$extrafieldsline = new ExtraFields($db);
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
$array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline);
$array_options = $extrafieldsline->getOptionalsFromPost($object->table_element_line);
// Unset extrafield
if (is_array($extralabelsline)) {
// Get extra fields
@@ -1543,7 +1544,7 @@ if ($action == 'create')
print '</td></tr>';
// Validaty duration
print '<tr><td class="fieldrequired">' . $langs->trans("ValidityDuration") . '</td><td><input name="duree_validite" size="5" value="' . $conf->global->PROPALE_VALIDITY_DURATION . '"> ' . $langs->trans("days") . '</td></tr>';
print '<tr><td class="fieldrequired">' . $langs->trans("ValidityDuration") . '</td><td><input name="duree_validite" class="width50" value="' . (GETPOST('duree_validite', 'int') ? GETPOST('duree_validite', 'int') : $conf->global->PROPALE_VALIDITY_DURATION) . '"> ' . $langs->trans("days") . '</td></tr>';
// Terms of payment
print '<tr><td class="nowrap fieldrequired">' . $langs->trans('PaymentConditionsShort') . '</td><td>';

View File

@@ -1316,9 +1316,9 @@ class Propal extends CommonObject
// Hook of thirdparty module
if (is_object($hookmanager))
{
$parameters=array('objFrom'=>$this,'clonedObj'=>$clonedObj);
$parameters=array('objFrom'=>$this,'clonedObj'=>$object);
$action='';
$reshook=$hookmanager->executeHooks('createFrom',$parameters,$clonedObj,$action); // Note that $action and $object may have been modified by some hooks
$reshook=$hookmanager->executeHooks('createFrom',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) $error++;
}
}

View File

@@ -265,13 +265,12 @@ $sql.= " ava.rowid as availability,";
$sql.= " state.code_departement as state_code, state.nom as state_name,";
$sql.= ' p.rowid, p.entity, p.note_private, p.total_ht, p.tva as total_vat, p.total as total_ttc, p.localtax1, p.localtax2, p.ref, p.ref_client, p.fk_statut, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,p.date_livraison as ddelivery,';
$sql.= ' p.datec as date_creation, p.tms as date_update,';
$sql.= " pr.rowid as project_id, pr.ref as project_ref,";
if (! $user->rights->societe->client->voir && ! $socid) $sql .= " sc.fk_soc, sc.fk_user,";
$sql.= " pr.rowid as project_id, pr.ref as project_ref, pr.title as project_label,";
$sql.= ' u.login';
if (! $user->rights->societe->client->voir && ! $socid) $sql .= ", sc.fk_soc, sc.fk_user";
if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc";
// Add fields from extrafields
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
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
@@ -760,6 +759,12 @@ if ($resql)
$objectstatic->id=$obj->rowid;
$objectstatic->ref=$obj->ref;
$companystatic->id=$obj->socid;
$companystatic->name=$obj->name;
$companystatic->client=$obj->client;
$companystatic->code_client=$obj->code_client;
$companystatic->email=$obj->email;
print '<tr class="oddeven">';
if (! empty($arrayfields['p.ref']['checked']))
@@ -812,20 +817,16 @@ if ($resql)
{
// Project ref
print '<td class="nocellnopadd nowrap">';
if ($obj->project_id) {
$projectstatic->fetch($obj->project_id);
if ($obj->project_id > 0) {
$projectstatic->id=$obj->project_id;
$projectstatic->ref=$obj->project_ref;
$projectstatic->title=$obj->project_label;
print $projectstatic->getNomUrl(1);
}
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
$companystatic->id=$obj->socid;
$companystatic->name=$obj->name;
$companystatic->client=$obj->client;
$companystatic->code_client=$obj->code_client;
$companystatic->email=$obj->email;
// Thirdparty
if (! empty($arrayfields['s.nom']['checked']))
{
@@ -971,9 +972,7 @@ if ($resql)
$nbofsalesrepresentative=count($listsalesrepresentatives);
if ($nbofsalesrepresentative > 3) // We print only number
{
print '<a href="'.DOL_URL_ROOT.'/societe/commerciaux.php?socid='.$companystatic->id.'">';
print $nbofsalesrepresentative;
print '</a>';
}
else if ($nbofsalesrepresentative > 0)
{

View File

@@ -2,6 +2,7 @@
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2019 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.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
@@ -60,8 +61,10 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
//if ($user->rights->societe->creer)
//if ($user->rights->facture->creer)
$amount_ttc_1=GETPOST('amount_ttc_1');
$amount_ttc_2=GETPOST('amount_ttc_2');
$amount_ttc_1 = GETPOST('amount_ttc_1');
$amount_ttc_1 = price2num($amount_ttc_1);
$amount_ttc_2 = GETPOST('amount_ttc_2');
$amount_ttc_2 = price2num($amount_ttc_2);
$error=0;
$remid=GETPOST("remid")?GETPOST("remid"):0;
@@ -118,7 +121,7 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
$newdiscount2->datec=$discount->datec;
$newdiscount1->tva_tx=$discount->tva_tx;
$newdiscount2->tva_tx=$discount->tva_tx;
$newdiscount1->amount_ttc=$_POST["amount_ttc_1"];
$newdiscount1->amount_ttc=$amount_ttc_1;
$newdiscount2->amount_ttc=price2num($discount->amount_ttc-$newdiscount1->amount_ttc);
$newdiscount1->amount_ht=price2num($newdiscount1->amount_ttc/(1+$newdiscount1->tva_tx/100),'MT');
$newdiscount2->amount_ht=price2num($newdiscount2->amount_ttc/(1+$newdiscount2->tva_tx/100),'MT');
@@ -127,6 +130,8 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
$db->begin();
$discount->fk_facture_source=0; // This is to delete only the require record (that we will recreate with two records) and not all family with same fk_facture_source
// This is to delete only the require record (that we will recreate with two records) and not all family with same fk_invoice_supplier_source
$discount->fk_invoice_supplier_source=0;
$res=$discount->delete($user);
$newid1=$newdiscount1->create($user);
$newid2=$newdiscount2->create($user);

View File

@@ -662,7 +662,7 @@ if (empty($reshook))
// Extrafields
$extrafieldsline = new ExtraFields($db);
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
$array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline, $predef);
$array_options = $extrafieldsline->getOptionalsFromPost($object->table_element_line, $predef);
// Unset extrafield
if (is_array($extralabelsline)) {
// Get extra fields
@@ -1025,7 +1025,7 @@ if (empty($reshook))
// Extrafields Lines
$extrafieldsline = new ExtraFields($db);
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
$array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline);
$array_options = $extrafieldsline->getOptionalsFromPost($object->table_element_line);
// Unset extrafield POST Data
if (is_array($extralabelsline)) {
foreach ($extralabelsline as $key => $value) {
@@ -1436,11 +1436,11 @@ if ($action == 'create' && $user->rights->commande->creer)
if ($element == 'order' || $element == 'commande') {
$element = $subelement = 'commande';
}
if ($element == 'propal') {
elseif ($element == 'propal') {
$element = 'comm/propal';
$subelement = 'propal';
}
if ($element == 'contract') {
elseif ($element == 'contract') {
$element = $subelement = 'contrat';
}

View File

@@ -1212,8 +1212,12 @@ class Commande extends CommonOrder
$this->fk_delivery_address = $object->fk_delivery_address;
$this->contact_id = $object->contactid;
$this->ref_client = $object->ref_client;
$this->note_private = $object->note_private;
$this->note_public = $object->note_public;
if (empty($conf->global->MAIN_DISABLE_PROPAGATE_NOTES_FROM_ORIGIN))
{
$this->note_private = $object->note_private;
$this->note_public = $object->note_public;
}
$this->origin = $object->element;
$this->origin_id = $object->id;

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2019 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
@@ -243,11 +243,10 @@ $sql.= " state.code_departement as state_code, state.nom as state_name,";
$sql.= ' c.rowid, c.ref, c.total_ht, c.tva as total_tva, c.total_ttc, c.ref_client,';
$sql.= ' c.date_valid, c.date_commande, c.note_private, c.date_livraison as date_delivery, c.fk_statut, c.facture as billed,';
$sql.= ' c.date_creation as date_creation, c.tms as date_update,';
$sql.= " p.rowid as project_id, p.ref as project_ref";
$sql.= " p.rowid as project_id, p.ref as project_ref, p.title as project_label";
if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc";
// Add fields from extrafields
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
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
@@ -957,10 +956,14 @@ if ($resql)
// Project
if (! empty($arrayfields['p.project_ref']['checked']))
{
$projectstatic->id=$obj->project_id;
$projectstatic->ref=$obj->project_ref;
print '<td>';
if ($obj->project_id > 0) print $projectstatic->getNomUrl(1);
print '<td class="nocellnopadd nowrap">';
if ($obj->project_id > 0)
{
$projectstatic->id=$obj->project_id;
$projectstatic->ref=$obj->project_ref;
$projectstatic->title=$obj->project_label;
print $projectstatic->getNomUrl(1);
}
print '</td>';
if (! $i) $totalarray['nbfield']++;
}

View File

@@ -44,6 +44,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php';
require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php';
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.php';
require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php';
@@ -367,6 +368,7 @@ $paymentstatic=new Paiement($db);
$paymentsupplierstatic=new PaiementFourn($db);
$paymentvatstatic=new TVA($db);
$paymentsalstatic=new PaymentSalary($db);
$paymentvariousstatic=new PaymentVarious($db);
$donstatic=new Don($db);
$paymentexpensereportstatic=new PaymentExpenseReport($db);
$bankstatic=new Account($db);
@@ -1146,13 +1148,13 @@ if ($resql)
if ($links[$key]['type']=='payment')
{
$paymentstatic->id=$links[$key]['url_id'];
$paymentstatic->ref=$links[$key]['url_id'];
$paymentstatic->ref=$links[$key]['url_id']; // FIXME This is id, not ref of payment
print ' '.$paymentstatic->getNomUrl(2);
}
elseif ($links[$key]['type']=='payment_supplier')
{
$paymentsupplierstatic->id=$links[$key]['url_id'];
$paymentsupplierstatic->ref=$links[$key]['url_id'];
$paymentsupplierstatic->ref=$links[$key]['url_id']; // FIXME This is id, not ref of payment
print ' '.$paymentsupplierstatic->getNomUrl(2);
}
elseif ($links[$key]['type']=='payment_sc')
@@ -1192,6 +1194,12 @@ if ($resql)
$paymentexpensereportstatic->ref=$links[$key]['url_id'];
print ' '.$paymentexpensereportstatic->getNomUrl(2);
}
elseif ($links[$key]['type']=='payment_various')
{
$paymentvariousstatic->id=$links[$key]['url_id'];
$paymentvariousstatic->ref=$links[$key]['url_id'];
print ' '.$paymentvariousstatic->getNomUrl(2);
}
elseif ($links[$key]['type']=='banktransfert')
{
// Do not show link to transfer since there is no transfer card (avoid confusion). Can already be accessed from transaction detail.

View File

@@ -639,11 +639,12 @@ else
print '<tr><td>'.$langs->trans("AccountancyJournal").'</td>';
print '<td>';
$accountingjournal = new AccountingJournal($db);
$accountingjournal->fetch($object->fk_accountancy_journal);
print $accountingjournal->getNomUrl(0,1,1,'',1);
if ($object->fk_accountancy_journal > 0) {
$accountingjournal = new AccountingJournal($db);
$accountingjournal->fetch($object->fk_accountancy_journal);
print $accountingjournal->getNomUrl(0, 1, 1, '', 1);
}
print '</td></tr>';
}

View File

@@ -303,7 +303,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
$reshook = $hookmanager->executeHooks('printObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
if(empty($reshook)){
print $hookmanager->resPrint;
$solde = isset($hookmanager->resArray['solde']) ? $hookmanager->resArray['solde'] : $solde;
$solde = isset($hookmanager->resArray['solde']) ? $hookmanager->resArray['solde'] : $solde;
}
// solde

View File

@@ -183,7 +183,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
print $socialcontrib->getNomUrl(1,'20');
print '</td>';
// Type
print '<td><a href="../sociales/index.php?filtre=cs.fk_type:'.$obj->type.'">'.$obj->lib.'</a></td>';
print '<td><a href="../sociales/list.php?filtre=cs.fk_type:'.$obj->type.'">'.$obj->lib.'</a></td>';
// Expected to pay
print '<td align="right">'.price($obj->total).'</td>';
// Ref payment

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2019 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2017 Pierre-Henry Favre <support@atm-consulting.fr>
*
* This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/compta/compta-files.php
* \file htdocs/compta/accounting-files.php
* \ingroup compta
* \brief Page to show portoflio and files of a thirdparty and download it
*/
@@ -25,15 +25,14 @@ require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.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.'/compta/paiement/class/paiement.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.'/compta/salaries/class/paymentsalary.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php';
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
$langs->loadLangs(array("accountancy","bills"));
$langs->loadLangs(array("accountancy", "bills", "companies", "salaries"));
$date_start =GETPOST('date_start', 'alpha');
$date_startDay= GETPOST('date_startday', 'int');
@@ -45,7 +44,7 @@ $date_stopDay= GETPOST('date_stopday', 'int');
$date_stopMonth= GETPOST('date_stopmonth', 'int');
$date_stopYear= GETPOST('date_stopyear', 'int');
//FIXME doldate
$date_stop=($date_stopDay)?dol_mktime(0, 0, 0, $date_stopMonth, $date_stopDay, $date_stopYear):strtotime($date_stop);
$date_stop=($date_stopDay)?dol_mktime(23, 59, 59, $date_stopMonth, $date_stopDay, $date_stopYear):strtotime($date_stop);
$action =GETPOST('action', 'alpha');
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
@@ -65,6 +64,7 @@ if (! $sortorder) $sortorder="DESC";
$arrayfields=array(
'type'=>array('label'=>"Type", 'checked'=>1),
'date'=>array('label'=>"Date", 'checked'=>1),
//...
);
@@ -74,8 +74,9 @@ if (empty($conf->comptabilite->enabled) && empty($conf->accounting->enabled)) {
accessforbidden();
}
if ($user->societe_id > 0)
{
accessforbidden();
}
/*
@@ -90,157 +91,211 @@ $entity = GETPOST('entity','int')?GETPOST('entity','int'):$conf->entity;
$filesarray=array();
$result=false;
if(($action=="searchfiles"||$action=="dl" ) && $date_start && $date_stop){
$wheretail=" '".$db->idate($date_start)."' AND '".$db->idate($date_stop)."'";
$sql="SELECT rowid as id, facnumber as ref,paye as paid, total_ttc, fk_soc, datef as date, 'Invoice' as item FROM ".MAIN_DB_PREFIX."facture";
$sql.=" WHERE datef between ".$wheretail;
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')';
$sql.=" AND fk_statut <> ".Facture::STATUS_DRAFT;
$sql.=" UNION ALL";
$sql.=" SELECT rowid as id, ref, paye as paid, total_ttc, fk_soc, datef as date, 'SupplierInvoice' as item FROM ".MAIN_DB_PREFIX."facture_fourn";
$sql.=" WHERE datef between ".$wheretail;
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')';
$sql.=" AND fk_statut <> ".FactureFournisseur::STATUS_DRAFT;
$sql.=" UNION ALL";
$sql.=" SELECT rowid as id, ref, paid, total_ttc, fk_user_author as fk_soc, date_fin as date,'ExpenseReport' as item FROM ".MAIN_DB_PREFIX."expensereport";
$sql.=" WHERE date_fin between ".$wheretail;
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')';
$sql.=" AND fk_statut <> ".ExpenseReport::STATUS_DRAFT;
$sql.=" UNION ALL";
$sql.=" SELECT rowid as id, ref,paid,amount as total_ttc, '0' as fk_soc, datedon as date,'Donation' as item FROM ".MAIN_DB_PREFIX."don";
$sql.=" WHERE datedon between ".$wheretail;
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')';
$sql.=" AND fk_statut <> ".Don::STATUS_DRAFT;
$sql.=" UNION ALL";
$sql.=" SELECT rowid as id, label as ref, 1 as paid, amount as total_ttc, fk_user as fk_soc,datep as date,'SalaryPayment' as item FROM ".MAIN_DB_PREFIX."payment_salary";
$sql.=" WHERE datep between ".$wheretail;
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')';
//$sql.=" AND fk_statut <> ".PaymentSalary::STATUS_DRAFT;
$sql.=" UNION ALL";
$sql.=" SELECT rowid as id, libelle as ref, paye as paid, amount as total_ttc, 0 as fk_soc, date_creation as date, 'SocialContributions' as item FROM ".MAIN_DB_PREFIX."chargesociales";
$sql.=" WHERE date_creation between ".$wheretail;
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')';
//$sql.=" AND fk_statut <> ".ChargeSociales::STATUS_DRAFT;
$sql.= $db->order($sortfield, $sortorder);
if (($action=="searchfiles" || $action=="dl" )) {
$resd = $db->query($sql);
$files=array();
$link='';
if ($resd)
if (empty($date_start))
{
$numd = $db->num_rows($resd);
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateStart")), null, 'errors');
$error++;
}
if (empty($date_stop))
{
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateEnd")), null, 'errors');
$error++;
}
$tmpinvoice=new Facture($db);
$tmpinvoicesupplier=new FactureFournisseur($db);
$tmpdonation=new Don($db);
if (! $error)
{
$wheretail=" '".$db->idate($date_start)."' AND '".$db->idate($date_stop)."'";
$upload_dir ='';
$i=0;
while ($i < $numd)
$sql="SELECT t.rowid as id, t.facnumber as ref, t.paye as paid, total as total_ht, total_ttc, tva as total_vat, fk_soc, t.datef as date, 'Invoice' as item, s.nom as thirdparty_name, s.code_client as thirdparty_code, c.code as country_code, s.tva_intra as vatnum";
$sql.=" FROM ".MAIN_DB_PREFIX."facture as t LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = t.fk_soc LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = s.fk_pays";
$sql.=" WHERE datef between ".$wheretail;
$sql.=" AND t.entity IN (".($entity==1?'0,1':$entity).')';
$sql.=" AND t.fk_statut <> ".Facture::STATUS_DRAFT;
$sql.=" UNION ALL";
$sql.=" SELECT t.rowid as id, t.ref, paye as paid, total_ht, total_ttc, total_tva as total_vat, fk_soc, datef as date, 'SupplierInvoice' as item, s.nom as thirdparty_name, s.code_fournisseur as thirdparty_code, c.code as country_code, s.tva_intra as vatnum";
$sql.=" FROM ".MAIN_DB_PREFIX."facture_fourn as t LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = t.fk_soc LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = s.fk_pays";
$sql.=" WHERE datef between ".$wheretail;
$sql.=" AND t.entity IN (".($entity==1?'0,1':$entity).')';
$sql.=" AND t.fk_statut <> ".FactureFournisseur::STATUS_DRAFT;
$sql.=" UNION ALL";
$sql.=" SELECT t.rowid as id, t.ref, paid, total_ht, total_ttc, total_tva as total_vat, fk_user_author as fk_soc, date_fin as date, 'ExpenseReport' as item, CONCAT(CONCAT(u.lastname, ' '), u.firstname) as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum";
$sql.=" FROM ".MAIN_DB_PREFIX."expensereport as t LEFT JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = t.fk_user_author LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = u.fk_country";
$sql.=" WHERE date_fin between ".$wheretail;
$sql.=" AND t.entity IN (".($entity==1?'0,1':$entity).')';
$sql.=" AND t.fk_statut <> ".ExpenseReport::STATUS_DRAFT;
$sql.=" UNION ALL";
$sql.=" SELECT t.rowid as id, t.ref, paid, amount as total_ht, amount as total_ttc, 0 as total_vat, 0 as fk_soc, datedon as date, 'Donation' as item, t.societe as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum";
$sql.=" FROM ".MAIN_DB_PREFIX."don as t LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = t.fk_country";
$sql.=" WHERE datedon between ".$wheretail;
$sql.=" AND t.entity IN (".($entity==1?'0,1':$entity).')';
$sql.=" AND t.fk_statut <> ".Don::STATUS_DRAFT;
$sql.=" UNION ALL";
$sql.=" SELECT t.rowid as id, t.label as ref, 1 as paid, amount as total_ht, amount as total_ttc, 0 as total_vat, t.fk_user as fk_soc, datep as date, 'SalaryPayment' as item, CONCAT(CONCAT(u.lastname, ' '), u.firstname) as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum";
$sql.=" FROM ".MAIN_DB_PREFIX."payment_salary as t LEFT JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = t.fk_user LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = u.fk_country";
$sql.=" WHERE datep between ".$wheretail;
$sql.=" AND t.entity IN (".($entity==1?'0,1':$entity).')';
//$sql.=" AND fk_statut <> ".PaymentSalary::STATUS_DRAFT;
$sql.=" UNION ALL";
$sql.=" SELECT t.rowid as id, t.libelle as ref, paye as paid, amount as total_ht, amount as total_ttc, 0 as total_tva, 0 as fk_soc, date_creation as date, 'SocialContributions' as item, '' as thirdparty_name, '' as thirdparty_code, '' as country_code, '' as vatnum";
$sql.=" FROM ".MAIN_DB_PREFIX."chargesociales as t";
$sql.=" WHERE date_creation between ".$wheretail;
$sql.=" AND t.entity IN (".($entity==1?'0,1':$entity).')';
//$sql.=" AND fk_statut <> ".ChargeSociales::STATUS_DRAFT;
$sql.= $db->order($sortfield, $sortorder);
//print $sql;
$resd = $db->query($sql);
$files=array();
$link='';
if ($resd)
{
$objd = $db->fetch_object($resd);
$numd = $db->num_rows($resd);
switch($objd->item)
{
case "Invoice":
$subdir=dol_sanitizeFileName($objd->ref);
$upload_dir = $conf->facture->dir_output.'/'.$subdir;
$link="document.php?modulepart=facture&file=".str_replace('/', '%2F', $subdir).'%2F';
break;
case "SupplierInvoice":
$tmpinvoicesupplier->fetch($objd->id);
$subdir=get_exdir($tmpinvoicesupplier->id, 2, 0, 0, $tmpinvoicesupplier, 'invoice_supplier').'/'.dol_sanitizeFileName($objd->ref);
$upload_dir = $conf->fournisseur->facture->dir_output.'/'.$subdir;
$link="document.php?modulepart=facture_fournisseur&file=".str_replace('/', '%2F', $subdir).'%2F';
break;
case "ExpenseReport":
$subdir=dol_sanitizeFileName($objd->ref);
$upload_dir = $conf->expensereport->dir_output.'/'.$subdir;
$link="document.php?modulepart=expensereport&file=".str_replace('/', '%2F', $subdir).'%2F';
break;
case "SalaryPayment":
$subdir=dol_sanitizeFileName($objd->id);
$upload_dir = $conf->salaries->dir_output.'/'.$subdir;
$link="document.php?modulepart=salaries&file=".str_replace('/', '%2F', $subdir).'%2F';
break;
case "Donation":
$tmpdonation->fetch($objp->id);
$subdir=get_exdir(0, 0, 0, 1, $tmpdonation, 'donation'). '/'. dol_sanitizeFileName($objd->id);
$upload_dir = $conf->don->dir_output . '/' . $subdir;
$link="document.php?modulepart=don&file=".str_replace('/', '%2F', $subdir).'%2F';
break;
case "SocialContributions":
$subdir=dol_sanitizeFileName($objd->id);
$upload_dir = $conf->tax->dir_output . '/' . $subdir;
$link="document.php?modulepart=tax&file=".str_replace('/', '%2F', $subdir).'%2F';
break;
default:
$subdir='';
$upload_dir='';
$link='';
break;
}
$tmpinvoice=new Facture($db);
$tmpinvoicesupplier=new FactureFournisseur($db);
$tmpdonation=new Don($db);
if (!empty($upload_dir))
$upload_dir ='';
$i=0;
while ($i < $numd)
{
$result=true;
$files=dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview\.png)$', '', SORT_ASC, 1);
//var_dump($upload_dir);
if (count($files) < 1)
$objd = $db->fetch_object($resd);
switch($objd->item)
{
$nofile['date']=$db->idate($objd->date);
$nofile['paid']=$objd->paid;
$nofile['amount']=$objd->total_ttc;
$nofile['ref']=$objd->ref;
$nofile['fk']=$objd->fk_soc;
$nofile['item']=$objd->item;
$filesarray[]=$nofile;
case "Invoice":
$subdir = '';
$subdir.=($subdir ? '/' : '').dol_sanitizeFileName($objd->ref);
$upload_dir = $conf->facture->dir_output.'/'.$subdir;
$link="document.php?modulepart=facture&file=".str_replace('/', '%2F', $subdir).'%2F';
break;
case "SupplierInvoice":
$tmpinvoicesupplier->fetch($objd->id);
$subdir = get_exdir($tmpinvoicesupplier->id, 2, 0, 1, $tmpinvoicesupplier, 'invoice_supplier'); // TODO Use first file
$subdir.=($subdir ? '/' : '').dol_sanitizeFileName($objd->ref);
$upload_dir = $conf->fournisseur->facture->dir_output.'/'.$subdir;
$link="document.php?modulepart=facture_fournisseur&file=".str_replace('/', '%2F', $subdir).'%2F';
break;
case "ExpenseReport":
$subdir = '';
$subdir.=($subdir ? '/' : '').dol_sanitizeFileName($objd->ref);
$upload_dir = $conf->expensereport->dir_output.'/'.$subdir;
$link="document.php?modulepart=expensereport&file=".str_replace('/', '%2F', $subdir).'%2F';
break;
case "SalaryPayment":
$subdir = '';
$subdir.=($subdir ? '/' : '').dol_sanitizeFileName($objd->id);
$upload_dir = $conf->salaries->dir_output.'/'.$subdir;
$link="document.php?modulepart=salaries&file=".str_replace('/', '%2F', $subdir).'%2F';
break;
case "Donation":
$tmpdonation->fetch($objp->id);
$subdir=get_exdir(0, 0, 0, 0, $tmpdonation, 'donation');
$subdir.=($subdir ? '/' : '').dol_sanitizeFileName($objd->id);
$upload_dir = $conf->don->dir_output . '/' . $subdir;
$link="document.php?modulepart=don&file=".str_replace('/', '%2F', $subdir).'%2F';
break;
case "SocialContributions":
$subdir = '';
$subdir.=($subdir ? '/' : '').dol_sanitizeFileName($objd->id);
$upload_dir = $conf->tax->dir_output . '/' . $subdir;
$link="document.php?modulepart=tax&file=".str_replace('/', '%2F', $subdir).'%2F';
break;
default:
$subdir='';
$upload_dir='';
$link='';
break;
}
else
{
foreach ($files as $key => $file)
{
$file['date']=$db->idate($objd->date);
$file['paid']=$objd->paid;
$file['amount']=$objd->total_ttc;
$file['ref']=$objd->ref;
$file['fk']=$objd->fk_soc;
$file['item']=$objd->item;
$file['link']=$link.$file['name'];
$file['relpathnamelang'] = $langs->trans($file['item']).'/'.$file['name'];
$filesarray[]=$file;
if (!empty($upload_dir))
{
$result=true;
$files=dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview\.png)$', '', SORT_ASC, 1);
//var_dump($upload_dir);
if (count($files) < 1)
{
$nofile['id']=$objd->id;
$nofile['date']=$db->idate($objd->date);
$nofile['paid']=$objd->paid;
$nofile['amount_ht']=$objd->total_ht;
$nofile['amount_ttc']=$objd->total_ttc;
$nofile['amount_vat']=$objd->total_vat;
$nofile['ref']=($objd->ref ? $objd->ref : $objd->id);
$nofile['fk']=$objd->fk_soc;
$nofile['item']=$objd->item;
$nofile['thirdparty_name']=$objd->thirdparty_name;
$nofile['thirdparty_code']=$objd->thirdparty_code;
$nofile['country_code']=$objd->country_code;
$nofile['vatnum']=$objd->vatnum;
$filesarray[]=$nofile;
}
else
{
foreach ($files as $key => $file)
{
$file['id']=$objd->id;
$file['date']=$db->idate($objd->date);
$file['paid']=$objd->paid;
$file['amount_ht']=$objd->total_ht;
$file['amount_ttc']=$objd->total_ttc;
$file['amount_vat']=$objd->total_vat;
$file['ref']=($objd->ref ? $objd->ref : $objd->id);
$file['fk']=$objd->fk_soc;
$file['item']=$objd->item;
$file['thirdparty_name']=$objd->thirdparty_name;
$file['thirdparty_code']=$objd->thirdparty_code;
$file['country_code']=$objd->country_code;
$file['vatnum']=$objd->vatnum;
$file['link']=$link.$file['name'];
$file['relpathnamelang'] = $langs->trans($file['item']).'/'.$file['name'];
$filesarray[]=$file;
}
}
}
$i++;
}
$i++;
}
}
else
{
dol_print_error($db);
}
else
{
dol_print_error($db);
}
$db->free($resd);
$db->free($resd);
}
}
/*
* cleanup of old ZIP
*/
//FIXME
/*
*ZIP creation
*/
if ($result && $action == "dl")
$dirfortmpfile = ($conf->accounting->dir_temp ? $conf->accounting->dir_temp : $conf->comptabilite->dir_temp);
if (empty($dirfortmpfile))
{
$dirfortmpfile = ($conf->accounting->dir_temp ? $conf->accounting->dir_temp : $conf->compta->dir_temp);
setEventMessages($langs->trans("ErrorNoAccountingModuleEnabled"), null, 'errors');
$error++;
}
if ($result && $action == "dl" && ! $error)
{
if (! extension_loaded('zip'))
{
setEventMessages('PHPZIPExtentionNotLoaded', null, 'errors');
exit;
}
dol_mkdir($dirfortmpfile);
$log='date,type,ref,total,paid,filename,item_id'."\n";
$log=$langs->transnoentitiesnoconv("Type").','.$langs->transnoentitiesnoconv("Date").','.$langs->transnoentitiesnoconv("Ref").','.$langs->transnoentitiesnoconv("TotalHT").','.$langs->transnoentitiesnoconv("TotalTTC").','.$langs->transnoentitiesnoconv("TotalVAT").','.$langs->transnoentitiesnoconv("Paid").',filename,item_id,'.$langs->transnoentitiesnoconv("ThirdParty").','.$langs->transnoentitiesnoconv("Code").','.$langs->transnoentitiesnoconv("Country").','.$langs->transnoentitiesnoconv("VATIntra")."\n";
$zipname = $dirfortmpfile.'/'.dol_print_date($date_start, 'dayrfc')."-".dol_print_date($date_stop, 'dayrfc').'_export.zip';
dol_delete_file($zipname);
@@ -249,10 +304,10 @@ if ($result && $action == "dl")
$res = $zip->open($zipname, ZipArchive::OVERWRITE|ZipArchive::CREATE);
if ($res)
{
foreach ($filesarray as $key=> $file)
foreach ($filesarray as $key => $file)
{
if (file_exists($file["fullname"])) $zip->addFile($file["fullname"], $file["relpathnamelang"]); //
$log.=dol_print_date($file['date'], 'dayrfc').','.$file['item'].','.$file['ref'].','.$file['amount'].','.$file['paid'].','.$file["name"].','.$file['fk']."\n";
$log.=$file['item'].','.dol_print_date($file['date'], 'dayrfc').','.$file['ref'].','.$file['amount_ht'].','.$file['amount_ttc'].','.$file['amount_vat'].','.$file['paid'].','.$file["name"].','.$file['fk'].','.$file['thirdparty_name'].','.$file['thirdparty_code'].','.$file['country_code'].',"'.$file['vatnum'].'"'."\n";
}
$zip->addFromString('transactions.csv', $log);
$zip->close();
@@ -267,6 +322,10 @@ if ($result && $action == "dl")
exit();
}
else
{
setEventMessages($langs->trans("FailedToOpenFile", $zipname), null, 'errors');
}
}
@@ -283,7 +342,7 @@ llxHeader('', $title, $help_url);
$h=0;
$head[$h][0] = $_SERVER["PHP_SELF"].$varlink;
$head[$h][1] = $langs->trans("AccountancyFiles");
$head[$h][1] = $langs->trans("AccountantFiles");
$head[$h][2] = 'AccountancyFiles';
dol_fiche_head($head, 'AccountancyFiles');
@@ -293,45 +352,20 @@ print '<form name="searchfiles" action="?action=searchfiles'.$tail.'" method="PO
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print $langs->trans("ReportPeriod").': '.$form->selectDate($date_start, 'date_start', 0, 0, 0, "", 1, 1, 0);
print ' - '.$form->selectDate($date_stop, 'date_stop', 0, 0, 0, "", 1, 1, 0)."\n</a>";
// Multicompany
/*if (! empty($conf->multicompany->enabled) && is_object($mc))
{
print '<br>';
// This is now done with hook formObjectOptions. Keep this code for backward compatibility with old multicompany module
if (method_exists($mc, 'formObjectOptions'))
{
if (empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && ! $user->entity) // condition must be same for create and edit mode
{
print "<tr>".'<td>'.$langs->trans("Entity").'</td>';
print "<td>".$mc->select_entities($entity);
print "</td></tr>\n";
}
else
{
print '<input type="hidden" name="entity" value="'.$conf->entity.'" />';
}
}
$object = new stdClass();
// Other attributes
$parameters=array('objectsrc' => null, 'colspan' => ' colspan="3"');
$reshook=$hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook))
{
print $object->showOptionals($extrafields, 'edit');
}
}*/
// Export is for current company only !
if (! empty($conf->multicompany->enabled) && is_object($mc))
{
print ' &nbsp; - &nbsp; '.$langs->trans("Entity").' : ';
print '<span class="marginleftonly marginrightonly">('.$langs->trans("Entity").' : ';
$mc->dao->getEntities();
$mc->dao->fetch($conf->entity);
print $mc->dao->label;
print "<br>\n";
print ")</span>\n";
}
print '<input class="button" type="submit" value="'.$langs->trans("Refresh").'" /></form>'."\n";
print '<input class="button" type="submit" name="search" value="'.$langs->trans("Search").'">';
print '</form>'."\n";
dol_fiche_end();
@@ -369,14 +403,18 @@ if (!empty($date_start) && !empty($date_stop))
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print_liste_field_titre($arrayfields['date']['label'], $_SERVER["PHP_SELF"], "date", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
print '<td>'.$langs->trans("Type").'</td>';
print_liste_field_titre($arrayfields['type']['label'], $_SERVER["PHP_SELF"], "type", "", $param, '', $sortfield, $sortorder, 'nowrap ');
print_liste_field_titre($arrayfields['date']['label'], $_SERVER["PHP_SELF"], "date", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
print '<td>'.$langs->trans("Ref").'</td>';
print '<td>'.$langs->trans("Link").'</td>';
print '<td>'.$langs->trans("Document").'</td>';
print '<td>'.$langs->trans("Paid").'</td>';
print '<td align="right">'.$langs->trans("Debit").'</td>';
print '<td align="right">'.$langs->trans("Credit").'</td>';
print '<td align="right">'.$langs->trans("Balance").'</td>';
print '<td align="right">'.$langs->trans("TotalHT").'</td>';
print '<td align="right">'.$langs->trans("TotalTTC").'</td>';
print '<td align="right">'.$langs->trans("TotalVAT").'</td>';
print '<td>'.$langs->trans("ThirdParty").'</td>';
print '<td class="center">'.$langs->trans("Code").'</td>';
print '<td class="center">'.$langs->trans("Country").'</td>';
print '<td class="center">'.$langs->trans("VATIntra").'</td>';
print '</tr>';
if ($result)
{
@@ -390,20 +428,11 @@ if (!empty($date_start) && !empty($date_stop))
{
// Sort array by date ASC to calculate balance
$totalET = 0;
$totalIT = 0;
$totalVAT = 0;
$totalDebit = 0;
$totalCredit = 0;
// Balance calculation
$balance = 0;
foreach($TData as &$data1) {
if ($data1['item']!='Invoice'&& $data1['item']!='Donation' ){
$data1['amount']=-$data1['amount'];
}
if ($data1['amount']>0){
}else{
}
$balance += $data1['amount'];
$data1['balance'] = $balance;
}
// Display array
foreach($TData as $data)
@@ -412,30 +441,79 @@ if (!empty($date_start) && !empty($date_stop))
//if (!empty($data['fk_facture'])) $html_class = 'facid-'.$data['fk_facture'];
//elseif (!empty($data['fk_paiement'])) $html_class = 'payid-'.$data['fk_paiement'];
print '<tr class="oddeven '.$html_class.'">';
print "<td align=\"center\">";
// Type
print '<td>'.$langs->trans($data['item']).'</td>';
// Date
print '<td class="center">';
print dol_print_date($data['date'], 'day');
print "</td>\n";
print '<td aling="left">'.$langs->trans($data['item']).'</td>';
// Ref
print '<td aling="left">'.$data['ref'].'</td>';
// File link
print '<td><a href='.DOL_URL_ROOT.'/'.$data['link'].">".$data['name']."</a></td>\n";
print '<td>';
if ($data['link'])
{
print '<a href='.DOL_URL_ROOT.'/'.$data['link'].' target="_blank">'.($data['name'] ? $data['name'] : $data['ref']).'</a>';
}
print "</td>\n";
// Paid
print '<td aling="left">'.$data['paid'].'</td>';
print '<td align="right">'.(($data['amount'] > 0) ? price(abs($data['amount'])) : '')."</td>\n";
$totalDebit += ($data['amount'] > 0) ? abs($data['amount']) : 0;
print '<td align="right">'.(($data['amount'] > 0) ? '' : price(abs($data['amount'])))."</td>\n";
$totalCredit += ($data['amount'] > 0) ? 0 : abs($data['amount']);
// Total ET
print '<td align="right">'.price($data['amount_ht'])."</td>\n";
// Total IT
print '<td align="right">'.price($data['amount_ttc'])."</td>\n";
// Total VAT
print '<td align="right">'.price($data['amount_vat'])."</td>\n";
print '<td>'.$data['thirdparty_name']."</td>\n";
print '<td class="center">'.$data['thirdparty_code']."</td>\n";
print '<td class="center">'.$data['country_code']."</td>\n";
print '<td align="right">'.$data['vatnum']."</td>\n";
// Debit
//print '<td align="right">'.(($data['amount_ttc'] > 0) ? price(abs($data['amount_ttc'])) : '')."</td>\n";
// Credit
//print '<td align="right">'.(($data['amount_ttc'] > 0) ? '' : price(abs($data['amount_ttc'])))."</td>\n";
$totalET += $data['amount_ht'];
$totalIT += $data['amount_ttc'];
$totalVAT += $data['amount_vat'];
$totalDebit += ($data['amount_ttc'] > 0) ? abs($data['amount_ttc']) : 0;
$totalCredit += ($data['amount_ttc'] > 0) ? 0 : abs($data['amount_ttc']);
// Balance
print '<td align="right">'.price($data['balance'])."</td>\n";
//print '<td align="right">'.price($data['balance'])."</td>\n";
print "</tr>\n";
}
print '<tr class="liste_total">';
print '<td colspan="5">&nbsp;</td>';
print '<td align="right">'.price($totalDebit).'</td>';
print '<td align="right">'.price($totalCredit).'</td>';
print '<td align="right">'.price(price2num($totalDebit - $totalCredit, 'MT')).'</td>';
print '<td></td>';
print '<td></td>';
print '<td></td>';
print '<td></td>';
print '<td></td>';
print '<td align="right">'.price($totalET).'</td>';
print '<td align="right">'.price($totalIT).'</td>';
print '<td align="right">'.price($totalVAT).'</td>';
print '<td></td>';
print '<td></td>';
print '<td></td>';
print '<td></td>';
/*print '<td align="right">'.price($totalDebit).'</td>';
print '<td align="right">'.price($totalCredit).'</td>';
print '<td align="right">'.price(price2num($totalDebit - $totalCredit, 'MT')).'</td>';
*/
print "</tr>\n";
}
}

View File

@@ -181,7 +181,8 @@ if (empty($reshook))
// Change status of invoice
else if ($action == 'reopen' && $usercancreate) {
$result = $object->fetch($id);
if ($object->statut == 2 || ($object->statut == 3 && $object->close_code != 'replaced') || ($object->statut == 1 && $object->paye == 1)) { // ($object->statut == 1 && $object->paye == 1) should not happened but can be found when data are corrupted
if ($object->statut == Facture::STATUS_CLOSED || ($object->statut == Facture::STATUS_ABANDONED && ($object->close_code != 'replaced' || $object->getIdReplacingInvoice() == 0)) || ($object->statut == Facture::STATUS_VALIDATED && $object->paye == 1)) { // ($object->statut == 1 && $object->paye == 1) should not happened but can be found when data are corrupted
$result = $object->set_unpaid($user);
if ($result > 0) {
header('Location: ' . $_SERVER["PHP_SELF"] . '?facid=' . $id);
@@ -1129,7 +1130,7 @@ if (empty($reshook))
// Source facture
$object->fac_rec = GETPOST('fac_rec', 'int');
$id = $object->create($user); // This include recopy of links from recurring invoice and invoice lines
$id = $object->create($user); // This include recopy of links from recurring invoice and recurring invoice lines
}
}
@@ -1254,7 +1255,7 @@ if (empty($reshook))
if ($_POST['type'] == Facture::TYPE_DEPOSIT)
{
$typeamount = GETPOST('typedeposit', 'alpha');
$valuedeposit = GETPOST('valuedeposit', 'int');
$valuedeposit = price2num(GETPOST('valuedeposit', 'alpha'), 'MU');
$amountdeposit = array();
if (!empty($conf->global->MAIN_DEPOSIT_MULTI_TVA))
@@ -1296,15 +1297,14 @@ if (empty($reshook))
$qualified=1;
if (empty($lines[$i]->qty)) $qualified=0; // We discard qty=0, it is an option
if (! empty($lines[$i]->special_code)) $qualified=0; // We discard special_code (frais port, ecotaxe, option, ...)
if ($qualified) $totalamount += $lines[$i]->total_ht; // Fixme : is it not for the customer ? Shouldn't we take total_ttc ?
if ($qualified){
$totalamount += $lines[$i]->total_ht; // Fixme : is it not for the customer ? Shouldn't we take total_ttc ?
$tva_tx = $lines[$i]->tva_tx;
$amountdeposit[$tva_tx] += ($lines[$i]->total_ht * $valuedeposit) / 100;
}
}
if ($totalamount != 0) {
if ($numlines > 0) $numlines = $numlines-1;
$tva_tx = $lines[$numlines]->tva_tx;
if (! empty($lines[$numlines]->vat_src_code) && ! preg_match('/\(/', $tva_tx)) $tva_tx .= ' ('.$lines[$numlines]->vat_src_code.')';
$amountdeposit[$tva_tx] = ($totalamount * $valuedeposit) / 100;
} else {
if($totalamount == 0) {
$amountdeposit[0] = 0;
}
} else {
@@ -1315,17 +1315,19 @@ if (empty($reshook))
$amount_ttc_diff = $amountdeposit[0];
}
foreach ($amountdeposit as $tva => $amount)
{
if (empty($amount)) continue;
$arraylist = array('amount' => 'FixAmount','variable' => 'VarAmount');
$descline = $langs->trans('Deposit');
$descline = '(DEPOSIT)';
//$descline.= ' - '.$langs->trans($arraylist[$typeamount]);
if ($typeamount=='amount') {
$descline.= ' ('. price($valuedeposit, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).')';
} elseif ($typeamount=='variable') {
$descline.= ' ('. $valuedeposit.'%)';
}
$descline.= ' - '.$srcobject->ref;
$result = $object->addline(
$descline,
@@ -1381,8 +1383,9 @@ if (empty($reshook))
{
// Don't add lines with qty 0 when coming from a shipment including all order lines
if($srcobject->element == 'shipping' && $conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS && $lines[$i]->qty == 0) continue;
// Don't add closed lines when coming from a contract
if($srcobject->element == 'contrat' && $lines[$i]->statut == 5) continue;
// Don't add closed lines when coming from a contract (Set constant to '0,5' to exclude also inactive lines)
if (! isset( $conf->global->CONTRACT_EXCLUDE_SERVICES_STATUS_FOR_INVOICE)) $conf->global->CONTRACT_EXCLUDE_SERVICES_STATUS_FOR_INVOICE = '5';
if ($srcobject->element == 'contrat' && in_array($lines[$i]->statut, explode(',', $conf->global->CONTRACT_EXCLUDE_SERVICES_STATUS_FOR_INVOICE))) continue;
$label=(! empty($lines[$i]->label)?$lines[$i]->label:'');
$desc=(! empty($lines[$i]->desc)?$lines[$i]->desc:$lines[$i]->libelle);
@@ -1539,14 +1542,16 @@ if (empty($reshook))
$datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
if (empty($datefacture)) {
$error++;
$mesg = '<div class="error">' . $langs->trans("ErrorFieldRequired", $langs->trans("Date")) . '</div>';
$mesg = $langs->trans("ErrorFieldRequired", $langs->trans("Date"));
setEventMessages($mesg, null, 'errors');
}
$date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']);
if (!($_POST['situations'] > 0)) {
$error++;
$mesg = '<div class="error">' . $langs->trans("ErrorFieldRequired", $langs->trans("InvoiceSituation")) . '</div>';
$mesg = $langs->trans("ErrorFieldRequired", $langs->trans("InvoiceSituation"));
setEventMessages($mesg, null, 'errors');
}
if (!$error) {
@@ -1686,7 +1691,7 @@ if (empty($reshook))
// Extrafields
$extrafieldsline = new ExtraFields($db);
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
$array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline, $predef);
$array_options = $extrafieldsline->getOptionalsFromPost($object->table_element_line, $predef);
// Unset extrafield
if (is_array($extralabelsline)) {
// Get extra fields
@@ -2095,7 +2100,7 @@ if (empty($reshook))
// Extrafields
$extrafieldsline = new ExtraFields($db);
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
$array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline);
$array_options = $extrafieldsline->getOptionalsFromPost($object->table_element_line);
// Unset extrafield
if (is_array($extralabelsline)) {
// Get extra fields
@@ -2274,11 +2279,13 @@ if (empty($reshook))
if (!$object->fetch($id) > 0) dol_print_error($db);
if (!is_null(GETPOST('all_progress')) && GETPOST('all_progress') != "")
{
$all_progress = GETPOST('all_progress', 'int');
foreach ($object->lines as $line)
{
$percent = $line->get_prev_progress($object->id);
if (GETPOST('all_progress') < $percent) {
$mesg = '<div class="warning">' . $langs->trans("CantBeLessThanMinPercent") . '</div>';
if (floatval($all_progress) < floatval($percent)) {
$mesg = $langs->trans("Line") . ' ' . $i . ' '. $line->ref .' : ' . $langs->trans("CantBeLessThanMinPercent");
setEventMessages($mesg, null, 'warnings');
$result = -1;
} else
$object->update_percent($line, $_POST['all_progress']);
@@ -2947,7 +2954,7 @@ if ($action == 'create')
{
// First situation invoice
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp='<input id="radio_situation invoice" type="radio" name="type" value="5"' . (GETPOST('type') == 5 ? ' checked' : '') . '> ';
$tmp='<input id="radio_situation" type="radio" name="type" value="5"' . (GETPOST('type') == 5 ? ' checked' : '') . '> ';
$tmp = $tmp.'<label for="radio_situation invoice" >'.$langs->trans("InvoiceFirstSituationAsk").'</label>';
$desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3);
print $desc;
@@ -3002,7 +3009,26 @@ if ($action == 'create')
}
else
{
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
if (! empty($conf->global->INVOICE_USE_SITUATION))
{
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp='<input type="radio" name="type" id="radio_situation" value="0" disabled> ';
$text = '<label>'.$tmp.$langs->trans("InvoiceFirstSituationAsk") . '</label> ';
$text.= '('.$langs->trans("YouMustCreateInvoiceFromThird").') ';
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3);
print $desc;
print '</div></div>';
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp='<input type="radio" name="type" id="radio_situation" value="0" disabled> ';
$text = '<label>'.$tmp.$langs->trans("InvoiceSituationAsk") . '</label> ';
$text.= '('.$langs->trans("YouMustCreateInvoiceFromThird").') ';
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3);
print $desc;
print '</div></div>';
}
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp='<input type="radio" name="type" id="radio_replacement" value="0" disabled> ';
$text = '<label>'.$tmp.$langs->trans("InvoiceReplacement") . '</label> ';
$text.= '('.$langs->trans("YouMustCreateInvoiceFromThird").') ';
@@ -3021,7 +3047,7 @@ if ($action == 'create')
{
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp='<input type="radio" id="radio_creditnote" name="type" value="2"' . (GETPOST('type') == 2 ? ' checked' : '');
if (! $optionsav) $tmp.=' disabled';
if (! $optionsav && empty($conf->global->INVOICE_CREDIT_NOTE_STANDALONE)) $tmp.=' disabled';
$tmp.= '> ';
// Show credit note options only if we checked credit note
print '<script type="text/javascript" language="javascript">
@@ -4665,11 +4691,11 @@ else if ($id > 0 || ! empty($ref))
&& ($object->statut == 2 || $object->statut == 3 || ($object->statut == 1 && $object->paye == 1)) // Condition ($object->statut == 1 && $object->paye == 1) should not happened but can be found due to corrupted data
&& ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || $usercanreopen)) // A paid invoice (partially or completely)
{
if (! $objectidnext && $object->close_code != 'replaced') // Not replaced by another invoice
if ($object->close_code != 'replaced' || (! $objectidnext)) // Not replaced by another invoice or replaced but the replacement invoice has been deleted
{
print '<div class="inline-block divButAction"><a class="butAction'.($conf->use_javascript_ajax?' reposition':'').'" href="' . $_SERVER['PHP_SELF'] . '?facid=' . $object->id . '&amp;action=reopen">' . $langs->trans('ReOpen') . '</a></div>';
} else {
print '<div class="inline-block divButAction"><span class="butActionRefused" title="' . $langs->trans("DisabledBecauseReplacedInvoice") . '">' . $langs->trans('ReOpen') . '</span></div>';
print '<div class="inline-block divButAction"><span class="butActionRefused" title="' . $langs->trans("DisabledBecauseReplacedInvoice") . '">' . $langs->trans('ReOpen') . '</span></div>';
}
}

View File

@@ -72,10 +72,10 @@ class Invoices extends DolibarrApi
}
// Get payment details
$this->invoice->totalpaye = $this->invoice->getSommePaiement();
$this->invoice->totalpaid = $this->invoice->getSommePaiement();
$this->invoice->totalcreditnotes = $this->invoice->getSumCreditNotesUsed();
$this->invoice->totaldeposits = $this->invoice->getSumDepositsUsed();
$this->invoice->resteapayer = price2num($this->invoice->total_ttc - $this->invoice->totalpaye - $this->invoice->totalcreditnotes - $this->invoice->totaldeposits, 'MT');
$this->invoice->remaintopay = price2num($this->invoice->total_ttc - $this->invoice->totalpaid - $this->invoice->totalcreditnotes - $this->invoice->totaldeposits, 'MT');
if (! DolibarrApi::_checkAccessToResource('facture',$this->invoice->id)) {
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);

View File

@@ -723,7 +723,7 @@ class Facture extends CommonInvoice
}
/*
* Insert lines of predefined invoices
* Insert lines of template invoices
*/
if (! $error && $this->fac_rec > 0)
{
@@ -749,6 +749,31 @@ class Facture extends CommonInvoice
$localtax1_tx = $_facrec->lines[$i]->localtax1_tx;
$localtax2_tx = $_facrec->lines[$i]->localtax2_tx;
$fk_product_fournisseur_price = empty($_facrec->lines[$i]->fk_product_fournisseur_price)?null:$_facrec->lines[$i]->fk_product_fournisseur_price;
$buyprice = empty($_facrec->lines[$i]->buyprice)?0:$_facrec->lines[$i]->buyprice;
// If buyprice not defined from template invoice, we try to guess the best value
if (! $buyprice && $_facrec->lines[$i]->fk_product > 0)
{
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
$producttmp = new ProductFournisseur($this->db);
$producttmp->fetch($_facrec->lines[$i]->fk_product);
// If margin module defined on costprice, we try the costprice
// If not defined or if module margin defined and pmp and stock module enabled, we try pmp price
// else we get the best supplier price
if ($conf->global->MARGIN_TYPE == 'costprice' && ! empty($producttmp->cost_price)) $buyprice = $producttmp->cost_price;
elseif (! empty($conf->stock->enabled) && ($conf->global->MARGIN_TYPE == 'costprice' || $conf->global->MARGIN_TYPE == 'pmp') && ! empty($producttmp->pmp)) $buyprice = $producttmp->pmp;
else {
if ($producttmp->find_min_price_product_fournisseur($_facrec->lines[$i]->fk_product) > 0)
{
if ($producttmp->product_fourn_price_id > 0)
{
$buyprice = price2num($producttmp->fourn_unitprice * (1 - $producttmp->fourn_remise_percent/100) + $producttmp->fourn_remise, 'MU');
}
}
}
}
$result_insert = $this->addline(
$_facrec->lines[$i]->desc,
$_facrec->lines[$i]->subprice,
@@ -771,8 +796,8 @@ class Facture extends CommonInvoice
'',
0,
0,
null,
0,
$fk_product_fournisseur_price,
$buyprice,
$_facrec->lines[$i]->label,
empty($_facrec->lines[$i]->array_options)?null:$_facrec->lines[$i]->array_options,
$_facrec->lines[$i]->situation_percent,
@@ -922,7 +947,7 @@ class Facture extends CommonInvoice
}
elseif ($this->type == self::TYPE_SITUATION && !empty($conf->global->INVOICE_USE_SITUATION))
{
$this->fetchObjectLinked('', '', $facture->id, 'facture');
$this->fetchObjectLinked('', '', $this->id, 'facture');
foreach ($this->linkedObjectsIds as $typeObject => $Tfk_object)
{
@@ -1056,7 +1081,7 @@ class Facture extends CommonInvoice
*/
function createFromOrder($object, User $user)
{
global $hookmanager;
global $conf, $hookmanager;
$error=0;
@@ -1117,8 +1142,12 @@ class Facture extends CommonInvoice
$this->fk_delivery_address = $object->fk_delivery_address;
$this->contact_id = $object->contactid;
$this->ref_client = $object->ref_client;
$this->note_private = $object->note_private;
$this->note_public = $object->note_public;
if (empty($conf->global->MAIN_DISABLE_PROPAGATE_NOTES_FROM_ORIGIN))
{
$this->note_private = $object->note_private;
$this->note_public = $object->note_public;
}
$this->origin = $object->element;
$this->origin_id = $object->id;
@@ -1666,7 +1695,7 @@ class Facture extends CommonInvoice
$sql.= " import_key=".(isset($this->import_key)?"'".$this->db->escape($this->import_key)."'":"null").",";
$sql.= " situation_cycle_ref=".(empty($this->situation_cycle_ref)?"null":$this->db->escape($this->situation_cycle_ref)).",";
$sql.= " situation_counter=".(empty($this->situation_counter)?"null":$this->db->escape($this->situation_counter)).",";
$sql.= " situation_final=".(empty($this->situation_counter)?"0":$this->db->escape($this->situation_counter));
$sql.= " situation_final=".(empty($this->situation_final)?"0":$this->db->escape($this->situation_final));
$sql.= " WHERE rowid=".$this->id;
$this->db->begin();
@@ -3107,7 +3136,13 @@ class Facture extends CommonInvoice
// phpcs:enable
global $mysoc,$user;
include_once DOL_DOCUMENT_ROOT . '/core/lib/price.lib.php';
// Progress should never be changed for discount lines
if (($line->info_bits & 2) == 2)
{
return;
}
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
// Cap percentages to 100
if ($percent > 100) $percent = 100;
@@ -3123,7 +3158,6 @@ class Facture extends CommonInvoice
$line->multicurrency_total_ttc = $tabprice[18];
$line->update($user);
$this->update_price(1);
$this->db->commit();
}
/**
@@ -3472,7 +3506,7 @@ class Facture extends CommonInvoice
* @param int $offset For pagination
* @param string $sortfield Sort criteria
* @param string $sortorder Sort order
* @return int -1 if KO, array with result if OK
* @return array|int -1 if KO, array with result if OK
*/
function liste_array($shortlist=0, $draft=0, $excluser='', $socid=0, $limit=0, $offset=0, $sortfield='f.datef,f.rowid', $sortorder='DESC')
{
@@ -3543,7 +3577,7 @@ class Facture extends CommonInvoice
* (Status validated or abandonned for a reason 'other') + not payed + no payment at all + not already replaced
*
* @param int $socid Id thirdparty
* @return array Array of invoices ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1)
* @return array|int Array of invoices ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1)
*/
function list_replacable_invoices($socid=0)
{
@@ -4377,20 +4411,16 @@ class FactureLigne extends CommonInvoiceLine
public $date_start;
public $date_end;
// Ne plus utiliser
//var $price; // P.U. HT apres remise % de ligne (exemple 80)
//var $remise; // Montant calcule de la remise % sur PU HT (exemple 20)
// From llx_product
/**
* @deprecated
* @see product_ref
* @see $product_ref
*/
public $ref; // Product ref (deprecated)
public $product_ref; // Product ref
/**
* @deprecated
* @see product_label
* @see $product_label
*/
public $libelle; // Product label (deprecated)
public $product_label; // Product label
@@ -4574,6 +4604,7 @@ class FactureLigne extends CommonInvoiceLine
if ($result <= 0)
{
$this->error='ErrorProductIdDoesNotExists';
dol_syslog(get_class($this)."::insert Error ".$this->error, LOG_ERR);
return -1;
}
}
@@ -4604,7 +4635,7 @@ class FactureLigne extends CommonInvoiceLine
$sql.= " '".$this->db->escape($this->localtax1_type)."',";
$sql.= " '".$this->db->escape($this->localtax2_type)."',";
$sql.= ' '.(! empty($this->fk_product)?$this->fk_product:"null").',';
$sql.= " ".$this->product_type.",";
$sql.= " ".((int) $this->product_type).",";
$sql.= " ".price2num($this->remise_percent).",";
$sql.= " ".price2num($this->subprice).",";
$sql.= ' '.(! empty($this->fk_remise_except)?$this->fk_remise_except:"null").',';

View File

@@ -452,7 +452,7 @@ if (empty($reshook))
// Extrafields
$extrafieldsline = new ExtraFields($db);
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
$array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline, $predef);
$array_options = $extrafieldsline->getOptionalsFromPost($object->table_element_line, $predef);
// Unset extrafield
if (is_array($extralabelsline))
{
@@ -773,7 +773,7 @@ if (empty($reshook))
// Extrafields
$extrafieldsline = new ExtraFields($db);
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
$array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline);
$array_options = $extrafieldsline->getOptionalsFromPost($object->table_element_line);
$objectline = new FactureLigneRec($db);
if ($objectline->fetch(GETPOST('lineid')))
@@ -1423,8 +1423,8 @@ else
include_once DOL_DOCUMENT_ROOT . '/core/modules/facture/modules_facture.php';
$list = array();
$models = ModelePDFFactures::liste_modeles($db);
foreach ($models as $model) {
$list[] = $model . ':' . $model;
foreach ($models as $k => $model) {
$list[] = str_replace(':', '|', $k) . ':' . $model;
}
$select = 'select;'.implode(',', $list);
print $form->editfieldval($langs->trans("Model"), 'modelpdf', $object->modelpdf, $object, $user->rights->facture->creer, $select);

View File

@@ -261,7 +261,7 @@ if ($search_month_date_when > 0)
if ($search_year_date_when > 0 && empty($search_day_date_when))
$sql.= " AND f.date_when BETWEEN '".$db->idate(dol_get_first_day($search_year_date_when,$search_month_date_when,false))."' AND '".$db->idate(dol_get_last_day($search_year_date_when,$search_month_date_when,false))."'";
else if ($search_year_date_when > 0 && ! empty($search_day_date_when))
$sql.= " AND f.date_date_when_reglement BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month_date_when, $search_day_date_when, $search_year_date_when))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month_date_when, $search_day_date_when, $search_year_date_when))."'";
$sql.= " AND f.date_when BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month_date_when, $search_day_date_when, $search_year_date_when))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month_date_when, $search_day_date_when, $search_year_date_when))."'";
else
$sql.= " AND date_format(f.date_when, '%m') = '".$db->escape($search_month_date_when)."'";
}

View File

@@ -354,8 +354,6 @@ $facturestatic=new Facture($db);
$formcompany=new FormCompany($db);
$thirdpartystatic=new Societe($db);
// llxHeader('',$langs->trans('CustomersInvoices'),'EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes');
$sql = 'SELECT';
if ($sall || $search_product_category > 0) $sql = 'SELECT DISTINCT';
$sql.= ' f.rowid as id, f.facnumber as ref, f.ref_client, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.total as total_ht, f.tva as total_vat, f.total_ttc,';
@@ -372,9 +370,8 @@ $sql.= " p.rowid as project_id, p.ref as project_ref, p.title as project_label";
// TODO Better solution to be able to sort on already payed or remain to pay is to store amount_payed in a denormalized field.
if (! $sall) $sql.= ', SUM(pf.amount) as dynamount_payed';
if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc";
// Add fields from extrafields
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
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
@@ -1024,7 +1021,7 @@ if ($resql)
// Project
if (! empty($arrayfields['p.ref']['checked']))
{
print '<td class="nowrap">';
print '<td class="nocellnopadd nowrap">';
if ($obj->project_id > 0)
{
$projectstatic->id=$obj->project_id;

View File

@@ -61,42 +61,52 @@ if ($id > 0 || ! empty($ref))
}
}
$hookmanager->initHooks(array('directdebitcard','globalcard'));
/*
* Actions
*/
if ($action == "new")
$parameters = array('socid' => $socid);
$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 ($object->id > 0)
if ($action == "new")
{
$db->begin();
$result = $object->demande_prelevement($user, GETPOST('withdraw_request_amount'));
if ($result > 0)
if ($object->id > 0)
{
$db->commit();
$db->begin();
setEventMessages($langs->trans("RecordSaved"), null, 'mesgs');
}
else
{
$db->rollback();
setEventMessages($object->error, $object->errors, 'errors');
$result = $object->demande_prelevement($user, GETPOST('withdraw_request_amount'));
if ($result > 0)
{
$db->commit();
setEventMessages($langs->trans("RecordSaved"), null, 'mesgs');
}
else
{
$db->rollback();
setEventMessages($object->error, $object->errors, 'errors');
}
}
$action='';
}
$action='';
}
if ($action == "delete")
{
if ($object->id > 0)
if ($action == "delete")
{
$result = $object->demande_prelevement_delete($user, GETPOST('did'));
if ($result == 0)
if ($object->id > 0)
{
header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
exit;
$result = $object->demande_prelevement_delete($user, GETPOST('did'));
if ($result == 0)
{
header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
exit;
}
}
}
}

View File

@@ -531,7 +531,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
$sql = 'SELECT f.rowid as facid, f.facnumber, f.total_ttc, f.multicurrency_code, f.multicurrency_total_ttc, f.type,';
$sql.= ' f.datef as df, f.fk_soc as socid, f.date_lim_reglement as dlr';
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture as f';
$sql.= ' WHERE f.entity IN ('.getEntity('facture', $conf->entity).')';
$sql.= ' WHERE f.entity IN ('.getEntity('facture').')';
$sql.= ' AND (f.fk_soc = '.$facture->socid;
// Can pay invoices of all child of parent company
if(!empty($conf->global->FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS) && !empty($facture->thirdparty->parent)) {
@@ -593,6 +593,10 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
print '<td align="right">'.$alreadypayedlabel.'</td>';
print '<td align="right">'.$remaindertopay.'</td>';
print '<td align="right">'.$langs->trans('PaymentAmount').'</td>';
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $facture, $action); // Note that $action and $object may have been modified by hook
print '<td align="right">&nbsp;</td>';
print "</tr>\n";
@@ -736,6 +740,9 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
}
print "</td>";
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $objp, $action); // Note that $action and $object may have been modified by hook
// Warning
print '<td align="center" width="16">';
//print "xx".$amounts[$invoice->id]."-".$amountsresttopay[$invoice->id]."<br>";
@@ -746,9 +753,6 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
}
print '</td>';
$parameters=array();
$reshook=$hookmanager->executeHooks('printObjectLine',$parameters,$objp,$action); // Note that $action and $object may have been modified by hook
print "</tr>\n";
$total+=$objp->total;
@@ -840,7 +844,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
*/
if (! GETPOST('action','aZ09'))
{
if ($page == -1) $page = 0 ;
if (empty($page) || $page == -1) $page = 0 ;
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
$offset = $limit * $page ;
@@ -886,11 +890,11 @@ if (! GETPOST('action','aZ09'))
print '<td>'.dol_print_date($db->jdate($objp->dp))."</td>\n";
print '<td>'.$objp->paiement_type.' '.$objp->num_paiement."</td>\n";
print '<td align="right">'.price($objp->amount).'</td><td>&nbsp;</td>';
$parameters=array();
$reshook=$hookmanager->executeHooks('printObjectLine',$parameters,$objp,$action); // Note that $action and $object may have been modified by hook
print '</tr>';
$parameters=array();
$reshook=$hookmanager->executeHooks('printObjectLine',$parameters,$objp,$action); // Note that $action and $object may have been modified by hook
$i++;
}
print '</table>';

View File

@@ -1180,7 +1180,7 @@ class Paiement extends CommonObject
$result='';
$label = '<u>'.$langs->trans("ShowPayment").'</u><br>';
$label.= '<strong>'.$langs->trans("Ref").':</strong> '.$this->ref;
$label.= '<br><strong>'.$langs->trans("Date").':</strong> '.dol_print_date($this->date, 'dayhour');
if ($this->date) $label.= '<br><strong>'.$langs->trans("Date").':</strong> '.dol_print_date($this->date, 'dayhour');
if ($mode == 'withlistofinvoices')
{
$arraybill = $this->getBillsArray();

View File

@@ -71,7 +71,7 @@ if ($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm=='yes
$error++;
$action = 'create';
}
if (! empty($conf->banque->enabled) && ! $_POST["accountid"] > 0)
if (! empty($conf->banque->enabled) && ! ($_POST["accountid"] > 0))
{
setEventMessages($langs->trans("ErrorFieldRequired",$langs->transnoentities("AccountToCredit")), null, 'errors');
$error++;

View File

@@ -63,78 +63,86 @@ $object = new BonPrelevement($db,"");
// 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
$hookmanager->initHooks(array('directdebitprevcard','globalcard'));
/*
* Actions
*/
if ( $action == 'confirm_delete' )
$parameters = array('socid' => $socid);
$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))
{
$res=$object->delete($user);
if ($res > 0)
{
header("Location: index.php");
exit;
}
}
if ( $action == 'confirm_delete' )
{
$res=$object->delete($user);
if ($res > 0)
{
header("Location: index.php");
exit;
}
}
// Seems to no be used and replaced with $action == 'infocredit
if ( $action == 'confirm_credite' && GETPOST('confirm','alpha') == 'yes')
{
$res=$object->set_credite();
if ($res >= 0)
{
header("Location: card.php?id=".$id);
exit;
}
}
// Seems to no be used and replaced with $action == 'infocredit
if ( $action == 'confirm_credite' && GETPOST('confirm','alpha') == 'yes')
{
$res=$object->set_credite();
if ($res >= 0)
{
header("Location: card.php?id=".$id);
exit;
}
}
if ($action == 'infotrans' && $user->rights->prelevement->bons->send)
{
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
if ($action == 'infotrans' && $user->rights->prelevement->bons->send)
{
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$dt = dol_mktime(12,0,0,GETPOST('remonth','int'),GETPOST('reday','int'),GETPOST('reyear','int'));
$dt = dol_mktime(12,0,0,GETPOST('remonth','int'),GETPOST('reday','int'),GETPOST('reyear','int'));
/*
if ($_FILES['userfile']['name'] && basename($_FILES['userfile']['name'],".ps") == $object->ref)
{
$dir = $conf->prelevement->dir_output.'/receipts';
/*
if ($_FILES['userfile']['name'] && basename($_FILES['userfile']['name'],".ps") == $object->ref)
{
$dir = $conf->prelevement->dir_output.'/receipts';
if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $dir . "/" . dol_unescapefile($_FILES['userfile']['name']),1) > 0)
{
$object->set_infotrans($user, $dt, GETPOST('methode','alpha'));
}
if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $dir . "/" . dol_unescapefile($_FILES['userfile']['name']),1) > 0)
{
$object->set_infotrans($user, $dt, GETPOST('methode','alpha'));
}
header("Location: card.php?id=".$id);
exit;
}
else
{
dol_syslog("Fichier invalide",LOG_WARNING);
$mesg='BadFile';
}*/
header("Location: card.php?id=".$id);
exit;
}
else
{
dol_syslog("Fichier invalide",LOG_WARNING);
$mesg='BadFile';
}*/
$error = $object->set_infotrans($user, $dt, GETPOST('methode','alpha'));
$error = $object->set_infotrans($user, $dt, GETPOST('methode','alpha'));
if ($error)
{
header("Location: card.php?id=".$id."&error=$error");
exit;
}
}
if ($error)
{
header("Location: card.php?id=".$id."&error=$error");
exit;
}
}
// Set direct debit order to credited, create payment and close invoices
if ($action == 'infocredit' && $user->rights->prelevement->bons->credit)
{
$dt = dol_mktime(12,0,0,GETPOST('remonth','int'),GETPOST('reday','int'),GETPOST('reyear','int'));
// Set direct debit order to credited, create payment and close invoices
if ($action == 'infocredit' && $user->rights->prelevement->bons->credit)
{
$dt = dol_mktime(12,0,0,GETPOST('remonth','int'),GETPOST('reday','int'),GETPOST('reyear','int'));
$error = $object->set_infocredit($user, $dt);
$error = $object->set_infocredit($user, $dt);
if ($error)
{
header("Location: card.php?id=".$id."&error=$error");
exit;
}
if ($error)
{
header("Location: card.php?id=".$id."&error=$error");
exit;
}
}
}

View File

@@ -1133,15 +1133,25 @@ class BonPrelevement extends CommonObject
/**
* Get object and lines from database
* Get object and lines from database
*
* @param User $user Object user that delete
* @return int >0 if OK, <0 if KO
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int >0 if OK, <0 if KO
*/
function delete($user=null)
function delete($user = null, $notrigger = 0)
{
$this->db->begin();
$error = 0;
if (! $notrigger)
{
// Call trigger
$result=$this->call_trigger('BON_PRELEVEMENT_DELETE', $user);
if ($result < 0) $error++;
// End call triggers
}
$sql = "DELETE FROM ".MAIN_DB_PREFIX."prelevement_facture WHERE fk_prelevement_lignes IN (SELECT rowid FROM ".MAIN_DB_PREFIX."prelevement_lignes WHERE fk_prelevement_bons = ".$this->id.")";
$resql1=$this->db->query($sql);
if (! $resql1) dol_print_error($this->db);
@@ -1158,7 +1168,7 @@ class BonPrelevement extends CommonObject
$resql4=$this->db->query($sql);
if (! $resql4) dol_print_error($this->db);
if ($resql1 && $resql2 && $resql3)
if ($resql1 && $resql2 && $resql3 && !$error)
{
$this->db->commit();
return 1;
@@ -1349,7 +1359,7 @@ class BonPrelevement extends CommonObject
$sql = "SELECT soc.code_client as code, soc.address, soc.zip, soc.town, c.code as country_code,";
$sql.= " pl.client_nom as nom, pl.code_banque as cb, pl.code_guichet as cg, pl.number as cc, pl.amount as somme,";
$sql.= " f.facnumber as fac, pf.fk_facture as idfac, rib.datec, rib.iban_prefix as iban, rib.bic as bic, rib.rowid as drum";
$sql.= " f.facnumber as fac, pf.fk_facture as idfac, rib.datec, rib.iban_prefix as iban, rib.bic as bic, rib.rowid as drum, rib.rum";
$sql.= " FROM";
$sql.= " ".MAIN_DB_PREFIX."prelevement_lignes as pl,";
$sql.= " ".MAIN_DB_PREFIX."facture as f,";
@@ -1375,7 +1385,7 @@ class BonPrelevement extends CommonObject
while ($i < $num)
{
$obj = $this->db->fetch_object($resql);
$fileDebiteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->nom, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $obj->fac, $obj->idfac, $obj->iban, $obj->bic, $this->db->jdate($obj->datec), $obj->drum);
$fileDebiteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->nom, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $obj->fac, $obj->idfac, $obj->iban, $obj->bic, $this->db->jdate($obj->datec), $obj->drum, $obj->rum);
$this->total = $this->total + $obj->somme;
$i++;
}
@@ -1586,9 +1596,10 @@ class BonPrelevement extends CommonObject
* @param string $row_bic rib.bic AS bic,
* @param string $row_datec rib.datec,
* @param string $row_drum rib.rowid used to generate rum
* @param string $row_rum rib.rum Rum defined on company bank account
* @return string Return string with SEPA part DrctDbtTxInf
*/
function EnregDestinataireSEPA($row_code_client, $row_nom, $row_address, $row_zip, $row_town, $row_country_code, $row_cb, $row_cg, $row_cc, $row_somme, $row_facnumber, $row_idfac, $row_iban, $row_bic, $row_datec, $row_drum)
function EnregDestinataireSEPA($row_code_client, $row_nom, $row_address, $row_zip, $row_town, $row_country_code, $row_cb, $row_cg, $row_cc, $row_somme, $row_facnumber, $row_idfac, $row_iban, $row_bic, $row_datec, $row_drum, $row_rum)
{
// phpcs:enable
global $conf;
@@ -1597,7 +1608,7 @@ class BonPrelevement extends CommonObject
// Define value for RUM
// Example: RUMCustomerCode-CustomerBankAccountId-01424448606 (note: Date is date of creation of CustomerBankAccountId)
$Rum = $this->buildRumNumber($row_code_client, $row_datec, $row_drum);
$Rum = empty($row_rum) ? $this->buildRumNumber($row_code_client, $row_datec, $row_drum) : $row_rum;
// Define date of RUM signature
$DtOfSgntr = dol_print_date($row_datec, '%Y-%m-%d');

View File

@@ -51,43 +51,54 @@ $page = GETPOST("page",'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
$offset = $limit * $page;
$hookmanager->initHooks(array('directdebitcreatecard','globalcard'));
/*
* Actions
*/
// Change customer bank information to withdraw
if ($action == 'modify')
$parameters = array('mode' => $mode, 'format' => $format, 'limit' => $limit, 'page' => $page, 'offset' => $offset);
$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))
{
for ($i = 1 ; $i < 9 ; $i++)
{
dolibarr_set_const($db, GETPOST("nom$i"), GETPOST("value$i"),'chaine',0,'',$conf->entity);
}
}
if ($action == 'create')
{
// $conf->global->PRELEVEMENT_CODE_BANQUE and $conf->global->PRELEVEMENT_CODE_GUICHET should be empty
$bprev = new BonPrelevement($db);
// Change customer bank information to withdraw
if ($action == 'modify')
{
for ($i = 1 ; $i < 9 ; $i++)
{
dolibarr_set_const($db, GETPOST("nom$i"), GETPOST("value$i"),'chaine',0,'',$conf->entity);
}
}
if ($action == 'create')
{
// $conf->global->PRELEVEMENT_CODE_BANQUE and $conf->global->PRELEVEMENT_CODE_GUICHET should be empty
$bprev = new BonPrelevement($db);
$executiondate = dol_mktime(0, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
$result = $bprev->create($conf->global->PRELEVEMENT_CODE_BANQUE, $conf->global->PRELEVEMENT_CODE_GUICHET, $mode, $format,$executiondate);
if ($result < 0)
{
setEventMessages($bprev->error, $bprev->errors, 'errors');
}
elseif ($result == 0)
{
$mesg=$langs->trans("NoInvoiceCouldBeWithdrawed", $format);
setEventMessages($mesg, null, 'errors');
$mesg.='<br>'."\n";
foreach($bprev->invoice_in_error as $key => $val)
{
$mesg.='<span class="warning">'.$val."</span><br>\n";
}
}
else
{
setEventMessages($langs->trans("DirectDebitOrderCreated", $bprev->getNomUrl(1)), null);
}
if ($result < 0)
{
setEventMessages($bprev->error, $bprev->errors, 'errors');
}
elseif ($result == 0)
{
$mesg=$langs->trans("NoInvoiceCouldBeWithdrawed", $format);
setEventMessages($mesg, null, 'errors');
$mesg.='<br>'."\n";
foreach($bprev->invoice_in_error as $key => $val)
{
$mesg.='<span class="warning">'.$val."</span><br>\n";
}
}
else
{
setEventMessages($langs->trans("DirectDebitOrderCreated", $bprev->getNomUrl(1)), null);
}
}
}

View File

@@ -156,7 +156,7 @@ $sql.= " AND pl.fk_prelevement_bons = p.rowid";
$sql.= " AND f.fk_soc = s.rowid";
$sql.= " AND pf.fk_facture = f.rowid";
$sql.= " AND f.entity = ".$conf->entity;
if ($prev_id) $sql.= " AND p.rowid=".$prev_id;
if ($object->id) $sql.= " AND p.rowid=".$object->id;
if ($socid) $sql.= " AND s.rowid = ".$socid;
$sql.= $db->order($sortfield,$sortorder);

View File

@@ -121,7 +121,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes')
$result=$object->delete($user);
if ($result > 0)
{
header("Location: index.php");
header("Location: list.php");
exit;
}
else

View File

@@ -319,7 +319,7 @@ class ChargeSociales extends CommonObject
$sql.= ", date_ech='".$this->db->idate($this->date_ech)."'";
$sql.= ", periode='".$this->db->idate($this->periode)."'";
$sql.= ", amount='".price2num($this->amount,'MT')."'";
$sql.= ", fk_projet='".$this->db->escape($this->fk_project)."'";
$sql.= ", fk_projet=".($this->fk_project>0?$this->db->escape($this->fk_project):"NULL");
$sql.= ", fk_user_modif=".$user->id;
$sql.= " WHERE rowid=".$this->id;

View File

@@ -55,7 +55,7 @@ $result = restrictedArea($user, 'tax', $id, 'chargesociales','charges');
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
if ($page == -1) {
if (empty($page) || $page == -1) {
$page = 0;
}
$offset = $conf->liste_limit * $page;

View File

@@ -168,7 +168,7 @@ if ($resql)
if ($year)
{
$center=($year?"<a href='index.php?year=".($year-1)."'>".img_previous()."</a> ".$langs->trans("Year")." $year <a href='index.php?year=".($year+1)."'>".img_next()."</a>":"");
$center=($year?"<a href='list.php?year=".($year-1)."'>".img_previous()."</a> ".$langs->trans("Year")." $year <a href='list.php?year=".($year+1)."'>".img_next()."</a>":"");
print_barre_liste($langs->trans("SocialContributions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'title_accountancy.png', 0, $newcardbutton, '', $limit);
}
else
@@ -258,7 +258,7 @@ if ($resql)
print '<td align="center">';
if ($obj->periode)
{
print '<a href="index.php?year='.strftime("%Y",$db->jdate($obj->periode)).'">'.dol_print_date($db->jdate($obj->periode),'day').'</a>';
print '<a href="list.php?year='.strftime("%Y",$db->jdate($obj->periode)).'">'.dol_print_date($db->jdate($obj->periode),'day').'</a>';
}
else
{

View File

@@ -90,7 +90,7 @@ print '<input type="hidden" name="mode" value="'.$mode.'">';
if ($mode != 'sconly')
{
$center=($year?'<a href="index.php?year='.($year-1).$param.'">'.img_previous($langs->trans("Previous"), 'class="valignbottom"')."</a> ".$langs->trans("Year").' '.$year.' <a href="index.php?year='.($year+1).$param.'">'.img_next($langs->trans("Next"), 'class="valignbottom"')."</a>":"");
$center=($year?'<a href="list.php?year='.($year-1).$param.'">'.img_previous($langs->trans("Previous"), 'class="valignbottom"')."</a> ".$langs->trans("Year").' '.$year.' <a href="list.php?year='.($year+1).$param.'">'.img_next($langs->trans("Next"), 'class="valignbottom"')."</a>":"");
print_barre_liste($title,$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,$center,$num,$totalnboflines, 'title_accountancy', 0, '', '', $limit, 1);
}
else
@@ -181,7 +181,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
print $socialcontrib->getNomUrl(1,'20');
print '</td>';
// Type
print '<td><a href="../sociales/index.php?filtre=cs.fk_type:'.$obj->type.'">'.$obj->lib.'</a></td>';
print '<td><a href="../sociales/list.php?filtre=cs.fk_type:'.$obj->type.'">'.$obj->lib.'</a></td>';
// Date
$date=$obj->periode;
if (empty($date)) $date=$obj->date_ech;

View File

@@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.
// Load translation files required by the page
$langs->loadLangs(array("other","compta","banks","bills","companies","product","trips","admin","accountancy"));
$modecompta = GETPOST('modecompta','alpha');
$modecompta = (GETPOST('modecompta', 'alpha') ? GETPOST('modecompta', 'alpha') : $conf->global->ACCOUNTING_MODE);
// Date range
$year=GETPOST("year",'int');

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