Compare commits

..

273 Commits

Author SHA1 Message Date
Laurent Destailleur
2fb521667c Doc 2019-10-22 02:42:08 +02:00
Laurent Destailleur
6205913056 FIX CVE-2019-17578 CVE-2019-17577 CVE-2019-17576 2019-10-22 02:35:54 +02:00
Laurent Destailleur
febf9ccd04 FIX The Button "Automatic binding" did not use the account intracomm or
export.
2019-10-21 05:24:54 +02:00
Laurent Destailleur
776bfabfc4 FIX If country not defined keep value empty 2019-10-21 05:24:42 +02:00
Laurent Destailleur
e909d16880 Doc 2019-10-20 15:57:32 +02:00
Laurent Destailleur
45d64e468f Fix regression 2019-10-20 15:29:15 +02:00
Laurent Destailleur
e224170dc2 FIX Clean the + of categories on the product view only in POS module
Conflicts:
	htdocs/takepos/takepos.php
2019-10-20 15:27:09 +02:00
Laurent Destailleur
78ac543dee Fix link to list 2019-10-18 20:01:47 +02:00
Laurent Destailleur
becd3f7d2f FIX Missing status and paid flag in export or expense report 2019-10-18 15:35:25 +02:00
Laurent Destailleur
d9abbfa461 Add a message 2019-10-17 21:12:18 +02:00
Laurent Destailleur
530025a346 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2019-10-17 20:13:31 +02:00
Laurent Destailleur
eaffe4d1eb doc 2019-10-17 20:13:10 +02:00
Laurent Destailleur
25fe861f9b Merge pull request #12151 from tuxgasy/10_Product_import_duplicate_volumUnits
Fix width unit label in product import
2019-10-17 17:47:31 +02:00
Gildas
ac46d2c918 Fix filtering ticket bug (Fixes #12081) 2019-10-17 17:46:42 +02:00
Laurent Destailleur
3267c224ff doc 2019-10-17 16:03:56 +02:00
Laurent Destailleur
d388c0b0a3 Doc 2019-10-17 16:03:07 +02:00
Laurent Destailleur
5e12dcc6b1 Fix on FACTURE_ENABLE_NEGATIVE 2019-10-17 15:40:02 +02:00
Laurent Destailleur
1a419a6eb6 Fix translation 2019-10-17 15:15:16 +02:00
Laurent Destailleur
e709c005a0 FIX Payment was not saved on TakePOS module. 2019-10-17 12:28:48 +02:00
Laurent Destailleur
084ab53b4b Fix translation 2019-10-17 12:14:38 +02:00
Laurent Destailleur
8a7a0b80e2 Fix remove warnings 2019-10-16 19:08:31 +02:00
TuxGasy
43ce1543d8 Fix width unit label in product import 2019-10-16 17:37:20 +02:00
Laurent Destailleur
8152c60878 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0
Conflicts:
	htdocs/core/actions_sendmails.inc.php
2019-10-16 17:13:14 +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
86e4ca55df Merge 2019-10-16 14:04:54 +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
Laurent Destailleur
81cb88721a Merge pull request #12146 from aspangaro/10.0_p27
Fix - Accountancy - Various payment - Subledger is not recovered in bank journal
2019-10-16 13:19:46 +02:00
Juanjo Menent
5a1682509b FIX It is not possible to create an expedition if there is no unit data 2019-10-16 11:11:34 +02:00
Alexandre SPANGARO
4bb1677079 Fix - Accountancy - Various payment - Subledger is not recovered in bank journal 2019-10-16 10:39:35 +02:00
Frédéric FRANCE
6a8e8907ef Update list.php 2019-10-15 17:55:07 +02:00
Laurent Destailleur
a45ad29e71 Doc 2019-10-15 11:32:53 +02:00
Laurent Destailleur
568faef7f4 Fix encoding of message 2019-10-15 04:08:34 +02:00
Laurent Destailleur
ee5fdc3239 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2019-10-14 23:52:58 +02:00
Laurent Destailleur
0fe3159a8a Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0
Conflicts:
	htdocs/fourn/facture/list.php
2019-10-14 23:52:46 +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
Laurent Destailleur
9f61bd23ce Merge pull request #12127 from atm-josselin/FIX_product_batch_fields_definition
Fix : add fields definition in product batch class
2019-10-14 21:22:24 +02:00
Laurent Destailleur
07bb83a96d Merge pull request #12113 from aspangaro/10.0_p25
Remove a duplicate line
2019-10-14 21:04:22 +02:00
Laurent Destailleur
d87a1e39a6 Merge pull request #12110 from aspangaro/10.0_holiday
lang file for holidays is holiday
2019-10-14 21:03:55 +02:00
Laurent Destailleur
3432147385 Merge pull request #12099 from prietojc/patch-11
FIX: Update card.php
2019-10-14 21:02:04 +02:00
Laurent Destailleur
2e7cc67f9c Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2019-10-14 20:42:28 +02:00
Laurent Destailleur
056f7f826b Clean code 2019-10-14 20:41:28 +02:00
Laurent Destailleur
ed0e090d91 Merge pull request #12123 from atm-greg/FIX_blocked_log_missing_lib
add security.lib.php for dol_hash
2019-10-14 20:37:19 +02:00
Frédéric FRANCE
45b3d623bb Update list.php 2019-10-14 20:30:31 +02:00
atm-josselin
4f10009113 Add fields definition in product batch class for extrafields compatibility 2019-10-14 15:39:38 +02:00
atm-greg
92c624daf0 add security.lib.php for dol_hash 2019-10-14 15:28:06 +02:00
Laurent Destailleur
b4827dbe06 Prepare 10.0.3 2019-10-14 12:30:26 +02:00
Laurent Destailleur
4fd12e22cb Fix trans export 2019-10-14 12:27:44 +02:00
Alexandre SPANGARO
e50d32dc00 Remove a duplicate line 2019-10-13 13:20:45 +02:00
Alexandre SPANGARO
499eb87173 lang file for holidays is holiday 2019-10-13 08:20:37 +02:00
Laurent Destailleur
650cd2b54f Prepare 10.0.3 2019-10-12 18:41:33 +02:00
Laurent Destailleur
9c94ffeea9 Fix css 2019-10-12 18:40:41 +02:00
Laurent Destailleur
67d76787eb Add new hidden conf VARIANT_ALLOW_STOCK_MOVEMENT_ON_VARIANT_PARENT 2019-10-12 15:29:06 +02:00
Laurent Destailleur
9871dd8770 Debug variants 2019-10-12 15:27:06 +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
2fa3b23cf1 Fix missing price level field 2019-10-11 19:36:36 +02:00
Laurent Destailleur
f345b5fdb0 Fix look and feel v10 2019-10-11 19:32:45 +02:00
JC Prieto
d109341ebe Update card.php
Variable $mesg not do anything
2019-10-11 18:08:15 +02:00
Laurent Destailleur
fc9c343af9 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0
Conflicts:
	htdocs/core/class/link.class.php
2019-10-11 16:12:01 +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
Laurent Destailleur
777c297353 FIX #12054 2019-10-11 15:42:27 +02:00
Laurent Destailleur
85a4bac9e0 Better translation 2019-10-11 15:22:12 +02:00
Laurent Destailleur
868bfb518b FIX #11702 FIX #12088 2019-10-11 15:08:10 +02:00
Laurent Destailleur
c3aba5f1a3 FIX #12083 2019-10-11 14:53:30 +02:00
Frédéric FRANCE
0c8331b6d7 doxygen 2019-10-09 18:47:25 +02:00
Laurent Destailleur
f2d04fe55c Code comment 2019-10-09 11:51:10 +02:00
Laurent Destailleur
9da1d5025b FIX If product account not suggested during bind, it is not preselected 2019-10-09 03:15:29 +02:00
Laurent Destailleur
9f4aadae18 Missing Nature, Duration and Type fields in export of products 2019-10-09 02:05:20 +02:00
Laurent Destailleur
1c105718b9 Update demo 2019-10-08 21:06:09 +02:00
Laurent Destailleur
6de31f2c54 Better translation 2019-10-08 19:35:50 +02:00
Laurent Destailleur
8921a103c1 Trans 2019-10-08 19:25:54 +02:00
Laurent Destailleur
7377c30bfe Fix limit 2019-10-08 13:17:13 +02:00
Laurent Destailleur
73422b2149 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2019-10-08 13:15:05 +02:00
Laurent Destailleur
760783b98b FIX #11942 2019-10-08 13:14:51 +02:00
Laurent Destailleur
958fdd5a40 Merge pull request #12061 from laudeco/hotfix/access_bank_account_user
FIX the access of the bank account of one user
2019-10-08 08:56:29 +02:00
Laurent De Coninck
091df082fc fix the access of the bank account of one user
There are 3 ways to access this tab :
    1. If the module holiday is enabled
    2. If the module holidays is enabled
    3. If the module expense report is enabled

More over that, the application checks if the user can access the bank
account of the selected user. The application does that twice (logical
^^), first to know if the tab has to be displayed or not. Second time,
when you arrive on the page /user/bank.php to know if you have access
(eg. if you type the url directly).

In this second check, the check of the expense report module was missing
(added by this PR). This caused the following issue: the tab was visible
but when the user clicked on itn, he received an error as he cannot
access the page.
2019-10-08 08:11:29 +02:00
Laurent Destailleur
51be0fad99 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2019-10-07 20:52:39 +02:00
Laurent Destailleur
bb72efefc5 Fix phpcs 2019-10-07 20:52:27 +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
Laurent Destailleur
7ed3561344 Merge pull request #12057 from laudeco/hotfix/12041-security-generate-password
[Fix #12041] - validate the 0 as min value consecutive
2019-10-07 20:23:30 +02:00
Laurent Destailleur
156eb7fa61 Merge branch '10.0' into hotfix/12041-security-generate-password 2019-10-07 20:22:19 +02:00
Laurent De Coninck
2ba8506608 validate the 0 as min value consecutive; meaning not take that rule into account 2019-10-07 17:53:23 +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
839929f764 FIX #12026 2019-10-07 14:16:47 +02:00
Laurent Destailleur
12d243b8d4 FIX #12040 2019-10-07 13:13:46 +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
68a4ab87a2 Fix can set min repeat to 0 for password 2019-10-07 12:57:24 +02:00
Laurent Destailleur
a604fb9afb Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2019-10-07 12:54:57 +02:00
Laurent Destailleur
022c67ee68 Merge pull request #12045 from laudeco/hotfix/12041-security-generate-password
[fix #12041] - Generate password mode perso
2019-10-07 12:54:45 +02:00
Laurent Destailleur
91a922a454 Update security.php 2019-10-07 12:54:28 +02:00
Laurent Destailleur
7015e71105 FIX #12041 2019-10-07 12:53:32 +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
23de8694fa Fix module files 2019-10-07 12:37:01 +02:00
Laurent Destailleur
b9ac8295d4 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2019-10-07 12:28:06 +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
VESSILLER
219b0d8925 FIX Import of product using units 2019-10-07 12:26:02 +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
Laurent Destailleur
753da4791e FIX Pb in units of shipments
Conflicts:
	htdocs/expedition/card.php
2019-10-06 16:31:17 +02:00
Laurent Destailleur
fb808d830e FIX Look and feel v10 2019-10-06 16:28:14 +02:00
Laurent Destailleur
6c1c008d09 FIX Look and feel v10 2019-10-06 16:28:10 +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
Laurent Destailleur
ac8837d01f Fix url 2019-10-05 19:28:00 +02:00
Laurent Destailleur
7f5ccf4b8e Remove google+ 2019-10-05 19:27:14 +02:00
Laurent Destailleur
3e5cd877b8 FIX Bad list of ticket on public interface for ticket emailcollector 2019-10-05 14:27:42 +02:00
Laurent Destailleur
e90234c2bc FIX escape email alias 2019-10-05 14:27:37 +02:00
Laurent Destailleur
083db12490 FIX access to public interface when origin email has an alias. 2019-10-05 11:53:08 +02:00
Laurent Destailleur
a06b1b9f3f Fix escaping chars 2019-10-05 11:43:28 +02:00
Laurent Destailleur
8bf9afb7ca FIX Attachement of linked files on ticket when sending a message 2019-10-04 19:41:35 +02:00
stickler-ci
a509404636 Fixing style errors. 2019-10-04 16:26:26 +00:00
Laurent De Coninck
c8fb81710f fix #12041 - Generate password
Secure the generate password method "perso".
Now the system checks the minimum possible value. If the value entered
is lower then the system will never trigger the update.

Since the update is done through GET parameters, I also added a check
backend wise. This checks should never be triggered nor in error.

[see: #12041]
2019-10-04 18:13:00 +02:00
Laurent Destailleur
503973cec9 FIX Edit of ticket module parameters erased others 2019-10-04 14:04:31 +02:00
Laurent Destailleur
c3fa770871 FIX Filter "Open all" of ticket was ko. 2019-10-04 13:06:24 +02:00
Laurent Destailleur
68c28ab3c7 FIX Look and feel v10 2019-10-04 12:31:25 +02:00
Laurent Destailleur
0b9d27423d FIX Can't modify vendor invoice if transfered into accountancy 2019-10-04 10:31:57 +02:00
Laurent Destailleur
6cd3d27885 Fix comparison 2019-10-04 09:54:52 +02:00
Frédéric FRANCE
55410a55ef Update list.php 2019-10-04 00:45:57 +02:00
Laurent Destailleur
b787e53020 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2019-10-03 17:54:58 +02:00
Laurent Destailleur
1a66e0b05e Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0
Conflicts:
	htdocs/product/card.php
2019-10-03 17:53:59 +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
9762d77958 Merge pull request #12024 from frederic34/patch-17
Update dolgraph.class.php
2019-10-03 15:57:48 +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
0d41216624 Update dolgraph.class.php 2019-10-03 00:22:14 +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
Laurent Destailleur
d6198a1e33 Fix billed time is empty 2019-10-01 13:47:29 +02:00
Laurent Destailleur
2d42afc686 FIX Filter on project on ticket list 2019-10-01 12:36:39 +02:00
Laurent Destailleur
9b607a3105 FIX navigation on ticket tab of projects 2019-10-01 12:29:58 +02:00
Frédéric FRANCE
64381ac4d6 Update api_boms.class.php 2019-10-01 11:37:29 +02:00
Laurent Destailleur
956b46d920 Fix warnings 2019-10-01 11:37:15 +02:00
Frédéric FRANCE
7872a93605 Update box_commandes.php 2019-10-01 11:36:33 +02:00
Frédéric FRANCE
4ff65ce586 Update box_supplier_orders.php 2019-10-01 11:36:29 +02:00
Frédéric FRANCE
d201515514 Update box_prospect.php 2019-10-01 11:36:24 +02:00
Laurent Destailleur
322786cabe Look and feel v10 2019-10-01 11:36:06 +02:00
Laurent Destailleur
15e646cc62 Fix bad name of trigger 2019-10-01 11:34:35 +02:00
Laurent Destailleur
6ee17022c0 Fix bad key for type of contact of resources 2019-10-01 11:34:01 +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
d2881eb85b FIX CSS
Conflicts:
	htdocs/core/tpl/extrafields_list_search_input.tpl.php
2019-09-29 19:26:37 +02:00
Laurent Destailleur
d0d884742f FIX #11861 Not consistent code to manage measuring units 2019-09-27 19:45:33 +02:00
Laurent Destailleur
18055bc425 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2019-09-27 17:51:34 +02:00
Laurent Destailleur
46e019642f Code comment 2019-09-27 17:51:22 +02:00
Laurent Destailleur
ea62ea8c70 Merge pull request #11901 from ptibogxiv/patch-263
NEW: delete purchase price API
2019-09-27 15:37:21 +02:00
VESSILLER
5f08a649eb FIX empty cache when we want to load specific warehouses in select
Conflicts:
	htdocs/product/class/html.formproduct.class.php
2019-09-27 15:10:05 +02:00
Laurent Destailleur
e3edb37620 Fix escape db 2019-09-27 14:54:23 +02:00
madx666
4b3430a1dc Fix return to list on page 1
When are on page 1 on any list and we go on an object, when return to the list, we are back on page 0
2019-09-27 14:53:11 +02:00
Laurent Destailleur
da35e3d7cd Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2019-09-27 14:07:35 +02:00
Laurent Destailleur
6d1a571aed Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0
Conflicts:
	htdocs/product/dynamic_price/class/price_parser.class.php
2019-09-27 14:07:11 +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
ab33665f7b Merge pull request #11950 from laudeco/hotfix/11881-remove-referent
[FIX][#11881] -  remove referent from the project
2019-09-27 12:37:16 +02:00
Laurent Destailleur
412e0f193b Update element.php 2019-09-27 12:36:53 +02:00
Laurent Destailleur
34aa64bae2 Update element.php 2019-09-27 12:36:15 +02:00
Laurent Destailleur
2eaa910336 Update project.class.php 2019-09-27 12:32:27 +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
Laurent Destailleur
61f8771525 Merge pull request #11959 from prietojc/patch-10
FIX:  expedition.class.php
2019-09-27 11:15:23 +02:00
Laurent Destailleur
435edf999b Fix: label of product not always visible after a search 2019-09-27 11:05:44 +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
cd295662d6 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2019-09-27 10:21:28 +02:00
Laurent Destailleur
8c3c7fd857 Fix remove + of categ on product thumb 2019-09-27 10:21:14 +02:00
Laurent Destailleur
d4364dd44e Merge pull request #11956 from atm-john/10.0_fix_top_menu_size
FIX top menu right padding
2019-09-26 23:39:23 +02:00
Laurent Destailleur
5d7e542d37 Merge pull request #11970 from aspangaro/10.0_colspan
FIX colspan on VAT quadri report
2019-09-26 23:29:09 +02:00
Alexandre SPANGARO
b52e5d51e3 FIX colspan on VAT quadri report 2019-09-26 22:01:59 +02:00
JC Prieto
cdb6e7f9a6 Fix moved to fetch_line()
Fix moved to fetch_line()
2019-09-26 20:34:28 +02:00
Laurent Destailleur
33754f1951 Update demo 2019-09-26 14:36:23 +02:00
Laurent Destailleur
24e5b6ab79 Fix default filename of dump 2019-09-26 14:35:50 +02:00
Laurent Destailleur
aa5f35f14f Fix image on ticket 2019-09-26 14:28:34 +02:00
Laurent Destailleur
0e5d0a7784 Add data for tickets 2019-09-26 14:14:01 +02:00
Laurent Destailleur
b0615d477e Update demo 2019-09-26 13:58:43 +02:00
Laurent Destailleur
280219843e Update demo 2019-09-26 13:58:30 +02:00
Laurent Destailleur
ba1275332d Fix thousand separator for fr_NC 2019-09-25 13:03:43 +02:00
JC Prieto
0893926189 Update expedition.class.php
Clear lines before fech them.
2019-09-25 12:49:19 +02:00
Laurent Destailleur
db334a3b94 FIX Var not enough sanitized 2019-09-24 14:16:24 +02:00
Laurent Destailleur
c53be23122 FIX Filtering the HTTP Header "Accept-Language". 2019-09-24 13:54:52 +02:00
Laurent Destailleur
9cfe1262bd FIX Force downlaod of file with .noexe as octet-stream mime type 2019-09-24 13:30:04 +02:00
John Botella
5417dc0356 Fix top menu right padding 2019-09-24 13:11:40 +02:00
Laurent Destailleur
b5c5cc42fc Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2019-09-24 12:43:54 +02:00
Laurent Destailleur
6431e8e16d FIX SQL injection on qty 2019-09-24 12:43:44 +02:00
Frédéric FRANCE
26cd418320 Update price_parser.class.php 2019-09-24 10:28:27 +02:00
Juanjo Menent
c97bd14278 FIX TakePOS no invoice validation control and good payment translate 2019-09-24 10:08:48 +02:00
Laurent Destailleur
d22a1e2571 Use space 2019-09-23 19:44:05 +02:00
Laurent De Coninck
b4f31d61fa allow to remove one custom referent in the project.
Allow to remove one custom referent from the project.

When we develop one module that supports the custom referent in a
project and if you don't follow the same naming convention as in the
other table (in french). You cannot remove the element.

This fix support now the property 'project_field'. And thus set this
column to null.

[see: #11881]
2019-09-23 17:46:54 +02:00
Laurent Destailleur
40f75b16d8 FIX Substitution of __PROJECT_XXX__ not done 2019-09-23 13:04:22 +02:00
Laurent Destailleur
8ac0383fa0 FIX Send email from expense report card.
FIX Alias name is not into the email recipient label.
2019-09-23 12:36:12 +02:00
Laurent Destailleur
d5877e9c36 FIX Bad currency var used in stripe for connect 2019-09-23 11:36:45 +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
9bf387d43c Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0
Conflicts:
	htdocs/admin/mails_templates.php
	htdocs/main.inc.php
	htdocs/user/card.php
2019-09-18 15:12:38 +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
ad3d21578c Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2019-09-18 13:13:02 +02:00
Laurent Destailleur
2da5071642 Fix VAT in New caledonia is now called TGC 2019-09-18 13:12:22 +02:00
Laurent Destailleur
214bf4375e Fix missing include 2019-09-17 13:28:36 +02:00
Laurent Destailleur
24cb1390e4 FIX Update of leave request when CSRF with token is on
FIX Export of leave request show the number of open days
2019-09-17 13:17:25 +02:00
Laurent Destailleur
90850c4d31 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2019-09-17 12:20:23 +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
Laurent Destailleur
b53293d84d Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2019-09-17 12:18:38 +02:00
Laurent Destailleur
a91f39ea3e FIX selection of project i am contact of. 2019-09-17 12:18:29 +02:00
Laurent Destailleur
d3b17f4f2d FIX form not closed. 2019-09-17 12:08: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
8d79404914 Fix css for responsive 2019-09-16 18:40:58 +02:00
Laurent Destailleur
e3480780cf Fix label on "Connect" button on Simple POS module 2019-09-16 18:31:40 +02:00
Laurent Destailleur
5233e7d8ad FIX do not output return code on screen after a select of bank account 2019-09-16 18:29:04 +02:00
Laurent Destailleur
23777fd5ff Fix css 2019-09-16 11:19:02 +02:00
Laurent Destailleur
abee6dceaa Fix css demo 2019-09-16 11:16:58 +02:00
Laurent Destailleur
f5dd4f4f9e css 2019-09-16 11:08:34 +02:00
Laurent Destailleur
edbf8f0186 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2019-09-16 11:01:21 +02:00
Laurent Destailleur
eb70411ae0 Css demo 2019-09-16 11:01:09 +02:00
ptibogxiv
ea1baefe9a NEW: delete purchase price API 2019-09-15 20:50:18 +02:00
Laurent Destailleur
a085b79993 Merge pull request #11898 from atm-maxime/patch-1
Remove bad copy / paste
2019-09-15 19:58:28 +02:00
Maxime Kohlhaas
5d4f702920 Remove bas copy / paste 2019-09-15 16:38:03 +02:00
Laurent Destailleur
bb6853a635 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2019-09-15 15:53:15 +02:00
Laurent Destailleur
ab07da02c4 Fix scrutinizer 2019-09-15 15:53:04 +02:00
Laurent Destailleur
cec5666257 Merge pull request #11872 from hregis/10.0_ldap
FIX an admin can not access his own permissions after enabling advanced permissions
2019-09-15 15:32:50 +02:00
Laurent Destailleur
27e3a2cb1d Update perms.php 2019-09-15 15:32:43 +02:00
Laurent Destailleur
76b3668368 FIX regression with option to hide picto on top menu 2019-09-15 15:15:59 +02:00
Laurent Destailleur
544a1237bc FIX regression with option to hide picto on top menu 2019-09-15 15:11:13 +02:00
Laurent Destailleur
f946ec0563 Merge pull request #11896 from tuxgasy/10.0_childtablesoncascade_isempty
Check if childtablesoncascade is not empty
2019-09-15 10:16:07 +02:00
Laurent Destailleur
7b56cbc334 Merge pull request #11892 from aspangaro/10.0_nowrap
Fix Bank entries - nowrap on amount
2019-09-15 10:01:06 +02:00
Laurent Destailleur
bbb62f27c7 Update doc 2019-09-14 19:25:09 +02:00
TuxGasy
e0238705cc Check if childtablesoncascade is not empty 2019-09-14 19:04:43 +02:00
Laurent Destailleur
f45abc1b2a Removed useless header 2019-09-14 18:26:38 +02:00
Laurent Destailleur
584549df11 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0
Conflicts:
	htdocs/accountancy/index.php
2019-09-14 18:25:31 +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
3caa1bd43c FIX Debug feature orderstoinvoice for suppliers 2019-09-14 18:21:37 +02:00
Laurent Destailleur
bac1e7133a Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2019-09-14 17:35:19 +02:00
Laurent Destailleur
844f0903da Fix missing fields 2019-09-14 17:34:57 +02:00
Laurent Destailleur
92c6168247 Merge pull request #11858 from ptibogxiv/patch-260
FIX new invoice with generic thirdparty in takepos
2019-09-14 17:10:32 +02:00
Laurent Destailleur
ace9eb9b3e Merge pull request #11870 from hregis/10.0_mc
FIX avoid non numeric warning
2019-09-14 16:39:40 +02:00
Laurent Destailleur
e7d01f98cf Merge pull request #11890 from atm-florian/10.0
fix: fill id for links (document tab)
2019-09-14 16:33: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
Alexandre SPANGARO
4420af683d Fix Bank entries - nowrap on amount 2019-09-14 05:44:28 +02:00
florian HENRY
224b4c147a Merge branch '10.0' of https://github.com/Dolibarr/dolibarr into 10.0 2019-09-13 15:25:25 +02:00
florian HENRY
7966bfc2df fix: fill id for links (document tab) 2019-09-13 15:25:16 +02:00
Laurent Destailleur
36963423c3 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2019-09-13 11:59:39 +02:00
Laurent Destailleur
9df4f0601d Clean address line to be on 1 line 2019-09-13 11:18:08 +02:00
Laurent Destailleur
7b73e2d57a FIX label of thirdparty is wrong on open project list 2019-09-13 11:05:50 +02:00
Laurent Destailleur
9eb736b110 FIX stripe payment when there is a quote into address 2019-09-13 10:12:43 +02:00
Laurent Destailleur
5137104b92 Fix responsive 2019-09-13 01:46:18 +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
Laurent Destailleur
a12bd6aec8 better translation 2019-09-12 18:55:07 +02:00
Regis Houssin
60e85136df FIX an admin can not access his own permissions after enabling advanced
permissions
2019-09-12 08:48:55 +02:00
Regis Houssin
5f23ba5467 FIX avoid non numeric warning 2019-09-12 08:04:53 +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
ptibogxiv
48419da769 FIX new invoice with generic thirdparty in takepos
by default, new invoice should always create with default thirdparty and avoid errors : creating new invoice with last customer and forget to change it...
2019-09-10 14:58:55 +02:00
227 changed files with 3053 additions and 1185 deletions

View File

@@ -2,8 +2,78 @@
English Dolibarr ChangeLog
--------------------------------------------------------------
***** ChangeLog for 10.0.2 compared to 10.0.1 *****
***** ChangeLog for 10.0.3 compared to 10.0.2 *****
IMPORTANT : This version fixes a serious bug in saving the units of weight, size, surface and volume on product card.
The unit were not saved correctly in database making calculation on shipments wrong.
Update to this version must be done if you use them and have installed version 10.0.0, 10.0.1 or 10.0.2 and set some products after installing or upgrading to one of this version.
Once update is done you must then edit (manually) the product that has bad unit to set the correct unit to have features restored.
FIX: #11702
FIX: #11861 No consistent code to manage measuring units
FIX: #11942
FIX: #12026
FIX: #12040
FIX: #12041
FIX: #12054
FIX: #12083
FIX: #12088
FIX: CVE-2019-17578 CVE-2019-17577 CVE-2019-17576
FIX: Clean the + of categories on the product view only in POS module
FIX: access to public interface when origin email has an alias.
FIX: Alias name is not into the email recipient label.
FIX: allow standalone credit note even if no invoice
FIX: an admin can not access his own permissions after enabling advanced
FIX: an admin can not access his own permissions after enabling advanced permissions
FIX: Attachement of linked files on ticket when sending a message
FIX: avoid non numeric warning
FIX: Bad currency var used in stripe for connect
FIX: Bad list of ticket on public interface for ticket emailcollector
FIX: Can't modify vendor invoice if transfered into accountancy
FIX: change product type must be allowed if we activate hidden conf
FIX: colspan on VAT quadri report
FIX: CSS
FIX: Debug feature orderstoinvoice for suppliers
FIX: do not output return code on screen after a select of bank account
FIX: Edit of ticket module parameters erased others
FIX: empty cache when we want to load specific warehouses in select
FIX: escape email alias
FIX: expedition.class.php
FIX: Export of leave request show the number of open days
FIX: Filtering the HTTP Header "Accept-Language".
FIX: Filter on project on ticket list
FIX: Filter "Open all" of ticket was ko.
FIX: Force downlaod of file with .noexe as octet-stream mime type
FIX: form not closed.
FIX: hidden conf to prevent from changing product_type
FIX: If product account not suggested during bind, it is not preselected
FIX: If we share invoice, we need to see discount created from a deposit on each entity
FIX: Import of product using units
FIX: label of thirdparty is wrong on open project list
FIX: Look and feel v10
FIX: missing begin()
FIX: missing "$this->id" in "fetch" function
FIX: navigation on ticket tab of projects
FIX: new invoice with generic thirdparty in takepos
FIX: Pb in units of shipments
FIX: regression with option to hide picto on top menu
FIX: selection of project i am contact of.
FIX: Send email from expense report card.
FIX: shipping card: missing user error messages when classifying closed or billed
FIX: SQL injection on qty
FIX: stripe payment when there is a quote into address
FIX: Substitution of __PROJECT_XXX__ not done
FIX: TakePOS no invoice validation control and good payment translate
FIX: the access of the bank account of one user
FIX: top menu right padding
FIX: Update of leave request when CSRF with token is on
FIX: Var not enough sanitized
FIX: wrong test
FIX: XSS
FIX: Payment from POS ware not recorded.
FIX: Can validate invoice with amount including tax of zero for the case of having a final invoice with
VAT that includes a deposit without vat.
***** ChangeLog for 10.0.2 compared to 10.0.1 *****
FIX: #10460 compatibility with MariaDB 10.4
FIX: #11401 Adherent unknown language key
FIX: #11422 Can't edit his own events with standard rights

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 991 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

View File

@@ -50,7 +50,7 @@ fi
# ----------------------------- if no params on command line
if [ "x$passwd" = "x" ]
then
export dumpfile=`ls $mydir/mysqldump_dolibarr_*.sql | sort | tail -n 1`
export dumpfile=`ls -v $mydir/mysqldump_dolibarr_*.sql | tail -n 1`
export dumpfile=`basename $dumpfile`
# ----------------------------- input file

File diff suppressed because one or more lines are too long

View File

@@ -38,7 +38,7 @@ passwd=$5;
# ----------------------------- if no params on command line
if [ "x$passwd" = "x" ]
then
export dumpfile=`ls $mydir/mysqldump_dolibarr_*.sql | sort | tail -n 1`
export dumpfile=`ls -v $mydir/mysqldump_dolibarr_*.sql | tail -n 1`
export dumpfile=`basename $dumpfile`
# ----------------------------- input file

View File

@@ -29,6 +29,7 @@
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
// Load translation files required by the page
@@ -65,6 +66,8 @@ $year_current = $year_start;
// Validate History
$action = GETPOST('action', 'aZ09');
$chartaccountcode = dol_getIdFromCode($db, $conf->global->CHARTOFACCOUNTS, 'accounting_system', 'rowid', 'pcg_version');
/*
* Actions
@@ -102,7 +105,7 @@ if ($action == 'validatehistory') {
$db->begin();
// Now make the binding. Bind automatically only for product with a dedicated account that exists into chart of account, others need a manual bind
if ($db->type == 'pgsql') {
/*if ($db->type == 'pgsql') {
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet";
$sql1 .= " SET fk_code_ventilation = accnt.rowid";
$sql1 .= " FROM " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
@@ -115,16 +118,83 @@ if ($action == 'validatehistory') {
$sql1 .= " WHERE fd.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS.' AND accnt.entity = '.$conf->entity;
$sql1 .= " AND accnt.active = 1 AND p.accountancy_code_sell=accnt.account_number";
$sql1 .= " AND fd.fk_code_ventilation = 0";
}
}*/
// Customer Invoice lines (must be same request than into page list.php for manual binding)
$sql = "SELECT f.rowid as facid, f.ref as ref, f.datef, f.type as ftype,";
$sql.= " l.rowid, l.fk_product, l.description, l.total_ht, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, l.vat_src_code,";
$sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_sell as code_sell, p.tva_tx as tva_tx_prod,";
$sql.= " p.accountancy_code_sell_intra as code_sell_intra, p.accountancy_code_sell_export as code_sell_export,";
$sql.= " aa.rowid as aarowid, aa2.rowid as aarowid_intra, aa3.rowid as aarowid_export,";
$sql.= " co.code as country_code, co.label as country_label,";
$sql.= " s.tva_intra";
$sql.= " FROM " . MAIN_DB_PREFIX . "facture as f";
$sql.= " INNER JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc";
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "c_country as co ON co.rowid = s.fk_pays ";
$sql.= " INNER JOIN " . MAIN_DB_PREFIX . "facturedet as l ON f.rowid = l.fk_facture";
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accountancy_code_sell = aa.account_number AND aa.active = 1 AND aa.fk_pcg_version = '" . $chartaccountcode."' AND aa.entity = " . $conf->entity;
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa2 ON p.accountancy_code_sell_intra = aa2.account_number AND aa2.active = 1 AND aa2.fk_pcg_version = '" . $chartaccountcode."' AND aa2.entity = " . $conf->entity;
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa3 ON p.accountancy_code_sell_export = aa3.account_number AND aa3.active = 1 AND aa3.fk_pcg_version = '" . $chartaccountcode."' AND aa3.entity = " . $conf->entity;
$sql.= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0";
$sql.= " AND l.product_type <= 2";
dol_syslog('htdocs/accountancy/customer/index.php');
$resql1 = $db->query($sql1);
if (! $resql1) {
$error ++;
$db->rollback();
$result = $db->query($sql);
if (! $result) {
$error++;
setEventMessages($db->lasterror(), null, 'errors');
} else {
$num_lines = $db->num_rows($result);
$isSellerInEEC = isInEEC($mysoc);
$i = 0;
while ($i < min($num_lines, 10000)) { // No more than 10000 at once
$objp = $db->fetch_object($result);
// Search suggested account for product/service
$suggestedaccountingaccountfor = '';
if (($objp->country_code == $mysoc->country_code) || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country)
$objp->code_sell_p = $objp->code_sell;
$objp->aarowid_suggest = $objp->aarowid;
$suggestedaccountingaccountfor = '';
} else {
if ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale
$objp->code_sell_p = $objp->code_sell_intra;
$objp->aarowid_suggest = $objp->aarowid_intra;
$suggestedaccountingaccountfor = 'eec';
} else { // Foreign sale
$objp->code_sell_p = $objp->code_sell_export;
$objp->aarowid_suggest = $objp->aarowid_export;
$suggestedaccountingaccountfor = 'export';
}
}
if ($objp->aarowid_suggest > 0)
{
$sqlupdate = "UPDATE " . MAIN_DB_PREFIX . "facturedet";
$sqlupdate.= " SET fk_code_ventilation = ".$objp->aarowid_suggest;
$sqlupdate.= " WHERE fk_code_ventilation <= 0 AND product_type <= 2 AND rowid = ".$objp->rowid;
$resqlupdate = $db->query($sqlupdate);
if (! $resqlupdate)
{
$error++;
setEventMessages($db->lasterror(), null, 'errors');
break;
}
}
$i++;
}
}
if ($error)
{
$db->rollback();
}
else {
$db->commit();
setEventMessages($langs->trans('AutomaticBindingDone'), null, 'mesgs');
}

View File

@@ -370,6 +370,7 @@ if ($result) {
// Ref Invoice
print '<td class="nowraponall">' . $facture_static->getNomUrl(1) . '</td>';
// Date invoice
print '<td class="center">' . dol_print_date($db->jdate($objp->datef), 'day') . '</td>';
// Ref Product
@@ -389,7 +390,13 @@ if ($result) {
print '<td class="right">' . vatrate($objp->tva_tx.($objp->vat_src_code?' ('.$objp->vat_src_code.')':'')) . '</td>';
print '<td>' . $langs->trans("Country".$objp->country_code) .' ('.$objp->country_code.')</td>';
// Country
print '<td>';
if ($objp->country_code)
{
print $langs->trans("Country".$objp->country_code) .' ('.$objp->country_code.')';
}
print '</td>';
print '<td>' . $objp->tva_intra . '</td>';

View File

@@ -221,9 +221,9 @@ $sql.= " INNER JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc";
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "c_country as co ON co.rowid = s.fk_pays ";
$sql.= " INNER JOIN " . MAIN_DB_PREFIX . "facturedet as l ON f.rowid = l.fk_facture";
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accountancy_code_sell = aa.account_number AND aa.fk_pcg_version = '" . $chartaccountcode."' AND aa.entity = " . $conf->entity;
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa2 ON p.accountancy_code_sell_intra = aa2.account_number AND aa2.fk_pcg_version = '" . $chartaccountcode."' AND aa2.entity = " . $conf->entity;
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa3 ON p.accountancy_code_sell_export = aa3.account_number AND aa3.fk_pcg_version = '" . $chartaccountcode."' AND aa3.entity = " . $conf->entity;
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accountancy_code_sell = aa.account_number AND aa.active = 1 AND aa.fk_pcg_version = '" . $chartaccountcode."' AND aa.entity = " . $conf->entity;
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa2 ON p.accountancy_code_sell_intra = aa2.account_number AND aa2.active = 1 AND aa2.fk_pcg_version = '" . $chartaccountcode."' AND aa2.entity = " . $conf->entity;
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa3 ON p.accountancy_code_sell_export = aa3.account_number AND aa3.active = 1 AND aa3.fk_pcg_version = '" . $chartaccountcode."' AND aa3.entity = " . $conf->entity;
$sql.= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0";
$sql.= " AND l.product_type <= 2";
// Add search filter like
@@ -249,7 +249,7 @@ if (strlen(trim($search_account))) {
$sql .= natural_search("aa.account_number", $search_account);
}
if (strlen(trim($search_vat))) {
$sql .= natural_search("l.tva_tx", $search_vat, 1);
$sql .= natural_search("l.tva_tx", price2num($search_vat), 1);
}
if ($search_month > 0)
{
@@ -420,12 +420,11 @@ if ($result) {
$isSellerInEEC = isInEEC($mysoc);
while ( $i < min($num_lines, $limit) ) {
while ($i < min($num_lines, $limit)) {
$objp = $db->fetch_object($result);
$objp->code_sell_l = '';
$objp->code_sell_p = '';
$objp->aarowid_suggest = '';
$product_static->ref = $objp->product_ref;
$product_static->id = $objp->product_id;
@@ -437,7 +436,7 @@ if ($result) {
$facture_static->type = $objp->ftype;
$code_sell_p_notset = '';
$objp->aarowid_suggest = $objp->aarowid;
$objp->aarowid_suggest = ''; // Will be set later
$isBuyerInEEC = isInEEC($objp);
@@ -471,8 +470,9 @@ if ($result) {
}
if ($objp->code_sell_l == -1) $objp->code_sell_l='';
// Search suggested account for product/service
$suggestedaccountingaccountfor = '';
if ($objp->country_code == $mysoc->country_code || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country)
if (($objp->country_code == $mysoc->country_code) || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country)
$objp->code_sell_p = $objp->code_sell;
$objp->aarowid_suggest = $objp->aarowid;
$suggestedaccountingaccountfor = '';
@@ -532,6 +532,7 @@ if ($result) {
print vatrate($objp->tva_tx_line.($objp->vat_src_code?' ('.$objp->vat_src_code.')':''));
print '</td>';
// Country
print '<td>';
$labelcountry=($objp->country_code && ($langs->trans("Country".$objp->country_code)!="Country".$objp->country_code))?$langs->trans("Country".$objp->country_code):$objp->country_label;
print $labelcountry;
@@ -561,12 +562,19 @@ if ($result) {
// Suggested accounting account
print '<td>';
print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth200 maxwidthonsmartphone', 'cachewithshowemptyone');
$suggestedid = $objp->aarowid_suggest;
if (empty($suggestedid) && empty($objp->code_sell_p) && ! empty($objp->code_sell_l) && ! empty($conf->global->ACCOUNTANCY_AUTOFILL_ACCOUNT_WITH_GENERIC))
{
//$suggestedid = // id of $objp->code_sell_l
}
print $formaccounting->select_account($suggestedid, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth200 maxwidthonsmartphone', 'cachewithshowemptyone');
print '</td>';
// Column with checkbox
print '<td class="center">';
print '<input type="checkbox" class="flat checkforselect checkforselect'.$objp->rowid.'" name="toselect[]" value="' . $objp->rowid . "_" . $i . '"' . ($objp->aarowid ? "checked" : "") . '/>';
//var_dump($objp->aarowid);var_dump($objp->aarowid_intra);var_dump($objp->aarowid_export);var_dump($objp->aarowid_suggest);
$ischecked = $objp->aarowid_suggest;
print '<input type="checkbox" class="flat checkforselect checkforselect'.$objp->rowid.'" name="toselect[]" value="' . $objp->rowid . "_" . $i . '"' . ($ischecked ? "checked" : "") . '/>';
print '</td>';
print '</tr>';

View File

@@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2016-2019 Alexandre Spangaro <aspangaro@open-dsi.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
@@ -50,6 +51,7 @@ $hookmanager->initHooks(array('accountancyindex'));
llxHeader('', $langs->trans("AccountancyArea"));
print load_fiche_titre($langs->trans("AccountancyArea"), '', 'title_accountancy');
//dol_fiche_head();
$step = 0;
@@ -175,6 +177,7 @@ else
{
print $langs->trans("Module10Desc")."<br>\n";
}
//dol_fiche_end();
// End of page
llxFooter();

View File

@@ -4,12 +4,12 @@
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2017-2018 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018 Eric Seigne <eric.seigne@cap-rel.fr>
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018 Eric Seigne <eric.seigne@cap-rel.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
@@ -387,7 +387,9 @@ if ($result) {
$tabpay[$obj->rowid]["paymentvariousid"] = $paymentvariousstatic->id;
$paymentvariousstatic->fetch($paymentvariousstatic->id);
$account_various = (! empty($paymentvariousstatic->accountancy_code) ? $paymentvariousstatic->accountancy_code : 'NotDefined'); // NotDefined is a reserved word
$tabtp[$obj->rowid][$account_various] += $obj->amount;
$account_subledger = (! empty($paymentvariousstatic->subledger_account) ? $paymentvariousstatic->subledger_account : ''); // NotDefined is a reserved word
$tabpay[$obj->rowid]["account_various"] = $account_various;
$tabtp[$obj->rowid][$account_subledger] += $obj->amount;
} elseif ($links[$key]['type'] == 'payment_loan') {
$paymentloanstatic->id = $links[$key]['url_id'];
$paymentloanstatic->ref = $links[$key]['url_id'];
@@ -660,11 +662,11 @@ if (! $error && $action == 'writebookkeeping') {
$accountingaccount->fetch(null, $k, true);
$bookkeeping->label_compte = $accountingaccount->label;
} elseif ($tabtype[$key] == 'payment_various') {
$bookkeeping->subledger_account = '';
$bookkeeping->subledger_label = '';
$bookkeeping->numero_compte = $k;
$bookkeeping->subledger_account = $k;
$bookkeeping->subledger_label = $tabcompany[$key]['name'];
$bookkeeping->numero_compte = $tabpay[$obj->rowid]["account_various"];
$accountingaccount->fetch(null, $k, true);
$accountingaccount->fetch(null, $bookkeeping->numero_compte, true);
$bookkeeping->label_compte = $accountingaccount->label;
} elseif ($tabtype[$key] == 'banktransfert') {
$bookkeeping->subledger_account = '';
@@ -1123,6 +1125,7 @@ if (empty($action) || $action == 'view') {
if ($tabtype[$key] == 'payment_salary') $account_ledger = $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT;
if ($tabtype[$key] == 'payment_vat') $account_ledger = $conf->global->ACCOUNTING_VAT_PAY_ACCOUNT;
if ($tabtype[$key] == 'member') $account_ledger = $conf->global->ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT;
if ($tabtype[$key] == 'payment_various') $account_ledger = $tabpay[$key]["account_various"];
$accounttoshow = length_accounta($account_ledger);
if (empty($accounttoshow) || $accounttoshow == 'NotDefined')
{
@@ -1156,7 +1159,7 @@ if (empty($action) || $action == 'view') {
// Subledger account
print "<td>";
if (in_array($tabtype[$key], array('payment', 'payment_supplier', 'payment_expensereport', 'payment_salary'))) // Type of payment with subledger
if (in_array($tabtype[$key], array('payment', 'payment_supplier', 'payment_expensereport', 'payment_salary', 'payment_various'))) // Type of payment with subledger
{
$accounttoshowsubledger = length_accounta($k);
if ($accounttoshow != $accounttoshowsubledger)

View File

@@ -27,6 +27,7 @@
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
// Load translation files required by the page
@@ -63,6 +64,7 @@ $year_current = $year_start;
// Validate History
$action = GETPOST('action', 'aZ09');
$chartaccountcode = dol_getIdFromCode($db, $conf->global->CHARTOFACCOUNTS, 'accounting_system', 'rowid', 'pcg_version');
/*
@@ -100,7 +102,7 @@ if ($action == 'validatehistory') {
$db->begin();
// Now make the binding. Bind automatically only for product with a dedicated account that exists into chart of account, others need a manual bind
if ($db->type == 'pgsql') {
/*if ($db->type == 'pgsql') {
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det";
$sql1 .= " SET fk_code_ventilation = accnt.rowid";
$sql1 .= " FROM " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
@@ -113,16 +115,85 @@ if ($action == 'validatehistory') {
$sql1 .= " WHERE fd.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS.' AND accnt.entity = '.$conf->entity;
$sql1 .= " AND accnt.active = 1 AND p.accountancy_code_buy=accnt.account_number";
$sql1 .= " AND fd.fk_code_ventilation = 0";
}
}*/
// Supplier Invoice Lines (must be same request than into page list.php for manual binding)
$sql = "SELECT f.rowid as facid, f.ref, f.ref_supplier, f.libelle as invoice_label, f.datef, f.type as ftype,";
$sql.= " l.rowid, l.fk_product, l.description, l.total_ht, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, l.vat_src_code,";
$sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_buy as code_buy, p.tva_tx as tva_tx_prod,";
$sql.= " aa.rowid as aarowid,";
$sql.= " co.code as country_code, co.label as country_label,";
$sql.= " s.tva_intra";
$sql.= " FROM " . MAIN_DB_PREFIX . "facture_fourn as f";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_country as co ON co.rowid = s.fk_pays ";
$sql.= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn_det as l ON f.rowid = l.fk_facture_fourn";
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accountancy_code_buy = aa.account_number AND aa.active = 1 AND aa.fk_pcg_version = '" . $chartaccountcode."' AND aa.entity = " . $conf->entity;
$sql.= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0";
$sql.= " AND l.product_type <= 2";
dol_syslog('htdocs/accountancy/supplier/index.php');
$resql1 = $db->query($sql1);
if (! $resql1) {
$error ++;
$db->rollback();
$result = $db->query($sql);
if (! $result) {
$error++;
setEventMessages($db->lasterror(), null, 'errors');
} else {
$num_lines = $db->num_rows($result);
$isSellerInEEC = isInEEC($mysoc);
$i = 0;
while ($i < min($num_lines, 10000)) { // No more than 10000 at once
$objp = $db->fetch_object($result);
// Search suggested account for product/service
$suggestedaccountingaccountfor = '';
if (($objp->country_code == $mysoc->country_code) || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country)
$objp->code_buy_p = $objp->code_buy;
$objp->aarowid_suggest = $objp->aarowid;
$suggestedaccountingaccountfor = '';
} else {
if ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale
//$objp->code_buy_p = $objp->code_buy_intra;
$objp->code_buy_p = $objp->code_buy;
//$objp->aarowid_suggest = $objp->aarowid_intra;
$objp->aarowid_suggest = $objp->aarowid;
$suggestedaccountingaccountfor = 'eec';
} else { // Foreign sale
//$objp->code_buy_p = $objp->code_buy_export;
$objp->code_buy_p = $objp->code_buy;
//$objp->aarowid_suggest = $objp->aarowid_export;
$objp->aarowid_suggest = $objp->aarowid;
$suggestedaccountingaccountfor = 'export';
}
}
if ($objp->aarowid_suggest > 0)
{
$sqlupdate = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det";
$sqlupdate.= " SET fk_code_ventilation = ".$objp->aarowid_suggest;
$sqlupdate.= " WHERE fk_code_ventilation <= 0 AND product_type <= 2 AND rowid = ".$objp->rowid;
$resqlupdate = $db->query($sqlupdate);
if (! $resqlupdate)
{
$error++;
setEventMessages($db->lasterror(), null, 'errors');
break;
}
}
$i++;
}
}
if ($error)
{
$db->rollback();
}
else {
$db->commit();
setEventMessages($langs->trans('AutomaticBindingDone'), null, 'mesgs');
}

View File

@@ -380,6 +380,7 @@ if ($result) {
print $objp->invoice_label;
print '</td>';
// Date invoice
print '<td class="center">' . dol_print_date($db->jdate($objp->datef), 'day') . '</td>';
// Ref product
@@ -400,7 +401,12 @@ if ($result) {
print '<td class="right">' . vatrate($objp->tva_tx.($objp->vat_src_code?' ('.$objp->vat_src_code.')':'')) . '</td>';
print '<td>' . $langs->trans("Country".$objp->country_code) .' ('.$objp->country_code.')</td>';
print '<td>';
if ($objp->country_code)
{
print $langs->trans("Country".$objp->country_code) .' ('.$objp->country_code.')';
}
print '</td>';
print '<td>' . $objp->tva_intra . '</td>';

View File

@@ -224,7 +224,7 @@ $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_country as co ON co.rowid = s.fk_pays ";
$sql.= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn_det as l ON f.rowid = l.fk_facture_fourn";
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accountancy_code_buy = aa.account_number AND aa.fk_pcg_version = '" . $chartaccountcode."' AND aa.entity = " . $conf->entity;
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accountancy_code_buy = aa.account_number AND aa.active = 1 AND aa.fk_pcg_version = '" . $chartaccountcode."' AND aa.entity = " . $conf->entity;
$sql.= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0";
$sql.= " AND l.product_type <= 2";
// Add search filter like
@@ -321,8 +321,8 @@ if ($result) {
$arrayofselected=is_array($toselect)?$toselect:array();
$param='';
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
if ($search_lineid) $param.='&search_lineid='.urlencode($search_lineid);
if ($search_day) $param.='&search_day='.urlencode($search_day);
if ($search_month) $param.='&search_month='.urlencode($search_month);
@@ -477,7 +477,7 @@ if ($result) {
print '<td class="center">' . dol_print_date($db->jdate($objp->datef), 'day') . '</td>';
// Ref product
// Ref Product
print '<td>';
if ($product_static->id > 0)
print $product_static->getNomUrl(1);
@@ -485,7 +485,7 @@ if ($result) {
print '</td>';
// Description
print '<td>';
print '<td class="tdoverflowonsmartphone">';
$text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->description));
$trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION;
print $form->textwithtooltip(dol_trunc($text, $trunclength), $objp->description);
@@ -533,12 +533,14 @@ if ($result) {
// Suggested accounting account
print '<td>';
print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth200 maxwidthonsmartphone', 'cachewithshowemptyone');
$suggestedid = $objp->aarowid_suggest;
print $formaccounting->select_account($suggestedid, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth200 maxwidthonsmartphone', 'cachewithshowemptyone');
print '</td>';
// Column with checkbox
print '<td class="center">';
print '<input type="checkbox" class="flat checkforselect checkforselect'.$objp->rowid.'" name="toselect[]" value="' . $objp->rowid . "_" . $i . '"' . ($objp->aarowid ? "checked" : "") . '/>';
$ischecked = $objp->aarowid_suggest;
print '<input type="checkbox" class="flat checkforselect checkforselect'.$objp->rowid.'" name="toselect[]" value="' . $objp->rowid . "_" . $i . '"' . ($ischecked ? "checked" : "") . '/>';
print '</td>';
print '</tr>';

View File

@@ -563,7 +563,7 @@ if ($id == 11)
'project' => $langs->trans('Project'),
'project_task' => $langs->trans('Task'),
'agenda' => $langs->trans('Agenda'),
'resource' => $langs->trans('Resource'),
'dolresource' => $langs->trans('Resource'),
// old deprecated
'propal' => $langs->trans('Proposal'),
'commande' => $langs->trans('Order'),

View File

@@ -116,7 +116,7 @@ if (empty($reshook))
if (GETPOST('addfilter', 'alpha'))
{
$emailcollectorfilter = new EmailCollectorFilter($db);
$emailcollectorfilter->type = GETPOST('filtertype', 'az09');
$emailcollectorfilter->type = GETPOST('filtertype', 'aZ09');
$emailcollectorfilter->rulevalue = GETPOST('rulevalue', 'alpha');
$emailcollectorfilter->fk_emailcollector = $object->id;
$emailcollectorfilter->status = 1;
@@ -150,7 +150,7 @@ if ($action == 'deletefilter')
if (GETPOST('addoperation', 'alpha'))
{
$emailcollectoroperation = new EmailCollectorAction($db);
$emailcollectoroperation->type = GETPOST('operationtype', 'az09');
$emailcollectoroperation->type = GETPOST('operationtype', 'aZ09');
$emailcollectoroperation->actionparam = GETPOST('operationparam', 'none');
$emailcollectoroperation->fk_emailcollector = $object->id;
$emailcollectoroperation->status = 1;

View File

@@ -808,36 +808,39 @@ print '</table>';
print '<br>';
print load_fiche_titre($langs->trans("PathToDocuments"), '', '');
print '<table class="noborder" width="100%">'."\n";
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">'."\n";
print '<tr class="liste_titre">'."\n";
print '<td>'.$langs->trans("Name").'</td>'."\n";
print '<td>'.$langs->trans("Value").'</td>'."\n";
print "</tr>\n";
print '<tr '.$bc[false].'>'."\n";
print '<tr class="oddeven">'."\n";
print '<td width="140">'.$langs->trans("PathDirectory").'</td>'."\n";
print '<td>'.$conf->facture->dir_output.'</td>'."\n";
print '</tr>'."\n";
print "</table>\n";
print "</div>\n";
/*
* Notifications
*/
print '<br>';
print load_fiche_titre($langs->trans("Notifications"), '', '');
print '<table class="noborder" width="100%">';
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameter").'</td>';
print '<td class="center" width="60"></td>';
print '<td width="80">&nbsp;</td>';
print "</tr>\n";
print '<tr class="oddeven"><td colspan="2">';
print $langs->trans("YouMayFindNotificationsFeaturesIntoModuleNotification").'<br>';
print '</td><td class="right">';
print "</td></tr>\n";
print '</table>';
print "</div>\n";
dol_fiche_end();

View File

@@ -65,27 +65,27 @@ complete_substitutions_array($substitutionarrayfortest, $langs);
if ($action == 'update' && empty($_POST["cancel"]))
{
dolibarr_set_const($db, "MAIN_DISABLE_ALL_MAILS", GETPOST("MAIN_DISABLE_ALL_MAILS"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_FORCE_SENDTO", GETPOST("MAIN_MAIL_FORCE_SENDTO"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_ENABLED_USER_DEST_SELECT", GETPOST("MAIN_MAIL_ENABLED_USER_DEST_SELECT"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_DISABLE_ALL_MAILS", GETPOST("MAIN_DISABLE_ALL_MAILS", 'int'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_FORCE_SENDTO", GETPOST("MAIN_MAIL_FORCE_SENDTO", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_ENABLED_USER_DEST_SELECT", GETPOST("MAIN_MAIL_ENABLED_USER_DEST_SELECT", 'int'), 'chaine', 0, '', $conf->entity);
// Send mode parameters
dolibarr_set_const($db, "MAIN_MAIL_SENDMODE", GETPOST("MAIN_MAIL_SENDMODE"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_SMTP_PORT", GETPOST("MAIN_MAIL_SMTP_PORT"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_SMTP_SERVER", GETPOST("MAIN_MAIL_SMTP_SERVER"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_SMTPS_ID", GETPOST("MAIN_MAIL_SMTPS_ID"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW", GETPOST("MAIN_MAIL_SMTPS_PW"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_TLS", GETPOST("MAIN_MAIL_EMAIL_TLS"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_STARTTLS", GETPOST("MAIN_MAIL_EMAIL_STARTTLS"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_SENDMODE", GETPOST("MAIN_MAIL_SENDMODE", 'aZ09'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_SMTP_PORT", GETPOST("MAIN_MAIL_SMTP_PORT", 'int'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_SMTP_SERVER", GETPOST("MAIN_MAIL_SMTP_SERVER", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_SMTPS_ID", GETPOST("MAIN_MAIL_SMTPS_ID", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW", GETPOST("MAIN_MAIL_SMTPS_PW", 'none'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_TLS", GETPOST("MAIN_MAIL_EMAIL_TLS", 'int'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_STARTTLS", GETPOST("MAIN_MAIL_EMAIL_STARTTLS", 'int'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_DKIM_ENABLED", GETPOST("MAIN_MAIL_EMAIL_DKIM_ENABLED"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_DKIM_DOMAIN", GETPOST("MAIN_MAIL_EMAIL_DKIM_DOMAIN"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_DKIM_SELECTOR", GETPOST("MAIN_MAIL_EMAIL_DKIM_SELECTOR"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY", GETPOST("MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_DKIM_ENABLED", GETPOST("MAIN_MAIL_EMAIL_DKIM_ENABLED", 'int'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_DKIM_DOMAIN", GETPOST("MAIN_MAIL_EMAIL_DKIM_DOMAIN", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_DKIM_SELECTOR", GETPOST("MAIN_MAIL_EMAIL_DKIM_SELECTOR", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY", GETPOST("MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
// Content parameters
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_FROM", GETPOST("MAIN_MAIL_EMAIL_FROM"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_ERRORS_TO", GETPOST("MAIN_MAIL_ERRORS_TO"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_AUTOCOPY_TO", GETPOST("MAIN_MAIL_AUTOCOPY_TO"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, 'MAIN_MAIL_DEFAULT_FROMTYPE', GETPOST('MAIN_MAIL_DEFAULT_FROMTYPE'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_FROM", GETPOST("MAIN_MAIL_EMAIL_FROM", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_ERRORS_TO", GETPOST("MAIN_MAIL_ERRORS_TO", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_AUTOCOPY_TO", GETPOST("MAIN_MAIL_AUTOCOPY_TO", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, 'MAIN_MAIL_DEFAULT_FROMTYPE', GETPOST('MAIN_MAIL_DEFAULT_FROMTYPE', 'alphanohtml'), 'chaine', 0, '', $conf->entity);
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
exit;
@@ -101,8 +101,8 @@ $mode='emailfortest';
$trackid=(($action == 'testhtml')?"testhtml":"test");
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
if ($action == 'presend' && GETPOST('trackid') == 'test') $action='test';
if ($action == 'presend' && GETPOST('trackid') == 'testhtml') $action='testhtml';
if ($action == 'presend' && GETPOST('trackid', 'alphanohtml') == 'test') $action='test';
if ($action == 'presend' && GETPOST('trackid', 'alphanohtml') == 'testhtml') $action='testhtml';
@@ -823,7 +823,7 @@ else
$formmail->frommail = (isset($_POST['frommail'])?$_POST['frommail']:$conf->global->MAIN_MAIL_EMAIL_FROM);
$formmail->fromid=$user->id;
$formmail->fromalsorobot=1;
$formmail->fromtype=(GETPOST('fromtype')?GETPOST('fromtype'):(!empty($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE)?$conf->global->MAIN_MAIL_DEFAULT_FROMTYPE:'user'));
$formmail->fromtype=(GETPOSTISSET('fromtype')?GETPOST('fromtype', 'aZ09'):(!empty($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE)?$conf->global->MAIN_MAIL_DEFAULT_FROMTYPE:'user'));
$formmail->withfromreadonly=1;
$formmail->withsubstit=1;
$formmail->withfrom=1;
@@ -849,7 +849,7 @@ else
$formmail->param["returnurl"]=$_SERVER["PHP_SELF"];
// Init list of files
if (GETPOST("mode")=='init')
if (GETPOST("mode", "aZ09")=='init')
{
$formmail->clear_attached_files();
}

View File

@@ -50,7 +50,7 @@ $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmatio
$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');
@@ -263,6 +263,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.=",";
@@ -667,8 +668,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;
@@ -695,7 +694,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]))
@@ -813,6 +812,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

@@ -170,9 +170,23 @@ elseif ($action == 'disable_MAIN_SECURITY_DISABLEFORGETPASSLINK')
if ($action == 'maj_pattern')
{
dolibarr_set_const($db, "USER_PASSWORD_PATTERN", GETPOST("pattern"), 'chaine', 0, '', $conf->entity);
header("Location: security.php");
exit;
$pattern = GETPOST("pattern");
$explodePattern = explode(';', $pattern);
$patternInError = false;
if ($explodePattern[0] < 1 || $explodePattern[4] < 0) {
$patternInError = true;
}
if ($explodePattern[0] < $explodePattern[1] + $explodePattern[2] + $explodePattern[3]) {
$patternInError = true;
}
if (!$patternInError) {
dolibarr_set_const($db, "USER_PASSWORD_PATTERN", $pattern, 'chaine', 0, '', $conf->entity);
header("Location: security.php");
exit;
}
}
@@ -278,13 +292,6 @@ if ($conf->global->USER_PASSWORD_GENERATED == "Perso"){
$tabConf = explode(";", $conf->global->USER_PASSWORD_PATTERN);
/*$this->length2 = $tabConf[0];
$this->NbMaj = $tabConf[1];
$this->NbNum = $tabConf[2];
$this->NbSpe = $tabConf[3];
$this->NbRepeat = $tabConf[4];
$this->WithoutAmbi = $tabConf[5];
*/
print '<br>';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
@@ -350,6 +357,13 @@ if ($conf->global->USER_PASSWORD_GENERATED == "Perso"){
print ' }';
print ' function valuePossible(){';
print ' var fields = ["#minlenght", "#NbMajMin", "#NbNumMin", "#NbSpeMin", "#NbIteConsecutive"];';
print ' for(var i = 0 ; i < fields.length ; i++){';
print ' if($(fields[i]).val() < $(fields[i]).attr("min")){';
print ' return false;';
print ' }';
print ' }';
print ' ';
print ' var length = parseInt($("#minlenght").val());';
print ' var length_mini = parseInt($("#NbMajMin").val()) + parseInt($("#NbNumMin").val()) + parseInt($("#NbSpeMin").val());';
print ' return length >= length_mini;';

View File

@@ -160,7 +160,6 @@ print '<ul>';
print '<li><a href="https://facebook.com/dolibarr" target="_blank" rel="external">FaceBook</a></li>';
print '<li><a href="https://twitter.com/dolibarr" target="_blank" rel="external">Twitter</a></li>';
print '<li><a href="https://plus.google.com/+DolibarrOrg" target="_blank" rel="external">Google Plus page</a></li>';
print '</ul>';

View File

@@ -42,6 +42,12 @@ $label = GETPOST('label', 'alpha');
$scandir = GETPOST('scandir', 'alpha');
$type = 'ticket';
$error = 0;
/*
* Actions
*/
if ($action == 'updateMask') {
$maskconstticket = GETPOST('maskconstticket', 'alpha');
$maskticket = GETPOST('maskticket', 'alpha');
@@ -91,7 +97,7 @@ if ($action == 'updateMask') {
$error++;
}
$mail_intro = GETPOST('TICKET_MESSAGE_MAIL_INTRO', 'alpha');
$mail_intro = GETPOST('TICKET_MESSAGE_MAIL_INTRO', 'restricthtml');
if (!empty($mail_intro)) {
$res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_INTRO', $mail_intro, 'chaine', 0, '', $conf->entity);
} else {
@@ -101,7 +107,7 @@ if ($action == 'updateMask') {
$error++;
}
$mail_signature = GETPOST('TICKET_MESSAGE_MAIL_SIGNATURE', 'alpha');
$mail_signature = GETPOST('TICKET_MESSAGE_MAIL_SIGNATURE', 'restricthtml');
if (!empty($mail_signature)) {
$res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_SIGNATURE', $mail_signature, 'chaine', 0, '', $conf->entity);
} else {
@@ -110,16 +116,6 @@ if ($action == 'updateMask') {
if (!$res > 0) {
$error++;
}
$text_help = GETPOST('TICKET_PUBLIC_TEXT_HELP_MESSAGE', 'alpha');
if (!empty($text_help)) {
$res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HELP_MESSAGE', $text_help, 'chaine', 0, '', $conf->entity);
} else {
$res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HELP_MESSAGE', $langs->trans('TicketPublicPleaseBeAccuratelyDescribe'), 'chaine', 0, '', $conf->entity);
}
if (!$res > 0) {
$error++;
}
}
if ($action == 'setvarother') {

View File

@@ -42,6 +42,12 @@ $label = GETPOST('label', 'alpha');
$scandir = GETPOST('scandir', 'alpha');
$type = 'ticket';
$error = 0;
/*
* Actions
*/
if ($action == 'setTICKET_ENABLE_PUBLIC_INTERFACE')
{
if (GETPOST('value')) dolibarr_set_const($db, 'TICKET_ENABLE_PUBLIC_INTERFACE', 1, 'chaine', 0, '', $conf->entity);
@@ -51,95 +57,54 @@ if ($action == 'setTICKET_ENABLE_PUBLIC_INTERFACE')
if ($action == 'setvar') {
include_once DOL_DOCUMENT_ROOT . "/core/lib/files.lib.php";
$notification_email = GETPOST('TICKET_NOTIFICATION_EMAIL_FROM', 'alpha');
if (!empty($notification_email)) {
$res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_FROM', $notification_email, 'chaine', 0, '', $conf->entity);
$topic_interface = GETPOST('TICKET_PUBLIC_INTERFACE_TOPIC', 'nohtml');
if (!empty($topic_interface)) {
$res = dolibarr_set_const($db, 'TICKET_PUBLIC_INTERFACE_TOPIC', $topic_interface, 'chaine', 0, '', $conf->entity);
} else {
$res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_FROM', '', 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, 'TICKET_PUBLIC_INTERFACE_TOPIC', '', 'chaine', 0, '', $conf->entity);
}
if (!$res > 0) {
$error++;
$error++;
}
// altairis : differentiate notification email FROM and TO
$notification_email_to = GETPOST('TICKET_NOTIFICATION_EMAIL_TO', 'alpha');
if (!empty($notification_email_to)) {
$res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_TO', $notification_email_to, 'chaine', 0, '', $conf->entity);
$text_home = GETPOST('TICKET_PUBLIC_TEXT_HOME', 'restricthtml');
if (!empty($text_home)) {
$res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HOME', $text_home, 'chaine', 0, '', $conf->entity);
} else {
$res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_TO', '', 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HOME', $langs->trans('TicketPublicInterfaceTextHome'), 'chaine', 0, '', $conf->entity);
}
if (!$res > 0) {
$error++;
$error++;
}
$mail_new_ticket = GETPOST('TICKET_MESSAGE_MAIL_NEW', 'alpha');
$text_help = GETPOST('TICKET_PUBLIC_TEXT_HELP_MESSAGE', 'restricthtml');
if (!empty($text_help)) {
$res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HELP_MESSAGE', $text_help, 'chaine', 0, '', $conf->entity);
} else {
$res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HELP_MESSAGE', $langs->trans('TicketPublicPleaseBeAccuratelyDescribe'), 'chaine', 0, '', $conf->entity);
}
if (!$res > 0) {
$error++;
}
$mail_new_ticket = GETPOST('TICKET_MESSAGE_MAIL_NEW', 'restricthtml');
if (!empty($mail_new_ticket)) {
$res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_NEW', $mail_new_ticket, 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_NEW', $mail_new_ticket, 'chaine', 0, '', $conf->entity);
} else {
$res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_NEW', $langs->trans('TicketMessageMailNewText'), 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_NEW', $langs->trans('TicketMessageMailNewText'), 'chaine', 0, '', $conf->entity);
}
if (!$res > 0) {
$error++;
}
$mail_intro = GETPOST('TICKET_MESSAGE_MAIL_INTRO', 'alpha');
if (!empty($mail_intro)) {
$res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_INTRO', $mail_intro, 'chaine', 0, '', $conf->entity);
} else {
$res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_INTRO', $langs->trans('TicketMessageMailIntroText'), 'chaine', 0, '', $conf->entity);
}
if (!$res > 0) {
$error++;
}
$mail_signature = GETPOST('TICKET_MESSAGE_MAIL_SIGNATURE', 'alpha');
if (!empty($mail_signature)) {
$res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_SIGNATURE', $mail_signature, 'chaine', 0, '', $conf->entity);
} else {
$res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_SIGNATURE', $langs->trans('TicketMessageMailSignatureText'), 'chaine', 0, '', $conf->entity);
}
if (!$res > 0) {
$error++;
$error++;
}
$url_interface = GETPOST('TICKET_URL_PUBLIC_INTERFACE', 'alpha');
if (!empty($url_interface)) {
$res = dolibarr_set_const($db, 'TICKET_URL_PUBLIC_INTERFACE', $url_interface, 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, 'TICKET_URL_PUBLIC_INTERFACE', $url_interface, 'chaine', 0, '', $conf->entity);
} else {
$res = dolibarr_set_const($db, 'TICKET_URL_PUBLIC_INTERFACE', '', 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, 'TICKET_URL_PUBLIC_INTERFACE', '', 'chaine', 0, '', $conf->entity);
}
if (!$res > 0) {
$error++;
}
$topic_interface = GETPOST('TICKET_PUBLIC_INTERFACE_TOPIC', 'alpha');
if (!empty($topic_interface)) {
$res = dolibarr_set_const($db, 'TICKET_PUBLIC_INTERFACE_TOPIC', $topic_interface, 'chaine', 0, '', $conf->entity);
} else {
$res = dolibarr_set_const($db, 'TICKET_PUBLIC_INTERFACE_TOPIC', '', 'chaine', 0, '', $conf->entity);
}
if (!$res > 0) {
$error++;
}
$text_home = GETPOST('TICKET_PUBLIC_TEXT_HOME', 'alpha');
if (!empty($text_home)) {
$res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HOME', $text_home, 'chaine', 0, '', $conf->entity);
} else {
$res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HOME', $langs->trans('TicketPublicInterfaceTextHome'), 'chaine', 0, '', $conf->entity);
}
if (!$res > 0) {
$error++;
}
$text_help = GETPOST('TICKET_PUBLIC_TEXT_HELP_MESSAGE', 'alpha');
if (!empty($text_help)) {
$res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HELP_MESSAGE', $text_help, 'chaine', 0, '', $conf->entity);
} else {
$res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HELP_MESSAGE', $langs->trans('TicketPublicPleaseBeAccuratelyDescribe'), 'chaine', 0, '', $conf->entity);
}
if (!$res > 0) {
$error++;
$error++;
}
}
@@ -162,14 +127,11 @@ if ($action == 'setvarother') {
$error++;
}
if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
{
$param_show_module_logo = GETPOST('TICKET_SHOW_MODULE_LOGO', 'alpha');
$res = dolibarr_set_const($db, 'TICKET_SHOW_MODULE_LOGO', $param_show_module_logo, 'chaine', 0, '', $conf->entity);
if (!$res > 0) {
$error++;
}
}
$param_show_module_logo = GETPOST('TICKET_SHOW_COMPANY_LOGO', 'alpha');
$res = dolibarr_set_const($db, 'TICKET_SHOW_COMPANY_LOGO', $param_show_module_logo, 'chaine', 0, '', $conf->entity);
if (!$res > 0) {
$error++;
}
if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
{
@@ -179,12 +141,6 @@ if ($action == 'setvarother') {
$error++;
}
}
$param_limit_view = GETPOST('TICKET_LIMIT_VIEW_ASSIGNED_ONLY', 'alpha');
$res = dolibarr_set_const($db, 'TICKET_LIMIT_VIEW_ASSIGNED_ONLY', $param_limit_view, 'chaine', 0, '', $conf->entity);
if (!$res > 0) {
$error++;
}
}
@@ -238,8 +194,7 @@ print '<br><br>';
if (! empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE))
{
if (!$conf->use_javascript_ajax) {
if (empty($conf->use_javascript_ajax)) {
print '<form method="post" action="' . $_SERVER['PHP_SELF'] . '" enctype="multipart/form-data" >';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="setvarother">';
@@ -349,16 +304,6 @@ if (! empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE))
print "</tr>\n";
}
// Url public interface
$url_interface = $conf->global->TICKET_URL_PUBLIC_INTERFACE;
print '<tr><td>' . $langs->trans("TicketUrlPublicInterfaceLabelAdmin") . '</label>';
print '</td><td>';
print '<input type="text" name="TICKET_URL_PUBLIC_INTERFACE" value="' . $conf->global->TICKET_URL_PUBLIC_INTERFACE . '" size="40" ></td>';
print '</td>';
print '<td align="center">';
print $form->textwithpicto('', $langs->trans("TicketUrlPublicInterfaceHelpAdmin"), 1, 'help');
print '</td></tr>';
// Interface topic
$url_interface = $conf->global->TICKET_PUBLIC_INTERFACE_TOPIC;
print '<tr><td>' . $langs->trans("TicketPublicInterfaceTopicLabelAdmin") . '</label>';
@@ -420,6 +365,16 @@ if (! empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE))
print $form->textwithpicto('', $langs->trans("TicketNewEmailBodyHelp"), 1, 'help');
print '</td></tr>';
// Url public interface
$url_interface = $conf->global->TICKET_URL_PUBLIC_INTERFACE;
print '<tr><td>' . $langs->trans("TicketUrlPublicInterfaceLabelAdmin") . '</label>';
print '</td><td>';
print '<input type="text" name="TICKET_URL_PUBLIC_INTERFACE" value="' . $conf->global->TICKET_URL_PUBLIC_INTERFACE . '" size="40" ></td>';
print '</td>';
print '<td align="center">';
print $form->textwithpicto('', $langs->trans("TicketUrlPublicInterfaceHelpAdmin"), 1, 'help');
print '</td></tr>';
print '</table>';
print '<div class="center"><input type="submit" class="button" value="' . $langs->trans("Save") . '"></div>';

View File

@@ -1048,6 +1048,7 @@ class BlockedLog
if (empty($conf->global->BLOCKEDLOG_ENTITY_FINGERPRINT)) { // creation of a unique fingerprint
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
$fingerprint = dol_hash(print_r($mysoc, true).getRandomPassword(1), '5');

View File

@@ -302,7 +302,7 @@ class Boms extends DolibarrApi
private function _validate($data)
{
$myobject = array();
foreach ($this->myobject->fields as $field => $propfield) {
foreach ($this->bom->fields as $field => $propfield) {
if (in_array($field, array('rowid', 'entity', 'date_creation', 'tms', 'fk_user_creat')) || $propfield['notnull'] != 1) continue; // Not a mandatory field
if (!isset($data[$field]))
throw new RestException(400, "$field field missing");

View File

@@ -100,14 +100,15 @@ if ($nolinesbefore) {
$filtertype='';
if (! empty($object->element) && $object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) $filtertype='1';
$statustoshow = -1;
if (! empty($conf->global->ENTREPOT_EXTRA_STATUS))
{
// hide products in closed warehouse, but show products for internal transfer
$form->select_produits(GETPOST('idprod'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, 1, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, 'warehouseopen,warehouseinternal', GETPOST('combinations', 'array'));
$form->select_produits(GETPOST('idprod'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, 'warehouseopen,warehouseinternal', GETPOST('combinations', 'array'));
}
else
{
$form->select_produits(GETPOST('idprod'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, 1, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, '', GETPOST('combinations', 'array'));
$form->select_produits(GETPOST('idprod'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, '', GETPOST('combinations', 'array'));
}
echo '</span>';

View File

@@ -96,11 +96,11 @@ else
<tr>
<td class="label1"><?php echo $langs->trans("Login"); ?></td>
<td><input name="txtUsername" class="texte_login" type="text" value="<?php echo $usertxt; ?>" /></td>
<td><input name="txtUsername" class="texte_login maxwidth150onsmartphoneimp" type="text" value="<?php echo $usertxt; ?>" /></td>
</tr>
<tr>
<td class="label1"><?php echo $langs->trans("Password"); ?></td>
<td><input name="pwdPassword" class="texte_login" type="password" value="" /></td>
<td><input name="pwdPassword" class="texte_login maxwidth150onsmartphoneimp" type="password" value="" /></td>
</tr>
<?php
@@ -157,7 +157,7 @@ print '<td class="label1">'.$langs->trans("CashDeskBankAccountForSell").'</td>';
print '<td>';
$defaultknown=0;
if (! empty($conf->global->CASHDESK_ID_BANKACCOUNT_CASH) && $conf->global->CASHDESK_ID_BANKACCOUNT_CASH > 0) $defaultknown=1; // If a particular stock is defined, we disable choice
print $form->select_comptes(((GETPOST('bankid_cash') > 0)?GETPOST('bankid_cash'):$conf->global->CASHDESK_ID_BANKACCOUNT_CASH), 'CASHDESK_ID_BANKACCOUNT_CASH', 0, "courant=2", ($defaultknown?0:2));
$form->select_comptes(((GETPOST('bankid_cash') > 0)?GETPOST('bankid_cash'):$conf->global->CASHDESK_ID_BANKACCOUNT_CASH), 'CASHDESK_ID_BANKACCOUNT_CASH', 0, "courant=2", ($defaultknown?0:2));
print '</td>';
print "</tr>\n";
@@ -166,7 +166,7 @@ print '<td class="label1">'.$langs->trans("CashDeskBankAccountForCheque").'</td>
print '<td>';
$defaultknown=0;
if (! empty($conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE) && $conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE > 0) $defaultknown=1; // If a particular stock is defined, we disable choice
print $form->select_comptes(((GETPOST('bankid_cheque') > 0)?GETPOST('bankid_cheque'):$conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE), 'CASHDESK_ID_BANKACCOUNT_CHEQUE', 0, "courant=1", ($defaultknown?0:2));
$form->select_comptes(((GETPOST('bankid_cheque') > 0)?GETPOST('bankid_cheque'):$conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE), 'CASHDESK_ID_BANKACCOUNT_CHEQUE', 0, "courant=1", ($defaultknown?0:2));
print '</td>';
print "</tr>\n";
@@ -175,7 +175,7 @@ print '<td class="label1">'.$langs->trans("CashDeskBankAccountForCB").'</td>';
print '<td>';
$defaultknown=0;
if (! empty($conf->global->CASHDESK_ID_BANKACCOUNT_CB) && $conf->global->CASHDESK_ID_BANKACCOUNT_CB > 0) $defaultknown=1; // If a particular stock is defined, we disable choice
print $form->select_comptes(((GETPOST('bankid_cb') > 0)?GETPOST('bankid_cb'):$conf->global->CASHDESK_ID_BANKACCOUNT_CB), 'CASHDESK_ID_BANKACCOUNT_CB', 0, "courant=1", ($defaultknown?0:2));
$form->select_comptes(((GETPOST('bankid_cb') > 0)?GETPOST('bankid_cb'):$conf->global->CASHDESK_ID_BANKACCOUNT_CB), 'CASHDESK_ID_BANKACCOUNT_CB', 0, "courant=1", ($defaultknown?0:2));
print '</td>';
print "</tr>\n";
@@ -191,7 +191,7 @@ print "</tr>\n";
</table>
<br>
<div align="center"><span class="bouton_login"><input class="button" name="sbmtConnexion" type="submit" value=<?php echo $langs->trans("Connection"); ?> /></span></div>
<div align="center"><span class="bouton_login"><input class="button" name="sbmtConnexion" type="submit" value="<?php echo dol_escape_htmltag($langs->trans("Connection")); ?>" /></span></div>
</form>
</fieldset>

View File

@@ -842,11 +842,14 @@ class Categorie extends CommonObject
if ($type=="contact") {
$subcol_name="fk_socpeople";
}
$idoftype = array_search($type, self::$MAP_ID_TO_CODE);
$sql = "SELECT s.rowid";
$sql.= " FROM ".MAIN_DB_PREFIX."categorie as s";
$sql.= " , ".MAIN_DB_PREFIX."categorie_".$sub_type." as sub ";
$sql.= ' WHERE s.entity IN ('.getEntity('category').')';
$sql.= ' AND s.type='.array_search($type, self::$MAP_ID_TO_CODE);
$sql.= ' AND s.type='.$idoftype;
$sql.= ' AND s.rowid = sub.fk_categorie';
$sql.= ' AND sub.'.$subcol_name.' = '.$id;
@@ -865,7 +868,15 @@ class Categorie extends CommonObject
}
}
$sql.= $this->db->plimit($limit + 1, $offset);
if ($limit) {
if ($page < 0)
{
$page = 0;
}
$offset = $limit * $page;
$sql.= $this->db->plimit($limit + 1, $offset);
}
$result = $this->db->query($sql);
if ($result)

View File

@@ -36,7 +36,7 @@ $langs->load("categories");
$id = GETPOST('id', 'int');
$label= GETPOST('label', 'alpha');
$type = GETPOST('type', 'az09');
$type = GETPOST('type', 'aZ09');
$action=GETPOST('action', 'aZ09');
$confirm = GETPOST('confirm', 'alpha');
$removeelem = GETPOST('removeelem', 'int');

View File

@@ -676,7 +676,7 @@ class ActionComm extends CommonObject
$this->socid = $obj->fk_soc; // To have fetch_thirdparty method working
$this->contactid = $obj->fk_contact; // To have fetch_contact method working
$this->fk_project = $obj->fk_project; // To have fetch_project method working
$this->fk_project = $obj->fk_project; // To have fetch_projet method working
$this->societe->id = $obj->fk_soc; // deprecated
//$this->contact->id = $obj->fk_contact; // deprecated

View File

@@ -87,7 +87,7 @@ $week=GETPOST("week", "int")?GETPOST("week", "int"):date("W");
$day=GETPOST("day", "int")?GETPOST("day", "int"):date("d");
$pid=GETPOST("search_projectid", "int", 3)?GETPOST("search_projectid", "int", 3):GETPOST("projectid", "int", 3);
$status=GETPOST("search_status", 'aZ09')?GETPOST("search_status", 'aZ09'):GETPOST("status", 'aZ09'); // status may be 0, 50, 100, 'todo'
$type=GETPOST("search_type", 'az09')?GETPOST("search_type", 'az09'):GETPOST("type", 'az09');
$type=GETPOST("search_type", 'aZ09')?GETPOST("search_type", 'aZ09'):GETPOST("type", 'aZ09');
$maxprint=(isset($_GET["maxprint"])?GETPOST("maxprint"):$conf->global->AGENDA_MAX_EVENTS_DAY_VIEW);
// Set actioncode (this code must be same for setting actioncode into peruser, listacton and index)
if (GETPOST('search_actioncode', 'array'))

View File

@@ -338,7 +338,7 @@ if ($object->fetch($id) >= 0)
print '<div class="tagtd">';
if (empty($obj->picto)) $obj->picto='generic';
print img_object($langs->trans("EmailingTargetSelector").': '.get_class($obj), $obj->picto);
print img_object($langs->trans("EmailingTargetSelector").': '.get_class($obj), $obj->picto, 'class="valignmiddle pictomodule"');
print ' ';
print $obj->getDesc();
print '</div>';

View File

@@ -551,7 +551,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;
@@ -570,7 +570,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

@@ -91,15 +91,13 @@ if ($_socid > 0)
dol_fiche_head($head, $tabchoice, $langs->trans("ThirdParty"), 0, 'company');
print '<table width="100%" border="0">';
print '<tr><td class="tdtop">';
print '<table class="border" width="100%">';
print '<table class="border centpercent">';
print '<tr><td colspan="2" width="25%">';
print $langs->trans("PriceLevel").'</td><td colspan="2">'.$objsoc->price_level."</td></tr>";
print '<tr><td class="titlefieldcreate">';
print $langs->trans("PriceLevel").'</td><td>'.$objsoc->price_level."</td></tr>";
print '<tr><td colspan="2">';
print $langs->trans("NewValue").'</td><td colspan="2">';
print '<tr><td>';
print $langs->trans("NewValue").'</td><td>';
print '<select name="price_level" class="flat">';
for($i=1;$i<=$conf->global->PRODUIT_MULTIPRICES_LIMIT;$i++)
{
@@ -116,12 +114,6 @@ if ($_socid > 0)
print "</table>";
print "</td>\n";
print "</td></tr>";
print "</table>";
dol_fiche_end();
print '<div align="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></div>';
@@ -157,8 +149,8 @@ if ($_socid > 0)
while ($i < $num )
{
$obj = $db->fetch_object($resql);
$tag = !$tag;
print '<tr '.$bc[$tag].'>';
print '<tr class="oddeven">';
print '<td>'.dol_print_date($db->jdate($obj->dc), "dayhour").'</td>';
print '<td>'.$obj->price_level.' </td>';
$userstatic->id=$obj->uid;

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