Compare commits

...

157 Commits
13.0.2 ... 11.0

Author SHA1 Message Date
Laurent Destailleur
a186e16568 Backport fix for mysql 8 export 2024-10-29 15:32:54 +01:00
Laurent Destailleur
a621032643 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2024-09-29 19:28:05 +02:00
Laurent Destailleur
32646cb7f4 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2024-09-29 19:25:49 +02:00
Florian Mortgat
74b67eb6c6 FIX - use price() to display qty on a product's stats tab to avoid showing too many decimals when rounding errors are possible (#31165) 2024-09-29 15:57:05 +02:00
Laurent Destailleur
667890247c Merge remote-tracking branch 'origin/10.0' into 11.0 2024-09-26 18:46:30 +02:00
Florian Mortgat
c727bbb530 FIX: when qty is not an integer, apply price() (#31138)
* FIX: when qty is not an integer, apply price() to avoid displaying precision errors if php.ini's precision settings are too high

* Apply eldy's suggestion to use price's parameters rather than a test
2024-09-26 18:41:41 +02:00
Laurent Destailleur
973a2ede97 Fix syntax error 2023-08-10 11:35:19 +02:00
Laurent Destailleur
e8fd551043 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2023-08-10 10:43:44 +02:00
Laurent Destailleur
34b3113bb7 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2023-08-10 10:41:20 +02:00
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
03a9daa3e6 Merge pull request #25139 from atm-greg/Fix_11.0_bankentries_list_missing_hook
add missing hook printFieldListValue
2023-06-19 16:48:13 +02:00
atm-greg
e5193f16cc add printFieldListJoin 2023-06-19 16:09:34 +02:00
atm-greg
9abde6c057 add missing hook printFieldListValue 2023-06-19 14:26:49 +02:00
Laurent Destailleur
6aa8ba8935 Removed unexpected files 2023-03-16 09:29:10 +01:00
Laurent Destailleur
f782ac6654 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2022-11-22 22:03:47 +01:00
Laurent Destailleur
1e54e695b2 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2022-11-22 22:00:59 +01:00
Laurent Destailleur
f2eb3c1a55 Merge pull request #22919 from atm-maxime/11.0
Fix API right check
2022-11-22 21:40:12 +01:00
Laurent Destailleur
41a970c90f Merge pull request #22922 from ATM-Nicolas/fix_sql_request_parenthesis
FIX sql request parenthesis
2022-11-22 21:39:11 +01:00
ATM-Nicolas
3d9b2a1676 FIX : SQL request parenthesis 2022-11-22 15:32:37 +01:00
Maxime Kohlhaas
7be0e0da1c Fix API right check 2022-11-22 13:46:42 +01:00
Laurent Destailleur
cc1a3080d0 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2022-05-03 11:53:23 +02:00
Laurent Destailleur
b5f887b3e4 Fix DEBUGBAR_USE_LOG_FILE 2022-05-03 11:52:32 +02:00
Laurent Destailleur
a1534955a1 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2022-03-10 15:52:50 +01:00
Laurent Destailleur
79371f66b0 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2022-03-10 15:52:28 +01: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
7dfb369a98 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2022-01-07 15:48:23 +01:00
Laurent Destailleur
265aeb76e6 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/core/class/utils.class.php
	htdocs/expensereport/class/expensereport.class.php
2022-01-07 15:48:13 +01:00
Laurent Destailleur
5ee74d7c07 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2022-01-07 15:45:51 +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
5de6c193ff Merge pull request #19745 from daraelmin/patch-1
Fix #19723 - Belgium provinces incorrect mapping
2022-01-06 10:41:19 +01:00
daraelmin
1f6e9a1a9e Fix install - Belgium provinces incorrect mapping 2022-01-04 18:46:29 +01:00
Laurent Destailleur
0a72aed3d7 Fix missing space before union 2021-12-23 13:35:38 +01:00
Laurent Destailleur
ce8312c744 Merge pull request #19464 from atm-quentin/FIX_11_TAB_INVOICE
FIX : Urgent onglet contact inaccessible depuis une facture
2021-11-30 11:45:56 +01:00
Quentin VIAL-GOUTEYRON
632147ad88 object->id is always empty 2021-11-24 12:04:18 +01:00
Laurent Destailleur
9aa5c94612 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2021-11-11 15:59:48 +01:00
Laurent Destailleur
ba724204a4 FIX Bad use of dol_concatdesc() 2021-11-11 15:50:32 +01:00
Laurent Destailleur
ff696e0dad Merge pull request #19236 from marc-dll/11.0_FIX_invoice_creation_blocked
FIX: URGENT: impossible to create an invoice
2021-10-31 14:03:11 +01:00
Laurent Destailleur
3dcd1aa05d Update info.php 2021-10-31 14:02:34 +01:00
Laurent Destailleur
8dfe4fe05f Update note.php 2021-10-31 14:02:14 +01:00
Laurent Destailleur
65d59405da Update document.php 2021-10-31 14:01:56 +01:00
Laurent Destailleur
0e2e8fe27f Update contact.php 2021-10-31 14:01:40 +01:00
Marc de Lima Lucio
eb8d7f92c3 FIX: invoice: inpossible to create an invoice because of very bad check + warnings when trying to print tabs for invoice with no ID 2021-10-28 15:26:40 +02:00
Laurent Destailleur
e1af439a6d Merge pull request #18931 from atm-florianm/FIX_11.0_consistent_UX_for_invoices_when_no_id_or_ref
FIX: consistent UX when calling a tab from the invoice card with empty ref/id
2021-10-17 13:52:30 +02:00
atm-florian
57052e2fba FIX PR#18931 Remove useless explicit call to dol_shutdown 2021-10-11 11:10:14 +02:00
atm-florian
2da16ade6c FIX: consistent UX when calling a tab from the invoice card with empty ref / id 2021-10-08 17:24:52 +02:00
Laurent Destailleur
cd09099409 Merge pull request #18563 from atm-maxime/patch-3
Fix supplier invoice pdf generation canelle
2021-09-01 13:37:50 +02:00
Maxime Kohlhaas
d09d036f06 Fix supplier invoice pdf generation canelle
Thirdparty wrongly fetched was causing errors on mass generation
2021-08-31 16:10:55 +02:00
Laurent Destailleur
ab8f78f29a Merge pull request #18366 from atm-quentin/FIX_11_postgre_select_filter_extrafield
FIX compatibility postgre sql
2021-08-11 15:45:04 +02:00
Laurent Destailleur
8da328b183 Update extrafields_list_search_sql.tpl.php 2021-08-11 15:44:48 +02:00
Quentin VIAL-GOUTEYRON
108a5ff7cb FIX postgre filter select search extrafield 2021-08-09 15:14:25 +02:00
Laurent Destailleur
026f38fe06 Merge pull request #18094 from marc-dll/11.0_FIX_holiday_pgsql
FIX: holiday: balances not updated correctly with pgsql because of case sensitivity
2021-07-06 14:47:08 +02:00
Marc de Lima Lucio
eea90cef56 FIX: holiday: balances not updated correctly with pgsql because of case sensitivity 2021-07-05 16:31:33 +02:00
Laurent Destailleur
246f7b054e Merge pull request #18060 from atm-arnaud/FIX_deposit_can_create_credit_note_in_payment_conf
FIX deposit can create credit note in payment conf
2021-06-30 14:48:29 +02:00
atm-arnaud
8772c53723 FIX deposit can create credit note in payment conf 2021-06-30 12:37:21 +02:00
Laurent Destailleur
0472ab4690 Merge pull request #18040 from OPEN-DSI/v11-fix-contact-update-perso-birthday-alert
FIX update contact birthday alert
2021-06-29 15:37:38 +02:00
lvessiller
fa28a02d74 FIX update contact birthday alert 2021-06-28 11:03:22 +02:00
Juanjo Menent
eeef78760a fix: Bad position of the printFieldListWhere hook 2021-06-17 10:29:43 +02:00
Laurent Destailleur
1d9310055e Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2021-06-14 15:19:11 +02:00
Laurent Destailleur
e81023c35a Update doc 2021-06-14 15:12:08 +02:00
Laurent Destailleur
dcca3011ee Clean code 2021-06-14 14:41:50 +02:00
Laurent Destailleur
e41a3a2f42 Merge pull request #17867 from OPEN-DSI/v11-fix-clone-invoice-with-acount-line
FIX clone invoice with acount line
2021-06-14 14:41:05 +02:00
Laurent Destailleur
41d9324600 Merge pull request #17888 from marc-dll/11.0_FIX_activity_task_assignment
FIX: project time spent by day/week: quote mismatch in SQL query to assign to check task assigment
2021-06-11 18:12:57 +02:00
Laurent Destailleur
a8f11fec31 Update perweek.php 2021-06-11 18:12:39 +02:00
Laurent Destailleur
057d91698f Update perday.php 2021-06-11 18:11:55 +02:00
Marc de Lima Lucio
96656ff148 FIX: project time spent by day/week: quote mismatch is SQL query to assign to check task assigment 2021-06-10 23:26:33 +02:00
Laurent Destailleur
5d6735f364 Merge pull request #17826 from ptibogxiv/patch-428
Fix date_start of last subscription
2021-06-10 13:01:07 +02:00
Laurent Destailleur
92b20d3595 Merge pull request #17831 from atm-john/11.0_fix_doc_childtablesoncascade
FIX : childtablesoncascade doc
2021-06-10 12:59:19 +02:00
Laurent Destailleur
b7ba9df6b4 Update societe.class.php 2021-06-10 12:59:04 +02:00
Laurent Destailleur
8a46fd376f Update commonobject.class.php 2021-06-10 12:58:42 +02:00
Laurent Destailleur
9ed7a3a5c5 Merge pull request #17863 from marc-dll/11.0_FIX_holiday_massaction_delete_right
FIX: holiday list: bad right for mass deletion
2021-06-10 12:13:10 +02:00
Laurent Destailleur
729c12a8e4 Merge pull request #17864 from DorianVabre/FIX_11.0_CSMSFile_count
Fix: using strlen() instead of count() to measure a message length on CSMSFile
2021-06-10 12:12:43 +02:00
lvessiller
c37c371392 FIX clone invoice with acount line 2021-06-09 17:18:01 +02:00
Dorian Vabre
0a23cf029d using strlen instead of count 2021-06-09 14:13:50 +02:00
Marc de Lima Lucio
5d9aa40065 FIX: holiday list: bad right for mass deletion 2021-06-09 12:40:34 +02:00
ATM john
1aca7efce3 Fix childtablesoncascade doc 2021-06-06 13:15:03 +02:00
ptibogxiv
36accba5c9 Fix date_start of last subscription 2021-06-05 14:43:40 +02:00
Laurent Destailleur
1753e980b8 Merge pull request #17728 from atm-maxime/fix_compta_export_dateech
Fix Quadra accountancy export for due date
2021-05-26 17:25:56 +02:00
Maxime Kohlhaas
1d5b8cbb19 Fix Quadra accountancy export for due date 2021-05-26 14:59:28 +02:00
Laurent Destailleur
93558d5bbb Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2021-05-20 14:58:57 +02:00
Laurent Destailleur
865ecf7a94 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/admin/translation.php
2021-05-20 14:58:50 +02:00
Laurent Destailleur
e8d9e9e697 Merge pull request #17659 from gmilad/gmilad-fix-17608-b10
Fix issue #17608 for branch 10
2021-05-20 14:34:12 +02:00
Laurent Destailleur
90443e26ac Merge pull request #17660 from gmilad/gmilad-fix-17608-b11
Fix issue #17608 for branch 11
2021-05-20 14:30:30 +02:00
Laurent Destailleur
5fd4da66cb Merge pull request #17673 from OPEN-DSI/v11-fix-supplier-order-special-code
FIX keep special code on supplier order lines for external modules
2021-05-20 14:13:07 +02:00
lvessiller
e2e6d4ba14 FIX keep special code on supplier order lines for external modules 2021-05-19 14:29:46 +02:00
gmilad
4bb18db905 Fix issue #17608 for branch 11
Fix issue #17608 for branch 11
2021-05-18 19:53:35 +02:00
gmilad
57732d4265 Fix issue #17608 for branch 10
Fix issue #17608 for branch 10
2021-05-18 19:45:15 +02:00
Laurent Destailleur
6170b28c3b FIx #17651 2021-05-18 11:58:49 +02:00
Laurent Destailleur
a865f49d72 Fix phpcs 2021-05-17 19:19:26 +02:00
Laurent Destailleur
c54e010126 Fix perms on API user 2021-05-17 16:16:45 +02:00
Laurent Destailleur
cb9db6e3a8 Merge pull request #17630 from DorianVabre/Fix_11.0_api_user_right
Fix: user rest api rights
2021-05-17 15:58:11 +02:00
stickler-ci
a3aba28c95 Fixing style errors. 2021-05-17 10:06:41 +00:00
Dorian Vabre
547f1dd370 Fix: user rest api rights 2021-05-17 11:54:53 +02:00
Laurent Destailleur
5305a983c7 Merge pull request #17629 from fmarcet/11.0
Fix: Before there was no mistake
2021-05-17 10:30:46 +02:00
Ferran Marcet
f923c70f38 Fix: Before there was no mistake 2021-05-17 10:17:54 +02:00
Laurent Destailleur
2637f9af63 Merge pull request #17586 from atm-quentin/FIX_missing_town_and_zip_filter
FIX missing town and zip filter in contract list sql request
2021-05-17 10:08:44 +02:00
Laurent Destailleur
fd6147578a Merge pull request #17611 from atm-maxime/fix/supplier_discount_replenish
Fix use supplier relative discount in replenish order creation
2021-05-17 09:44:39 +02:00
Laurent Destailleur
592cfb5e93 Merge pull request #17602 from fmarcet/11.0
FIX: Impossible to add multiple localtax2
2021-05-17 09:13:58 +02:00
Laurent Destailleur
6a2afabcac Merge pull request #17617 from piernov/11.0-fix-LDAPposixGroupId
Fix: properly set gid for Group LDAP synchro
2021-05-17 07:14:25 +02:00
Laurent Destailleur
fc22565532 Merge pull request #17613 from atm-maxime/fix/date_propal
Fix use of DatePropal instead of Date
2021-05-17 07:09:35 +02:00
piernov
1cbe0e3f2d Fix: properly set gid for Group LDAP synchro
Even if the gidNumber field was set in the configuration, a gid different from the Dolibarr's one was generated and stored into LDAP.
Now the gidNumber is properly set to Dolibarr's gid if gidNumber field is set in the LDAP module configuration.
2021-05-15 18:01:34 +02:00
Maxime Kohlhaas
db32f882e8 Fix use of DatePropal instead of Date 2021-05-15 07:45:04 +02:00
Maxime Kohlhaas
acadef72c1 Fix use supplier relative discount in replenish order creation 2021-05-14 18:01:22 +02:00
Ferran Marcet
c577d1c51e FIX: Impossible to add multiple localtax2 2021-05-13 13:35:28 +02:00
Quentin VIAL-GOUTEYRON
56d78cf12a FIX missing town and zip filter in contract list sql request 2021-05-12 11:02:27 +02:00
Laurent Destailleur
b5c88d5817 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2021-05-11 20:15:32 +02:00
Laurent Destailleur
c2fa19a0b4 fix phpcs 2021-05-11 20:15:20 +02:00
Laurent Destailleur
82400ca2a5 Merge pull request #17542 from atm-john/patch-2
FIX : var case
2021-05-11 18:43:57 +02:00
John BOTELLA
2fda3b1b46 FIX ; var case
On this page $datePrint is not used but $dateprint yes
2021-05-08 13:53:20 +02:00
Laurent Destailleur
824a601014 Merge pull request #17507 from atm-john/11.0_fix_search_accent_in_description
FIX : search accented words in product description (consumption page)
2021-05-06 16:45:21 +02:00
Laurent Destailleur
9ce23ac6b2 Merge pull request #17494 from atm-john/fix_not_enabled_email_template
FIX saving template email
2021-05-06 16:22:19 +02:00
Laurent Destailleur
a4d93424dc Merge pull request #17498 from marc-dll/FIX_11.0_pgsql_where_boolean
FIX: pgsql: prevent 'WHERE 1'
2021-05-06 15:58:41 +02:00
ATM john
63292255cc Fix search accented words in product description 2021-05-05 18:45:23 +02:00
Marc de Lima Lucio
139ae3db00 FIX: pgsql: prevent 'WHERE 1' 2021-05-05 11:49:11 +02:00
ATM john
6574e54a41 Fix saving template email 2021-05-04 18:09:13 +02:00
Laurent Destailleur
e6b4f1eab6 Merge pull request #17442 from atm-john/11.0_fix_showInputField_checkbox_selection
FIX : Show input field checkbox selection
2021-05-03 16:16:56 +02:00
Laurent Destailleur
33a20ae9a1 Update extrafields.class.php 2021-05-03 16:16:44 +02:00
ATM john
6e4962bb39 Merge branch '11.0' of github.com:Dolibarr/dolibarr into 11.0_fix_showInputField_checkbox_selection 2021-04-30 12:22:31 +02:00
ATM john
6c1e0919c8 Fix checkbox multiselect pre-selected value from get/post 2021-04-30 12:20:43 +02:00
Laurent Destailleur
27e2c69e4e Merge pull request #17439 from atm-lena/11.0_FIX_ShowContactSearch_SQLError
FIX SQL Error show_contacts : socialnetworks
2021-04-30 12:03:40 +02:00
Laurent Destailleur
0d4eaca3e8 Merge pull request #17426 from daraelmin/daraelmin-patch-v11
Fix wrong alias in natural_search v11-v14
2021-04-30 11:58:53 +02:00
Laurent Destailleur
08c85a88c8 Merge pull request #17437 from daraelmin/daraelmin-patch-v11-2
Fix logical test always false V11 to v14
2021-04-30 11:57:58 +02:00
stickler-ci
81b964db45 Fixing style errors. 2021-04-30 08:12:24 +00:00
atm-lena
5e98d99321 FIX SQL Error show_contacts : socialnetworks 2021-04-30 10:04:21 +02:00
daraelmin
749aeeb233 Fix $objp->subscription =="yes" 2021-04-29 23:16:21 +02:00
daraelmin
4174ebd9c0 Fix subscription =="yes" 2021-04-29 23:11:51 +02:00
daraelmin
965eb2d639 Fix logical test always false
subscription is an integer and is set to 0 or 1. So subscription is never equal to "yes"
2021-04-29 22:57:39 +02:00
daraelmin
68415322ec Fix v11 wrong alias in natural_search 2021-04-29 10:00:54 +02:00
Laurent Destailleur
2e9cf8d00b Fix phpcs 2021-04-27 02:15:58 +02:00
Laurent Destailleur
c7f38c4cf0 Fix bad var 2021-04-27 02:10:52 +02:00
Laurent Destailleur
7a6edfd61f Merge pull request #17295 from atm-gauthier/fix_adv_target_emailing_extrafields_link
FIX : type link extrafield case for advanced target emailing
2021-04-27 01:45:26 +02:00
Laurent Destailleur
e9b8e81773 Update advtargetemailing.class.php 2021-04-27 01:45:10 +02:00
Laurent Destailleur
5a6d3b7c88 Merge pull request #17372 from marc-dll/FIX_11.0_invoice__generation_after_paiement
FIX: invoice PDF generation after payment
2021-04-26 22:49:56 +02:00
Marc de Lima Lucio
ce022ab36c FIX: payment validation: invoices PDF were no re-generated, make it with correct display options 2021-04-22 15:57:06 +02:00
Marc de Lima Lucio
ee96fb6470 FIX: payment creation: re-generate invoice PDF with correct display options 2021-04-22 15:56:12 +02:00
stickler-ci
318a783237 Fixing style errors. 2021-04-19 07:19:45 +00:00
Gauthier PC portable 024
8c428081ab FIX : test on link type 2021-04-19 09:17:33 +02:00
Gauthier PC portable 024
ff8aae1209 Merge branch 'fix_adv_target_emailing_extrafields_link' of github.com:atm-gauthier/dolibarr into fix_adv_target_emailing_extrafields_link 2021-04-19 09:16:06 +02:00
Gauthier PC portable 024
5b6439ca5e FIX : cast int 2021-04-19 09:15:47 +02:00
stickler-ci
37f44f4a07 Fixing style errors. 2021-04-16 14:58:57 +00:00
Gauthier PC portable 024
f8fcf7c16b FIX : type link extrafield case for advanced target emailing 2021-04-16 16:55:19 +02:00
Laurent Destailleur
521dec7792 Merge pull request #17018 from fmarcet/11.0
FIX: Show Ref.Supplier in LinkToObjectBlock
2021-03-31 13:44:53 +02:00
Ferran Marcet
b6faa6b605 FIX: Show Ref.Supplier in LinkToObjectBlock 2021-03-31 09:40:12 +02:00
Ferran Marcet
b4f638602a FIX: Show Ref.Supplier in LinkToObjectBlock 2021-03-30 11:10:07 +02:00
Laurent Destailleur
eabe5ae616 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2021-03-29 21:35:54 +02:00
Laurent Destailleur
8c08b3945b Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2021-03-29 21:35:46 +02:00
Laurent Destailleur
b9a91f92ea Merge pull request #16984 from aspangaro/10p38
FIX Search on date in accountancy
2021-03-29 16:12:31 +02:00
Alexandre SPANGARO
56ae51375d FIX Search on date in accountancy 2021-03-27 07:11:28 +01:00
Laurent Destailleur
30543bda71 Merge pull request #16947 from atm-john/11.0_fix_something_that_not_exist
FIX : shhhhhh ! There is nothing here...
2021-03-25 01:09:20 +01:00
ATM john
4f693b86c2 shhhhhh ! There is nothing here... 2021-03-23 19:27:40 +01:00
Laurent Destailleur
66bbc7f54f Merge pull request #16734 from AlexisLaurier/11.0
correct nb_expedition count
2021-03-16 15:12:18 +01:00
Alexis LAURIER
971b97d78f correct nb_expedition count 2021-03-16 15:00:46 +01:00
79 changed files with 302 additions and 212 deletions

View File

@@ -43,7 +43,7 @@ jobs:
include:
- if: type = push
php: '5.5'
env: DB=postgresql
env: DB=mysql
- if: type = pull_request OR type = push
php: '7.4'
env: DB=mysql

View File

@@ -542,7 +542,7 @@ $cfg['ThemePerServer'] = FALSE; // allow diferent theme for each co
* %f will be replaced by a list of field names.
* (%t and %f only applies to DefaultQueryTable)
*/
$cfg['DefaultQueryTable'] = 'SELECT * FROM %t WHERE 1';
$cfg['DefaultQueryTable'] = 'SELECT * FROM %t WHERE 1 = 1';
$cfg['DefaultQueryDatabase'] = '';
/**

View File

@@ -17,8 +17,6 @@ on Internet on web following sites:<br>
<br>
* <a href="https://demo.dolibarr.org">Dolibarr demo (online)</a><br>
<br>
* <a href="https://www.nltechno.com/pages/dolibarrwinbin.php">DoliWamp, the Dolibarr for Windows</a><br>
<br>
* <a href="https://www.dolistore.com">DoliStore (official addons/plugins market place)</a><br>
</body>

View File

@@ -19,7 +19,7 @@ Download
Install
--------------------------------
* For a Quick guide, take a look at README file into root directory.
* For a Quick guide, take a look at README.md file into root directory.
* More complete documentations are also available on line on the Dolibarr Wiki:
https://wiki.dolibarr.org

View File

@@ -22,7 +22,7 @@ Download / Herunterladen
Installation
--------------------------------
* Für eine kurze Einleitung, schau auf die README Datei im Hauptverzeichnis.
* Für eine kurze Einleitung, schau auf die README.md Datei im Hauptverzeichnis.
* Umfangreiche Dokumentationen sind im Dolibarr Wiki zu finden:
https://wiki.dolibarr.org/index.php/Hauptseite

View File

@@ -19,9 +19,7 @@ https://www.dolistore.org
Documentation utilisateur
--------------------------------
* Pour une prise en main et installation rapide, consultez le fichier
README-FR à la racine.
* Pour une prise en main et installation rapide, consultez le fichier README-FR.md à la racine.
* Une documentation utilisateur francophone plus consistante est disponible en
ligne sur le wiki de Dolibarr à l'adresse:
https://wiki.dolibarr.org
* Une documentation utilisateur francophone plus consistante est disponible en ligne sur le wiki de Dolibarr à l'adresse:
https://wiki.dolibarr.org

View File

@@ -4,4 +4,5 @@ User guide
--------------------------------
* All Dolibarr guides are available, on line, on the Dolibarr Web site:
https://www.dolibarr.org

View File

@@ -3,9 +3,6 @@ README (french)
Documentation utilisateur
--------------------------------
* Pour une prise en main et installation rapide, consultez le fichier
README-FR à la racine.
La documentation utilisateur francophone est disponible en ligne sur le site Web de Dolibarr à l'adresse:
* Une documentation utilisateur francophone plus consistante est disponible en
ligne sur le site Web de Dolibarr à l'adresse:
https://www.dolibarr.fr

View File

@@ -44,14 +44,14 @@ $search_mvt_num = GETPOST('search_mvt_num', 'int');
$search_doc_type = GETPOST("search_doc_type", 'alpha');
$search_doc_ref = GETPOST("search_doc_ref", 'alpha');
$search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int'));
$search_date_end = dol_mktime(0, 0, 0, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int'));
$search_date_end = dol_mktime(23, 59, 59, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int'));
$search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int'));
$search_date_creation_start = dol_mktime(0, 0, 0, GETPOST('date_creation_startmonth', 'int'), GETPOST('date_creation_startday', 'int'), GETPOST('date_creation_startyear', 'int'));
$search_date_creation_end = dol_mktime(0, 0, 0, GETPOST('date_creation_endmonth', 'int'), GETPOST('date_creation_endday', 'int'), GETPOST('date_creation_endyear', 'int'));
$search_date_creation_end = dol_mktime(23, 59, 59, GETPOST('date_creation_endmonth', 'int'), GETPOST('date_creation_endday', 'int'), GETPOST('date_creation_endyear', 'int'));
$search_date_modification_start = dol_mktime(0, 0, 0, GETPOST('date_modification_startmonth', 'int'), GETPOST('date_modification_startday', 'int'), GETPOST('date_modification_startyear', 'int'));
$search_date_modification_end = dol_mktime(0, 0, 0, GETPOST('date_modification_endmonth', 'int'), GETPOST('date_modification_endday', 'int'), GETPOST('date_modification_endyear', 'int'));
$search_date_modification_end = dol_mktime(23, 59, 59, GETPOST('date_modification_endmonth', 'int'), GETPOST('date_modification_endday', 'int'), GETPOST('date_modification_endyear', 'int'));
$search_date_export_start = dol_mktime(0, 0, 0, GETPOST('date_export_startmonth', 'int'), GETPOST('date_export_startday', 'int'), GETPOST('date_export_startyear', 'int'));
$search_date_export_end = dol_mktime(0, 0, 0, GETPOST('date_export_endmonth', 'int'), GETPOST('date_export_endday', 'int'), GETPOST('date_export_endyear', 'int'));
$search_date_export_end = dol_mktime(23, 59, 59, GETPOST('date_export_endmonth', 'int'), GETPOST('date_export_endday', 'int'), GETPOST('date_export_endyear', 'int'));
//var_dump($search_date_start);exit;
if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_delmvt")) {

View File

@@ -39,7 +39,7 @@ $langs->loadLangs(array("accountancy"));
$action = GETPOST('action', 'alpha');
$search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int'));
$search_date_end = dol_mktime(0, 0, 0, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int'));
$search_date_end = dol_mktime(23, 59, 59, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int'));
$search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int'));
$search_accountancy_code = GETPOST("search_accountancy_code");

View File

@@ -498,9 +498,8 @@ class AccountancyExport
$Tab['contrepartie'] = str_repeat(' ', 8);
// elarifr: date format must be fixed format : 6 char ddmmyy = %d%m%yand not defined by user / dolibarr setting
if (!empty($data->date_echeance))
//$Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE);
$Tab['date_echeance'] = dol_print_date($data->date_echeance, '%d%m%y'); // elarifr: format must be ddmmyy
if (!empty($data->date_lim_reglement))
$Tab['date_echeance'] = dol_print_date($data->date_lim_reglement, '%d%m%y'); // elarifr: format must be ddmmyy
else
$Tab['date_echeance'] = '000000';

View File

@@ -1402,7 +1402,7 @@ class Adherent extends CommonObject
$this->first_subscription_amount = $obj->subscription;
}
$this->last_subscription_date = $this->db->jdate($obj->datec);
$this->last_subscription_date_start = $this->db->jdate($obj->datef);
$this->last_subscription_date_start = $this->db->jdate($obj->dateh);
$this->last_subscription_date_end = $this->db->jdate($obj->datef);
$this->last_subscription_amount = $obj->subscription;

View File

@@ -857,7 +857,7 @@ while ($i < min($num, $limit))
else
{
print '<td class="nowrap left">';
if ($obj->subscription == 'yes')
if (!empty($obj->subscription))
{
print $langs->trans("SubscriptionNotReceived");
if ($obj->statut > 0) print " ".img_warning();

View File

@@ -511,7 +511,7 @@ if ($rowid > 0)
$sql .= " AND t.rowid = ".$object->id;
if ($sall)
{
$sql .= natural_search(array("f.firstname", "d.lastname", "d.societe", "d.email", "d.login", "d.address", "d.town", "d.note_public", "d.note_private"), $sall);
$sql .= natural_search(array("d.firstname", "d.lastname", "d.societe", "d.email", "d.login", "d.address", "d.town", "d.note_public", "d.note_private"), $sall);
}
if ($status != '')
{
@@ -710,7 +710,7 @@ if ($rowid > 0)
else
{
print '<td class="nowrap left">';
if ($objp->subscription == 'yes')
if (!empty($objp->subscription))
{
print $langs->trans("SubscriptionNotReceived");
if ($objp->statut > 0) print " ".img_warning();

View File

@@ -777,7 +777,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
elseif (in_array($keycode, array('joinfile', 'private', 'position', 'scale'))) {
$sql .= (int) GETPOST($keycode, 'int');
}
else {
else {
$sql .= "'".$db->escape(GETPOST($keycode, 'nohtml'))."'";
}

View File

@@ -257,7 +257,7 @@ if (empty($reshook))
$sql = "INSERT INTO ".$tabname[$id]." (";
// List of fields
$sql .= $tabfieldinsert[$id];
$sql .= ",active)";
$sql .= ",active,enabled)";
$sql .= " VALUES(";
// List of values
@@ -289,7 +289,7 @@ if (empty($reshook))
$i++;
}
$sql .= ", 1)";
$sql .= ", 1, 1)";
dol_syslog("actionadd", LOG_DEBUG);
$result = $db->query($sql);

View File

@@ -197,7 +197,7 @@ if ($action == 'delete')
$form = new Form($db);
$formadmin = new FormAdmin($db);
$wikihelp = 'EN:Setup|FR:Paramétrage|ES:Configuración';
$wikihelp = 'EN:Setup_Translation|FR:Paramétrage_Traduction|ES:Configuración_Traducción';
llxHeader('', $langs->trans("Setup"), $wikihelp);
$param = '&mode='.$mode;

View File

@@ -640,6 +640,10 @@ class AdvanceTargetingMailing extends CommonObject
if ($arrayquery['options_'.$key]!=''){
$sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key].")";
}
} elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'link') {
if ($arrayquery['options_'.$key] > 0) {
$sqlwhere[]= " (te.".$key." = ".((int) $arrayquery['options_'.$key]).")";
}
} else {
if (is_array($arrayquery['options_'.$key])) {
$sqlwhere[]= " (te.".$key." IN ('".implode("','", $arrayquery['options_'.$key])."'))";
@@ -666,7 +670,6 @@ class AdvanceTargetingMailing extends CommonObject
while ($i < $num)
{
$obj = $this->db->fetch_object($resql);
$this->thirdparty_lines[$i] = $obj->rowid;
$i++;

View File

@@ -325,7 +325,7 @@ if (empty($reshook))
$duration = GETPOST('duree_validite', 'int');
if (empty($datep)) {
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors');
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DatePropal")), null, 'errors');
$action = 'create';
$error++;
}
@@ -1614,7 +1614,7 @@ if ($action == 'create')
}
// Date
print '<tr><td class="fieldrequired">'.$langs->trans('Date').'</td><td>';
print '<tr><td class="fieldrequired">'.$langs->trans('DatePropal').'</td><td>';
print $form->selectDate('', '', '', '', '', "addprop", 1, 1);
print '</td></tr>';
@@ -2044,7 +2044,7 @@ if ($action == 'create')
print '<tr>';
print '<td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Date');
print $langs->trans('DatePropal');
print '</td>';
if ($action != 'editdate' && $object->statut == Propal::STATUS_DRAFT && $usercancreate)
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editdate&amp;id='.$object->id.'">'.img_edit($langs->trans('SetDate'), 1).'</a></td>';

View File

@@ -157,7 +157,7 @@ $arrayfields = array(
'state.nom'=>array('label'=>"StateShort", 'checked'=>0),
'country.code_iso'=>array('label'=>"Country", 'checked'=>0),
'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers),
'p.date'=>array('label'=>"Date", 'checked'=>1),
'p.date'=>array('label'=>"DatePropal", 'checked'=>1),
'p.fin_validite'=>array('label'=>"DateEnd", 'checked'=>1),
'p.date_livraison'=>array('label'=>"DeliveryDate", 'checked'=>0),
'ava.rowid'=>array('label'=>"AvailabilityPeriod", 'checked'=>0),

View File

@@ -2254,6 +2254,7 @@ class Commande extends CommonOrder
$sql .= ' FROM '.MAIN_DB_PREFIX.'expedition as e';
$sql .= ', '.MAIN_DB_PREFIX.'element_element as el';
$sql .= ' WHERE el.fk_source = '.$this->id;
$sql .= " AND el.sourcetype = 'commande'";
$sql .= " AND el.fk_target = e.rowid";
$sql .= " AND el.targettype = 'shipping'";

View File

@@ -495,6 +495,12 @@ $sql .= " ".MAIN_DB_PREFIX."bank as b";
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (b.rowid = ef.fk_object)";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank_url as bu ON bu.fk_bank = b.rowid AND type = 'company'";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON bu.url_id = s.rowid";
// Add fields from hooks
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListJoin', $parameters); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
$sql .= " WHERE b.fk_account = ba.rowid";
$sql .= " AND ba.entity IN (".getEntity('bank_account').")";
if ($search_account > 0) $sql .= " AND b.fk_account = ".$search_account;
@@ -1507,6 +1513,11 @@ if ($resql)
if (!$i) $totalarray['nbfield']++;
}
// Fields from hook
$parameters=array('arrayfields'=>$arrayfields, 'obj'=>$objp, 'i'=>$i, 'totalarray'=>&$totalarray);
$reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $objecttmp); // Note that $action and $objecttmpect may have been modified by hook
print $hookmanager->resPrint;
// Action edit/delete
print '<td class="nowraponall" align="center">';
// Transaction reconciliated or edit link

View File

@@ -2756,6 +2756,7 @@ if (empty($reshook))
* View
*/
$form = new Form($db);
$formother = new FormOther($db);
$formfile = new FormFile($db);
@@ -3669,6 +3670,15 @@ if ($action == 'create')
}
elseif ($id > 0 || !empty($ref))
{
if (empty($object->id)) {
llxHeader();
$langs->load('errors');
echo '<div class="error">'.$langs->trans("ErrorRecordNotFound");
echo ' <a href="javascript:history.go(-1)">'.$langs->trans('GoBack').'</div>';
llxFooter();
exit;
}
/*
* Show object in view mode
*/
@@ -5260,7 +5270,7 @@ elseif ($id > 0 || !empty($ref))
}
// Create a credit note
if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $object->statut > 0 && $usercancreate)
if (($object->type == Facture::TYPE_STANDARD || ($object->type == Facture::TYPE_DEPOSIT && empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS) ) || $object->type == Facture::TYPE_PROFORMA) && $object->statut > 0 && $usercancreate)
{
if (!$objectidnext)
{

View File

@@ -85,6 +85,14 @@ require_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
* View
*/
if (empty($object->id)) {
llxHeader();
$langs->load('errors');
echo '<div class="error">'.$langs->trans("ErrorRecordNotFound").'</div>';
llxFooter();
exit;
}
$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Documents');
$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
llxHeader('', $title, $helpurl);

View File

@@ -43,6 +43,14 @@ $ref = GETPOST("ref", 'alpha');
* View
*/
if (empty($object->id)) {
llxHeader();
$langs->load('errors');
echo '<div class="error">'.$langs->trans("ErrorRecordNotFound").'</div>';
llxFooter();
exit;
}
$form = new Form($db);
$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Info');

View File

@@ -64,6 +64,14 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include,
* View
*/
if (empty($object->id)) {
llxHeader();
$langs->load('errors');
echo '<div class="error">'.$langs->trans("ErrorRecordNotFound").'</div>';
llxFooter();
exit;
}
$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Notes');
$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
llxHeader('', $title, $helpurl);

View File

@@ -109,28 +109,70 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->facture->
$object->fetch($id);
if ($object->valide($user) > 0)
{
$db->commit();
// Loop on each invoice linked to this payment to rebuild PDF
$factures = array();
foreach ($factures as $id)
{
$fac = new Facture($db);
$fac->fetch($id);
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
$outputlangs = $langs;
if (!empty($_REQUEST['lang_id']))
{
$outputlangs = new Translate("", $conf);
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
}
$outputlangs = $langs;
if (!empty($_REQUEST['lang_id']))
{
$outputlangs = new Translate("", $conf);
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
}
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
$fac->generateDocument($fac->modelpdf, $outputlangs);
}
$hidedetails = ! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0;
$hidedesc = ! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0;
$hideref = !empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0;
$sql = 'SELECT f.rowid as facid';
$sql .= ' FROM '.MAIN_DB_PREFIX.'paiement_facture as pf,'.MAIN_DB_PREFIX.'facture as f,'.MAIN_DB_PREFIX.'societe as s';
$sql .= ' WHERE pf.fk_facture = f.rowid';
$sql .= ' AND f.fk_soc = s.rowid';
$sql .= ' AND f.entity IN ('.getEntity('invoice').')';
$sql .= ' AND pf.fk_paiement = '.$object->id;
$resql = $db->query($sql);
if ($resql)
{
$i = 0;
$num = $db->num_rows($resql);
if ($num > 0)
{
while ($i < $num)
{
$objp = $db->fetch_object($resql);
$invoice = new Facture($db);
if ($invoice->fetch($objp->facid) <= 0) {
$errors++;
setEventMessage($invoice->error, $invoice->errors, 'errors');
break;
}
if ($invoice->generateDocument($invoice->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref) < 0) {
$errors++;
setEventMessage($invoice->error, $invoice->errors, 'errors');
break;
}
$i++;
}
}
$db->free($resql);
}
else
{
$errors++;
setEventMessage($db->error, $db->errors, 'errors');
}
}
header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id);
exit;
if (! $errors) {
$db->commit();
header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id);
exit;
}
}
else
{

View File

@@ -440,8 +440,13 @@ class Paiement extends CommonObject
$outputlangs = new Translate("", $conf);
$outputlangs->setDefaultLang($newlang);
}
$hidedetails = ! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0;
$hidedesc = ! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0;
$hideref = !empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0;
$ret = $invoice->fetch($facid); // Reload to get new records
$result = $invoice->generateDocument($invoice->modelpdf, $outputlangs);
$result = $invoice->generateDocument($invoice->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
if ($result < 0) {
setEventMessages($invoice->error, $invoice->errors, 'errors');
$error++;

View File

@@ -418,7 +418,7 @@ if ($modecompta == 'CREANCES-DETTES')
// Quantity
print '<td class="right">';
print $qty[$key];
print price($qty[$key], 1, $langs, 0, 0);
print '</td>';
// Percent;

View File

@@ -740,38 +740,32 @@ class Contact extends CommonObject
$this->error = $this->db->lasterror();
}
// Mis a jour alerte birthday
if ($this->birthday_alert)
{
//check existing
$sql_check = "SELECT rowid FROM ".MAIN_DB_PREFIX."user_alert WHERE type=1 AND fk_contact=".$this->db->escape($id)." AND fk_user=".$user->id;
$result_check = $this->db->query($sql_check);
if (!$result_check || ($this->db->num_rows($result_check) < 1))
{
//insert
$sql = "INSERT INTO ".MAIN_DB_PREFIX."user_alert(type,fk_contact,fk_user) ";
$sql .= "VALUES (1,".$this->db->escape($id).",".$user->id.")";
$result = $this->db->query($sql);
if (!$result)
{
$error++;
$this->error = $this->db->lasterror();
if ($user) {
// Mis a jour alerte birthday
if ($this->birthday_alert) {
//check existing
$sql_check = "SELECT rowid FROM " . MAIN_DB_PREFIX . "user_alert WHERE type=1 AND fk_contact=" . $this->db->escape($id) . " AND fk_user=" . $user->id;
$result_check = $this->db->query($sql_check);
if (!$result_check || ($this->db->num_rows($result_check) < 1)) {
//insert
$sql = "INSERT INTO " . MAIN_DB_PREFIX . "user_alert(type,fk_contact,fk_user) ";
$sql .= "VALUES (1," . $this->db->escape($id) . "," . $user->id . ")";
$result = $this->db->query($sql);
if (!$result) {
$error++;
$this->error = $this->db->lasterror();
}
} else {
$result = true;
}
} else {
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "user_alert ";
$sql .= "WHERE type=1 AND fk_contact=" . $this->db->escape($id) . " AND fk_user=" . $user->id;
$result = $this->db->query($sql);
if (!$result) {
$error++;
$this->error = $this->db->lasterror();
}
}
else
{
$result = true;
}
}
else
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."user_alert ";
$sql .= "WHERE type=1 AND fk_contact=".$this->db->escape($id)." AND fk_user=".$user->id;
$result = $this->db->query($sql);
if (!$result)
{
$error++;
$this->error = $this->db->lasterror();
}
}

View File

@@ -250,6 +250,8 @@ if ($search_email) $sql .= natural_search('s.email', $search_email);
if ($search_contract) $sql .= natural_search(array('c.rowid', 'c.ref'), $search_contract);
if (!empty($search_ref_customer)) $sql .= natural_search(array('c.ref_customer'), $search_ref_customer);
if (!empty($search_ref_supplier)) $sql .= natural_search(array('c.ref_supplier'), $search_ref_supplier);
if ($search_zip) $sql .= natural_search(array('s.zip'), $search_zip);
if ($search_town) $sql .= natural_search(array('s.town'), $search_town);
if ($search_sale > 0)
{
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$search_sale;

View File

@@ -75,7 +75,7 @@ class CSMSFile
return -1;
}
dol_syslog("CSMSFile::CSMSFile: MAIN_SMS_SENDMODE=".$conf->global->MAIN_SMS_SENDMODE." charset=".$conf->file->character_set_client." from=".$from.", to=".$to.", msg length=".count($msg), LOG_DEBUG);
dol_syslog("CSMSFile::CSMSFile: MAIN_SMS_SENDMODE=".$conf->global->MAIN_SMS_SENDMODE." charset=".$conf->file->character_set_client." from=".$from.", to=".$to.", msg length=".strlen($msg), LOG_DEBUG);
dol_syslog("CSMSFile::CSMSFile: deferred=".$deferred." priority=".$priority." class=".$class, LOG_DEBUG);
// Action according to choosed sending method

View File

@@ -440,7 +440,7 @@ abstract class CommonObject
/**
* @var array List of child tables. To know object to delete on cascade.
* if name like with @ClassNAme:FilePathClass;ParentFkFieldName' it will
* if name like with @ClassName:FilePathClass:ParentFkFieldName' it will
* call method deleteByParentField(parentId,ParentFkFieldName) to fetch and delete child object
*/
protected $childtablesoncascade = array();

View File

@@ -1339,7 +1339,10 @@ class ExtraFields
}
elseif ($type == 'checkbox')
{
$value_arr = explode(',', $value);
$value_arr = $value;
if (!is_array($value)) {
$value_arr = explode(',', $value);
}
$out = $form->multiselectarray($keyprefix.$key.$keysuffix, (empty($param['options']) ?null:$param['options']), $value_arr, '', 0, '', 0, '100%');
}
elseif ($type == 'radio')

View File

@@ -16,7 +16,7 @@
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2012-2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018-2021 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2018 Christophe Battarel <christophe@altairis.fr>
@@ -7020,7 +7020,7 @@ class Form
print '<input type="radio" name="idtolinkto" value='.$objp->rowid.'>';
print '</td>';
print '<td class="center">'.$objp->ref.'</td>';
print '<td>'.$objp->ref_client.'</td>';
print '<td>'.(!empty($objp->ref_client)?$objp->ref_client:$objp->ref_supplier).'</td>';
print '<td class="right">'.price($objp->total_ht).'</td>';
print '<td>'.$objp->name.'</td>';
print '</tr>';

View File

@@ -469,7 +469,7 @@ class Translate
if (! $found && ! empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION))
{
// Overwrite translation with database read
$sql ="SELECT transkey, transvalue FROM ".MAIN_DB_PREFIX."overwrite_trans where lang='".$db->escape($this->defaultlang)."' OR lang IS NULL";
$sql ="SELECT transkey, transvalue FROM ".MAIN_DB_PREFIX."overwrite_trans where (lang='".$db->escape($this->defaultlang)."' OR lang IS NULL)";
$sql.=" AND entity IN (0, ".getEntity('overwrite_trans').")";
$sql.=$db->order("lang", "DESC");
$resql=$db->query($sql);

View File

@@ -346,17 +346,19 @@ class Utils
{
$handlein = popen($fullcommandclear, 'r');
$i = 0;
while (!feof($handlein))
{
$i++; // output line number
$read = fgets($handlein);
// Exclude warning line we don't want
if ($i == 1 && preg_match('/Warning.*Using a password/i', $read)) continue;
fwrite($handle, $read);
if (preg_match('/'.preg_quote('-- Dump completed').'/i', $read)) $ok = 1;
elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i', $read)) $ok = 1;
if ($handlein) {
while (!feof($handlein))
{
$i++; // output line number
$read = fgets($handlein);
// Exclude warning line we don't want
if ($i == 1 && preg_match('/Warning.*Using a password/i', $read)) continue;
fwrite($handle, $read);
if (preg_match('/'.preg_quote('-- Dump completed').'/i', $read)) $ok = 1;
elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i', $read)) $ok = 1;
}
pclose($handlein);
}
pclose($handlein);
}
@@ -388,7 +390,7 @@ class Utils
if ($compression == 'none') fclose($handle);
if ($compression == 'gz') gzclose($handle);
if ($compression == 'bz') bzclose($handle);
if ($ok && preg_match('/^-- (MySql|MariaDB)/i', $errormsg)) { // No error
if ($ok && preg_match('/^-- (MySql|MariaDB)/i', $errormsg) || preg_match('/^\/\*M?!999999/', $errormsg)) { // Start of file is ok, NOT an error
$errormsg = '';
}
else

View File

@@ -902,11 +902,11 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '')
't.email',
);
//Social media
foreach ($socialnetworks as $key => $value) {
if ($value['active']) {
$searchAddressPhoneDBFields['t.'.$key] = "t.socialnetworks->'$.".$key."'";
}
}
// foreach ($socialnetworks as $key => $value) {
// if ($value['active']) {
// $searchAddressPhoneDBFields['t.'.$key] = "t.socialnetworks->'$.".$key."'";
// }
// }
if (!$sortorder) $sortorder = "ASC";
if (!$sortfield) $sortfield = "t.lastname";

View File

@@ -8123,7 +8123,7 @@ function getDictvalue($tablename, $field, $id, $checkentity = false, $rowidfield
if (!isset($dictvalues[$tablename]))
{
$dictvalues[$tablename] = array();
$sql = 'SELECT * FROM '.$tablename.' WHERE 1'; // Here select * is allowed as it is generic code and we don't have list of fields
$sql = 'SELECT * FROM '.$tablename.' WHERE 1 = 1'; // Here select * is allowed as it is generic code and we don't have list of fields
if ($checkentity) $sql .= ' AND entity IN (0,'.getEntity($tablename).')';
$resql = $db->query($sql);

View File

@@ -367,7 +367,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_propale['nb'];
print '</td><td class="right">';
print $product->stats_propale['qty'];
print price($product->stats_propale['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}
@@ -385,7 +385,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_proposal_supplier['nb'];
print '</td><td class="right">';
print $product->stats_proposal_supplier['qty'];
print price($product->stats_proposal_supplier['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}
@@ -403,7 +403,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_commande['nb'];
print '</td><td class="right">';
print $product->stats_commande['qty'];
print price($product->stats_commande['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}
@@ -421,7 +421,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_commande_fournisseur['nb'];
print '</td><td class="right">';
print $product->stats_commande_fournisseur['qty'];
print price($product->stats_commande_fournisseur['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}
@@ -439,7 +439,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_facture['nb'];
print '</td><td class="right">';
print $product->stats_facture['qty'];
print price($product->stats_facture['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}
@@ -457,7 +457,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_facture_fournisseur['nb'];
print '</td><td class="right">';
print $product->stats_facture_fournisseur['qty'];
print price($product->stats_facture_fournisseur['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}
@@ -476,7 +476,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_contrat['nb'];
print '</td><td class="right">';
print $product->stats_contrat['qty'];
print price($product->stats_contrat['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}

View File

@@ -1266,12 +1266,10 @@ class pdf_einstein extends ModelePDFCommandes
if ($this->emetteur->logo)
{
$logodir = $conf->mycompany->dir_output;
if (! empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO))
{
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) {
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
}
else {
} else {
$logo = $logodir.'/logos/'.$this->emetteur->logo;
}
if (is_readable($logo))

View File

@@ -1631,12 +1631,10 @@ class pdf_crabe extends ModelePDFFactures
if ($this->emetteur->logo)
{
$logodir = $conf->mycompany->dir_output;
if (! empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO))
{
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) {
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
}
else {
} else {
$logo = $logodir.'/logos/'.$this->emetteur->logo;
}
if (is_readable($logo))

View File

@@ -1478,12 +1478,10 @@ class pdf_azur extends ModelePDFPropales
if ($this->emetteur->logo)
{
$logodir = $conf->mycompany->dir_output;
if (! empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO))
{
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) {
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
}
else {
} else {
$logo = $logodir.'/logos/'.$this->emetteur->logo;
}
if (is_readable($logo))
@@ -1533,7 +1531,7 @@ class pdf_azur extends ModelePDFPropales
$posy += 4;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("Date")." : ".dol_print_date($object->date, "day", false, $outputlangs, true), '', 'R');
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("DatePropal")." : ".dol_print_date($object->date, "day", false, $outputlangs, true), '', 'R');
$posy += 4;
$pdf->SetXY($posx, $posy);

View File

@@ -1514,12 +1514,10 @@ class pdf_cyan extends ModelePDFPropales
if ($this->emetteur->logo)
{
$logodir = $conf->mycompany->dir_output;
if (! empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO))
{
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) {
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
}
else {
} else {
$logo = $logodir.'/logos/'.$this->emetteur->logo;
}
if (is_readable($logo))

View File

@@ -208,7 +208,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
global $user, $langs, $conf, $mysoc, $hookmanager, $nblines;
// Get source company
if (!is_object($object->thirdparty)) $object->fetch_thirdparty();
$object->fetch_thirdparty();
if (!is_object($object->thirdparty)) $object->thirdparty = $mysoc; // If fetch_thirdparty fails, object has no socid (specimen)
$this->emetteur = $object->thirdparty;
if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if was not defined
@@ -224,8 +224,6 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
if ($conf->fournisseur->facture->dir_output)
{
$object->fetch_thirdparty();
$deja_regle = $object->getSommePaiement(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0);
$amount_credit_notes_included = $object->getSumCreditNotesUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0);
$amount_deposits_included = $object->getSumDepositsUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0);

View File

@@ -41,7 +41,7 @@ if (! empty($extrafieldsobjectkey) && ! empty($search_array_options) && is_array
if (in_array($typ, array('chkbxlst', 'checkbox'))) $mode_search=4; // Search on a multiselect field with sql type = text
if (is_array($crit)) $crit = implode(' ', $crit); // natural_search() expects a string
elseif ($typ === 'select' and is_string($crit) and strpos($crit, ' ') === false) {
$sql .= ' AND (' . $extrafieldsobjectprefix.$tmpkey . ' = "' . $db->escape($crit) . '")';
$sql .= " AND (" . $extrafieldsobjectprefix.$tmpkey . " = '" . $db->escape($crit) . "')";
continue;
}
$sql .= natural_search($extrafieldsobjectprefix.$tmpkey, $crit, $mode_search);

View File

@@ -289,9 +289,9 @@ if (! empty($_SESSION['dol_loginmesg']))
if (!empty($conf->global->MAIN_EASTER_EGG_COMMITSTRIP)) {
include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
if (substr($langs->defaultlang, 0, 2)=='fr') {
$resgetcommitstrip = getURLContent("http://www.commitstrip.com/fr/feed/");
$resgetcommitstrip = getURLContent("https://www.commitstrip.com/fr/feed/");
} else {
$resgetcommitstrip = getURLContent("http://www.commitstrip.com/en/feed/");
$resgetcommitstrip = getURLContent("https://www.commitstrip.com/en/feed/");
}
if ($resgetcommitstrip && $resgetcommitstrip['http_code'] == '200')
{

View File

@@ -282,8 +282,8 @@ class InterfaceLdapsynchro extends DolibarrTriggers
$info=$object->_load_ldap_info();
$dn=$object->_load_ldap_dn($info);
// Get a gid number for objectclass PosixGroup
if (in_array('posixGroup', $info['objectclass'])) {
// Get a gid number for objectclass PosixGroup if none was provided
if (empty($info[$conf->global->LDAP_GROUP_FIELD_GROUPID]) && in_array('posixGroup', $info['objectclass'])) {
$info['gidNumber'] = $ldap->getNextGroupGid('LDAP_KEY_GROUPS');
}

View File

@@ -84,11 +84,7 @@ class InterfaceContactRoles extends DolibarrTriggers
if (is_array($TContact) && ! empty($TContact)) {
$TContactAlreadyLinked = array();
if ($object->id > 0) {
$cloneFrom = dol_clone($object, 1);
if (! empty($cloneFrom->id)) {
$TContactAlreadyLinked = array_merge($cloneFrom->liste_contact(- 1, 'external'), $cloneFrom->liste_contact(- 1, 'internal'));
}
$TContactAlreadyLinked = array_merge($object->liste_contact(-1, 'external'), $object->liste_contact(-1, 'internal'));
}
foreach ($TContact as $i => $infos) {

View File

@@ -268,11 +268,11 @@ class DataPolicy
{
if ($sendtocc)
{
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc);
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc);
}
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject);
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":");
$actionmsg .= dol_concatdesc($actionmsg, $message);
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject);
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":");
$actionmsg = dol_concatdesc($actionmsg, $message);
}
// Send mail
@@ -342,11 +342,11 @@ class DataPolicy
$actionmsg = $langs->transnoentities('MailSentBy') . ' ' . $from . ' ' . $langs->transnoentities('To') . ' ' . $sendto;
if ($message) {
if ($sendtocc) {
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc);
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc);
}
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject);
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":");
$actionmsg .= dol_concatdesc($actionmsg, $message);
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject);
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":");
$actionmsg = dol_concatdesc($actionmsg, $message);
}

View File

@@ -72,7 +72,7 @@ class DolLogsCollector extends MessagesCollector
{
global $conf;
$uselogfile=$conf->global->DEBUGBAR_USE_LOGFILE;
$uselogfile=$conf->global->DEBUGBAR_USE_LOG_FILE;
if ($uselogfile)
{

View File

@@ -2236,7 +2236,7 @@ class ExpenseReport extends CommonObject
$sql = "SELECT DISTINCT ur.fk_user";
$sql .= " FROM ".MAIN_DB_PREFIX."user_rights as ur, ".MAIN_DB_PREFIX."rights_def as rd";
$sql .= " WHERE ur.fk_id = rd.id and rd.module = 'expensereport' AND rd.perms = 'approve'"; // Permission 'Approve';
$sql .= "UNION";
$sql .= " UNION";
$sql .= " SELECT DISTINCT ugu.fk_user";
$sql .= " FROM ".MAIN_DB_PREFIX."usergroup_user as ugu, ".MAIN_DB_PREFIX."usergroup_rights as ur, ".MAIN_DB_PREFIX."rights_def as rd";
$sql .= " WHERE ugu.fk_usergroup = ur.fk_usergroup AND ur.fk_id = rd.id and rd.module = 'expensereport' AND rd.perms = 'approve'"; // Permission 'Approve';

View File

@@ -1239,6 +1239,8 @@ if (empty($reshook))
$tva_tx = get_default_tva($soc, $mysoc, $lines[$i]->fk_product, $product_fourn_price_id);
}
$object->special_code = $lines[$i]->special_code;
$result = $object->addline(
$desc,
$lines[$i]->subprice,

View File

@@ -2112,7 +2112,7 @@ class Holiday extends CommonObject
{
global $mysoc;
$sql = "SELECT rowid, code, label, affect, delay, newByMonth";
$sql = "SELECT rowid, code, label, affect, delay, newbymonth";
$sql .= " FROM ".MAIN_DB_PREFIX."c_holiday_types";
$sql .= " WHERE (fk_country IS NULL OR fk_country = ".$mysoc->country_id.')';
if ($active >= 0) $sql .= " AND active = ".((int) $active);
@@ -2126,7 +2126,7 @@ class Holiday extends CommonObject
{
while ($obj = $this->db->fetch_object($result))
{
$types[$obj->rowid] = array('rowid'=> $obj->rowid, 'code'=> $obj->code, 'label'=>$obj->label, 'affect'=>$obj->affect, 'delay'=>$obj->delay, 'newByMonth'=>$obj->newByMonth);
$types[$obj->rowid] = array('rowid'=> $obj->rowid, 'code'=> $obj->code, 'label'=>$obj->label, 'affect'=>$obj->affect, 'delay'=>$obj->delay, 'newByMonth'=>$obj->newbymonth);
}
return $types;

View File

@@ -381,7 +381,7 @@ if ($resql)
//'builddoc'=>$langs->trans("PDFMerge"),
//'presend'=>$langs->trans("SendByMail"),
);
if ($user->rights->holiday->supprimer) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
if ($user->rights->holiday->delete) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

View File

@@ -158,10 +158,10 @@ insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,no
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (201,'05','',1,'FLANDRE-OCCIDENTALE','Flandre-Occidentale');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (201,'06','',1,'FLANDRE-ORIENTALE','Flandre-Orientale');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (202,'07','',2,'HAINAUT','Hainaut');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (201,'08','',2,'LIEGE','Liège');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (202,'08','',2,'LIEGE','Liège');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (202,'09','',1,'LIMBOURG','Limbourg');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (202,'10','',2,'LUXEMBOURG','Luxembourg');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (201,'11','',2,'NAMUR','Namur');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (202,'11','',2,'NAMUR','Namur');
-- Provinces Italy (id=3)
insert into llx_c_departements (code_departement,fk_region,cheflieu,tncc,ncc,nom) values ('AG',315,NULL,NULL,NULL,'AGRIGENTO');

View File

@@ -48,7 +48,7 @@ $hookmanager->initHooks(array('stockreplenishlist'));
//checks if a product has been ordered
$action = GETPOST('action', 'alpha');
$action = GETPOST('action', 'aZ09');
$sref = GETPOST('sref', 'alpha');
$snom = GETPOST('snom', 'alpha');
$sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
@@ -211,7 +211,9 @@ if ($action == 'order' && isset($_POST['valid']))
if ($resql && $db->num_rows($resql) > 0) {
$obj = $db->fetch_object($resql);
$order->fetch($obj->rowid);
$order->fetch_thirdparty();
foreach ($supplier['lines'] as $line) {
if(empty($line->remise_percent)) $line->remise_percent = $order->thirdparty->remise_supplier_percent;
$result = $order->addline(
$line->desc,
$line->subprice,
@@ -248,6 +250,7 @@ if ($action == 'order' && isset($_POST['valid']))
//trick to know which orders have been generated this way
$order->source = 42;
foreach ($supplier['lines'] as $line) {
if(empty($line->remise_percent)) $line->remise_percent = $order->thirdparty->remise_supplier_percent;
$order->lines[] = $line;
}
$order->cond_reglement_id = $order->thirdparty->cond_reglement_supplier_id;
@@ -305,7 +308,7 @@ if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entre
$sql = 'SELECT p.rowid, p.ref, p.label, p.description, p.price,';
$sql .= ' p.price_ttc, p.price_base_type,p.fk_product_type,';
$sql .= ' p.price_ttc, p.price_base_type, p.fk_product_type,';
$sql .= ' p.tms as datem, p.duration, p.tobuy,';
$sql .= ' p.desiredstock, p.seuil_stock_alerte,';
if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) {
@@ -323,11 +326,8 @@ $sql .= $hookmanager->resPrint;
$sql .= ' FROM '.MAIN_DB_PREFIX.'product as p';
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_stock as s ON p.rowid = s.fk_product';
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'entrepot AS ent ON s.fk_entrepot = ent.rowid AND ent.entity IN('.getEntity('stock').')';
if ($fk_supplier > 0) {
$sql .= ' INNER JOIN '.MAIN_DB_PREFIX.'product_fournisseur_price pfp ON (pfp.fk_product = p.rowid AND pfp.fk_soc = '.$fk_supplier.')';
}
if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) {
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_warehouse_properties AS pse ON (p.rowid = pse.fk_product AND pse.fk_entrepot = '.$fk_entrepot.')';
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_warehouse_properties AS pse ON (p.rowid = pse.fk_product AND pse.fk_entrepot = '.((int) $fk_entrepot).')';
}
// Add fields from hooks
@@ -349,6 +349,15 @@ if ($sref) $sql .= natural_search('p.ref', $sref);
if ($snom) $sql .= natural_search('p.label', $snom);
$sql .= ' AND p.tobuy = 1';
if (!empty($canvas)) $sql .= ' AND p.canvas = "'.$db->escape($canvas).'"';
if ($fk_supplier > 0) {
$sql .= ' AND EXISTS (SELECT pfp.rowid FROM '.MAIN_DB_PREFIX.'product_fournisseur_price as pfp WHERE pfp.fk_product = p.rowid AND pfp.fk_soc = '.((int) $fk_supplier).' AND pfp.entity IN ('.getEntity('product_fournisseur_price').'))';
}
// Add where from hooks
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
$sql .= ' GROUP BY p.rowid, p.ref, p.label, p.description, p.price';
$sql .= ', p.price_ttc, p.price_base_type,p.fk_product_type, p.tms';
$sql .= ', p.duration, p.tobuy';
@@ -456,11 +465,6 @@ if ($usevirtualstock)
}
}
// Add where from hooks
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
$sql .= $db->order($sortfield, $sortorder);
$sql .= $db->plimit($limit + 1, $offset);
@@ -759,7 +763,9 @@ while ($i < ($limit ? min($num, $limit) : $num))
print '<td class="right">'.$alertstock.'</td>';
// Current stock (all warehouses)
print '<td class="right">'.$warning.$stock.'</td>';
print '<td class="right">'.$warning.$stock;
print '<!-- stock returned by main sql is '.$objp->stock_physique.' -->';
print '</td>';
// Already ordered
print '<td class="right"><a href="replenishorders.php?sproduct='.$prod->id.'">'.$ordered.'</a> '.$picto.'</td>';

View File

@@ -210,7 +210,7 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('assigntask')
{
// Test if we are already contact of the project (should be rare but sometimes we can add as task contact without being contact of project, like when admin user has been removed from contact of project)
$sql = 'SELECT ec.rowid FROM '.MAIN_DB_PREFIX.'element_contact as ec, '.MAIN_DB_PREFIX.'c_type_contact as tc WHERE tc.rowid = ec.fk_c_type_contact';
$sql .= ' AND ec.fk_socpeople = '.$idfortaskuser." AND ec.element_id = '.$object->fk_project.' AND tc.element = 'project' AND source = 'internal'";
$sql .= ' AND ec.fk_socpeople = '.((int) $idfortaskuser)." AND ec.element_id = ".((int) $object->fk_project)." AND tc.element = 'project' AND source = 'internal'";
$resql = $db->query($sql);
if ($resql)
{

View File

@@ -224,7 +224,7 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('assigntask')
{
// Test if we are already contact of the project (should be rare but sometimes we can add as task contact without being contact of project, like when admin user has been removed from contact of project)
$sql = 'SELECT ec.rowid FROM '.MAIN_DB_PREFIX.'element_contact as ec, '.MAIN_DB_PREFIX.'c_type_contact as tc WHERE tc.rowid = ec.fk_c_type_contact';
$sql .= ' AND ec.fk_socpeople = '.$idfortaskuser." AND ec.element_id = '.$object->fk_project.' AND tc.element = 'project' AND source = 'internal'";
$sql .= ' AND ec.fk_socpeople = '.((int) $idfortaskuser)." AND ec.element_id = ".((int) $object->fk_project)." AND tc.element = 'project' AND source = 'internal'";
$resql = $db->query($sql);
if ($resql)
{

View File

@@ -1048,7 +1048,7 @@ class Thirdparties extends DolibarrApi
{
global $db, $conf;
if (!DolibarrApiAccess::$user->rights->facture->lire) {
if (!DolibarrApiAccess::$user->rights->societe->lire) {
throw new RestException(401);
}
if (empty($id)) {

View File

@@ -84,7 +84,7 @@ class Societe extends CommonObject
/**
* @var array List of child tables. To know object to delete on cascade.
* if name like with @ClassNAme:FilePathClass;ParentFkFieldName' it will call method deleteByParentField (with parentId as parameters) and FieldName to fetch and delete child object
* if name like with @ClassName:FilePathClass:ParentFkFieldName' it will call method deleteByParentField (with parentId as parameters) and FieldName to fetch and delete child object
*/
protected $childtablesoncascade = array(
"societe_prices",

View File

@@ -218,7 +218,7 @@ if ($type_element == 'propal')
$where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".$socid;
$where.= " AND d.fk_propal = c.rowid";
$where.= " AND c.entity = ".$conf->entity;
$datePrint = 'c.datep';
$dateprint = 'c.datep';
$doc_number='c.ref';
$thirdTypeSelect='customer';
}
@@ -309,7 +309,7 @@ if (!empty($sql_select))
if ($sref) $sql.= " AND ".$doc_number." LIKE '%".$db->escape($sref)."%'";
if ($sprod_fulldescr)
{
$sql.= " AND (d.description LIKE '%".$db->escape($sprod_fulldescr)."%'";
$sql.= " AND (d.description LIKE '%".$db->escape($sprod_fulldescr)."%' OR d.description LIKE '%".$db->escape(dol_htmlentities($sprod_fulldescr))."%'";
if (GETPOST('type_element') != 'fichinter') $sql.= " OR p.ref LIKE '%".$db->escape($sprod_fulldescr)."%'";
if (GETPOST('type_element') != 'fichinter') $sql.= " OR p.label LIKE '%".$db->escape($sprod_fulldescr)."%'";
$sql.=")";

View File

@@ -331,7 +331,7 @@ if ($id > 0 || ! empty($ref))
else
{
print '<td class="left nowrap">';
if ($objp->subscription == 'yes')
if (!empty($objp->subscription))
{
print $langs->trans("SubscriptionNotReceived");
if ($objp->statut > 0) print " ".img_warning();

View File

@@ -71,7 +71,7 @@ class Users extends DolibarrApi
$obj_ret = array();
if (!DolibarrApiAccess::$user->rights->user->user->lire) {
if (!DolibarrApiAccess::$user->rights->user->user->lire && empty(DolibarrApiAccess::$user->admin)) {
throw new RestException(401, "You are not allowed to read list of users");
}
@@ -142,9 +142,9 @@ class Users extends DolibarrApi
*/
public function get($id, $includepermissions = 0)
{
//if (!DolibarrApiAccess::$user->rights->user->user->lire) {
//throw new RestException(401);
//}
if (!DolibarrApiAccess::$user->rights->user->user->lire && empty(DolibarrApiAccess::$user->admin)) {
throw new RestException(401);
}
$result = $this->useraccount->fetch($id);
if (!$result)
@@ -177,7 +177,11 @@ class Users extends DolibarrApi
*/
public function getInfo()
{
$apiUser = DolibarrApiAccess::$user;
if (empty(DolibarrApiAccess::$user->rights->user->user->lire) && empty(DolibarrApiAccess::$user->admin)) {
throw new RestException(401, 'Not allowed');
}
$apiUser = DolibarrApiAccess::$user;
$result = $this->useraccount->fetch($apiUser->id);
if (!$result) {
@@ -208,9 +212,9 @@ class Users extends DolibarrApi
public function post($request_data = null)
{
// check user authorization
//if(! DolibarrApiAccess::$user->rights->user->creer) {
// throw new RestException(401, "User creation not allowed");
//}
if (empty(DolibarrApiAccess::$user->rights->user->creer) && empty(DolibarrApiAccess::$user->admin)) {
throw new RestException(401, "User creation not allowed");
}
// check mandatory fields
/*if (!isset($request_data["login"]))
throw new RestException(400, "login field missing");
@@ -242,9 +246,9 @@ class Users extends DolibarrApi
*/
public function put($id, $request_data = null)
{
//if (!DolibarrApiAccess::$user->rights->user->user->creer) {
//throw new RestException(401);
//}
if (empty(DolibarrApiAccess::$user->rights->user->user->creer) && empty(DolibarrApiAccess::$user->admin)) {
throw new RestException(401);
}
$result = $this->useraccount->fetch($id);
if (!$result)
@@ -299,7 +303,7 @@ class Users extends DolibarrApi
{
$obj_ret = array();
if (!DolibarrApiAccess::$user->rights->user->user->lire) {
if (empty(DolibarrApiAccess::$user->rights->user->user->lire) && empty(DolibarrApiAccess::$user->admin)) {
throw new RestException(401);
}
@@ -334,9 +338,9 @@ class Users extends DolibarrApi
global $conf;
//if (!DolibarrApiAccess::$user->rights->user->user->supprimer) {
//throw new RestException(401);
//}
if (empty(DolibarrApiAccess::$user->rights->user->user->creer) && empty(DolibarrApiAccess::$user->admin)) {
throw new RestException(401);
}
$result = $this->useraccount->fetch($id);
if (!$result)
{
@@ -389,9 +393,10 @@ class Users extends DolibarrApi
$obj_ret = array();
if (!DolibarrApiAccess::$user->rights->user->group_advance->read) {
throw new RestException(401, "You are not allowed to read list of groups");
}
if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty(DolibarrApiAccess::$user->rights->user->user->lire) && empty(DolibarrApiAccess::$user->admin)) ||
!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty(DolibarrApiAccess::$user->rights->user->group_advance->read) && empty(DolibarrApiAccess::$user->admin)) {
throw new RestException(401, "You are not allowed to read groups");
}
// case of external user, $societe param is ignored and replaced by user's socid
//$socid = DolibarrApiAccess::$user->socid ? DolibarrApiAccess::$user->socid : $societe;
@@ -463,7 +468,8 @@ class Users extends DolibarrApi
{
global $db, $conf;
if (!DolibarrApiAccess::$user->rights->user->group_advance->read) {
if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty(DolibarrApiAccess::$user->rights->user->user->lire) && empty(DolibarrApiAccess::$user->admin)) ||
!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty(DolibarrApiAccess::$user->rights->user->group_advance->read) && empty(DolibarrApiAccess::$user->admin)) {
throw new RestException(401, "You are not allowed to read groups");
}
@@ -486,9 +492,9 @@ class Users extends DolibarrApi
*/
public function delete($id)
{
//if (!DolibarrApiAccess::$user->rights->user->user->supprimer) {
//throw new RestException(401);
//}
if (empty(DolibarrApiAccess::$user->rights->user->user->supprimer) && empty(DolibarrApiAccess::$user->admin)) {
throw new RestException(401);
}
$result = $this->useraccount->fetch($id);
if (!$result)
{

View File

@@ -3320,7 +3320,7 @@ class User extends CommonObject
}
else
{
$sql .= " WHERE 1";
$sql .= " WHERE 1 = 1";
}
// Manage filter

View File

@@ -983,7 +983,7 @@ class UserGroup extends CommonObject
}
$info[$conf->global->LDAP_GROUP_FIELD_GROUPMEMBERS] = (!empty($valueofldapfield)?$valueofldapfield:'');
}
if(!empty($info[$conf->global->LDAP_GROUP_FIELD_GROUPID])){
if(!empty($conf->global->LDAP_GROUP_FIELD_GROUPID)){
$info[$conf->global->LDAP_GROUP_FIELD_GROUPID]=$this->id;
}
return $info;

View File

@@ -69,8 +69,8 @@ if ($action == 'dolibarr2ldap')
{
$info=$object->_load_ldap_info();
// Get a gid number for objectclass PosixGroup
if (in_array('posixGroup', $info['objectclass'])) {
// Get a gid number for objectclass PosixGroup if none was provided
if (empty($info[$conf->global->LDAP_GROUP_FIELD_GROUPID]) && in_array('posixGroup', $info['objectclass'])) {
$info['gidNumber'] = $ldap->getNextGroupGid('LDAP_KEY_GROUPS');
}