2
0
forked from Wavyzz/dolibarr

Compare commits

...

863 Commits

Author SHA1 Message Date
Laurent Destailleur
0eac798674 Changelog 2020-06-26 19:47:03 +02:00
Laurent Destailleur
347667b346 Prepare 11.0.5 2020-06-26 19:45:39 +02:00
Laurent Destailleur
8e324c36ff Prepare 11.0.5 2020-06-26 19:39:01 +02:00
Laurent Destailleur
03b540b948 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/core/modules/facture/doc/pdf_crabe.modules.php
2020-06-20 12:23:04 +02:00
Laurent Destailleur
5a53a16c17 Merge pull request #14101 from mistraloz/patch-5
Fix: Bug when delete payment when already deleted in account
2020-06-20 12:15:59 +02:00
Laurent Destailleur
da9c25348e Update paiement.class.php 2020-06-20 12:15:48 +02:00
Laurent Destailleur
15af3d68fc FIX #13877 2020-06-19 14:50:33 +02:00
Laurent Destailleur
22ca5e0671 Fix XSS reported by C. Weiler <sak1.s3curity@gmail.com> in notice.php 2020-06-19 00:39:27 +02:00
Mistral Oz - LWEP
2f7bb18e2b Fix: Bug when delete payment when already deleted in account
Related to : 
https://github.com/Dolibarr/dolibarr/blame/11.0/htdocs/compta/bank/class/account.class.php#L1976

Mistake between id / rowid. I prefere add the fix here (but a fix in account class can be also a good fix). 
And best fix may use setter to do it (but to complicated : maybe latter ? i may check it in september if you want in all CommonObject properties)
2020-06-18 20:56:46 +02:00
Laurent Destailleur
de5a2d738b FIX #14001 2020-06-17 18:39:25 +02:00
Laurent Destailleur
6d6abd4320 FIX vulenrability reported by wizlynx WLX-2020-012 2020-06-17 14:45:15 +02:00
Laurent Destailleur
23df5596e8 FIX vulenrability reported by wizlynx WLX-2020-012 2020-06-17 13:42:38 +02:00
Laurent Destailleur
fdbb6debc9 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-06-17 13:30:43 +02:00
Laurent Destailleur
6660923e94 FIX Privilege escalation reported by wizlynx WLX-2020-011 2020-06-17 13:29:43 +02:00
Laurent Destailleur
33cd20de68 Merge pull request #14096 from ATM-Consulting/11.0_NEW_fetch_multicurrency_code_with_payments
FIX 11.0 - multicurrency_amount not fetched with payments
2020-06-17 12:30:36 +02:00
Florian Mortgat
3d69a1dc70 FIX 11.0 - multicurrency amount not fetched when fetching payments from llx_paiement or llx_paiementfourn 2020-06-17 11:06:31 +02:00
Laurent Destailleur
6ea4928c79 Merge pull request #14090 from ATM-Consulting/FIX_11.0_missing_currency_columns_in_supplier_exports
11.0 - FIX - missing currency columns in supplier exports
2020-06-16 22:00:56 +02:00
Laurent Destailleur
2c0a1904b8 Merge pull request #14091 from atm-gauthier/11.0_ldcompta
FIX : force rounding 2 on export ld compta
2020-06-16 21:41:40 +02:00
gauthier
e50d239322 FIX : force rounding 2 on export ld compta 2020-06-16 11:40:01 +02:00
Florian Mortgat
18d5ec7750 11.0 - FIX - missing currency columns in supplier exports
(copy-pasted from modFacture.class.php)
2020-06-16 10:56:10 +02:00
Laurent Destailleur
40e16672e3 FIX BlindBoolean SQL injection reported by Christian Weiler
<sak1.s3curity@gmail.com>
2020-06-15 15:08:52 +02:00
Laurent Destailleur
72130dacb9 Merge pull request #14061 from atm-gauthier/10.0_fix_progress_pdf
FIX : percent must be displayed on one line
2020-06-12 14:50:49 +02:00
Laurent Destailleur
1ba03566dc Fix case of delete contact not correctly implemented. 2020-06-12 02:15:02 +02:00
Laurent Destailleur
e04557948d Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-06-11 23:37:04 +02:00
Laurent Destailleur
2109a91992 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/core/class/html.formticket.class.php
	htdocs/takepos/admin/setup.php
2020-06-11 23:36:55 +02:00
Laurent Destailleur
0023d14e65 Merge pull request #14037 from OPEN-DSI/v10-fix-takepos-free-text-html
FIX free text on cash desk
2020-06-11 23:33:31 +02:00
Laurent Destailleur
ffb345e724 Merge pull request #14062 from atm-florianm/11.0_FIX_missing_translation
FIX: missing translation value for key "NoMorePredefinedProductToDispatch"
2020-06-11 23:05:55 +02:00
Laurent Destailleur
9aafb82fd3 Merge pull request #14059 from atm-florianm/FIX_10.0_missing_global_langs_when_activating_modContrat
FIX 10.0 - undefined $langs if template file copy fails during activation of modContrat
2020-06-11 23:02:19 +02:00
Laurent Destailleur
3698af39f1 Merge pull request #14060 from indelog/fix_measuringunitstring
Fix 11.0 -  undef func measuringUnitString() in From::select_produits_fournis…
2020-06-11 23:02:01 +02:00
Laurent Destailleur
7d4a7a4be0 Merge pull request #14067 from atm-john/11.0_fix_ticket_file_save
Fix ticket file save
2020-06-11 23:01:33 +02:00
Laurent Destailleur
f1f37c7b29 Merge pull request #14064 from atm-florianm/FIX_11.0_postgresql_fatal_on_contact_agenda
FIX 11.0 - fatal with postgres on contact/agenda.php
2020-06-11 23:01:01 +02:00
Laurent Destailleur
e3811840df Merge pull request #14066 from atm-gauthier/10.0_fix_arraydefaultmessage
FIX : $arraydefaultmessage is an object, as well as in /htdocs/core/c…
2020-06-11 22:59:55 +02:00
Laurent Destailleur
b36e658b20 Update html.formticket.class.php 2020-06-11 22:58:58 +02:00
Laurent Destailleur
7fcb62359d Merge pull request #14072 from hregis/11.0_bug
FIX avoid error "Call to undefined function measuringUnitString()"
2020-06-11 22:56:17 +02:00
Regis Houssin
997cb214f1 FIX avoid error "Call to undefined function measuringUnitString()" 2020-06-11 16:52:24 +02:00
ATM john
564b9df1e7 Fix ticket file save 2020-06-10 17:01:57 +02:00
gauthier
58ff96af30 FIX : $arraydefaultmessage is an object, as well as in /htdocs/core/class/html.formmail.class.php 2020-06-10 16:48:02 +02:00
Florian Mortgat
5bc80f8626 FIX 11.0 - fatal with postgres because empty string literals are assigned to fields typed as integers as per UNION syntax 2020-06-10 16:22:48 +02:00
Florian Mortgat
d19febc2ca FIX: missing translation value for key "NoMorePredefinedProductToDispatch" 2020-06-09 17:34:24 +02:00
gauthier
92b89437d1 FIX : percent must be displayed on one line 2020-06-09 16:02:41 +02:00
DEMAREST Maxime (Indelog)
1ac341e651 Fix undef func measuringUnitString() in From::select_produits_fournisseurs_list 2020-06-09 15:33:10 +02:00
Florian Mortgat
0a2099e0ac FIX 10.0 - undefined $langs if template file copy fails during activation of modContrat 2020-06-09 14:22:32 +02:00
Laurent Destailleur
366f458b39 Show more info to help fix corrupted data 2020-06-08 15:20:01 +02:00
Laurent Destailleur
fd8f8ff4e1 Error message 2020-06-08 15:12:07 +02:00
VESSILLER
7bba9db2f0 FIX replace filter parameter "none" by "restricthtml" 2020-06-08 11:28:05 +02:00
Laurent Destailleur
5e6ce8ea70 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-06-07 18:59:57 +02:00
Laurent Destailleur
941362e683 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/compta/facture/card.php
	htdocs/compta/facture/class/facture.class.php
2020-06-07 18:59:49 +02:00
Laurent Destailleur
4020d97362 FIX Can create a credit note on situation invoice if previous is also
credit note
2020-06-07 18:36:58 +02:00
Laurent Destailleur
180a0a4557 Info for debug 2020-06-07 18:30:46 +02:00
Laurent Destailleur
e17818c3dd Merge pull request #14048 from simicar29/11.0-replenish
replenish : select expedition quantities only from opened orders when…
2020-06-07 14:12:38 +02:00
Laurent Destailleur
4169aa716c FIX can install module even if (x) was appended during download. 2020-06-07 00:23:20 +02:00
Laurent Destailleur
cbafbe16a2 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/accountancy/customer/index.php
	htdocs/accountancy/supplier/index.php
	htdocs/admin/mails_templates.php
	htdocs/core/class/html.form.class.php
	htdocs/core/class/html.formticket.class.php
	htdocs/langs/en_US/admin.lang
2020-06-06 23:00:24 +02:00
Laurent Destailleur
e9a0b0c290 Merge pull request #14029 from atm-maxime/fix_user_validator_test
Fix missing test on module enabled for user validators
2020-06-06 22:23:30 +02:00
Laurent Destailleur
30ea9a497d Merge pull request #14030 from atm-maxime/fix_contact_update_socialnetworks
Fix #14027 : emptying social network value on contact wasn't working
2020-06-06 21:57:32 +02:00
Laurent Destailleur
d7bd7371a6 Merge pull request #13973 from atm-florian/11.0
FIX : #13968
2020-06-06 21:48:26 +02:00
Laurent Destailleur
261d0772f8 Update commonobject.class.php 2020-06-06 21:47:27 +02:00
Laurent Destailleur
38d95aa5cd Update societe.class.php 2020-06-06 21:45:53 +02:00
Laurent Destailleur
bb192195f1 Update commonobject.class.php 2020-06-06 21:41:33 +02:00
Laurent Destailleur
87806346c7 Update commonobject.class.php 2020-06-06 21:40:20 +02:00
Laurent Destailleur
d9ac7ab9da Update commonobject.class.php 2020-06-06 21:37:53 +02:00
Laurent Destailleur
af440b7c49 Update societe.class.php 2020-06-06 21:32:25 +02:00
Laurent Destailleur
a66926cf08 Update commonobject.class.php 2020-06-06 21:30:08 +02:00
Laurent Destailleur
4f2af3bf67 Merge pull request #14021 from atm-gauthier/10.0_fix_modelmail_tickets
FIX : Tickets mail models doesn't work
2020-06-06 21:24:04 +02:00
Laurent Destailleur
30c6ae394b Update html.formticket.class.php 2020-06-06 21:23:35 +02:00
Laurent Destailleur
cd8dd236f4 Merge pull request #14028 from aspangaro/10.0_p38
FIX: Show ref_customer, amount on contract link object
2020-06-06 21:22:11 +02:00
Laurent Destailleur
a5b74189e6 Merge pull request #14031 from atm-florianm/10.0_FIX_copy_payment_value_date_on_account_line
FIX: copy value date of VariousPayment onto the new AccountLine
2020-06-06 21:19:11 +02:00
Laurent Destailleur
2140f05eb4 Merge pull request #14040 from aspangaro/10.0_p40
FIX: Accountancy - Binding index - Add a filter on sql request for module Subtotal & Jalon
2020-06-06 21:01:40 +02:00
florian HENRY
0943b13ecc Merge branch '11.0' of github.com:Dolibarr/dolibarr into 11.0 2020-06-06 17:51:31 +02:00
Marc Guenneugues
cefc8dcca2 replenish : select expedition quantities only from opened orders when using virtual stocks 2020-06-06 11:39:49 +02:00
Laurent Destailleur
5dd9f4e4c4 Fix travis false positive 2020-06-06 11:36:24 +02:00
Laurent Destailleur
2344435416 Fix XSS CWE-ID CWE-79 2020-06-05 23:41:29 +02:00
Laurent Destailleur
4fcaaa3387 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-06-05 17:48:02 +02:00
Laurent Destailleur
ca3f62e4ac Doc repair Row size too large 2020-06-05 17:47:52 +02:00
Alexandre SPANGARO
e5f8f38fbf FIX: Accountancy - Binding index - Add a filter on sql request for module Subtotal & Jalon 2020-06-05 17:24:59 +02:00
VESSILLER
ded7b79a6f FIX free text on cash desk 2020-06-05 12:10:03 +02:00
florian HENRY
699557adbe forget[] 2020-06-04 21:39:23 +02:00
florian HENRY
afafe1a737 forget[] 2020-06-04 21:38:44 +02:00
florian HENRY
29649a1e2a Merge branch '11.0' of github.com:atm-florian/dolibarr into 11.0 2020-06-04 20:21:17 +02:00
stickler-ci
e9b17aac8d Fixing style errors. 2020-06-04 18:20:48 +00:00
florian HENRY
b47761e05c fix comment 2020-06-04 20:20:43 +02:00
florian HENRY
ca4a1dc266 Merge branch '11.0' of github.com:atm-florian/dolibarr into 11.0 2020-06-04 20:18:46 +02:00
florian HENRY
9a3e68b594 Merge branch '11.0' of github.com:Dolibarr/dolibarr into 11.0 2020-06-04 20:14:29 +02:00
florian HENRY
7115bd7033 better fix 2020-06-04 20:14:19 +02:00
Florian Mortgat
c393f8149c FIX: when creating a VariousPayment, the value date is not copied onto the AccountLine that gets created at the same time, so the bank transaction's value date will be the payment date instead of the payment's value date 2020-06-04 11:29:51 +02:00
Alexandre SPANGARO
ede084a111 Fix stickler 2020-06-04 05:11:00 +02:00
Maxime Kohlhaas
f6e0ed08e2 Fix #14027 : emptying social network value on contact wasn't working 2020-06-04 00:30:17 +02:00
Maxime Kohlhaas
e19f496d62 Fix missing test on module enabled for user validators 2020-06-03 23:30:06 +02:00
Alexandre SPANGARO
9e5c7d0acf FIX: Show ref_customer, amount on contract link object 2020-06-03 23:00:53 +02:00
gauthier
68bb552dcc FIX : Tickets mail models doesn't work 2020-06-02 17:06:49 +02:00
Laurent Destailleur
da481049c1 Update commonobject.class.php 2020-06-02 15:45:40 +02:00
Laurent Destailleur
f91e7e4917 Merge pull request #13922 from atm-lena/11.0_NEW_AddHook_SelectWarehouses
11.0 new add hook select warehouses
2020-06-02 13:27:01 +02:00
Laurent Destailleur
009780b895 Update html.formproduct.class.php 2020-06-02 12:13:55 +02:00
Laurent Destailleur
88a831c05a Update html.formproduct.class.php 2020-06-02 12:12:07 +02:00
atm-lena
ae9c490134 Merge branch '11.0' of https://github.com/Dolibarr/dolibarr into 11.0_NEW_AddHook_SelectWarehouses 2020-06-02 09:55:56 +02:00
atm-lena
99b4bfc91e Movement of hook "selectwarehouse" 2020-06-02 09:53:30 +02:00
Laurent Destailleur
6cc512ea16 Merge pull request #14016 from atm-florianm/FIX_11.0_check_file_exists_after_pdftk_massgeneration
FIX 11.0 - when using pdftk for pdf concatenation, check if file was created before saying so
2020-06-01 20:10:08 +02:00
Florian Mortgat
3213148d87 FIX 11.0 - when using pdftk as per hidden conf USE_PDFTK_FOR_PDF_CONCAT, check that the file exists before displaying a success message 2020-06-01 17:12:02 +02:00
florian HENRY
c655720b78 fix travis 2020-06-01 10:51:50 +02:00
florian HENRY
2337d75d92 better fix for #13968 2020-06-01 10:43:57 +02:00
florian HENRY
face2d644e Merge branch '11.0' of github.com:Dolibarr/dolibarr into 11.0 2020-06-01 10:05:07 +02:00
Laurent Destailleur
2b317120d3 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/compta/facture/card.php
2020-05-31 00:25:33 +02:00
Laurent Destailleur
bc1724a3aa Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-05-31 00:23:40 +02:00
Laurent Destailleur
4303d3d3e8 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0
Conflicts:
	htdocs/margin/tabs/productMargins.php
2020-05-31 00:23:33 +02:00
Laurent Destailleur
2696a6a4d0 Merge pull request #14000 from OPEN-DSI/fix_erreur_facture_v10
FIX: Fix link of the button to create a credit note and fix the awareness of a error happen when to create a credit note
2020-05-30 17:24:08 +02:00
Laurent Destailleur
52af430ae2 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-05-30 14:20:16 +02:00
Laurent Destailleur
e223189507 FIX #14002 2020-05-30 14:20:04 +02:00
kamel
1e208e537f FIX: Fix link of the button to create a credit note and fix the awareness of a error happen when to create a credit note 2020-05-29 16:24:07 +02:00
Laurent Destailleur
113144ea21 Merge pull request #13993 from glu000/11.0-fix-13991
Fix #13991
2020-05-28 18:27:39 +02:00
Laurent Destailleur
3ae61fcd73 Merge pull request #13981 from atm-florianm/11.0_FIX_pgsql_error_in_adherents_module
11.0 FIX postgreSQL error on landing page when "members" module is on
2020-05-28 17:50:08 +02:00
Laurent Destailleur
c3f75ba2ec Merge pull request #13989 from atm-lena/11.0_FIX_RoundingTotalTVA_PDFCrabeModel
FIX Rounding Total TVA in "crabe" model pdf
2020-05-28 17:38:52 +02:00
Laurent Destailleur
8360ca4b20 Update pdf_crabe.modules.php 2020-05-28 17:38:20 +02:00
Laurent Destailleur
bdc73b5cae Update pdf_crabe.modules.php 2020-05-28 17:37:53 +02:00
stickler-ci
56259bae9a Fixing style errors. 2020-05-28 14:18:00 +00:00
glu000
9915d97adf Fix #13991 2020-05-28 16:11:02 +02:00
atm-lena
edc6abcea8 FIX Rounding Total TVA in "crabe" model pdf 2020-05-28 15:19:37 +02:00
Laurent Destailleur
537b291fab Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/compta/prelevement/bons.php
2020-05-28 12:24:55 +02:00
Laurent Destailleur
c17c2a6c23 Merge pull request #13977 from atm-florianm/FIX_10.0_pagination_bons_prelevement
FIX 10.0 - pagination in prelevement/bons.php
2020-05-28 12:21:04 +02:00
Florian Mortgat
d491f2cf54 [pgsql] type of llx_adherent_type.subscription is VARCHAR(3) so quotes are mandatory 2020-05-27 18:27:10 +02:00
Laurent Destailleur
e2680fa29a Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/core/class/html.form.class.php
2020-05-27 14:39:19 +02:00
Laurent Destailleur
a207365bd2 FIX XSS using the renaming of .noexe files - reported by Nolan. 2020-05-27 13:12:18 +02:00
Florian Mortgat
954c29786e FIX 10.0 - pagination in prelevement/bons.php 2020-05-27 12:15:42 +02:00
Laurent Destailleur
e02aa4e41b FIX Default bank account was not loaded for document generation. 2020-05-26 23:22:14 +02:00
florian HENRY
ceb0a5b0b5 space 2020-05-26 21:32:18 +02:00
florian HENRY
e5edc06f3d spelling 2020-05-26 21:29:47 +02:00
florian HENRY
7ada0de654 FIX : #13968 2020-05-26 21:27:46 +02:00
Laurent Destailleur
2595f571c7 Fix exclude credit note when searching situation invoice to use for next 2020-05-25 00:21:09 +02:00
Laurent Destailleur
fe6453194e Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-05-23 20:18:17 +02:00
Laurent Destailleur
45ddde6940 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/expensereport/class/expensereport.class.php
	htdocs/holiday/class/holiday.class.php
	htdocs/index.php
2020-05-23 20:18:10 +02:00
Laurent Destailleur
4004aeb257 Merge pull request #13915 from atm-quentin/Fix_missing_getnomurl_warehouse_hook
FIX missing GetNomURL Hook in warehouse class
2020-05-23 14:57:28 +02:00
Laurent Destailleur
b7fbda8d08 Merge pull request #13924 from atm-lena/11.0_AddHook_Massstockmove
Add Hook "Massstockmove"
2020-05-23 14:25:12 +02:00
Laurent Destailleur
1e6cc80438 Merge pull request #13923 from atm-gauthier/11.0_rename_bank_releve
FIX : We must only rename current bank receipt
2020-05-23 14:24:51 +02:00
Laurent Destailleur
e29d2588cf Merge pull request #13931 from altatof/fixdispatch
FIX missing rollbacks on trigger bad return
2020-05-23 14:24:15 +02:00
Laurent Destailleur
475abbe24b Merge pull request #13944 from atm-maxime/fix_board_expensereport
Fix board expensereport and holiday
2020-05-23 14:20:28 +02:00
Laurent Destailleur
afacfa702d Merge pull request #13943 from atm-maxime/fix_pgsql_if
Fix SQL IF for PGSQL
2020-05-23 13:41:18 +02:00
Maxime Kohlhaas
fb0f31c142 Fix board filters for expense report and holiday 2020-05-22 00:33:30 +02:00
Maxime Kohlhaas
6434f255c3 Fix load_state_board doesn't take parameters 2020-05-22 00:32:55 +02:00
Maxime Kohlhaas
f89195e39f Fix SQL IF for PGSQL 2020-05-21 23:23:59 +02:00
Laurent Destailleur
9e3e8df60f Fix phpcs 2020-05-20 23:56:06 +02:00
Laurent Destailleur
650bddde0d Fix phpcs 2020-05-20 23:25:10 +02:00
Laurent Destailleur
6f52c62f2a Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/install/mysql/migration/repair.sql
	htdocs/langs/en_US/bills.lang
2020-05-20 19:53:28 +02:00
Laurent Destailleur
434341316b suggest some fix to debug situation invoices 2020-05-20 19:51:04 +02:00
altairis
55def0248c fix missing rollbacks 2020-05-20 14:37:35 +02:00
Laurent Destailleur
18ec65b4af Fix: action on an ID must not include test on entity. 2020-05-19 22:06:17 +02:00
atm-lena
bf9756b8c4 Add Hook "Massstockmove" 2020-05-19 16:05:13 +02:00
atm-lena
e042807b32 Add $this to parameters 2020-05-19 15:58:16 +02:00
gauthier
f3582d891a FIX : We must only rename current bank receipt 2020-05-19 15:35:37 +02:00
atm-lena
3f28c9a461 Add parameters to hook 2020-05-19 15:31:37 +02:00
atm-lena
987fb806c6 Exclude array param 2020-05-19 15:24:53 +02:00
atm-lena
f518bafda9 11.0 - Add Hook "SelectWarehouses" 2020-05-19 15:17:06 +02:00
atm-quentin
e39774a508 add more hook param 2020-05-19 10:05:26 +02:00
atm-quentin
f073b7023a FIX missing GetNomURL Hook in warehouse class 2020-05-19 09:52:33 +02:00
Laurent Destailleur
82a8c42441 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-05-18 15:54:47 +02:00
Laurent Destailleur
9336828710 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/comm/action/class/actioncomm.class.php
	htdocs/compta/paiement/card.php
	htdocs/expedition/class/expedition.class.php
2020-05-18 15:54:39 +02:00
Laurent Destailleur
6d62e92e12 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-05-18 15:50:42 +02:00
Laurent Destailleur
45345440a4 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0
Conflicts:
	htdocs/expedition/class/expedition.class.php
	scripts/cron/cron_run_jobs.php
2020-05-18 15:50:36 +02:00
Laurent Destailleur
e29f4083e5 Merge pull request #13904 from atm-maxime/fix_merge_contactrole
Fix third merge issue with contact roles
2020-05-18 15:11:10 +02:00
Laurent Destailleur
40565cdf06 Merge pull request #13907 from ptibogxiv/patch-341
FIX php error if multicompany disabled
2020-05-18 15:07:55 +02:00
Laurent Destailleur
ca14f9a0fa Merge pull request #13901 from atm-maxime/fix_cron_globals
Fix cron globals reload, missing mysoc and langs
2020-05-18 15:02:00 +02:00
Laurent Destailleur
18a19dafe5 Update cron_run_jobs.php 2020-05-18 15:01:29 +02:00
Laurent Destailleur
3d385dd378 Merge pull request #13903 from atm-maxime/fix_actioncomm_fetch_entity
Fix : entity was missing in actioncomm fetch
2020-05-18 14:59:10 +02:00
Laurent Destailleur
2d1f151fb2 Merge pull request #13905 from atm-maxime/fix_expedition_fetch_entity
Fix : entity was missing in expedition fetch
2020-05-18 14:58:57 +02:00
ptibogxiv
a9d1519f96 FIX php error if multicompany disabled 2020-05-18 14:52:33 +02:00
Maxime Kohlhaas
3d9d5d0ad5 Fix : entity was missing in expedition fetch 2020-05-18 11:03:32 +02:00
Maxime Kohlhaas
baa502a224 Fix third merge issue with contact roles 2020-05-18 10:54:25 +02:00
Maxime Kohlhaas
cf96383bf9 Fix : entity was missing in actioncomm fetch 2020-05-18 10:44:55 +02:00
Maxime Kohlhaas
54af917afb Fix cron globals reload, missing mysoc and langs 2020-05-16 20:13:47 +02:00
Laurent Destailleur
8b79b7f074 Update changelog 2020-05-15 20:00:59 +02:00
Laurent Destailleur
762ca96203 FIX #13841 2020-05-15 18:28:15 +02:00
Laurent Destailleur
ddf3f8b244 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-05-15 14:09:36 +02:00
Laurent Destailleur
d430b2896e Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-05-15 14:09:26 +02:00
Laurent Destailleur
987d3cf52e Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-05-15 14:04:58 +02:00
Laurent Destailleur
c7b1a43529 Merge pull request #13893 from ptibogxiv/patch-340
Fix datapolicycron
2020-05-15 14:04:16 +02:00
Laurent Destailleur
e327d609d7 Merge pull request #13891 from aspangaro/9.0p1
FIX Site ec.europa.eu has moved to https://
2020-05-15 14:01:28 +02:00
stickler-ci
e691045c3d Fixing style errors. 2020-05-14 23:20:39 +00:00
ptibogxiv
cb98ec4d23 Fix datapolicycron 2020-05-15 01:18:53 +02:00
Alexandre SPANGARO
3811586cd0 FIX Site ec.europa.eu has moved to https:// 2020-05-14 20:34:48 +02:00
Laurent Destailleur
92b245ae93 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/compta/facture/card.php
2020-05-14 16:34:24 +02:00
Laurent Destailleur
2b8da85eea Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-05-14 16:20:15 +02:00
Laurent Destailleur
49cfc1afd8 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0
Conflicts:
	htdocs/install/upgrade2.php
2020-05-14 16:20:04 +02:00
Laurent Destailleur
f5b9151f17 Merge pull request #13871 from FHenry/11.0
fix template email on propal list
2020-05-14 16:10:33 +02:00
Laurent Destailleur
136d002639 Merge pull request #13872 from simnandez/11.0
FIX: Do not show stats panel if the user does not have permissions
2020-05-14 16:09:37 +02:00
Laurent Destailleur
aae1b9f7fe Merge pull request #13873 from ptibogxiv/patch-337
Fix mailing entity
2020-05-14 16:00:04 +02:00
Laurent Destailleur
b8265d3604 Merge pull request #13878 from atm-gauthier/10.0_fix_wrong_param
FIX : wrong url param
2020-05-14 15:59:37 +02:00
Laurent Destailleur
30c167c6f4 Merge pull request #13885 from atm-maxime/fix_top_menu_search
Fix top menu search method must be GET
2020-05-14 15:58:32 +02:00
Laurent Destailleur
cf039b26f9 Merge pull request #13887 from atm-florianm/FIX_9.0_fatal_during_migration_from_dolibarr_3.1_if_php7
FIX 9.0 - fatal during migration from 3.1 using PHP 7
2020-05-14 15:49:08 +02:00
Laurent Destailleur
928ed6eecc Merge pull request #13889 from atm-john/11.0_fix_multicompany_shared_filter
Fix multicompany supplier product price filter
2020-05-14 15:44:45 +02:00
ATM john
9f6a5d4cc9 Fix multicompany supplier product price filter 2020-05-14 10:50:20 +02:00
Florian Mortgat
bd3504c473 FIX 9.0 - delete unused mandatory argument from migrate_clean_association: argument count mismatch causes a fatal error since php7 2020-05-13 10:26:44 +02:00
Maxime Kohlhaas
48183b396a Fix top menu search method must be GET 2020-05-13 08:54:42 +02:00
gauthier
fc2f2c6da7 FIX : wrong url param 2020-05-12 17:41:21 +02:00
Laurent Destailleur
0544434482 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-05-12 15:26:11 +02:00
Laurent Destailleur
b6afd86354 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-05-12 15:25:59 +02:00
Laurent Destailleur
4cf99585f8 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-05-12 15:24:15 +02:00
ptibogxiv
e1db0ef855 Update index.php 2020-05-12 10:57:51 +02:00
Juanjo Menent
66beb7c14f FIX: Do not show stats panel if the user does not have permissions 2020-05-12 10:17:47 +02:00
florian HENRY
33b663091e Merge branch '11.0' of github.com:Dolibarr/dolibarr into 11.0 2020-05-12 08:38:13 +02:00
florian HENRY
d9e26b8569 fix template email on prpal list 2020-05-12 08:38:03 +02:00
Laurent Destailleur
e9b387a4e9 Merge pull request #13868 from ATM-Consulting/Fix_Ticket_public_extrafieldsVisibility_3
fix visibility of extrafields in public interface
2020-05-12 03:01:12 +02:00
Laurent Destailleur
4a9c85ae39 Merge pull request #13869 from frederic34/patch-6
Fix dolistore search with csrf active
2020-05-12 02:59:06 +02:00
Frédéric FRANCE
4d50ba5e37 Fix dolistore search with csrf active 2020-05-11 20:42:47 +02:00
atm-greg
64d2f906bc fix visibility of extrafields in public interface 2020-05-11 16:35:58 +02:00
Laurent Destailleur
a2f311d25a Merge pull request #13845 from atm-maxime/fix_missing_hook_params
Fix missing hook params for printFieldListValue
2020-05-08 19:48:08 +02:00
Laurent Destailleur
6d1eb9277b Merge pull request #13844 from hregis/11.0_bug
FIX missing file manifest.json.php
2020-05-08 19:47:33 +02:00
Maxime Kohlhaas
1a9afe6b20 Fix missing hook params for printFieldListValue 2020-05-08 01:40:25 +02:00
Regis Houssin
d9a0edcf2b FIX missing file manifest.json.php 2020-05-08 00:01:56 +02:00
Laurent Destailleur
0cd05887ce FIX count of open day when date and start are not open should be 0 2020-05-07 17:21:27 +02:00
Laurent Destailleur
d6887f3ca4 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/compta/prelevement/bons.php
	htdocs/compta/prelevement/list.php
	htdocs/core/class/notify.class.php
2020-05-07 11:59:13 +02:00
Laurent Destailleur
695771726f Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-05-07 11:39:45 +02:00
Laurent Destailleur
d4400cf80f FIX links into emails of notifications 2020-05-07 11:39:32 +02:00
Laurent Destailleur
387c2209d7 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-05-06 16:17:45 +02:00
Laurent Destailleur
b3a064d309 Fix dup 2020-05-06 16:02:34 +02:00
Laurent Destailleur
860b6e7557 Merge pull request #13812 from mapiolca/patch-45
Fix issue in status name
2020-05-06 02:23:15 +02:00
Laurent Destailleur
d9cef1c8d7 Fix packager to publish on new web site 2020-05-06 01:49:19 +02:00
Laurent Destailleur
fa305fdaca Prepare version 11.0.4 2020-05-05 21:49:46 +02:00
Laurent Destailleur
36a0780f14 More complete fix for #13817 2020-05-05 15:20:40 +02:00
Laurent Destailleur
3f9731a3a0 Merge pull request #13817 from atm-lena/11.0_FIX_UserRights_MenuCommercial
FIX wrong user right's name to top menu "commercial"
2020-05-05 15:16:15 +02:00
Laurent Destailleur
d7d48936d2 Merge pull request #13816 from atm-gauthier/10.0_missinghookinit_and_tablefix
FIX : missing hook init + table class + $page not set
2020-05-05 15:15:42 +02:00
atm-lena
78a427c996 FIX wrong user right's name to top menu "commercial" 2020-05-05 14:35:03 +02:00
gauthier
c14b6884e3 FIX : missing hook init + table class + $page not set 2020-05-05 10:03:19 +02:00
Pierre Ardoin
c0b9fef229 Fix issue in status name
Before : $commandestatic->LibStatut($obj->nb) shows bad value because bad param

Now : $commandestatic->LibStatut($obj->fk_statut) shows good value.
2020-05-05 08:40:30 +02:00
Laurent Destailleur
d2d9ce3576 Merge pull request #13794 from atm-maxime/fix_addline_titles
Fix addline titles
2020-05-04 22:08:34 +02:00
Laurent Destailleur
2afd38e2f6 FIX Combo list of available users to filter on the list of leaves. 2020-05-04 21:59:31 +02:00
Laurent Destailleur
6d894b7abd Fix missing link in message 2020-05-04 19:08:31 +02:00
Maxime Kohlhaas
e0ebe85c13 Fix addline titles 2020-05-03 09:15:12 +02:00
Laurent Destailleur
160009630f Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/admin/tools/dolibarr_export.php
2020-05-01 21:57:28 +02:00
Laurent Destailleur
aab9a2ff75 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-05-01 21:03:38 +02:00
Laurent Destailleur
b41b22996f Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0
Conflicts:
	htdocs/core/class/utils.class.php
	htdocs/core/lib/files.lib.php
2020-05-01 21:03:16 +02:00
Laurent Destailleur
385f998254 Fix restore param --quick 2020-05-01 21:01:40 +02:00
Laurent Destailleur
8ed100ca87 Merge pull request #13776 from ATM-Consulting/9.0_backport_FIX_document_export
FIX Several pb in export of documents
2020-05-01 20:48:15 +02:00
Laurent Destailleur
1c7873b4f4 FIX Sanitizing menu parameter 2020-05-01 15:53:56 +02:00
Laurent Destailleur
4c27ae6530 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/compta/facture/card.php
2020-04-30 18:47:18 +02:00
Laurent Destailleur
b1495e12ce FIX A variable was erased by a temporary variable 2020-04-30 18:45:00 +02:00
Laurent Destailleur
82ace4b4ef FIX Several pb in export of documents
FIX Must escape shell
FIX Must exclude logs and some dirs for compressed backup
FIX gzip and bzip2 must use option -f
2020-04-30 11:52:30 +02:00
Laurent Destailleur
908e5d7f0a Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/api/class/api_setup.class.php
2020-04-29 18:05:01 +02:00
Laurent Destailleur
84bca036c9 FIX Link missing into email of some notification 2020-04-29 18:03:28 +02:00
Laurent Destailleur
a0c013d87b Fix missing link
Conflicts:
	htdocs/core/class/notify.class.php
2020-04-28 19:18:31 +02:00
Laurent Destailleur
c22e13b138 FIX Avoid infinite loop when a fetch is inside a compute field. 2020-04-28 14:27:51 +02:00
Laurent Destailleur
a8740352af FIX Extrafields of type price must be '' and not '0' if not defined 2020-04-28 14:27:42 +02:00
Laurent Destailleur
91523b4b64 FIX Can switch from double to price type for extrafields
Conflicts:
	htdocs/core/tpl/admin_extrafields_edit.tpl.php
2020-04-28 14:27:22 +02:00
Laurent Destailleur
fe6fb12d18 Fix missing link 2020-04-27 17:13:23 +02:00
Laurent Destailleur
635b9bb0fe FIX #13641 2020-04-27 15:27:03 +02:00
Laurent Destailleur
ed045b2673 FIX #13749 2020-04-27 15:04:31 +02:00
Laurent Destailleur
17a4447ccb Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-04-27 14:02:28 +02:00
Laurent Destailleur
ed63287797 Fix font 2020-04-27 14:02:18 +02:00
Laurent Destailleur
10ab97944a Merge pull request #13752 from fmarcet/10.0
FIX: Wrong Sql on getListOfTowns api method
2020-04-27 11:42:19 +02:00
Laurent Destailleur
84353087b2 Merge pull request #13754 from atm-gauthier/11.0_fix_elementtype_2
FIX : Another "Access to undeclared static property: Contact::$table_…
2020-04-27 11:42:02 +02:00
gauthier
7f56c4a785 FIX : Another "Access to undeclared static property: Contact::$table_element" && "Societe::$table_element" 2020-04-27 11:18:53 +02:00
Ferran Marcet
b90a6024f5 FIX: Wrong Sql on getListOfTowns api method 2020-04-27 10:15:47 +02:00
Laurent Destailleur
6c3e5b19b4 Merge pull request #13745 from simicar29/11.0-erfetchlines
Properly assign ->id in expensereport fetch_lines
2020-04-25 18:18:01 +02:00
Marc Guenneugues
a040cd0305 Properly assign ->id in expensereport fetch_lines 2020-04-25 15:19:47 +02:00
Laurent Destailleur
fc1a1c6afe Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-04-24 19:56:29 +02:00
Laurent Destailleur
d11dcc35c3 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/core/class/commonobject.class.php
2020-04-24 19:56:19 +02:00
Laurent Destailleur
6798e9e6f5 Fix remove warning missing the seller in update_price 2020-04-24 19:52:54 +02:00
Laurent Destailleur
df10b86d1f FIX consistency of price w/wo vat wrong when price entered with tax 2020-04-24 19:52:34 +02:00
Laurent Destailleur
48245cf134 Merge pull request #13735 from atm-gauthier/11.0_fix_elementtype
FIX : Access to undeclared static property: Contact::$table_element
2020-04-24 19:02:11 +02:00
Laurent Destailleur
f6e2399f3c Merge pull request #13736 from atm-florian/11.0
fix: remove php warning
2020-04-24 19:01:24 +02:00
Laurent Destailleur
4564a5cffd Update accounting-files.php 2020-04-24 19:01:08 +02:00
florian HENRY
a685026756 fix: remove php warning 2020-04-24 17:22:35 +02:00
Laurent Destailleur
b77892451f Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-04-24 16:21:58 +02:00
Laurent Destailleur
21665cdc85 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/compta/facture/class/facture.class.php
2020-04-24 16:21:51 +02:00
Laurent Destailleur
df91780552 FIX Situation invoice take into account the credit notes. 2020-04-24 15:57:08 +02:00
gauthier
e98671e404 FIX : Access to undeclared static property: Contact::$table_element 2020-04-24 15:22:38 +02:00
Laurent Destailleur
42ee9845ad Report error 2020-04-24 15:21:02 +02:00
Laurent Destailleur
9764af7e9c Merge pull request #13731 from simicar29/11.0-reception
Clean line extrafields when deleting reception
2020-04-24 15:16:51 +02:00
Laurent Destailleur
eda3643639 Merge pull request #13730 from simicar29/11.0-expedition
Clean line extrafields when deleting expedition
2020-04-24 15:16:41 +02:00
Laurent Destailleur
c96937d101 Merge pull request #13729 from simicar29/11.0-contrat
Clean line extrafields when deleting contrat
2020-04-24 15:16:29 +02:00
Laurent Destailleur
f4df3d01b2 Merge pull request #13733 from frederic34/patch-1
fix countable php7 warning
2020-04-24 14:51:45 +02:00
Frédéric FRANCE
1aafd4667b fix countable php7 warning 2020-04-24 11:57:23 +02:00
stickler-ci
ababad540a Fixing style errors. 2020-04-23 17:29:52 +00:00
Laurent Destailleur
a90398af06 Merge pull request #13726 from simicar29/11.0-supplierproposal
Clean line extrafields when deleting supplier proposal
2020-04-23 19:27:39 +02:00
Laurent Destailleur
2fcb2ff19f Merge pull request #13727 from simicar29/11.0-fichinter
Clean line extrafields when deleting fichinter
2020-04-23 19:27:22 +02:00
Marc Guenneugues
b4fbb86548 Clean line extrafields when deleting reception 2020-04-23 19:22:25 +02:00
Marc Guenneugues
3ea8d1895b Clean line extrafields when deleting expedition 2020-04-23 19:09:05 +02:00
stickler-ci
b8a4c0d83b Fixing style errors. 2020-04-23 17:02:57 +00:00
Marc Guenneugues
a70be95760 Clean line extrafields when deleting contrat 2020-04-23 19:00:47 +02:00
Laurent Destailleur
7f0e019c78 Merge pull request #13725 from simicar29/11.0-supplierorder
Clean line extrafields when deleting supplier order
2020-04-23 18:56:09 +02:00
stickler-ci
93735bf9cd Fixing style errors. 2020-04-23 16:55:36 +00:00
Marc Guenneugues
285f215acf Clean line extrafields when deleting fichinter 2020-04-23 18:52:45 +02:00
Laurent Destailleur
388e98fdf0 Merge pull request #13724 from simicar29/11.0-supplierinvoice
Clean line extrafields when deleting supplier invoice
2020-04-23 18:35:34 +02:00
Marc Guenneugues
ab5c2b1fd5 Clean line extrafields when deleting supplier proposal 2020-04-23 18:33:58 +02:00
Laurent Destailleur
922efaf49b Merge pull request #13714 from simnandez/11.0
FIX: Error update SQL into stock reception
2020-04-23 18:31:11 +02:00
Laurent Destailleur
02c5530e1f Update mouvementstock.class.php 2020-04-23 18:31:01 +02:00
stickler-ci
4b58213e5b Fixing style errors. 2020-04-23 16:29:36 +00:00
Marc Guenneugues
64d877bc7b Clean line extrafields when deleting supplier order 2020-04-23 18:27:06 +02:00
Laurent Destailleur
00e9ed1452 Merge pull request #13716 from atm-florian/11.0
fix: remove debug pring
2020-04-23 18:22:18 +02:00
stickler-ci
b5f48fb815 Fixing style errors. 2020-04-23 16:17:37 +00:00
Marc Guenneugues
039fe92209 Clean line extrafields when deleting supplier invoice 2020-04-23 18:14:56 +02:00
Laurent Destailleur
5edd8b1206 Merge pull request #13722 from simicar29/11.0-commande
Clean line extrafields when deleting order
2020-04-23 18:13:34 +02:00
Laurent Destailleur
c8a93437ff Merge pull request #13721 from simicar29/11.0
Clean line extrafields when deleting invoice
2020-04-23 18:12:28 +02:00
Laurent Destailleur
67d6b6b3db Merge pull request #13723 from simicar29/11.0-propal
Clean line extrafields when deleting proposal
2020-04-23 18:11:26 +02:00
Marc Guenneugues
94be1870ec Clean line extrafields when deleting proposal 2020-04-23 18:02:53 +02:00
Laurent Destailleur
1101c4e587 Fix trans 2020-04-23 18:01:04 +02:00
Laurent Destailleur
f7d4d78008 Fix error 500 2020-04-23 17:55:55 +02:00
Marc Guenneugues
be46b2062e Clean line extrafields when deleting order 2020-04-23 17:51:06 +02:00
Laurent Destailleur
293c5a5626 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/accountancy/journal/bankjournal.php
2020-04-23 17:12:06 +02:00
Laurent Destailleur
cd1368cb71 Fix dispatch in ledger for various payment done in same account when
there is 2 different transaction in 2 different account (backport v12)
2020-04-23 17:10:40 +02:00
stickler-ci
2633e90890 Fixing style errors. 2020-04-23 15:03:14 +00:00
simicar29
e2dcc8f773 Merge pull request #9 from simicar29/simicar29-patch-10
Clean line extrafields when deleting recurring invoice
2020-04-23 17:02:19 +02:00
simicar29
ce94788dd9 Clean line extrafields when deleting recurring invoice
Delete extrafields recurring invoice lines when deleting parent object
Delete extrafields when deleting a recurring invoice line
2020-04-23 17:01:40 +02:00
stickler-ci
aebc04d30a Fixing style errors. 2020-04-23 14:33:11 +00:00
simicar29
21697eeda3 Merge pull request #8 from simicar29/simicar29-patch-9
Clean line extrafields when deleting invoice
2020-04-23 16:29:59 +02:00
simicar29
b68e85703f Clean line extrafields when deleting invoice
Delete extrafields invoice lines when deleting parent object (sql syntax ok for mariadb & pgsql)
Delete extrafields when deleting an invoice line
2020-04-23 16:29:22 +02:00
Laurent Destailleur
6819255b76 FIX #13650 2020-04-23 13:49:18 +02:00
florian HENRY
7972174787 remove debug pring 2020-04-23 13:44:23 +02:00
Laurent Destailleur
436362502c CSS 2020-04-23 13:41:51 +02:00
Laurent Destailleur
3a9add0e70 FIX #13663 2020-04-23 13:37:43 +02:00
Laurent Destailleur
e1129babbc Code comment 2020-04-23 12:44:30 +02:00
Laurent Destailleur
93278b2dca FIX #13713 2020-04-23 12:42:03 +02:00
Juanjo Menent
0999f5e6f2 FIX: Error update SQL into stock reception 2020-04-23 12:12:50 +02:00
Laurent Destailleur
de90f24bd4 Fix phpcs 2020-04-22 21:29:15 +02:00
Laurent Destailleur
6b8ff56c20 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/core/class/html.formother.class.php
2020-04-22 18:26:26 +02:00
Laurent Destailleur
80271cc852 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-04-22 18:24:00 +02:00
Laurent Destailleur
7bc8a70b0a FIX #13670 2020-04-22 18:23:48 +02:00
Laurent Destailleur
ab586b8f42 Merge pull request #13696 from atm-gauthier/10.0_fix_export_model_list_display_order
FIX : model export list must be sorted by label
2020-04-22 18:08:58 +02:00
gauthier
43f4c5ac96 FIX : model export list must be sorted by label 2020-04-22 15:29:54 +02:00
Laurent Destailleur
c1d0cae24d Merge pull request #13692 from hregis/11.0_bug
FIX missing fk_bank during export of suppliers invoices
2020-04-22 13:18:46 +02:00
Laurent Destailleur
910c4144e8 Merge pull request #13691 from atm-florian/11.0
fix: avoid php notice
2020-04-22 12:24:31 +02:00
Regis Houssin
f6f9ca48dd FIX missing fk_bank during export of suppliers invoices 2020-04-22 12:23:26 +02:00
florian HENRY
8be14060d6 fix: avoid php notice 2020-04-22 12:08:05 +02:00
Laurent Destailleur
11e9cc68b7 Merge pull request #13666 from frederic34/patch-1
Rename llx_c_shipment_package_type to llx_c_shipment_package_type.sql
2020-04-22 00:37:19 +02:00
Laurent Destailleur
7587e38302 Merge pull request #13685 from laurpaum/expensereport-status-pdf
FIX expensereport status in generated pdf
2020-04-22 00:36:54 +02:00
Laurent Destailleur
e8ead1d924 Update expensereport.class.php 2020-04-22 00:36:46 +02:00
Laurent Paumier
cf05796f31 FIX #13027 expensereport status in generated pdf 2020-04-21 23:01:21 +02:00
Laurent Destailleur
f670a68b04 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/admin/mails.php
2020-04-21 18:29:50 +02:00
Laurent Destailleur
0b790ef327 Sync lang files 2020-04-21 18:18:07 +02:00
Laurent Destailleur
f6735ce8f2 Update repair.sql script 2020-04-21 14:28:52 +02:00
Laurent Destailleur
536ab95207 FIX: The "test smtp connectivity" failed on page to setup mass emailing
Conflicts:
	htdocs/admin/mails.php
2020-04-21 12:50:20 +02:00
Laurent Destailleur
f8ae5d9972 Fix Do not show value if null 2020-04-21 12:00:14 +02:00
Laurent Destailleur
ff5bf040e8 FIX text version of html emailing (removed the body style) 2020-04-21 11:19:27 +02:00
Frédéric FRANCE
f09fa5226a Rename llx_c_shipment_package_type to llx_c_shipment_package_type.sql 2020-04-20 18:43:05 +02:00
Laurent Destailleur
b8e68a5ef7 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-04-20 16:06:31 +02:00
Laurent Destailleur
1e0e4d5d6d Merge pull request #13653 from atm-maxime/fix_box_birthdays
Fix birthdays boxes and filter on month
2020-04-20 16:04:52 +02:00
Laurent Destailleur
fb24fbba05 Merge pull request #13662 from atm-gauthier/10.0_fix_vcard
FIX : we must export company mail address on contact vcard only if co…
2020-04-20 16:04:17 +02:00
gauthier
b72651fdfd FIX : we must export company mail address on contact vcard only if contact email address is empty 2020-04-20 15:59:44 +02:00
stickler-ci
27aeaaecb5 Fixing style errors. 2020-04-20 14:42:13 +02:00
Adrien Jacob
91fbccb594 [BUGFIX] Allow update of extra fields
This is to make supplier invoices consistent with other similar classes
2020-04-20 14:42:08 +02:00
Frédéric FRANCE
f546103c01 make dolistore happy again 2020-04-20 14:37:52 +02:00
Maxime Kohlhaas
817e16d652 Fix birthdays boxes and filter on month 2020-04-18 20:01:18 +02:00
Laurent Destailleur
ea60d0be63 FIX #13618 2020-04-17 10:27:38 +02:00
Laurent Destailleur
3e7f0b364e FIX #13611 2020-04-17 10:22:08 +02:00
Laurent Destailleur
3c29a7b8d8 Fix phpcs 2020-04-16 16:02:06 +02:00
Laurent Destailleur
01ec8693f2 Trans 2020-04-16 15:48:05 +02:00
Laurent Destailleur
855ac5467c FIX setup of suggested payment mode on proposals and orders 2020-04-16 15:40:16 +02:00
Laurent Destailleur
26022f062f Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-04-16 15:24:23 +02:00
Laurent Destailleur
984fa0d5a0 Fix hidden const 2020-04-16 15:24:12 +02:00
Laurent Destailleur
7f746af10e Merge pull request #13620 from atm-quentin/FIX_draftordered_replenish
FIX draftordered replenish virtual stock
2020-04-16 00:58:23 +02:00
Laurent Destailleur
b540bb29e0 Merge pull request #13617 from atm-quentin/11.0_viewstatut_to_search_status
FIX viewstatut to search status
2020-04-16 00:48:12 +02:00
Laurent Destailleur
86eaa78f1e FIX Use of image into free text for PDF if DOL_DATA_DIR is outside of
DOL_DOCUMENT_DIR.
2020-04-15 20:00:27 +02:00
atm-quentin
18fdf3573f FIX draftordered replenish virtual stock 2020-04-15 16:05:50 +02:00
atm-quentin
5b96066bf4 FIX keep viewstatut for doli 3.5 2020-04-15 15:07:11 +02:00
atm-quentin
f7c07640dd viewstatut to search_status 2020-04-15 15:01:00 +02:00
Laurent Destailleur
53ceef5b6a FIX XSS Vulnerability 2020-04-15 02:32:55 +02:00
Laurent Destailleur
c3b8949e2e Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/core/lib/functions.lib.php
2020-04-14 21:57:20 +02:00
Laurent Destailleur
85bea5a7c4 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-04-14 21:54:27 +02:00
Laurent Destailleur
110787d66a Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-04-14 21:54:16 +02:00
Laurent Destailleur
d143bd8aec FIX #13589 missing price_level in import of thirdparties 2020-04-14 21:22:08 +02:00
Laurent Destailleur
f2704036cd FIX #13517 2020-04-13 16:00:41 +02:00
Laurent Destailleur
236898f4e7 FIX #13503 2020-04-13 14:55:37 +02:00
Laurent Destailleur
a72b262f5b FIx #13592
Conflicts:
	htdocs/compta/bank/line.php
2020-04-13 14:52:06 +02:00
Laurent Destailleur
f726fcdcd8 FIX #13593 2020-04-13 14:32:15 +02:00
Laurent Destailleur
1c6faf79a9 FIX #13595 2020-04-13 14:23:57 +02:00
Laurent Destailleur
384cfeccf6 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-04-12 21:38:51 +02:00
Laurent Destailleur
46ccd61009 Fix phpcs 2020-04-12 21:38:23 +02:00
Laurent Destailleur
0f71ee1e49 Merge pull request #13563 from simicar29/11.0
FIX #7594 Expense report multi pagebreak
2020-04-12 18:19:23 +02:00
Laurent Destailleur
afbfd66ee9 Merge pull request #13581 from atm-maxime/fix_expedition_warning_count
Fix warning on shipment because of count func
2020-04-12 17:21:28 +02:00
Laurent Destailleur
8e6de35d7b Merge pull request #13568 from atm-maxime/10.0
FIX #13535 : state in italian address
2020-04-12 17:03:24 +02:00
Laurent Destailleur
8e246f2a18 Prepare 11.0.4 2020-04-12 16:54:54 +02:00
Laurent Destailleur
acbbffdb7f Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-04-12 16:54:15 +02:00
Laurent Destailleur
1cda760621 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/comm/action/class/actioncomm.class.php
2020-04-12 16:54:09 +02:00
Laurent Destailleur
94ae75c2a0 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-04-12 16:53:07 +02:00
Laurent Destailleur
eebf48b27c Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0
Conflicts:
	htdocs/comm/action/class/actioncomm.class.php
2020-04-12 16:52:58 +02:00
Laurent Destailleur
2e27355dec FIX #13569 2020-04-12 16:51:35 +02:00
Laurent Destailleur
b1bae5f3dd Merge pull request #13569 from tuxgasy/Fix_breaking_selectForFormsList
Keep compatibility with old object declaration
2020-04-12 16:48:08 +02:00
Laurent Destailleur
697043bbd3 Update html.form.class.php 2020-04-12 16:47:56 +02:00
Laurent Destailleur
acab0200a6 Update html.form.class.php 2020-04-12 16:46:21 +02:00
Laurent Destailleur
e9ee7a23e6 Merge pull request #13573 from frederic34/patch-11
Update actioncomm.class.php
2020-04-12 16:42:07 +02:00
Laurent Destailleur
3cc68c6972 Merge pull request #13579 from atm-maxime/fix_variants_links
Fix #13576 : links on variants
2020-04-12 16:38:56 +02:00
Laurent Destailleur
a38e273ae8 Merge pull request #13583 from atm-maxime/fix_default_workdayhour
Fix #13468 setup working days and hours
2020-04-12 16:38:36 +02:00
Laurent Destailleur
ba2c035556 Merge pull request #13580 from atm-maxime/fix_composition_token
Fix missing token on product composition
2020-04-12 16:36:48 +02:00
Maxime Kohlhaas
20e684ec69 Fix #13468 setup working days and hours 2020-04-12 15:30:58 +02:00
Maxime Kohlhaas
3ca0d48b37 Fix warning on shipment because of count func 2020-04-12 10:45:30 +02:00
Maxime Kohlhaas
8bca68cfba Fix missing token on product composition 2020-04-12 10:39:16 +02:00
Maxime Kohlhaas
3f59ca6418 Fix #13576 : links on variants 2020-04-12 10:13:37 +02:00
Frédéric FRANCE
e2660fd31c Update actioncomm.class.php 2020-04-11 22:38:28 +02:00
TuxGasy
fecfe2e3a1 Keep compatibility with old object declaration 2020-04-11 18:37:06 +02:00
Maxime Kohlhaas
f5ab957faf FIX #13535 : state in italian address 2020-04-11 17:56:23 +02:00
simicar29
d0af49cdce Merge pull request #6 from simicar29/simicar29-patch-7
FIX #7594
2020-04-11 13:46:27 +02:00
simicar29
9573f1289a FIX #7594
This is a temptative fix of the bad "multi page break" in expense report
2020-04-11 13:42:37 +02:00
Laurent Destailleur
eb63350d55 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-04-11 01:09:36 +02:00
Laurent Destailleur
450b1761b1 Fix label 2020-04-11 01:09:26 +02:00
Laurent Destailleur
679b94dcaa Merge pull request #13553 from atm-quentin/11_fix_checkbox_supplier_order
FIX missing selectedlines on supplier order
2020-04-10 20:04:24 +02:00
Laurent Destailleur
70e71d32c7 Merge pull request #13555 from atm-gauthier/fix_cabyprodserv
FIX : some others modules (like subtotal) use other product_type than…
2020-04-10 20:03:56 +02:00
Laurent Destailleur
b693525b3e Merge pull request #13557 from philazerty/patch-9
FIX #13519 - Update list.php
2020-04-10 20:03:27 +02:00
philazerty
63d41fa356 Update list.php
Bug #13519
2020-04-10 16:48:18 +02:00
gauthier
1f471d46eb FIX : some others modules (like subtotal) use other product_type than 0 or 1 AND must not be considered in this report 2020-04-10 15:51:51 +02:00
atm-quentin
83f3c9ab6e use only 1 if 2020-04-10 12:09:18 +02:00
atm-quentin
28fa0e4e5d FIX missing selectedlines on supplier order but checkbox are displayed 2020-04-10 11:55:00 +02:00
Laurent Destailleur
3e04fe2319 Merge pull request #13548 from andreubisquerra/patch-2
FIX TakePOS buying price
2020-04-10 11:11:39 +02:00
andreubisquerra
4ac978303b FIX TakePOS buying price 2020-04-10 08:36:16 +02:00
Laurent Destailleur
92cd0372db Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/societe/class/societe.class.php
2020-04-10 02:04:26 +02:00
Laurent Destailleur
a1e714f123 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0
Conflicts:
	htdocs/societe/class/societe.class.php
2020-04-10 02:03:12 +02:00
Laurent Destailleur
c4d898e155 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/societe/class/societe.class.php
2020-04-10 02:01:31 +02:00
Laurent Destailleur
6f4ff57612 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/supplier_proposal/list.php
2020-04-10 02:00:22 +02:00
Laurent Destailleur
5a366767fb Fix phpcs 2020-04-10 01:47:50 +02:00
Laurent Destailleur
7fe8c7eab3 FIX #11855 2020-04-10 01:37:04 +02:00
Laurent Destailleur
273443550e Fix list in warehouse 2020-04-10 01:21:59 +02:00
Laurent Destailleur
f7d1ce1e09 FIX Can use decimal value in virtual products 2020-04-10 00:26:09 +02:00
Laurent Destailleur
1ed8639653 Merge pull request #13532 from atm-quentin/11_fix_buyprice_extrafield_langfile_and_tooltip
FIX buyprice extrafield langfile and tooltip
2020-04-09 19:49:32 +02:00
Laurent Destailleur
f52f59e80a Merge pull request #13540 from atm-gauthier/10.0_quote
FIX : IHM, unexpected quote
2020-04-09 19:43:39 +02:00
Laurent Destailleur
3c9ca3860b Merge pull request #13543 from atm-lena/11.0_FIX_hookmanager_typeAddReplace_completeTabsHead
FIX - Add function "completeTabsHead" to "addreplace" type hook.
2020-04-09 19:37:48 +02:00
Laurent Destailleur
56336e1d30 Merge pull request #13541 from fappels/11_stock_list_default_vis
Fix set default warehouse list columns
2020-04-09 19:35:18 +02:00
Laurent Destailleur
c83f0f7484 Merge pull request #13533 from simicar29/11.0
11.0
2020-04-09 19:34:31 +02:00
Laurent Destailleur
2ac03c2875 Merge pull request #13545 from fappels/fix_photos_on_shipment_docs
FIX print pictures on shipment docs
2020-04-09 19:30:31 +02:00
Francis Appels
0a8a8bafa0 FIX print pictures in shipment docs 2020-04-09 15:40:36 +02:00
atm-lena
c9ab61b521 FIX - Add function "completeTabsHead" to hooks "addreplace" 2020-04-09 14:54:47 +02:00
Francis Appels
caecb0152f Fix set default warehouse list columns 2020-04-09 14:46:20 +02:00
gauthier
3327f1c074 FIX : IHM, unexpected quote 2020-04-09 11:53:03 +02:00
Laurent Destailleur
b9fc642a35 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-04-08 18:32:23 +02:00
Laurent Destailleur
63f0c07a07 Add warning 2020-04-08 18:32:13 +02:00
stickler-ci
e402e35d96 Fixing style errors. 2020-04-08 14:09:04 +00:00
simicar29
89bd8ecc21 Merge pull request #5 from simicar29/simicar29-patch-6
Avoid the doubledot issue in quoted-printable mail
2020-04-08 16:05:54 +02:00
simicar29
6cb780d125 Avoid the doubledot issue in quoted-printable mail
When sending HTML mail using swiftmailer, the content will be encoded using quoted-printable. We may then encounter the "double dot" issue (doubled dot at the beginning of the line). This can be problematic with broken links to pictures for example.
This PR switches the encoding to base64.
2020-04-08 16:03:41 +02:00
stickler-ci
50b789456d Fixing style errors. 2020-04-08 14:03:16 +00:00
atm-quentin
64f6542f96 FIX buyprice extrafield langfile and tooltip 2020-04-08 15:59:10 +02:00
Laurent Destailleur
49c38042a9 Merge pull request #13504 from atm-quentin/10.0_fix_author_supplier_proposal
FIX author search supplier proposal list
2020-04-08 14:47:17 +02:00
Laurent Destailleur
3ac07ff84f Merge pull request #13507 from atm-john/11.0_Fix_warehouse_list
Fix warehouse list
2020-04-08 14:44:55 +02:00
Laurent Destailleur
0716951b6d Fix logo 2020-04-08 13:38:29 +02:00
Laurent Destailleur
9ef6204f7e Fix description of reports (use date of invoice not validation date) 2020-04-08 11:40:38 +02:00
Laurent Destailleur
df81065f73 MAIN_VIEW_LINE_NUMBER_IN_LIST 2020-04-08 11:23:31 +02:00
Laurent Destailleur
2ec60c9d55 Merge pull request #13508 from hregis/8.0_mc3
FIX missing member entity
2020-04-07 21:14:06 +02:00
Regis Houssin
34e434a17e FIX missing member entity 2020-04-06 16:36:11 +02:00
ATM john
88297d5682 fix key 2020-04-06 13:20:42 +02:00
ATM john
721371a08c Fix warehouse list 2020-04-06 13:08:03 +02:00
atm-quentin
9950295e41 FIX author search supplier proposal list 2020-04-06 10:29:04 +02:00
Laurent Destailleur
ed4aa55857 Doxygen 2020-04-05 15:46:10 +02:00
Laurent Destailleur
47987f239d Fix trans 2020-04-05 15:42:39 +02:00
Laurent Destailleur
009cc36355 Fix sendocntext for builk action 2020-04-05 15:39:53 +02:00
Laurent Destailleur
e32ac7644d FIX Send email from bulk action of list of thirdparties 2020-04-05 15:31:18 +02:00
Laurent Destailleur
62387f712c FIX Send email from bulk action of list of thirdparties 2020-04-05 15:26:16 +02:00
Laurent Destailleur
9bbedce3d6 Fix phpcs 2020-04-05 12:23:58 +02:00
Laurent Destailleur
bfbc9b303a Fix phpcs 2020-04-05 12:23:16 +02:00
Laurent Destailleur
e838000795 responsive 2020-04-05 12:11:58 +02:00
Laurent Destailleur
5b8c50cb72 css 2020-04-05 12:07:00 +02:00
Laurent Destailleur
5ca9c71449 css 2020-04-05 12:05:27 +02:00
Laurent Destailleur
98dfc7ca71 Fix css 2020-04-05 12:01:05 +02:00
Laurent Destailleur
13b47774e2 FIX #13424 2020-04-05 11:55:43 +02:00
Laurent Destailleur
50790a7f36 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/categories/class/categorie.class.php
	htdocs/filefunc.inc.php
2020-04-05 03:44:06 +02:00
Laurent Destailleur
eac75497c0 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-04-05 03:42:12 +02:00
Laurent Destailleur
d0c4af5855 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-04-05 03:42:05 +02:00
Laurent Destailleur
8a14652eae Merge pull request #13449 from atm-quentin/FIX_missing_default_accountancy_product_buy_code
FIX missing default accountancy product buy code
2020-04-05 03:41:46 +02:00
Laurent Destailleur
165df931f1 Complete fix #13491 2020-04-05 03:14:12 +02:00
Laurent Destailleur
22a8c207f4 Merge pull request #13491 from atm-lena/11.0_FIX_Ticket_ExtrafieldsVisibility_4
FIX 11.0 Ticket - Visibility 4, don't display extrafields at the creation
2020-04-05 02:54:41 +02:00
Laurent Destailleur
2f1b25c67a Fix property not defined 2020-04-05 02:43:30 +02:00
Laurent Destailleur
683ddac0d4 Merge pull request #13493 from ptibogxiv/patch-320
FIX child categories only with good entity rights
2020-04-05 02:40:43 +02:00
Laurent Destailleur
a41f54c82f Fix css 2020-04-05 02:39:40 +02:00
Laurent Destailleur
ed0f6b56b9 FIX: The "test smtp connectivity" failed on page to setup mass emailing 2020-04-05 00:29:34 +02:00
ptibogxiv
c7cdb64087 FIX child categories only with good entity rights
fix v9 to develop
display only categories with good entity rights ( intradolibarr or via REST API)
2020-04-04 11:07:48 +02:00
Laurent Destailleur
d46417c8bd FIX #13482 2020-04-03 17:53:17 +02:00
Laurent Destailleur
372d719693 #13482 2020-04-03 15:48:54 +02:00
Laurent Destailleur
e9bddf5c26 Fix enable/disable of module 2020-04-03 15:36:41 +02:00
Laurent Destailleur
d7e4e5f18c Fix modulebuilder clone message 2020-04-03 15:14:59 +02:00
Laurent Destailleur
a13287e285 Fix: validate of object is ok even if some fields are missing 2020-04-03 14:56:15 +02:00
atm-lena
bc0d98b91c FIX 11.0 Ticket Module - Visibility 4, don't display extrafields at the creation 2020-04-03 14:24:59 +02:00
Laurent Destailleur
f7b6895dc6 Fix option to not generate doc in modulebuilder. 2020-04-03 14:02:37 +02:00
Laurent Destailleur
71910b2181 Fix warning 2020-04-03 13:01:17 +02:00
Laurent Destailleur
193a10bc39 FIX cloning of emailing when no content selected 2020-04-03 02:29:10 +02:00
Laurent Destailleur
4c8a04cf38 Fix phpcs 2020-04-02 21:17:04 +02:00
Laurent Destailleur
644d83d799 Rename field to avoid confusion 2020-04-02 19:42:08 +02:00
Laurent Destailleur
733814a8a0 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-04-02 18:51:36 +02:00
Laurent Destailleur
7cee643c05 Prepare 10.0.8 2020-04-02 18:51:25 +02:00
Laurent Destailleur
19084286be Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	ChangeLog
	htdocs/fourn/class/fournisseur.product.class.php
2020-04-02 16:49:37 +02:00
Laurent Destailleur
7da01c3013 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-04-02 16:00:20 +02:00
Laurent Destailleur
3408f67348 Clean orhpelins in llx_product_association 2020-04-02 16:00:09 +02:00
Laurent Destailleur
d204cfe6c6 FIX Protection when database has a corrupted product id 2020-04-02 15:54:33 +02:00
Laurent Destailleur
3c75c29e6b Merge pull request #13463 from atm-quentin/FIX_buyprice_filter_was_only_qty
FIX : Buyprice was updated only if min price for this qty had same qty
2020-04-02 13:08:40 +02:00
Laurent Destailleur
7ad67ff91d Merge pull request #13462 from atm-florian/11.0
fix advtargetemailing : fatal call to static attribut (table_element is not a static attribut)
2020-04-02 13:05:12 +02:00
Laurent Destailleur
3b6db77cb3 Merge pull request #13460 from atm-quentin/FIX_multicurrency_SUPPLIER_PROPOSAL_UPDATE_PRICE_ON_SUPPlIER_PROPOSAL
FIX multicurrency manage on hidden conf SUPPLIER_PROPOSAL_UPDATE_PRIC…
2020-04-02 13:04:00 +02:00
Laurent Destailleur
c6f57c46a8 Update supplier_proposal.class.php 2020-04-02 13:01:49 +02:00
Laurent Destailleur
a923ef5a6d Merge pull request #13456 from atm-gauthier/9.0_fix_migrate_picture_path_script
FIX : picture migration script from doli 9.0
2020-04-02 12:50:23 +02:00
Laurent Destailleur
00a12b9fc8 Merge pull request #13475 from thepocagency/11.0_fix_extrafield_lines_in_template
Copy extrafields of lines from a draft invoice to an invoice template
2020-04-02 12:47:34 +02:00
jribal
7380fa32ec On _checkAccessToResource: category -> categorie 2020-04-02 12:44:50 +02:00
Laurent Destailleur
a7656793da Merge pull request #13479 from altatof/md
FIX md stylesheet to be included by external modules like eldy
2020-04-02 12:40:10 +02:00
Laurent Destailleur
5135474232 Merge pull request #13477 from atm-florianm/FIX_error_log_wrong_method_name_logged_for_insert
Fix insert error logged as a delete error
2020-04-02 12:38:51 +02:00
Laurent Destailleur
5622c1947b Prepare 10.0.7 2020-04-02 12:23:53 +02:00
altairis
a743110f03 FIX md stylesheet to be included by external modules like eldy 2020-04-02 10:44:24 +02:00
Florian Mortgat
4d2b4583d0 FIX - This error logs an Orderline::delete error, but this is an Orderline::insert error 2020-04-02 09:28:56 +02:00
stickler-ci
9476fbc3e7 Fixing style errors. 2020-04-01 23:16:13 +00:00
Alex Veremme
7330c31204 Fix ##13474: copy extrafields of LINES from a draft invoice to an
invoice template
2020-04-02 01:10:56 +02:00
Laurent Destailleur
70706d9ea7 FIX Missing token and take into account max date when it can. 2020-04-01 18:48:45 +02:00
Laurent Destailleur
6f0071bebe FIX sort on company on member list 2020-03-31 17:54:48 +02:00
stickler-ci
1f5da36fdb Fixing style errors. 2020-03-31 13:02:44 +00:00
atm-quentin
e3dfe60567 uniformize update buyprice + some fixes 2020-03-31 14:53:15 +02:00
florian HENRY
5658d783d6 fix advtargetemailing : fatal call to static attribut (that is not static: table_element) 2020-03-31 12:04:34 +02:00
atm-quentin
73f6c9210f FIX multicurrency manage on hidden conf SUPPLIER_PROPOSAL_UPDATE_PRICE_ON_SUPPlIER_PROPOSAL 2020-03-31 11:03:08 +02:00
gauthier
04564e83ea FIX : picture migration script from doli 9.0 2020-03-31 10:31:18 +02:00
Laurent Destailleur
3860f24908 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/product/class/product.class.php
2020-03-30 19:56:31 +02:00
Laurent Destailleur
d0c179e1e9 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-03-30 19:54:32 +02:00
Laurent Destailleur
878c4fb106 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2020-03-30 19:53:40 +02:00
Laurent Destailleur
fbce8fcfe3 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/product/class/product.class.php
2020-03-30 19:53:31 +02:00
Laurent Destailleur
125e964352 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0
Conflicts:
	htdocs/product/class/product.class.php
2020-03-30 19:50:47 +02:00
Laurent Destailleur
b081cf5cba Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/product/class/product.class.php
2020-03-30 19:48:41 +02:00
Laurent Destailleur
3ea9c297ea Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2020-03-30 19:46:23 +02:00
Laurent Destailleur
474260e526 Merge pull request #13447 from c3do/patch-1
Fix can set desiredstock to (int) 0 from API Rest
2020-03-30 19:46:02 +02:00
Laurent Destailleur
6ecacb9c29 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-03-30 19:38:07 +02:00
Laurent Destailleur
07d64f47e3 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-03-30 19:37:29 +02:00
Laurent Destailleur
7466eaade3 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-03-30 19:37:01 +02:00
Laurent Destailleur
9fcbec9f02 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-03-30 19:36:07 +02:00
Laurent Destailleur
06ad21f2e8 Merge pull request #13442 from fappels/9.0_newToken
Improve modulebuilder compatiblity with maintained versions.
2020-03-30 19:35:45 +02:00
Laurent Destailleur
ff44e2d2ac Merge pull request #13448 from atm-quentin/FIX_missing_array_option_supplier_proposal_to_supplier_order
FIX missing array option
2020-03-30 19:35:20 +02:00
Laurent Destailleur
7c9583011a Merge pull request #13441 from hgy29/patch-1
FIX: extra date field incorrect check
2020-03-30 19:30:25 +02:00
Laurent Destailleur
1c7ce31207 Merge pull request #13435 from ptibogxiv/patch-316
FIX product get purchase prices
2020-03-30 19:20:32 +02:00
Laurent Destailleur
81b41c932f Merge pull request #13432 from atm-quentin/FIX_reapro_11
FIX replenish stock to buy
2020-03-30 19:11:34 +02:00
atm-quentin
9a92545d8d FIX missing default accountancy product buy code 2020-03-30 14:28:22 +02:00
atm-quentin
64207ef58d FIX missing array option 2020-03-30 14:18:59 +02:00
Cédric
eead9a93d3 Fix can set desiredstock to (int) 0 from API Rest
When you set desiredstock to 0 as an integer from the API, it registers to null in the database. Using is_numeric() fixes this.
2020-03-30 13:03:13 +02:00
Francis Appels
3eda785ca5 Add newline end of file 2020-03-30 10:36:49 +02:00
Francis Appels
076caa11ab Add token functions to improve modulebuilder compatiblity with maintained versions. 2020-03-30 10:28:20 +02:00
Nicolas Bouquet
31fca2897a FIX: extra date field incorrect check
Small typo fixed, was preventing extra date fields from being processed, leading to denial of object creation
2020-03-30 10:24:42 +02:00
Laurent Destailleur
9b2da5bdae FIX Missing token 2020-03-29 00:56:11 +01:00
ptibogxiv
cb7342d4c8 FIX product purchase prices
Fix get datas but don't fix cleandata :( @eldy
2020-03-27 20:07:18 +01:00
Laurent Destailleur
4207d94f53 FIX Bad position of total in column
Conflicts:
	htdocs/fourn/facture/paiement.php
2020-03-27 19:10:01 +01:00
Laurent Destailleur
f512e0d161 Fix popup 2020-03-27 12:06:58 +01:00
Laurent Destailleur
3a9cc532d7 FIX Use getNomURL instead of hard coded link. Fix limit. 2020-03-27 11:56:59 +01:00
Laurent Destailleur
259f23e96b Look and feel v11 2020-03-27 11:56:45 +01:00
atm-quentin
96481c3d52 FIX ordered stock already in $stock 2020-03-27 09:43:59 +01:00
Laurent Destailleur
9379f6fa9d Fix duplicate tooltip 2020-03-26 20:27:49 +01:00
Laurent Destailleur
4a012c13b2 FIX Translation of tooltips of extrafields 2020-03-26 19:47:28 +01:00
Laurent Destailleur
947ccf0892 Fix travis 2020-03-26 03:59:45 +01:00
Laurent Destailleur
30379b4cba Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0
Conflicts:
	.travis.yml
2020-03-26 03:57:02 +01:00
Laurent Destailleur
81ae6c45ea composer is a big mess 2020-03-26 03:47:58 +01:00
Laurent Destailleur
39f7742387 Update travis config 2020-03-26 03:46:39 +01:00
Laurent Destailleur
386d478b65 Add os in travis 2020-03-26 03:44:58 +01:00
Laurent Destailleur
ddf233f2ed Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0
Conflicts:
	.travis.yml
2020-03-26 03:39:46 +01:00
Laurent Destailleur
5fdf23bba8 Fix exclude fucking composer dependencies 2020-03-26 03:36:16 +01:00
Laurent Destailleur
84fc394e6f Fix exclude fucking composer dependencies 2020-03-26 03:29:29 +01:00
Laurent Destailleur
004397304e FIX Foreign currency lost when splitting a discount 2020-03-26 02:32:53 +01:00
Laurent Destailleur
d3debccabe FIX bad value in currency into discount created from down payment 2020-03-26 02:14:57 +01:00
Laurent Destailleur
88d98acbba FIX #13410
Conflicts:
	htdocs/compta/facture/card.php
2020-03-26 01:26:50 +01:00
Laurent Destailleur
a05f9fad33 FIX Look and feel v11 2020-03-26 01:25:10 +01:00
Laurent Destailleur
ab19bb2455 FIX default value of selectMasssAction broken 2020-03-26 01:25:05 +01:00
Laurent Destailleur
51f8c5ca87 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/core/class/commoninvoice.class.php
	htdocs/expensereport/list.php
	htdocs/fourn/class/fournisseur.product.class.php
	htdocs/product/fournisseurs.php
2020-03-25 19:01:56 +01:00
Laurent Destailleur
b48c21dbcb If we need more var here, we must fix to have var starting with search_ 2020-03-25 18:47:42 +01:00
Laurent Destailleur
e160ea2bee Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-03-25 18:45:55 +01:00
Laurent Destailleur
a7ba23d845 Merge pull request #13419 from atm-gauthier/9.0_search_status_on_bookmarks
FIX : when we filter a list on a view status, we want this filter to …
2020-03-25 18:44:40 +01:00
Laurent Destailleur
33fe7b5f70 Merge pull request #13416 from simnandez/11.0
FIX: Compatibility with multicompany, bad numerotation of task.
2020-03-25 18:40:13 +01:00
Laurent Destailleur
7de191b097 Merge pull request #13414 from atm-gauthier/11.0_fix_default_role_mustnot_be_sortable
FIX : sort by default role makes no sense
2020-03-25 18:32:08 +01:00
Laurent Destailleur
925554d15e More accurate result 2020-03-25 18:27:53 +01:00
Laurent Destailleur
74667c2943 Merge pull request #13422 from OPEN-DSI/v10-fix-invoice-remain-to-pay
FIX get remain to pay with rounding decimals
2020-03-25 18:26:33 +01:00
VESSILLER
c516a54f78 FIX get remain to pay with rounding decimals 2020-03-25 11:53:47 +01:00
gauthier
81af385259 FIX : when we filter a list on a view status, we want this filter to be on bookmark that we create 2020-03-25 10:27:59 +01:00
Juanjo Menent
fec3377f24 FIX: Compatibility with multicompany, bad numerotation of task. 2020-03-24 18:49:16 +01:00
gauthier
4c0de74470 FIX : sort by default role makes no sense 2020-03-24 16:27:53 +01:00
Laurent Destailleur
1657a6b50a FIX actions on supplier proposal not saved (bad trigger name)
Conflicts:
	htdocs/supplier_proposal/class/supplier_proposal.class.php
2020-03-24 15:00:13 +01:00
Laurent Destailleur
a5379c7144 FIX All forms must use newToken()
Conflicts:
	htdocs/commande/card.php
	htdocs/compta/cashcontrol/cashcontrol_card.php
	htdocs/supplier_proposal/card.php
2020-03-24 13:14:23 +01:00
Laurent Destailleur
1e955a89ef FIX #13399 after #13285 and #13183 2020-03-23 15:28:18 +01:00
Laurent Destailleur
0dbc37667c Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-03-23 15:25:42 +01:00
Laurent Destailleur
ca4b641094 FIX #13407 2020-03-23 15:24:29 +01:00
Laurent Destailleur
55dd3ae0ae Merge pull request #13403 from andreubisquerra/11.0
Fix TakePOS DirectPayment when place is higher 0
2020-03-23 15:13:35 +01:00
Laurent Destailleur
04a875f43b Merge pull request #13404 from hregis/10.0_mc2
FIX remove unused var, $usercancreate can be change by Multicompany
2020-03-23 15:13:19 +01:00
Regis Houssin
45579b0986 FIX remove unused var, $usercancreate can be change by Multicompany 2020-03-23 07:01:23 +01:00
andreubisquerra
fbe6711353 Fix TakePOS DirectPayment when place is higher 0 2020-03-22 22:46:40 +01:00
Laurent Destailleur
94b6fbb223 FIX #13300 2020-03-22 20:52:00 +01:00
Laurent Destailleur
ef86311639 Merge pull request #13224 from mapiolca/patch-38
# Fix Compatibility with NOTMODIFYOTHERENTITYFOURNPRICE const.
2020-03-22 20:32:15 +01:00
glu000
61deab41f9 Fix #13394 2020-03-22 20:17:52 +01:00
Laurent Destailleur
bcf17c79ef FIX closing tags 2020-03-22 02:44:00 +01:00
Laurent Destailleur
4ce1665a15 Fix charset in RSS export 2020-03-21 17:36:07 +01:00
Laurent Destailleur
ade07865d6 FIX Look and feel v11 2020-03-20 21:21:40 +01:00
Laurent Destailleur
3e807b00ba FIX Look and feel v11 2020-03-20 21:21:30 +01:00
Laurent Destailleur
599bf89f60 Fix can edit emailing after sending has started 2020-03-20 20:46:21 +01:00
Laurent Destailleur
5d9e713a1c Fix better default sort order 2020-03-20 20:36:59 +01:00
Laurent Destailleur
d28eaf5824 FIX Backto link 2020-03-20 15:48:50 +01:00
Laurent Destailleur
f7b4e48d59 Code comment 2020-03-20 10:51:26 +01:00
Laurent Destailleur
87e808fec4 Fix phpcs 2020-03-19 22:07:20 +01:00
Laurent Destailleur
a413e2861e Fix edit html 2020-03-19 21:13:15 +01:00
Laurent Destailleur
d9f616d6e3 Avoid file xxx_preview-1.png into export 2020-03-19 15:59:49 +01:00
Laurent Destailleur
9be4b28bea FIX mass action on stock movements 2020-03-19 15:43:55 +01:00
Laurent Destailleur
c71da5d013 FIX mass action on stock movements 2020-03-19 15:43:06 +01:00
Laurent Destailleur
7eb4522636 FIX missing token and save of survey description 2020-03-19 11:59:57 +01:00
Laurent Destailleur
8e1ffa5144 Fix management of token 2020-03-19 10:52:07 +01:00
Laurent Destailleur
d38c6616e6 Doc 2020-03-19 09:53:20 +01:00
Laurent Destailleur
54d3703c42 Prepare 11.0.3 2020-03-18 19:45:47 +01:00
Laurent Destailleur
c7c0eba10b Merge pull request #13370 from atm-florian/11.0
fix wrong DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_ called
2020-03-18 19:29:05 +01:00
Laurent Destailleur
ea13c707a2 Merge pull request #13380 from atm-john/11.0_fix_import_lines_from_object_for_situation_invoices
FIX import lines from object for situation invoices
2020-03-18 19:25:04 +01:00
Laurent Destailleur
b41ac2a428 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-03-18 18:37:55 +01:00
Laurent Destailleur
a3328c5ef3 Fix div 2020-03-18 18:37:44 +01:00
Laurent Destailleur
e9e0ce591b Merge pull request #13379 from atm-lena/11.0_FIX_extrafields_add_tpl_include
FIX : wrong include - replace extrafields_create.tpl.php to extrafiel…
2020-03-18 18:26:57 +01:00
Laurent Destailleur
c1931a045e Merge pull request #13376 from fmarcet/11.0
FIX: Bank movements color is not showing
2020-03-18 18:22:46 +01:00
Laurent Destailleur
a848a8523a Merge pull request #13377 from atm-john/11.0_fix_situations_invoices_stuff
Fix situations invoices stuff
2020-03-18 18:20:27 +01:00
Laurent Destailleur
cc93a40c45 Fix label of local tax 2020-03-18 14:06:15 +01:00
Laurent Destailleur
56e4fa1bb3 Trans 2020-03-18 14:01:11 +01:00
ATM john
c767e553d3 fix import line from object default value for situations 2020-03-18 10:59:13 +01:00
ATM john
4f1dd5439f Merge branch '11.0_fix_situations_invoices_stuff' of github.com:atm-john/dolibarr into 11.0_fix_situations_invoices_stuff 2020-03-18 10:35:49 +01:00
ATM john
7b8cafb710 remove var_dump 2020-03-18 10:34:44 +01:00
stickler-ci
0a5f971eb5 Fixing style errors. 2020-03-18 09:32:34 +00:00
ATM john
d3aeec0a7c Fix situation value transmission 2020-03-18 10:30:15 +01:00
atm-lena
2e1554def4 FIX : wrong include - replace extrafields_create.tpl.php to extrafields_add.tpl.php 2020-03-18 10:18:52 +01:00
Ferran Marcet
1fe4e4415e FIX: Bank movements color is not showing 2020-03-18 09:27:08 +01:00
ATM john
075757eb3d Fix situation value transmission 2020-03-17 16:49:05 +01:00
ATM john
cb43928a5d Fix radio label target 2020-03-17 12:29:14 +01:00
florian HENRY
1d05531aa8 fix wrong DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_ called 2020-03-17 10:10:54 +01:00
Pierre Ardoin
26f6f04486 forgot ";" 2020-03-17 10:08:18 +01:00
Pierre Ardoin
564f412957 correction due to comments @hregis and @eldy 2020-03-17 10:04:43 +01:00
Laurent Destailleur
ee29125579 typo 2020-03-15 11:29:00 +01:00
Laurent Destailleur
8927d40cc4 Prepare 11.0.3 2020-03-15 11:28:00 +01:00
Laurent Destailleur
37fce0d3ee Fix position on merou
Fix preselected value on contact
2020-03-14 14:45:37 +01:00
Laurent Destailleur
8192e9dc67 FIX Missing token in form 2020-03-14 03:02:49 +01:00
Laurent Destailleur
8a9553522f Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-03-14 00:14:52 +01:00
Laurent Destailleur
f774733fcb Sync transifex 2020-03-14 00:14:42 +01:00
Laurent Destailleur
6948e347c4 Merge pull request #13329 from atm-florian/fix_11_multiEntityOnCommCardElement
Fix 11 multi entity on comm card element
2020-03-13 16:57:10 +01:00
Laurent Destailleur
4841a5bf4a Fix look and feel v11 2020-03-13 16:53:37 +01:00
florian HENRY
ca269864f7 let keep it to expedition 2020-03-13 14:55:34 +01:00
Laurent Destailleur
1ff102f62a Prepare 11.0.3 2020-03-13 10:31:28 +01:00
Laurent Destailleur
864c903d05 FIX #13294 2020-03-12 18:55:08 +01:00
Laurent Destailleur
7e428885cc Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-03-12 18:34:43 +01:00
Laurent Destailleur
74b8b9f47d Merge pull request #13340 from atm-lena/11.0_FIX_loadCacheMsgTicket_PrivateStatus
FIX - Ticket Public  - Private messages are displayed
2020-03-12 17:59:13 +01:00
Laurent Destailleur
6d9967a5d3 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-03-12 17:59:03 +01:00
Laurent Destailleur
dea03efd4f Look and feel v11 2020-03-12 17:58:51 +01:00
Laurent Destailleur
09359b8025 Merge pull request #13338 from altatof/box_shipments
FIX : missing class declaration
2020-03-12 17:06:50 +01:00
Laurent Destailleur
aa3b28a8be Merge pull request #13337 from simicar29/11.0
Load line extrafields when fetching supplier invoice
2020-03-12 17:06:26 +01:00
atm-lena
ca121dd689 FIX - Ticket - Load Cache Messages Ticket, wrong message's status 2020-03-12 16:21:11 +01:00
altairis
6618205e6f fix missing class declaration 2020-03-12 15:05:32 +01:00
simicar29
4f4b778c8c update_price: add invoice_supplier element name
'invoice_supplier' as an element name was missing in test conditions to skip the update_price function
2020-03-12 12:53:17 +01:00
stickler-ci
0babab2824 Fixing style errors. 2020-03-12 11:48:08 +00:00
simicar29
95efdab62a Merge pull request #4 from simicar29/simicar29-patch-5
Load line extrafields when fetching supplier invoice
2020-03-12 12:44:31 +01:00
simicar29
325d635c48 Load line extrafields when fetching supplier invoice
PR to load extrafield values of lines when fetchinf supplier invoice.
2020-03-12 12:43:06 +01:00
Laurent Destailleur
dfe947885c FIX params of setEventMessage($langs->trans('ErrorProductClone')... 2020-03-12 12:40:28 +01:00
Laurent Destailleur
5dc403cb66 FIX #13304 2020-03-12 12:19:24 +01:00
Laurent Destailleur
ad22820872 FIX #13313 2020-03-12 12:15:44 +01:00
florian HENRY
6edaa7ac11 fix getentity on comm/card.php 2020-03-11 18:00:35 +01:00
florian HENRY
c4610fee8b Merge branch '11.0' of github.com:Dolibarr/dolibarr into fix_11_multiEntityOnCommCardElement 2020-03-11 17:58:51 +01:00
florian HENRY
f40c8ce507 fix getentity on comm/card.php 2020-03-11 17:58:41 +01:00
Laurent Destailleur
4903287204 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/core/boxes/box_commandes.php
	htdocs/fourn/class/fournisseur.commande.class.php
2020-03-11 17:04:28 +01:00
Laurent Destailleur
27bdee9df1 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-03-11 17:01:47 +01:00
Laurent Destailleur
c9b715b7ad Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-03-11 17:01:31 +01:00
Laurent Destailleur
7afbb5ce9c Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2020-03-11 17:00:01 +01:00
Laurent Destailleur
467dc2da7a Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2020-03-11 16:59:35 +01:00
Laurent Destailleur
7e574e0429 Fix permissions 2020-03-11 16:47:42 +01:00
Laurent Destailleur
4bdf10c995 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2020-03-11 16:44:03 +01:00
Laurent Destailleur
ae5d94b01c Merge pull request #13323 from aspangaro/11.0_p5
Fix accounting files link on auguria menu
2020-03-11 16:43:10 +01:00
Laurent Destailleur
13ffc186b7 Merge pull request #13324 from atm-florianm/FIX_10.0_status_column_empty_in_invoices_box_when_using_MAIN_STATUS_USES_CSS
FIX 10.0 - status missing from last customer invoices box when using MAIN_STATUS_USES_CSS
2020-03-11 16:41:24 +01:00
Laurent Destailleur
8808b7df87 Merge pull request #13325 from atm-florianm/FIX_10.0_load_langs_in_box_commandes
FIX 10.0 - missing translations for "orders" homepage "orders" box
2020-03-11 16:39:43 +01:00
Laurent Destailleur
7f759c6ff5 Merge pull request #13322 from atm-lena/6.0_FIX_FournCommandClone_ExtrafieldsLines
FIX - Clone Fourn Command, add line's extrafields
2020-03-11 16:36:27 +01:00
Laurent Destailleur
838b6d1e71 Merge pull request #13316 from atm-florian/11.0
fix PHP Fatal error:  Uncaught Error: Call to undefined function newToken()
2020-03-11 16:34:59 +01:00
Laurent Destailleur
25eae4db9c Fix missing __USER_EMAIL__ substitution 2020-03-11 16:28:00 +01:00
Laurent Destailleur
2b8a06cb5e FIX unit price for selected supplier products not set. NaN was used. 2020-03-11 16:12:34 +01:00
atm-lena
20aa51f26b FIX - Clone Fourn Command, add line's extrafields Part 2 2020-03-11 15:26:49 +01:00
Florian Mortgat
ce01cf278d FIX 10.0 - translations for "orders" not loaded in the homepage box 2020-03-11 11:45:57 +01:00
Florian Mortgat
6d1f62c1d9 FIX 10.0 - status missing from last customer invoices box when using MAIN_STATUS_USES_CSS 2020-03-11 11:03:19 +01:00
Alexandre SPANGARO
f2b33c0d77 Fix accounting files link on auguria menu 2020-03-11 06:20:25 +01:00
Laurent Destailleur
1f5c8f682c FIX cols parameter not propagated to tpl 2020-03-10 21:55:29 +01:00
Laurent Destailleur
078112c649 Fix trans 2020-03-10 15:19:24 +01:00
atm-lena
35f32391a0 FIX - Clone Fourn Command, add line's extrafields 2020-03-10 14:46:15 +01:00
florian HENRY
8d2ece83b7 Merge branch '11.0' of github.com:Dolibarr/dolibarr into 11.0 2020-03-10 09:00:59 +01:00
florian HENRY
3d279094c1 fix PHP Fatal error: Uncaught Error: Call to undefined function newToken() 2020-03-10 09:00:51 +01:00
Laurent Destailleur
b1bb7de2fb FIX CSRF error when creating an intervention 2020-03-09 20:19:28 +01:00
Laurent Destailleur
e66313d47e FIX use bad var to check if total is positive for each VAT rate when
validating invoice.
2020-03-09 20:06:47 +01:00
Laurent Destailleur
b81c02de04 Fix home page after first page creation 2020-03-09 19:50:01 +01:00
Laurent Destailleur
99b1c773a7 FIX link when using anchor on "/" 2020-03-09 18:56:52 +01:00
Laurent Destailleur
1fb6d1d43d FIX menu export document was not visible when using "simple accounting" 2020-03-08 20:49:50 +01:00
Laurent Destailleur
c4a429fb56 Merge pull request #13298 from jtraulle/patch-3
Fix Call to a member function getMessage() on null
2020-03-07 17:40:33 +01:00
Laurent Destailleur
26e0d63e31 Merge pull request #13297 from jtraulle/11.0
Fix #13296
2020-03-07 17:39:41 +01:00
Laurent Destailleur
fbcfc368b4 Merge pull request #13295 from jtraulle/patch-2
Fix param lost
2020-03-07 17:33:35 +01:00
Jean Traullé
f7dda657b1 Fix Call to a member function getMessage() on null
Because we are not in the exception block, $e is necessarily undefined.
Thus replacing $e->getMessage(); by value of $paymentintent->status.
2020-03-06 17:46:45 +01:00
Jean Traullé
a6e3980acb Update ihm.php 2020-03-06 17:35:03 +01:00
Jean Traullé
7c2bed2846 Fix #13296 2020-03-06 16:22:41 +00:00
Jean Traullé
ddf87e6d80 Fix param lost
Reported on https://www.dolibarr.fr/forum/t/v11-petites-regressions/32228
2020-03-06 16:13:09 +01:00
Laurent Destailleur
d4b67a6cef Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/contrat/list.php
	htdocs/core/lib/functions.lib.php
2020-03-06 14:19:30 +01:00
Laurent Destailleur
aaf9aef5c8 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0
Conflicts:
	htdocs/contrat/list.php
2020-03-06 14:17:21 +01:00
Laurent Destailleur
d39820d1ac Merge pull request #13286 from ATM-Nicolas/fix_unexisting_link
FIX : Remove unexisting link
2020-03-06 14:14:00 +01:00
Laurent Destailleur
adc996ee0a FIX #13194 2020-03-06 13:19:17 +01:00
Laurent Destailleur
5ff4b638a5 FIX empty of series in graph of product distribution 2020-03-06 12:00:40 +01:00
ATM-Nicolas
a9d7bbc2ed FIX : Remove unexisting link 2020-03-06 09:52:19 +01:00
Laurent Destailleur
e8407e3f0b Merge pull request #13283 from OPEN-DSI/10.0
FIX substitute lines dates values on doc generator (ODT, ...)
2020-03-06 09:19:50 +01:00
Laurent Destailleur
fff7ee3e96 FIX #13285 SQL error during migration with pgsql 2020-03-06 01:55:36 +01:00
kamel
0123fa7696 FIX subsitute lines dates values on doc generator (ODT, ...) 2020-03-05 15:37:01 +01:00
Laurent Destailleur
a98b65ad99 FIX #13274 cannot add or update 0 value for an int or double extrafield
type
2020-03-05 00:43:51 +01:00
Laurent Destailleur
a5a2d60755 Fix phpcs 2020-03-05 00:20:39 +01:00
Christian Foellmann
55dc3d36ac fix broken categories on "contacts" tab of project 2020-03-04 19:25:48 +01:00
Laurent Destailleur
deda6252f2 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/core/actions_massactions.inc.php
	htdocs/core/lib/functions.lib.php
	htdocs/expensereport/class/expensereport.class.php
2020-03-04 19:22:30 +01:00
Laurent Destailleur
eb4ca743e4 Merge pull request #13273 from atm-arnaud/FIX_MASSACTION_CREATE_BILLS_FROM_ORDERS
FIX date order was -1D and desc with label repetition
2020-03-04 19:16:07 +01:00
Laurent Destailleur
ddc0547eda Fix position of button 2020-03-04 13:31:19 +01:00
atm-arnaud
834873ab15 FIX date order was -1D and desc with label repetition 2020-03-04 11:58:42 +01:00
Laurent Destailleur
50d76ae0e8 FIX Bad permission to access menu Statistics on intervention. 2020-03-04 11:51:32 +01:00
Laurent Destailleur
de0234e7a8 Update doc 2020-03-04 11:13:09 +01:00
Laurent Destailleur
f586c3b0c8 Prepare 11.0.2 2020-03-04 10:13:55 +01:00
Laurent Destailleur
0f156a6521 Fix phpcs 2020-03-04 02:15:35 +01:00
Laurent Destailleur
24f416d0dd Fix default content of page 2020-03-04 02:03:29 +01:00
Laurent Destailleur
13ecf9a585 Add debug tool 2020-03-04 01:54:02 +01:00
Laurent Destailleur
0b37c2c201 FIX #13263 2020-03-04 00:53:07 +01:00
Laurent Destailleur
109770f5c3 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-03-04 00:38:53 +01:00
Laurent Destailleur
5f417039f6 More log to help debug 2020-03-04 00:38:43 +01:00
Laurent Destailleur
71f19b4e5e FIX #13267 2020-03-04 00:38:04 +01:00
Laurent Destailleur
c80e37edf6 Merge pull request #13259 from ptibogxiv/patch-310
FIX:  fk_type subscription list via api REST
2020-03-03 23:11:47 +01:00
Laurent Destailleur
6f3197bbea Merge pull request #13258 from atm-ph/fix_11.0_dict_sql_error_sortorder
Fix sql syntax error
2020-03-03 22:54:11 +01:00
Laurent Destailleur
3f2d6ac2ba Merge pull request #13266 from hregis/patch-1
FIX missing global $conf
2020-03-03 22:53:35 +01:00
Laurent Destailleur
d5546df57b Responsive 2020-03-03 22:50:37 +01:00
Laurent Destailleur
fd64f0fadb Fix responsive 2020-03-03 22:46:29 +01:00
Laurent Destailleur
88d2e13f02 Fix reponsive 2020-03-03 22:15:55 +01:00
Regis Houssin
945641a05b FIX missing global $conf 2020-03-03 16:26:57 +01:00
Laurent Destailleur
a22296ca72 Trans 2020-03-03 15:19:37 +01:00
Laurent Destailleur
b587ac6936 FIX responsive 2020-03-03 15:14:27 +01:00
ptibogxiv
060df57cb1 FIX: fk_type subscription list via api REST
v10 to dev
2020-03-03 11:58:15 +01:00
atm-ph
e916ff40ff Fix sql syntax error 2020-03-03 11:55:05 +01:00
Laurent Destailleur
b9e5f349a1 Merge pull request #13249 from hregis/11.0_bug
FIX modFournisseur is required by modSupplierProposal
2020-03-02 22:01:39 +01:00
Laurent Destailleur
87fe2e691b Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/product/stats/facture.php
	htdocs/product/stats/facture_fournisseur.php
2020-03-02 21:59:34 +01:00
Laurent Destailleur
5e6ee7888c Merge pull request #13238 from aspangaro/10.0_p37
FIX: typo on ckeck method
2020-03-02 21:49:59 +01:00
Regis Houssin
e962afb9c5 FIX modFournisseur is required by modSupplierProposal 2020-03-02 14:10:37 +01:00
Alexandre SPANGARO
da99c89c26 FIX: typo on ckeck method 2020-03-01 05:21:51 +01:00
Laurent Destailleur
bb5b55f9e3 Merge pull request #13225 from prietojc/patch-13
Update translate.class.php
2020-02-29 12:58:32 +01:00
Laurent Destailleur
0855598c00 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/accountancy/journal/purchasesjournal.php
	htdocs/accountancy/journal/sellsjournal.php
	htdocs/core/lib/functions.lib.php
2020-02-29 12:51:33 +01:00
Laurent Destailleur
c3ab1055bf Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-02-29 12:48:40 +01:00
VESSILLER
8eff3162a9 FIX undefined function measuringUnitString in product list 2020-02-29 12:47:48 +01:00
Laurent Destailleur
d6b5a84895 Merge pull request #13210 from atm-quentin/FIX_list_search_0
FIX search with '0'
2020-02-29 12:36:09 +01:00
Laurent Destailleur
52a92924de Merge pull request #13230 from atm-gauthier/fix_round_accountancy
FIX : round MT in accountancy books
2020-02-29 12:35:33 +01:00
Laurent Destailleur
e35bba358f Fix error when generating documents 2020-02-29 00:13:42 +01:00
Laurent Destailleur
c6b6b97ac0 FIX Free input for email no more visible 2020-02-28 20:25:17 +01:00
gauthier
284a4189b3 FIX : round MT in accountancy books 2020-02-28 14:32:35 +01:00
Laurent Destailleur
87b3cf9765 FIX Bad link to template invoices 2020-02-28 12:01:43 +01:00
Laurent Destailleur
e07a29ecd0 Fix class not found 2020-02-27 22:02:45 +01:00
Laurent Destailleur
51489004a3 Removed travis warnings 2020-02-27 18:07:32 +01:00
Laurent Destailleur
baaa6b797b FIX SQl syntax error 2020-02-27 17:51:31 +01:00
Laurent Destailleur
f039008282 Fix reponsive 2020-02-27 16:33:24 +01:00
Laurent Destailleur
eac07aceb0 Responsive 2020-02-27 16:00:01 +01:00
atm-quentin
009eb0d4a4 FIX test on 0 better than isset 2020-02-27 09:34:20 +01:00
JC Prieto
c555a2c588 Update translate.class.php
Resolve bug #9105
When load() function loads translation file from an external modules, adds a \r simbol at the end of each line.
2020-02-27 09:32:22 +01:00
Pierre Ardoin
8476477137 add const NOTMODIFYOTHERENTITYFOURNPRICE
if const NOTMODIFYOTHERENTITYFOURNPRICE, can't modify other shared fourn prices.
2020-02-27 09:19:39 +01:00
Pierre Ardoin
74ac69fc5a Add Entity in list_product_fournisseur_price()
Select too the entity value to add const NOTMODIFYOTHERENTITYFOURNPRICE
2020-02-27 09:16:15 +01:00
Laurent Destailleur
957295ee2d Fix look and feel v11 2020-02-27 01:12:53 +01:00
Laurent Destailleur
9bc5eb44ca FIX #13182 2020-02-26 20:25:26 +01:00
Laurent Destailleur
8b1fff202b FIX option MAIN_OPTIMIZEFORTEXTBROWSER 2020-02-26 20:11:42 +01:00
Laurent Destailleur
8f8a733d7b Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-02-26 17:02:32 +01:00
Laurent Destailleur
ef9fe73d96 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/compta/index.php
2020-02-26 17:02:23 +01:00
Laurent Destailleur
f797f6bbaf Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-02-26 16:59:04 +01:00
Laurent Destailleur
921dacf695 Fix remove $_POST 2020-02-26 16:58:45 +01:00
Laurent Destailleur
ab01acfe53 Merge pull request #13211 from ATM-Marc/FIX_11.0_excess_paid_from_situation_invoice
FIX: excess paid from situation invoices not counted when calculating remain to pay
2020-02-26 16:30:20 +01:00
Laurent Destailleur
9c1c0ee08f Fix for nojs interface 2020-02-26 16:17:31 +01:00
Laurent Destailleur
aba29207a3 Fix param lost 2020-02-26 16:10:12 +01:00
Laurent Destailleur
9f097b1a08 FIX #13146 #13198 2020-02-26 15:45:21 +01:00
Laurent Destailleur
b52cfe58d6 FIX Disable js if no javascript 2020-02-26 15:45:12 +01:00
Laurent Destailleur
4370bf8fdc FIX Use GETPOST instead of POST
Conflicts:
	htdocs/admin/ihm.php
2020-02-26 15:44:54 +01:00
Laurent Destailleur
91e7ff3c8e FIX No js if javascript off 2020-02-26 15:43:09 +01:00
Laurent Destailleur
0b43d67eea Merge pull request #13219 from atm-gauthier/10.0_fix_datecontrat_in_list
FIX : timezone must be tzserver and not tzuser as well as on contract card
2020-02-26 15:39:37 +01:00
Laurent Destailleur
4a516a0352 Merge pull request #13220 from ptibogxiv/patch-307
FIX token in barcode tools page
2020-02-26 15:38:12 +01:00
ptibogxiv
b95d74f843 FIX token in barcode tools page 2020-02-26 15:23:59 +01:00
gauthier
01b9c42670 FIX : timezone must be tzserver and not tzuser as well as on contract card 2020-02-26 15:02:42 +01:00
Marc de Lima Lucio
d3b70994fe Merge branch 'FIX_8.0_excess_paid_from_situation_invoice' of github.com:ATM-Marc/dolibarr into FIX_11.0_excess_paid_from_situation_invoice 2020-02-26 10:42:55 +01:00
Marc de Lima Lucio
373ab3bc01 FIX: excess paid from situation invoices not counted when calculating remain to pay 2020-02-26 10:35:43 +01:00
atm-quentin
a5baf2bc88 FIX search with '0' 2020-02-26 09:19:39 +01:00
Laurent Destailleur
114e41108d FIX sort link 2020-02-26 06:43:58 +01:00
Laurent Destailleur
c38e88ca46 FIX Bad sort link in accounting report 2020-02-26 06:43:52 +01:00
Laurent Destailleur
e2786fc35f Merge pull request #13197 from dolibit-ut/patch-1
Create README-DE.md
2020-02-26 05:13:01 +01:00
Laurent Destailleur
d7c079919b Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-02-25 20:00:06 +01:00
Laurent Destailleur
a18fda6b3d Fix data on popup 2020-02-25 19:59:53 +01:00
Laurent Destailleur
ec108162e3 Fix GETPOST 2020-02-25 15:14:37 +01:00
Laurent Destailleur
b7a0de11c6 FIX API Get list of documents for supplier_invoice 2020-02-25 14:47:51 +01:00
Laurent Destailleur
69c2f4bd27 FIX API upload/download doc for expensereport 2020-02-25 14:36:39 +01:00
Laurent Destailleur
f386614511 Doc 2020-02-25 14:29:41 +01:00
Laurent Destailleur
91f7a14602 FIX API to push an expense report 2020-02-25 14:17:13 +01:00
UT from dolibit
b565881b31 Create README-DE.md 2020-02-25 12:58:27 +01:00
Laurent Destailleur
5516c8ce81 FIX Submit of documents for supplier invoices. 2020-02-25 00:51:06 +01:00
Laurent Destailleur
c2f7d857a0 Merge pull request #13189 from atm-josselin/FIX_bad_translation_productlot
FIX : Bad translation for productlot EatBy and SellBy
2020-02-25 00:05:31 +01:00
Laurent Destailleur
2067abdc7e Fix title of page 2020-02-24 23:10:04 +01:00
Laurent Destailleur
aec47b474a Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-02-24 23:04:27 +01:00
Laurent Destailleur
2118c2eede Fix missing title line 2020-02-24 23:04:17 +01:00
Laurent Destailleur
2a6652f6b5 Merge pull request #13192 from atm-florian/11_fixcomumnRUMMissingintoImport
fix missing column into Bank import
2020-02-24 22:55:47 +01:00
florian HENRY
9f8166ed37 fix missing column into import 2020-02-24 15:14:01 +01:00
florian HENRY
b2b2291117 fix missing column into import 2020-02-24 15:12:26 +01:00
florian HENRY
2c26ddb22b fix missing column into import 2020-02-24 15:11:14 +01:00
atm-josselin
b2a488ef9f FIX : Bad translation for productlot EatBy and SellBy 2020-02-24 11:00:55 +01:00
Laurent Destailleur
3682d9143e Fix showing bank account on PDF 2020-02-24 04:55:44 +01:00
Laurent Destailleur
4b4d1bcce2 Fix disable accountancy chart that is deprecated. 2020-02-24 03:05:58 +01:00
Laurent Destailleur
6366881f91 FIX #13175 2020-02-24 00:41:25 +01:00
Laurent Destailleur
090b0e90d2 FIX #13183 2020-02-23 23:52:48 +01:00
Laurent Destailleur
3075e40f8c Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/comm/remx.php
	htdocs/core/boxes/box_contacts.php
	htdocs/core/lib/functions.lib.php
	htdocs/core/lib/security.lib.php
2020-02-23 23:37:46 +01:00
Laurent Destailleur
5919570b34 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-02-23 23:31:51 +01:00
Laurent Destailleur
11ff3f6562 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-02-23 23:31:03 +01:00
Laurent Destailleur
530930b7aa Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2020-02-23 23:30:38 +01:00
Laurent Destailleur
ee45c3efb6 FIX #13184 2020-02-23 23:29:13 +01:00
Laurent Destailleur
ac2f6bdc42 Merge pull request #13178 from gmilad/patch-2
Update note.php
2020-02-23 22:45:00 +01:00
Laurent Destailleur
5648205beb Merge pull request #13181 from atm-maxime/8.0
Fix #10179 discount split
2020-02-23 22:43:21 +01:00
Maxime Kohlhaas
0ab16ed5ae Fix #10179 discount split 2020-02-23 16:50:24 +01:00
Laurent Destailleur
295d42b476 Fix trans of status 2020-02-22 14:19:23 +01:00
gmilad
559fc9f61e Update note.php
Fix : #13168
2020-02-22 13:07:25 +01:00
Laurent Destailleur
b4fdd9bc50 Merge pull request #13078 from hregis/10.0_mc
FIX #10309
2020-02-21 19:21:54 +01:00
Laurent Destailleur
d6917b6b08 Merge pull request #13152 from fmarcet/9.0
FIX: Visualization rights correction on last modified contacts box
2020-02-21 18:14:09 +01:00
Frédéric FRANCE
8d507c4f32 fix workflow with multicurrency 2020-02-21 18:12:48 +01:00
Frédéric FRANCE
327b827fb4 avoid warning if not an array
Conflicts:
	htdocs/projet/element.php
2020-02-21 18:01:04 +01:00
Frédéric FRANCE
f6eba36575 fix CATEGORY_ADD_DESC_INTO_DOC
$cate->add_category doesn't exists
2020-02-21 18:00:12 +01:00
Laurent Destailleur
dc0972fdfc Merge pull request #13150 from aspangaro/10.0_p36
FIX: z-index for moretabsList with constant MAIN_MAXTABS_IN_CARD
2020-02-21 17:57:30 +01:00
Laurent Destailleur
60f394a53c Fix CSS for RTL languages 2020-02-21 17:07:22 +01:00
Laurent Destailleur
ea19ab96c3 Fix compatibility with php 7.4 2020-02-21 14:46:02 +01:00
Laurent Destailleur
593091f399 FIX etrafield with visibilty=5 were not in read only
FIX CSS
FIX option for topbar search and bookmarks

Conflicts:
	htdocs/theme/eldy/global.inc.php
2020-02-20 15:29:59 +01:00
Ferran Marcet
9ff424e23b FIX: Visualization rights correction on last modified contacts box 2020-02-20 11:45:46 +01:00
Alexandre SPANGARO
a7ca7dfbb6 FIX: z-index for moretabsList with constant MAIN_MAXTABS_IN_CARD 2020-02-20 06:00:17 +01:00
Laurent Destailleur
2cfca2a45e Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/comm/action/card.php
	htdocs/comm/index.php
	htdocs/core/boxes/box_fournisseurs.php
	htdocs/core/boxes/box_propales.php
	htdocs/societe/index.php
2020-02-20 00:18:58 +01:00
Laurent Destailleur
44c2909696 FIX Multicompany compatibility 2020-02-19 16:08:33 +01:00
Laurent Destailleur
3fafbb372b Remove call of $mc->dao than hangs. Replaced with $mc use. 2020-02-19 15:51:27 +01:00
Laurent Destailleur
91899d2f56 Fix list of opportunity with filter on search_usage_opportunity 2020-02-19 14:32:12 +01:00
Laurent Destailleur
db1e324ba5 Fix trans 2020-02-19 13:58:04 +01:00
Laurent Destailleur
394c256ca1 Merge pull request #13129 from mapiolca/patch-33
Fix issue with unselect data
2020-02-19 11:37:52 +01:00
Laurent Destailleur
d0d352be1a FIX #13118 2020-02-19 03:37:28 +01:00
Laurent Destailleur
7c07589850 FIX #13124 2020-02-19 03:07:12 +01:00
Laurent Destailleur
43b173ef76 FIX #13131 2020-02-19 01:23:54 +01:00
Laurent Destailleur
016c7ad875 FIX #13135 2020-02-19 01:17:16 +01:00
Laurent Destailleur
979d7eb548 Merge pull request #13133 from OPEN-DSI/v10-fix-action-card-assigned-users
FIX keep assigned users in session when loading projects and tasks
2020-02-18 23:51:13 +01:00
Laurent Destailleur
51bc20a110 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/product/card.php
2020-02-18 23:36:42 +01:00
Laurent Destailleur
ce09ec8805 Fix phpcs 2020-02-18 23:35:45 +01:00
oscim
b0016764c4 Update bank.php
For authorize line manager to see wages paid
2020-02-18 22:59:56 +01:00
Laurent Destailleur
fa16063875 Fix bad accounting code set 2020-02-18 22:39:01 +01:00
Laurent Destailleur
31ae0bc06e Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/fourn/commande/index.php
	htdocs/product/card.php
2020-02-18 22:38:30 +01:00
root
0dcb83e6bf referer XSS patches 2020-02-18 22:31:24 +01:00
Laurent Destailleur
8d9577137a Merge pull request #13130 from hregis/10.0_mc2
FIX Multicompany compatibility
2020-02-18 22:28:15 +01:00
Laurent Destailleur
c60ae7227f Merge pull request #13126 from atm-gauthier/10.0_fix_if
FIX : must be == and not =
2020-02-18 22:18:49 +01:00
Laurent Destailleur
e73b57e969 Merge pull request #13134 from atm-ph/fix_11.0_object_linked_from_supplier_order
Fix create supplier invoice from supplier order don't keep source object as linked obkect
2020-02-18 22:18:16 +01:00
stickler-ci
c6b05040a3 Fixing style errors. 2020-02-18 17:36:00 +00:00
Pierre Ardoin
afadf9dc0e Fix Not Display Photo with Multicompany 2020-02-18 18:34:15 +01:00
atm-ph
bb64d2d353 Fix create supplier invoice from supplier order don't keep source object as linked obkect 2020-02-18 16:00:12 +01:00
Laurent Destailleur
24bb61b5e4 FIX Usage of project not available in export. 2020-02-18 12:51:53 +01:00
Laurent Destailleur
b6be42e103 FIX List of viewed projects too large in task widget 2020-02-18 12:40:50 +01:00
Laurent Destailleur
67eb584a7f FIX Missing field "billed" in export 2020-02-18 12:22:25 +01:00
Laurent Destailleur
7e814e2a08 FIX Menu truncated. Add tooltip to have all content. 2020-02-18 12:01:19 +01:00
Laurent Destailleur
9ce0e6869e Fix trans 2020-02-18 11:55:39 +01:00
VESSILLER
d1e9f3a505 FIX keep assigned users in session when loading projects and tasks 2020-02-18 11:18:00 +01:00
Regis Houssin
110a23623b FIX an external user can not approved 2020-02-18 11:04:11 +01:00
Pierre Ardoin
dbb7db376b fix error code 2020-02-18 09:16:12 +01:00
Regis Houssin
4511cf1060 FIX missing "statut" for getNomUrl() function 2020-02-18 09:03:25 +01:00
Regis Houssin
1034e4a472 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0_mc2 2020-02-18 09:02:35 +01:00
Regis Houssin
f6f0d9d4a2 FIX better method to check user rights AND usergroup rights ! 2020-02-18 08:35:51 +01:00
Pierre Ardoin
49dd8e30aa Fix not display data 2020-02-18 08:28:39 +01:00
Laurent Destailleur
7b4c674bdc Fix css 2020-02-17 21:43:53 +01:00
Pierre Ardoin
ef64e20367 Fix not display value 2020-02-17 19:34:09 +01:00
Pierre Ardoin
f8e18a3826 Fix Not displayed email 2020-02-17 19:25:25 +01:00
Pierre Ardoin
a773b86ad1 Fix not displayed value 2020-02-17 19:23:48 +01:00
Pierre Ardoin
29cfd6d857 Fix issue with Multicompany
Before : can't find photo

Now : ok
2020-02-17 19:18:22 +01:00
Regis Houssin
a5de331410 FIX Multicompany compatibility 2020-02-17 19:13:37 +01:00
Pierre Ardoin
f1bbe1c64d Fix issue not show photo. 2020-02-17 19:09:58 +01:00
Laurent Destailleur
e59ac41182 Fix phpcs 2020-02-17 13:59:44 +01:00
Laurent Destailleur
25fa83bd06 Fix phpcs 2020-02-17 12:40:26 +01:00
Laurent Destailleur
504a67daee FIX duplicate class name into some log lines 2020-02-17 12:34:00 +01:00
Laurent Destailleur
1904ae0e82 FIX Type of contact for event does not exists and not supported
FIX Type of contact not saved when creating a contact
FIX SQL Overload in default contact trigger.
FIX Trigger name PROPAL_SUPPLIER_TRIGGER into PROPOSAL_SUPPLIER_TRIGGER

Conflicts:
	htdocs/supplier_proposal/class/supplier_proposal.class.php
2020-02-17 12:25:51 +01:00
Laurent Destailleur
549bf076d7 Fix prefix of log 2020-02-17 12:22:52 +01:00
gauthier
523d09536c FIX : must be == and not = 2020-02-17 12:20:19 +01:00
Laurent Destailleur
bf281b7dab Comment 2020-02-17 11:51:49 +01:00
Laurent Destailleur
ac7a077c77 FIX Vulnerability in module from modulebuilder. Only fields with type
html can contains HTML.
2020-02-16 18:14:10 +01:00
Laurent Destailleur
5b87b12e64 FIX Vulnerability reported by code16 2020-02-16 18:06:25 +01:00
Laurent Destailleur
7cdfc3ca65 FIX HTML Injection 2020-02-16 12:55:32 +01:00
Laurent Destailleur
f14cd9f49f Look and feel v11 2020-02-15 18:07:23 +01:00
Laurent Destailleur
2b3cc0d048 Fix add both public id and ref in topic 2020-02-15 18:00:09 +01:00
Laurent Destailleur
69bd616e73 css 2020-02-15 10:40:32 +01:00
Laurent Destailleur
d3d572c8d3 FIX Avoid to download the export if we just press enter to refresh form 2020-02-14 19:55:50 +01:00
Regis Houssin
0ab0bb2e7d FIX wrong test 2020-02-14 19:26:28 +01:00
Laurent Destailleur
58ad62aa7b Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-02-14 19:12:11 +01:00
Laurent Destailleur
3bc122ecf6 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-02-14 19:05:58 +01:00
Laurent Destailleur
3faed758b3 FIX #13110 2020-02-14 19:05:39 +01:00
Laurent Destailleur
88f0cc1331 Merge pull request #13113 from aspangaro/9.0_FEC
FIX: Force FEC export to txt format
2020-02-14 18:56:31 +01:00
Alexandre SPANGARO
72e59e6fe2 FIX: Force FEC export to txt format 2020-02-14 16:07:06 +01:00
Regis Houssin
52506ddd05 FIX can be a string or integer 2020-02-13 09:25:36 +01:00
Regis Houssin
f19f706c38 FIX better check 2020-02-13 07:55:52 +01:00
Laurent Destailleur
5be0485917 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-02-12 22:51:05 +01:00
Laurent Destailleur
700e01d661 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0
Conflicts:
	htdocs/compta/stats/cabyprodserv.php
2020-02-12 22:50:56 +01:00
Regis Houssin
275b5d1f77 FIX #10309 2020-02-11 07:32:29 +01:00
Laurent Destailleur
102428a503 Merge pull request #13056 from atm-lena/FIX_cabyprodlist_filter
FIX CA by prod list filter
2020-02-08 16:09:18 +01:00
atm-lena
ecea726323 FIX CA by prod list filter 2020-02-07 15:01:37 +01:00
1999 changed files with 27515 additions and 14225 deletions

View File

@@ -3,6 +3,7 @@
# For syntax, see http://about.travis-ci.org/docs/user/languages/php/
# We use dist: trusty to have php 5.4+ available
os: linux
dist: trusty
sudo: required
@@ -42,7 +43,7 @@ env:
global:
# Set to true for very verbose output
- DEBUG=false
matrix:
jobs:
# MariaDB overrides MySQL installation so it's not possible to test both yet
#- DB=mysql
- DB=mariadb
@@ -54,7 +55,7 @@ env:
# See https://github.com/DracoBlue/travis-ci-nginx-php-fpm-test
#- WS=nginx
matrix:
jobs:
fast_finish: true
allow_failures:
- php: nightly
@@ -290,7 +291,7 @@ script:
# Ensure we catch errors
set -e
#parallel-lint --exclude htdocs/includes --blame .
parallel-lint --exclude dev/namespacemig --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian --exclude htdocs/includes/squizlabs/php_codesniffer/tests --exclude htdocs/includes/jakub-onderka/php-parallel-lint/tests --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/php-token-stream/tests --exclude htdocs/includes/composer/autoload_static.php --blame .
parallel-lint --exclude dev/namespacemig --exclude htdocs/includes/myclabs --exclude htdocs/includes/webmozart --exclude htdocs/includes/phpspec --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian --exclude htdocs/includes/squizlabs/php_codesniffer/tests --exclude htdocs/includes/jakub-onderka/php-parallel-lint/tests --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/php-token-stream/tests --exclude htdocs/includes/composer/autoload_static.php --blame .
set +e
echo

288
ChangeLog
View File

@@ -2,6 +2,223 @@
English Dolibarr ChangeLog
--------------------------------------------------------------
***** ChangeLog for 11.0.5 compared to 11.0.4 *****
FIX: $arraydefaultmessage is an object, as well as in /htdocs/core/class/html.formmail.class.php
FIX: 10.0 - pagination in prelevement/bons.php
FIX: 10.0 - undefined $langs if template file copy fails during activation of modContrat
FIX: 11.0 - fatal with postgres on contact/agenda.php
FIX: 11.0 - multicurrency amount not fetched when fetching payments from llx_paiement or llx_paiementfourn
FIX: 11.0 - when using pdftk as per hidden conf USE_PDFTK_FOR_PDF_CONCAT, check that the file exists before displaying a success message
FIX: #13841
FIX: #13877 - Can validate invoice if there is a credit note with VAT 0% on an invoice with other lines with a VAT non 0%
FIX: #13968
FIX: #14001
FIX: #14002
FIX: 9.0 - delete unused mandatory argument from migrate_clean_association: argument count mismatch causes a fatal error since php7
FIX: 9.0 - fatal during migration from 3.1 using PHP 7
FIX: Accountancy - Binding index - Add a filter on sql request for module Subtotal & Jalon
FIX: avoid error "Call to undefined function measuringUnitString()"
FIX: BlindBoolean SQL injection reported by Christian Weiler
FIX: Can create a credit note on situation invoice if previous is also
FIX: can install module even if (x) was appended during download.
FIX: copy value date of VariousPayment onto the new AccountLine
FIX: count of open day when date and start are not open should be 0
FIX: Default bank account was not loaded for document generation.
FIX: Do not show stats panel if the user does not have permissions
FIX: Fix link of the button to create a credit note and fix the awareness of a error that happen when wo create a credit note
FIX: force rounding 2 on export ld compta
FIX: free text on cash desk
FIX: links into emails of notifications
FIX: missing file manifest.json.php
FIX: missing GetNomURL Hook in warehouse class
FIX: missing hook init + table class + $page not set
FIX: missing rollbacks on trigger bad return
FIX: missing translation value for key "NoMorePredefinedProductToDispatch"
FIX: percent must be displayed on one line
FIX: php error if multicompany disabled
FIX: Privilege escalation reported by wizlynx WLX-2020-011
FIX: replace filter parameter "none" by "restricthtml"
FIX: Rounding Total TVA in "crabe" model pdf
FIX: Show ref_customer, amount on contract link object
FIX: Site ec.europa.eu has moved to https://
FIX: Tickets mail models doesn't work
FIX: vulnerability reported by wizlynx WLX-2020-012
FIX: We must only rename current bank receipt
FIX: when creating a VariousPayment, the value date is not copied onto the AccountLine that gets created at the same time, so the bank transaction's value date will be the payment date instead of the payment's value date
FIX: wrong url param
FIX: XSS using the renaming of .noexe files - reported by Nolan.
***** ChangeLog for 11.0.4 compared to 11.0.3 *****
FIX: #13749
FIX: #7594 Expense report multi pagebreak
FIX: Access to undeclared static property: Contact::$table_element
FIX: actions on supplier proposal not saved (bad trigger name)
FIX: Add function "completeTabsHead" to "addreplace" type hook.
FIX: All forms must use newToken()
FIX: Another "Access to undeclared static property: Contact::$table_element" && "Societe::$table_element"
FIX: author search supplier proposal list
FIX: A variable was erased by a temporary variable
FIX: Avoid infinite loop when a fetch is inside a compute field.
FIX: Backto link
FIX: Bad position of total in column
FIX: bad value in currency into discount created from down payment
FIX: buyprice extrafield langfile and tooltip
FIX: Buyprice was updated only if min price for this qty had same qty
FIX: Can switch from double to price type for extrafields
FIX: Can use decimal value in virtual products
FIX: child categories only with good entity rights
FIX: cloning of emailing when no content selected
FIX: closing tags
FIX: Combo list of available users to filter on the list of leaves.
FIX: Compatibility with multicompany, bad numerotation of task.
FIX: consistency of price w/wo vat wrong when price entered with tax
FIX: default value of selectMasssAction broken
FIX: draftordered replenish virtual stock
FIX: Error update SQL into stock reception
FIX: expensereport status in generated pdf
FIX: extra date field incorrect check
FIX: Extrafields of type price must be '' and not '0' if not defined
FIX: Foreign currency lost when splitting a discount
FIX: get remain to pay with rounding decimals
FIX: gzip and bzip2 must use option -f
FIX: IHM, unexpected quote
FIX: keep viewstatut for doli 3.5
FIX: Link missing into email of some notification
FIX: Look and feel v11
FIX: md stylesheet to be included by external modules like eldy
FIX: missing array option
FIX: missing default accountancy product buy code
FIX: missing fk_bank during export of suppliers invoices
FIX: missing member entity
FIX: missing selectedlines on supplier order but checkbox are displayed
FIX: Missing token and take into account max date when it can.
FIX: model export list must be sorted by label
FIX: multicurrency manage on hidden conf SUPPLIER_PROPOSAL_UPDATE_PRICE_ON_SUPPlIER_PROPOSAL
FIX: Must escape shell
FIX: Must exclude logs and some dirs for compressed backup
FIX: ordered stock already in $stock
FIX: picture migration script from doli 9.0
FIX: print pictures on shipment docs
FIX: product get purchase prices
FIX: product purchase prices
FIX: Protection when database has a corrupted product id
FIX: remove unused var, $usercancreate can be change by Multicompany
FIX: replenish stock to buy
FIX: Sanitizing menu parameter
FIX: Send email from bulk action of list of thirdparties
FIX: setup of suggested payment mode on proposals and orders
FIX: Several pb in export of documents
FIX: Situation invoice take into account the credit notes.
FIX: some others modules (like subtotal) use other product_type than 0 or 1 AND must not be considered in this report
FIX: sort by default role makes no sense
FIX: sort on company on member list
FIX: TakePOS buying price
FIX: text version of html emailing (removed the body style)
FIX: The "test smtp connectivity" failed on page to setup mass emailing
FIX: Error logs an Orderline::delete error, but this is an Orderline::insert error
FIX: Translation of tooltips of extrafields
FIX: Use getNomURL instead of hard coded link. Fix limit.
FIX: Use of image into free text for PDF if DOL_DATA_DIR is outside of
FIX: viewstatut to search status
FIX: we must export company mail address on contact vcard only if contact email address is empty
FIX: when we filter a list on a view status, we want this filter to be on bookmark that we create
FIX: Wrong Sql on getListOfTowns api method
FIX: wrong user right's name to top menu "commercial"
FIX: XSS Vulnerability reported by Mehmet Kelepçe / Gais Cyber Security
***** ChangeLog for 11.0.3 compared to 11.0.2 *****
FIX: unit price for selected supplier products not set. NaN was used.
FIX: use bad var to check if total is positive for each VAT rate when validating an invoice
FIX: status missing from last customer invoices box when using MAIN_STATUS_USES_CSS
FIX: translations for "orders" not loaded in the homepage box
FIX: #13194
FIX: #13274 cannot add or update 0 value for an int or double extrafield
FIX: #13285 SQL error during migration with pgsql
FIX: #13294
FIX: #13313
FIX: Clone Fourn Command, add line's extrafields
FIX: cols parameter not propagated to tpl
FIX: CSRF error when creating an intervention
FIX: date order was -1D and desc with label repetition
FIX: empty of series in graph of product distribution
FIX: fk_type subscription list via api REST
FIX: link when using anchor on "/" in website module
FIX: menu export document was not visible when using "simple accounting"
FIX: missing class declaration
FIX: missing global $conf
FIX: Missing token in some forms (avoid unset POST errors)
FIX: params of setEventMessage($langs->trans('ErrorProductClone')...
FIX: Remove unexisting link
FIX: mass action on stock movements
FIX: substitute lines dates values on doc generator (ODT, ...)
FIX: Ticket - Load Cache Messages Ticket, wrong message's status
FIX: Ticket Public - Private messages are displayed
FIX: wrong include - replace extrafields_create.tpl.php to extrafields_add.tpl.php
***** ChangeLog for 11.0.2 compared to 11.0.1 *****
FIX: #10309
FIX: #13110
FIX: #13118
FIX: #13124
FIX: #13131
FIX: #13135
FIX: #13146
FIX: #13198
FIX: #13175
FIX: #13182
FIX: #13183
FIX: #13184
FIX: #13263
FIX: #13267
FIX: an external user can not approve
FIX: API Get list of documents for supplier_invoice
FIX: API to push an expense report
FIX: API upload/download doc for expensereport
FIX: Avoid to download the export if we just press enter to refresh form
FIX: Bad link to template invoices
FIX: Bad sort link in accounting report
FIX: Bad translation for productlot EatBy and SellBy
FIX: better method to check user rights AND usergroup rights !
FIX: CA by product list filter
FIX: CSS
FIX: Disable js if no javascript
FIX: duplicate class name into some log lines
FIX: etrafield with visibilty=5 were not in read only.
FIX: excess paid from situation invoices not counted when calculating remain to pay.
FIX: Force FEC export to txt format.
FIX: Free input for email no more visible.
FIX: Keep assigned users in session when loading projects and tasks
FIX: List of viewed projects too large in task widget.
FIX: Menu truncated. Add tooltip to have all content.
FIX: Missing field "billed" in export.
FIX: missing "statut" for getNomUrl() function
FIX: modFournisseur is required by modSupplierProposal
FIX: Multicompany compatibility
FIX: must be == and not =
FIX: option for topbar search and bookmarks
FIX: option MAIN_OPTIMIZEFORTEXTBROWSER
FIX: some responsive troubles
FIX: round MT in accountancy books
FIX: search with '0'
FIX: sort link
FIX: SQL Overload in default contact trigger.
FIX: SQl syntax error.
FIX: Submit of documents for supplier invoices.
FIX: timezone must be tzserver and not tzuser as on contract card
FIX: token in barcode tools page missing
FIX: Bad name of trigger PROPAL_SUPPLIER_TRIGGER, should be PROPOSAL_SUPPLIER_TRIGGER
FIX: Type of contact for event does not exists and not supported
FIX: Type of contact not saved when creating a contact
FIX: typo on ckeck method
FIX: undefined function measuringUnitString in product list
FIX: Usage of project not available in export.
FIX: wrong test
FIX: z-index for moretabsList with constant MAIN_MAXTABS_IN_CARD
FIX: Use GETPOST instead of POST
FIX: HTML Injection
FIX: Visualization rights correction on last modified contacts box.
FIX: Vulnerability in module from modulebuilder.
FIX: Vulnerability reported by code16
***** ChangeLog for 11.0.1 compared to 11.0.0 *****
FIX: advanced target emailing sql and ergonomy.
@@ -286,6 +503,77 @@ Following changes may create regressions for some external modules, but were nec
* The jquery plugin/dependency multiselect has been removed. It was not used by Dolibarr core.
***** ChangeLog for 10.0.7 compared to 10.0.6 *****
FIX: 10.0 - missing translations for "orders" homepage "orders" box
FIX: 10.0 - status missing from last customer invoices box when using MAIN_STATUS_USES_CSS
FIX: 10.0 - translations for "orders" not loaded in the homepage box
FIX: #10309
FIX: #12875
FIX: #12932
FIX: #12966
FIX: #12973
FIX: #13304
FIX: advanced target emailing sql and ergonomy
FIX: an external user can not approved
FIX: Bad translation for productlot EatBy and SellBy
FIX: better check
FIX: better method to check user rights AND usergroup rights !
FIX: CA by prod list filter
FIX: can be a string or integer
FIX: Check on unicity on prof id was not triggered sometimes
FIX: clone of purchase order
FIX: compatibility with multicompany (avoid duplicate data)
FIX: complex export model loading
FIX: date filter not used if no operator
FIX: date order was -1D and desc with label repetition
FIX: default lang selection when filter
FIX: dom and missing param
FIX: drafts are now implemented for stats
FIX: Error in log for email sending with smtps was not complete
FIX: Extrafield position in export field list must respect "pos" field
FIX: FEC export format
FIX: FEC export have specific name
FIX: fetching account on current entity
FIX: Filenames must not contains non ascii char or we will get non ascii
FIX: fk_type subscription list via api REST
FIX: Force FEC export to txt format
FIX: get remain to pay with rounding decimals
FIX: Invert isSellerInEEC and isBuyerInEEC
FIX: keep assigned users in session when loading projects and tasks
FIX: length, width and height units coherence in product table
FIX: links in products/services index
FIX: Mail smtps truncated if content has a line with single .
FIX: missing array option
FIX: missing global $conf
FIX: missing hook parameter
FIX: Missing Linked objects Fichinter Ref. in PDF formats
FIX: missing "statut" for getNomUrl() function
FIX: multicompany for discount
FIX: must be == and not =
FIX: Problem with column label in subscription list
FIX: regex for include or exclude categories in full arbo
FIX: Remove unexisting link
FIX: remove unused var, $usercancreate can be change by Multicompany
FIX: require category class in extrafield
FIX: round MT in accountancy books
FIX: search with '0'
FIX: send expense report mail in HTML format
FIX: SQL request and phpunit
FIX: substitute lines dates values on doc generator (ODT, ...)
FIX: test on 0 better than isset
FIX: The "automatic bind" was linked EEC to export accountancy code
FIX: thirdparty alias name desappeared if we change country with THIRDPARTY_SUGGEST_ALSO_ADDRESS_CREATION conf
FIX: timezone must be tzserver and not tzuser as well as on contract card
FIX: typo on ckeck method
FIX: use "usergroup" instead "user"
FIX: Visualization rights correction on last modified contacts box
FIX: Warning on admin/export_files
FIX: We want to be able to import data for extrafields of entity 0 too
FIX: when we filter a list on a view status, we want this filter to be on bookmark that we create
FIX: wrong test
FIX: XSS vulnerability in description of list of audit events.
FIX: z-index for moretabsList with constant MAIN_MAXTABS_IN_CARD
***** ChangeLog for 10.0.6 compared to 10.0.5 *****
FIX Regression of 10.0.5 to create/edit proposals and orders.
FIX: #12760 #12763 #12755 #12765 #12751

View File

@@ -2,7 +2,7 @@
#----------------------------------------------------------------------------
# \file build/makepack-dolibarr.pl
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps)
# \author (c)2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
# \author (c)2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
#
# This is list of constant you can set to have generated packages moved into a specific dir:
#DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'
@@ -19,7 +19,7 @@ use Term::ANSIColor;
# Change this to defined target for option 98 and 99
$PROJECT="dolibarr";
$PUBLISHSTABLE="eldy,dolibarr\@frs.sourceforge.net:/home/frs/project/dolibarr";
$PUBLISHBETARC="dolibarr\@vmprod1.dolibarr.org:/home/dolibarr/dolibarr.org/httpdocs/files";
$PUBLISHBETARC="dolibarr\@vmprod1.dolibarr.org:/home/dolibarr/asso.dolibarr.org/dolibarr_documents/website/www.dolibarr.org/files";
#@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
@@ -430,12 +430,14 @@ if ($nboftargetok) {
$ret=`git tag -a -f -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD"`;
print 'Run git push -f --tags'."\n";
$ret=`git push -f --tags`;
#$ret=`git push -f origin "$MAJOR.$MINOR.$BUILD"`;
}
}
else
{
print 'Run git push --tags'."\n";
$ret=`git push --tags`;
#$ret=`git push origin "$MAJOR.$MINOR.$BUILD"`;
}
chdir("$olddir");
}

View File

@@ -104,6 +104,27 @@ with
//return false;
}
* Replace in tcpdf.php
if (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
with
// @CHANGE LDR Add support for src="file://..." links
if (strpos($imgsrc, 'file://') === 0) {
$imgsrc = str_replace('file://', '/', $imgsrc);
$imgsrc = urldecode($imgsrc);
$testscrtype = @parse_url($imgsrc);
if (empty($testscrtype['query'])) {
// convert URL to server path
$imgsrc = str_replace(K_PATH_URL, K_PATH_MAIN, $imgsrc);
} elseif (preg_match('|^https?://|', $imgsrc) !== 1) {
// convert URL to server path
$imgsrc = str_replace(K_PATH_MAIN, K_PATH_URL, $imgsrc);
}
}
elseif (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
* In tecnickcom/tcpdf/include/tcpdf_static, in function fopenLocal, replace

File diff suppressed because one or more lines are too long

View File

@@ -54,5 +54,5 @@ fi
echo Think to launch also:
echo "> dev/tools/fixaltlanguages.sh fix all"
echo "For v11: Replace also regex \(.*(sponge|cornas|eratosthene|cyan).*\) with ''"
echo "For v11: Replace also regex \(.*(sponge|cornas|eratosthene|cyan).*\) with '' on *.lang files"

12
doc/user/README-DE.md Normal file
View File

@@ -0,0 +1,12 @@
README (german)
LiesMich (deutsch)
--------------------------------
Benutzeranleitung
--------------------------------
Alle Dolibarr-Informationen sind online verfuegbar ueber die Webseiten:
https://www.dolibarr.de
oder
https://www.dolibarr.org
https://wiki.dolibarr.org

View File

@@ -46,6 +46,8 @@ $search_accountparent = GETPOST('search_accountparent', 'alpha');
$search_pcgtype = GETPOST('search_pcgtype', 'alpha');
$search_pcgsubtype = GETPOST('search_pcgsubtype', 'alpha');
$chartofaccounts = GETPOST('chartofaccounts', 'int');
// Security check
if ($user->socid > 0) accessforbidden();
if (! $user->rights->accounting->chartofaccount) accessforbidden();
@@ -101,11 +103,9 @@ if (empty($reshook))
$search_pcgsubtype = "";
$search_array_options = array();
}
if (GETPOST('change_chart', 'alpha') && (GETPOST('valid_change_chart', 'int') || empty($conf->use_javascript_ajax)))
if ((GETPOST('valid_change_chart', 'alpha') && GETPOST('chartofaccounts', 'int') > 0) // explicit click on button 'Change and load' with js on
|| (GETPOST('chartofaccounts', 'int') > 0 && GETPOST('chartofaccounts', 'int') != $conf->global->CHARTOFACCOUNTS)) // a submit of form is done and chartofaccounts combo has been modified
{
$chartofaccounts = GETPOST('chartofaccounts', 'int');
if ($chartofaccounts > 0)
{
// Get language code for this $chartofaccounts
@@ -274,18 +274,13 @@ if ($resql)
if (!empty($conf->use_javascript_ajax))
{
print '<!-- Add javascript to update a flag when we select "Change plan" -->
print '<!-- Add javascript to reload page when we click "Change plan" -->
<script type="text/javascript">
$(document).ready(function () {
$("#searchFormList").on("submit", function (e) {
console.log("chartofaccounts focus = "+$("#chartofaccounts").is(":focus"));
console.log("change_chart focus = "+$("#change_chart").is(":focus"));
if ($("#change_chart").is(":focus"))
{
console.log("We set valid_change_chart to 1");
$("#valid_change_chart").val(1);
}
return true;
$("#change_chart").on("click", function (e) {
console.log("chartofaccounts seleted = "+$("#chartofaccounts").val());
// reload page
window.location.href = "'.$_SERVER["PHP_SELF"].'?valid_change_chart=1&chartofaccounts="+$("#chartofaccounts").val();
});
});
</script>';
@@ -332,8 +327,7 @@ if ($resql)
else dol_print_error($db);
print "</select>";
print ajax_combobox("chartofaccounts");
print '<input type="submit" class="button" name="change_chart" id="change_chart" value="'.dol_escape_htmltag($langs->trans("ChangeAndLoad")).'">';
print '<input type="hidden" name="valid_change_chart" id="valid_change_chart" value="0">';
print '<input type="'.(empty($conf->use_javascript_ajax)?'submit':'button').'" class="button" name="change_chart" id="change_chart" value="'.dol_escape_htmltag($langs->trans("ChangeAndLoad")).'">';
print '<br>';
print '<br>';

View File

@@ -161,6 +161,7 @@ print '<input type="hidden" name="action" value="update">';
// Define main accounts for thirdparty
print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><td>'.$langs->trans("ThirdParties").' | '.$langs->trans("Users").'</td><td></td></tr>';
foreach ($list_account_main as $key) {
print '<tr class="oddeven value">';
@@ -180,15 +181,6 @@ foreach ($list_account_main as $key) {
}
print "</table>\n";
print '<br>';
// Define default accounts
print '<table class="noborder centpercent">';
foreach ($list_account as $key) {
$reg=array();
if (preg_match('/---(.*)---/', $key, $reg)) {

View File

@@ -134,13 +134,13 @@ if ($action == 'update') {
$form = new Form($db);
$title = $langs->trans('ConfigAccountingExpert');
$title = $langs->trans('ExportOptions');
llxHeader('', $title);
$linkback = '';
// $linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1">' . $langs->trans("BackToModuleList") . '</a>';
print load_fiche_titre($langs->trans('ConfigAccountingExpert'), $linkback, 'accountancy');
print load_fiche_titre($langs->trans('ExportOptions'), $linkback, 'accountancy');
print "\n".'<script type="text/javascript" language="javascript">'."\n";

View File

@@ -42,7 +42,6 @@ $page = GETPOST("page", 'int');
$sortorder = GETPOST("sortorder", 'alpha');
$sortfield = GETPOST("sortfield", 'alpha');
$action = GETPOST('action', 'aZ09');
if (GETPOST("exportcsv", 'alpha')) $action = 'export_csv';
// Load variable for pagination
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
@@ -198,12 +197,25 @@ if ($action != 'export_csv')
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
print '<input type="hidden" name="action" value="list">';
print '<input type="hidden" name="action" id="action" value="list">';
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="page" value="'.$page.'">';
$button = '<input type="submit" name="exportcsv" class="butAction" value="'.$langs->trans("Export").' ('.$conf->global->ACCOUNTING_EXPORT_FORMAT.')" />';
print '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
jQuery("#exportcsvbutton").click(function() {
event.preventDefault();
console.log("Set action to export_csv");
jQuery("#action").val("export_csv");
jQuery("#searchFormList").submit();
jQuery("#action").val("list");
});
});
</script>';
$button = '<input type="button" id="exportcsvbutton" name="exportcsvbutton" class="butAction" value="'.$langs->trans("Export").' ('.$conf->global->ACCOUNTING_EXPORT_FORMAT.')" />';
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $button, $result, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);

View File

@@ -933,7 +933,7 @@ while ($i < min($num, $limit))
// Amount debit
if (!empty($arrayfields['t.debit']['checked']))
{
print '<td class="nowrap right">'.($line->debit ? price($line->debit) : '').'</td>';
print '<td class="nowrap right">'.($line->debit != 0 ? price($line->debit) : '').'</td>';
if (!$i) $totalarray['nbfield']++;
if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totaldebit';
$totalarray['val']['totaldebit'] += $line->debit;
@@ -942,7 +942,7 @@ while ($i < min($num, $limit))
// Amount credit
if (!empty($arrayfields['t.credit']['checked']))
{
print '<td class="nowrap right">'.($line->credit ? price($line->credit) : '').'</td>';
print '<td class="nowrap right">'.($line->credit != 0 ? price($line->credit) : '').'</td>';
if (!$i) $totalarray['nbfield']++;
if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totalcredit';
$totalarray['val']['totalcredit'] += $line->credit;
@@ -966,7 +966,7 @@ while ($i < min($num, $limit))
}
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;

View File

@@ -197,7 +197,7 @@ if ($resql) {
$param="&socid=".$socid;
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '?socid=' . $object->id . '" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="token" value="' . newToken() . '">';
print '<input type="hidden" name="socid" value="' . $object->id . '">';
$letteringbutton = '<a class="divButAction"><span class="valignmiddle"><input class="butAction" type="submit" value="lettering" name="lettering" id="lettering"></span></a>';

View File

@@ -195,7 +195,7 @@ if ($resql) {
$param="&socid=".$socid;
print '<form name="add" action="'.$_SERVER["PHP_SELF"].'?socid=' . $object->id . '" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="token" value="' . newToken() . '">';
print '<input type="hidden" name="socid" value="' . $object->id . '">';
$letteringbutton = '<a class="divButAction"><span class="valignmiddle"><input class="butAction" type="submit" value="lettering" name="lettering" id="lettering"></span></a>';

View File

@@ -985,7 +985,7 @@ class AccountancyExport
print $racine_subledger_account . $separator; // deprecated CPTG & CPTA use instead
// MONT
print price(abs($line->montant), 0, '', 1, 2).$separator;
print price(abs($line->montant), 0, '', 1, 2, 2).$separator;
// CODC
print $line->sens.$separator;
// CPTG

View File

@@ -1554,7 +1554,7 @@ class BookKeeping extends CommonObject
$sql .= " WHERE piece_num = ".$piecenum;
$sql .= " AND entity IN (".getEntity('accountancy').")";
dol_syslog(get_class($this)."::".__METHOD__, LOG_DEBUG);
dol_syslog(__METHOD__, LOG_DEBUG);
$result = $this->db->query($sql);
if ($result) {
$obj = $this->db->fetch_object($result);
@@ -1568,7 +1568,7 @@ class BookKeeping extends CommonObject
$this->date_creation = $obj->date_creation;
} else {
$this->error = "Error ".$this->db->lasterror();
dol_syslog(get_class($this)."::".__METHOD__.$this->error, LOG_ERR);
dol_syslog(__METHOD__.$this->error, LOG_ERR);
return -1;
}
@@ -1622,7 +1622,7 @@ class BookKeeping extends CommonObject
$sql .= " WHERE piece_num = ".$piecenum;
$sql .= " AND entity IN (".getEntity('accountancy').")";
dol_syslog(get_class($this)."::".__METHOD__, LOG_DEBUG);
dol_syslog(__METHOD__, LOG_DEBUG);
$result = $this->db->query($sql);
if ($result) {
while ($obj = $this->db->fetch_object($result)) {
@@ -1654,7 +1654,7 @@ class BookKeeping extends CommonObject
}
} else {
$this->error = "Error ".$this->db->lasterror();
dol_syslog(get_class($this)."::".__METHOD__.$this->error, LOG_ERR);
dol_syslog(__METHOD__.$this->error, LOG_ERR);
return -1;
}

View File

@@ -34,8 +34,8 @@ $action = GETPOST('action', 'alpha');
$cancel = GETPOST('cancel', 'alpha');
$backtopage = GETPOST('backtopage', 'alpha');
$codeventil = GETPOST('codeventil');
$id = GETPOST('id');
$codeventil = GETPOST('codeventil', 'int');
$id = GETPOST('id', 'int');
// Security check
if ($user->socid > 0)

View File

@@ -251,6 +251,7 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON aa.rowid = fd
$sql .= " WHERE f.datef >= '".$db->idate($search_date_start)."'";
$sql .= " AND f.datef <= '".$db->idate($search_date_end)."'";
$sql .= " AND f.fk_statut > 0";
$sql .= " AND fd.product_type <= 2";
$sql .= " AND f.entity IN (".getEntity('invoice', 0).")"; // We don't share object for accountancy
$sql .= " AND aa.account_number IS NULL";
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
@@ -327,10 +328,11 @@ $sql .= " WHERE f.datef >= '".$db->idate($search_date_start)."'";
$sql .= " AND f.datef <= '".$db->idate($search_date_end)."'";
$sql .= " AND f.entity IN (".getEntity('invoice', 0).")"; // We don't share object for accountancy
$sql .= " AND f.fk_statut > 0";
$sql .= " AND fd.product_type <= 2";
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_SITUATION.")";
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.", ".Facture::TYPE_REPLACEMENT.", ".Facture::TYPE_CREDIT_NOTE.", ".Facture::TYPE_SITUATION.")";
} else {
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_DEPOSIT.",".Facture::TYPE_SITUATION.")";
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.", ".Facture::TYPE_REPLACEMENT.", ".Facture::TYPE_CREDIT_NOTE.", ".Facture::TYPE_DEPOSIT.", ".Facture::TYPE_SITUATION.")";
}
$sql .= " AND aa.account_number IS NOT NULL";
$sql .= " GROUP BY fd.fk_code_ventilation,aa.account_number,aa.label";
@@ -403,10 +405,11 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
$sql .= " AND f.datef <= '".$db->idate($search_date_end)."'";
$sql .= " AND f.entity IN (".getEntity('invoice', 0).")"; // We don't share object for accountancy
$sql .= " AND f.fk_statut > 0";
$sql .= " AND fd.product_type <= 2";
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_SITUATION.")";
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.", ".Facture::TYPE_REPLACEMENT.", ".Facture::TYPE_CREDIT_NOTE.", ".Facture::TYPE_SITUATION.")";
} else {
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_DEPOSIT.",".Facture::TYPE_SITUATION.")";
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.", ".Facture::TYPE_REPLACEMENT.", ".Facture::TYPE_CREDIT_NOTE.", ".Facture::TYPE_DEPOSIT.", ".Facture::TYPE_SITUATION.")";
}
dol_syslog('htdocs/accountancy/customer/index.php');
@@ -455,10 +458,11 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
$sql .= " AND f.datef <= '".$db->idate($search_date_end)."'";
$sql .= " AND f.entity IN (".getEntity('invoice', 0).")"; // We don't share object for accountancy
$sql .= " AND f.fk_statut > 0";
$sql .= " AND fd.product_type <= 2";
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_SITUATION.")";
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.", ".Facture::TYPE_REPLACEMENT.", ".Facture::TYPE_CREDIT_NOTE.", ".Facture::TYPE_SITUATION.")";
} else {
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_DEPOSIT.",".Facture::TYPE_SITUATION.")";
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.", ".Facture::TYPE_REPLACEMENT.", ".Facture::TYPE_CREDIT_NOTE.", ".Facture::TYPE_DEPOSIT.", ".Facture::TYPE_SITUATION.")";
}
dol_syslog('htdocs/accountancy/customer/index.php');

View File

@@ -332,7 +332,7 @@ if ($result) {
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "fd.tva_tx", "", $param, '', $sortfield, $sortorder, 'right ');
print_liste_field_titre("Country", $_SERVER["PHP_SELF"], "co.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("VATIntra", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "aa.account_number", "", $param, '', $sortfield, $sortorder, 'center ');
print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "aa.account_number", "", $param, '', $sortfield, $sortorder);
$clickpicto = $form->showCheckAddButtons();
print_liste_field_titre($clickpicto, '', '', '', '', '', '', '', 'center ');
print "</tr>\n";
@@ -341,7 +341,7 @@ if ($result) {
$product_static = new Product($db);
while ($objp = $db->fetch_object($result)) {
$codecompta = length_accountg($objp->account_number).' - '.$objp->label_compte;
$codecompta = length_accountg($objp->account_number).' - <span class="opacitymedium">'.$objp->label_compte.'</span>';
$facture_static->ref = $objp->ref;
$facture_static->id = $objp->facid;
@@ -390,7 +390,7 @@ if ($result) {
print '<td>'.$objp->tva_intra.'</td>';
print '<td class="center">';
print '<td>';
print $codecompta.' <a class="editfielda" href="./card.php?id='.$objp->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($param ? '?'.$param : '')).'">';
print img_edit();
print '</a>';

View File

@@ -38,8 +38,8 @@ $action = GETPOST('action', 'alpha');
$cancel = GETPOST('cancel', 'alpha');
$backtopage = GETPOST('backtopage', 'alpha');
$codeventil = GETPOST('codeventil');
$id = GETPOST('id');
$codeventil = GETPOST('codeventil', 'int');
$id = GETPOST('id', 'int');
// Security check
if ($user->socid > 0)

View File

@@ -287,7 +287,7 @@ if ($result) {
while ($i < min($num_lines, $limit)) {
$objp = $db->fetch_object($result);
$codeCompta = length_accountg($objp->account_number).' - '.$objp->label;
$codeCompta = length_accountg($objp->account_number).' - <span class="opacitymedium">'.$objp->label.'</span>';
$expensereport_static->ref = $objp->ref;
$expensereport_static->id = $objp->erid;
@@ -315,7 +315,7 @@ if ($result) {
print '<td>'.$codeCompta.'</td>';
print '<td class="left"><a href="./card.php?id='.$objp->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($param ? '?'.$param : '')).'">';
print '<td class="left"><a class="editfielda" href="./card.php?id='.$objp->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($param ? '?'.$param : '')).'">';
print img_edit();
print '</a></td>';

View File

@@ -66,7 +66,7 @@ if ($conf->accounting->enabled)
$resultboxes = FormOther::getBoxesArea($user, "27"); // Load $resultboxes (selectboxlist + boxactivated + boxlista + boxlistb)
$helpisexpanded = empty($resultboxes['boxactivated']); // If there is no widget, the tooltip help is expanded by default.
$helpisexpanded = empty($resultboxes['boxactivated']) || (empty($resultboxes['boxlista']) && empty($resultboxes['boxlistb'])); // If there is no widget, the tooltip help is expanded by default.
$showtutorial = '';
if (!$helpisexpanded)
@@ -222,10 +222,6 @@ if ($conf->accounting->enabled)
$boxlist .= '<div class="twocolumns">';
$boxlist .= '<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
if (!empty($nbworkboardcount))
{
$boxlist .= $boxwork;
}
$boxlist .= $resultboxes['boxlista'];
@@ -233,7 +229,6 @@ if ($conf->accounting->enabled)
$boxlist .= '<div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
$boxlist .= $boxstat;
$boxlist .= $resultboxes['boxlistb'];
$boxlist .= '</div>';

View File

@@ -663,7 +663,7 @@ if (! $error && $action == 'writebookkeeping') {
} elseif ($tabtype[$key] == 'payment_various') {
$bookkeeping->subledger_account = $k;
$bookkeeping->subledger_label = $tabcompany[$key]['name'];
$bookkeeping->numero_compte = $tabpay[$obj->rowid]["account_various"];
$bookkeeping->numero_compte = $tabpay[$key]["account_various"];
$accountingaccount->fetch(null, $bookkeeping->numero_compte, true);
$bookkeeping->label_compte = $accountingaccount->label;
@@ -760,7 +760,7 @@ if (! $error && $action == 'writebookkeeping') {
}
}
if (price2num($totaldebit) != price2num($totalcredit))
if (price2num($totaldebit, 'MT') != price2num($totalcredit, 'MT'))
{
$error++;
$errorforline++;

View File

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

View File

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

View File

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

View File

@@ -38,8 +38,8 @@ $action = GETPOST('action', 'alpha');
$cancel = GETPOST('cancel', 'alpha');
$backtopage = GETPOST('backtopage', 'alpha');
$codeventil = GETPOST('codeventil');
$id = GETPOST('id');
$codeventil = GETPOST('codeventil', 'int');
$id = GETPOST('id', 'int');
// Security check
if ($user->socid > 0)

View File

@@ -249,6 +249,7 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON aa.rowid = ff
$sql .= " WHERE ff.datef >= '".$db->idate($search_date_start)."'";
$sql .= " AND ff.datef <= '".$db->idate($search_date_end)."'";
$sql .= " AND ff.fk_statut > 0";
$sql .= " AND ffd.product_type <= 2";
$sql .= " AND ff.entity IN (".getEntity('facture_fourn', 0).")"; // We don't share object for accountancy
$sql .= " AND aa.account_number IS NULL";
$sql .= " GROUP BY ffd.fk_code_ventilation,aa.account_number,aa.label";
@@ -319,6 +320,7 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON aa.rowid = ff
$sql .= " WHERE ff.datef >= '".$db->idate($search_date_start)."'";
$sql .= " AND ff.datef <= '".$db->idate($search_date_end)."'";
$sql .= " AND ff.fk_statut > 0";
$sql .= " AND ffd.product_type <= 2";
$sql .= " AND ff.entity IN (".getEntity('facture_fourn', 0).")"; // We don't share object for accountancy
$sql .= " AND aa.account_number IS NOT NULL";
$sql .= " GROUP BY ffd.fk_code_ventilation,aa.account_number,aa.label";
@@ -389,6 +391,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
$sql .= " WHERE ff.datef >= '".$db->idate($search_date_start)."'";
$sql .= " AND ff.datef <= '".$db->idate($search_date_end)."'";
$sql .= " AND ff.fk_statut > 0";
$sql .= " AND ffd.product_type <= 2";
$sql .= " AND ff.entity IN (".getEntity('facture_fourn', 0).")"; // We don't share object for accountancy
dol_syslog('htdocs/accountancy/supplier/index.php');

View File

@@ -336,7 +336,7 @@ if ($result) {
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, '', $sortfield, $sortorder, 'right ');
print_liste_field_titre("Country", $_SERVER["PHP_SELF"], "co.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("VATIntra", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "aa.account_number", "", $param, '', $sortfield, $sortorder, 'center ');
print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "aa.account_number", "", $param, '', $sortfield, $sortorder);
$checkpicto = $form->showCheckAddButtons();
print_liste_field_titre($checkpicto, '', '', '', '', '', '', '', 'center ');
print "</tr>\n";
@@ -347,7 +347,7 @@ if ($result) {
while ($i < min($num_lines, $limit)) {
$objp = $db->fetch_object($result);
$codecompta = length_accountg($objp->account_number).' - '.$objp->label;
$codecompta = length_accountg($objp->account_number).' - <span class="opacitymedium">'.$objp->label.'</span>';
$facturefournisseur_static->ref = $objp->ref;
$facturefournisseur_static->id = $objp->facid;
@@ -399,7 +399,7 @@ if ($result) {
print '<td>'.$objp->tva_intra.'</td>';
print '<td class="center">';
print '<td>';
print $codecompta.' <a href="./card.php?id='.$objp->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($param ? '?'.$param : '')).'">';
print img_edit();
print '</a></td>';

View File

@@ -57,7 +57,7 @@ if ($accountancyexport->getFormatCode($formatexportset) == $accountancyexport::$
$endaccountingperiod = dol_print_date(dol_get_last_day($tmparray['year'], $tmparray['mon']), 'dayxcard');
$completefilename = $siren . "FEC" . $endaccountingperiod . "." . $format;
$completefilename = $siren . "FEC" . $endaccountingperiod . ".txt";
}
else
{

View File

@@ -243,18 +243,16 @@ if (empty($reshook))
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$birthdate = '';
if (isset($_POST["birthday"]) && $_POST["birthday"]
&& isset($_POST["birthmonth"]) && $_POST["birthmonth"]
&& isset($_POST["birthyear"]) && $_POST["birthyear"])
if (GETPOST("birthday", 'int') && GETPOST("birthmonth", 'int') && GETPOST("birthyear", 'int'))
{
$birthdate = dol_mktime(12, 0, 0, $_POST["birthmonth"], $_POST["birthday"], $_POST["birthyear"]);
$birthdate = dol_mktime(12, 0, 0, GETPOST("birthmonth", 'int'), GETPOST("birthday", 'int'), GETPOST("birthyear", 'int'));
}
$lastname = $_POST["lastname"];
$firstname = $_POST["firstname"];
$gender = $_POST["gender"];
$societe = $_POST["societe"];
$morphy = $_POST["morphy"];
$login = $_POST["login"];
$lastname = GETPOST("lastname", 'alphanohtml');
$firstname = GETPOST("firstname", 'alphanohtml');
$gender = GETPOST("gender", 'alphanohtml');
$societe = GETPOST("societe", 'alphanohtml');
$morphy = GETPOST("morphy", 'alphanohtml');
$login = GETPOST("login", 'alphanohtml');
if ($morphy != 'mor' && empty($lastname)) {
$error++;
$langs->load("errors");
@@ -284,19 +282,19 @@ if (empty($reshook))
$object->oldcopy = clone $object;
// Change values
$object->civility_id = trim(GETPOST("civility_id", 'alpha'));
$object->firstname = trim(GETPOST("firstname", 'alpha'));
$object->lastname = trim(GETPOST("lastname", 'alpha'));
$object->gender = trim(GETPOST("gender", 'alpha'));
$object->civility_id = trim(GETPOST("civility_id", 'alphanohtml'));
$object->firstname = trim(GETPOST("firstname", 'alphanohtml'));
$object->lastname = trim(GETPOST("lastname", 'alphanohtml'));
$object->gender = trim(GETPOST("gender", 'alphanohtml'));
$object->login = trim(GETPOST("login", 'alpha'));
$object->pass = trim(GETPOST("pass", 'alpha'));
$object->societe = trim(GETPOST("societe", 'alpha')); // deprecated
$object->company = trim(GETPOST("societe", 'alpha'));
$object->societe = trim(GETPOST("societe", 'alphanohtml')); // deprecated
$object->company = trim(GETPOST("societe", 'alphanohtml'));
$object->address = trim(GETPOST("address", 'alpha'));
$object->zip = trim(GETPOST("zipcode", 'alpha'));
$object->town = trim(GETPOST("town", 'alpha'));
$object->address = trim(GETPOST("address", 'alphanohtml'));
$object->zip = trim(GETPOST("zipcode", 'alphanohtml'));
$object->town = trim(GETPOST("town", 'alphanohtml'));
$object->state_id = GETPOST("state_id", 'int');
$object->country_id = GETPOST("country_id", 'int');
@@ -442,14 +440,14 @@ if (empty($reshook))
}
$typeid = GETPOST("typeid", 'int');
$civility_id = GETPOST("civility_id", 'alpha');
$lastname = GETPOST("lastname", 'alpha');
$firstname = GETPOST("firstname", 'alpha');
$gender = GETPOST("gender", 'alpha');
$societe = GETPOST("societe", 'alpha');
$address = GETPOST("address", 'alpha');
$zip = GETPOST("zipcode", 'alpha');
$town = GETPOST("town", 'alpha');
$civility_id = GETPOST("civility_id", 'alphanohtml');
$lastname = GETPOST("lastname", 'alphanohtml');
$firstname = GETPOST("firstname", 'alphanohtml');
$gender = GETPOST("gender", 'alphanohtml');
$societe = GETPOST("societe", 'alphanohtml');
$address = GETPOST("address", 'alphanohtml');
$zip = GETPOST("zipcode", 'alphanohtml');
$town = GETPOST("town", 'alphanohtml');
$state_id = GETPOST("state_id", 'int');
$country_id = GETPOST("country_id", 'int');
@@ -465,9 +463,8 @@ if (empty($reshook))
$pass = GETPOST("password", 'alpha');
$photo = GETPOST("photo", 'alpha');
//$comment=GETPOST("comment",'none');
$morphy = GETPOST("morphy", 'alpha');
$subscription = GETPOST("subscription", 'alpha');
$public = GETPOST("public", 'alpha');
$morphy = GETPOST("morphy", 'alphanohtml');
$public = GETPOST("public", 'alphanohtml');
$userid = GETPOST("userid", 'int');
$socid = GETPOST("socid", 'int');
@@ -976,7 +973,7 @@ else
print "</td>\n";
// Company
print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td><input type="text" name="societe" class="minwidth300" maxlength="128" value="'.(GETPOST('societe', 'alpha') ?GETPOST('societe', 'alpha') : $object->company).'"></td></tr>';
print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td><input type="text" name="societe" class="minwidth300" maxlength="128" value="'.(GETPOSTISSET('societe') ? GETPOST('societe', 'alphanohtml') : $object->company).'"></td></tr>';
// Civility
print '<tr><td>'.$langs->trans("UserTitle").'</td><td>';
@@ -984,39 +981,39 @@ else
print '</tr>';
// Lastname
print '<tr><td id="tdlastname">'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" class="minwidth300" maxlength="50" value="'.(GETPOST('lastname', 'alpha') ?GETPOST('lastname', 'alpha') : $object->lastname).'"></td>';
print '<tr><td id="tdlastname">'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" class="minwidth300" maxlength="50" value="'.(GETPOSTISSET('lastname') ? GETPOST('lastname', 'alphanohtml') : $object->lastname).'"></td>';
print '</tr>';
// Firstname
print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" class="minwidth300" maxlength="50" value="'.(GETPOST('firstname', 'alpha') ?GETPOST('firstname', 'alpha') : $object->firstname).'"></td>';
print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" class="minwidth300" maxlength="50" value="'.(GETPOSTISSET('firstname') ? GETPOST('firstname', 'alphanohtml') : $object->firstname).'"></td>';
print '</tr>';
// Gender
print '<tr><td>'.$langs->trans("Gender").'</td>';
print '<td>';
$arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"));
print $form->selectarray('gender', $arraygender, GETPOST('gender'), 1);
print $form->selectarray('gender', $arraygender, GETPOST('gender', 'alphanohtml'), 1);
print '</td></tr>';
// EMail
print '<tr><td>'.img_picto('', 'object_email').' '.($conf->global->ADHERENT_MAIL_REQUIRED ? '<span class="fieldrequired">' : '').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED ? '</span>' : '').'</td><td><input type="text" name="member_email" class="minwidth300" maxlength="255" value="'.(GETPOST('member_email', 'alpha') ?GETPOST('member_email', 'alpha') : $object->email).'"></td></tr>';
print '<tr><td>'.img_picto('', 'object_email').' '.($conf->global->ADHERENT_MAIL_REQUIRED ? '<span class="fieldrequired">' : '').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED ? '</span>' : '').'</td><td><input type="text" name="member_email" class="minwidth300" maxlength="255" value="'.(GETPOSTISSET('member_email') ? GETPOST('member_email', 'alpha') : $object->email).'"></td></tr>';
// Address
print '<tr><td class="tdtop">'.$langs->trans("Address").'</td><td>';
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="2">'.(GETPOST('address', 'alphanohtml') ?GETPOST('address', 'alphanohtml') : $object->address).'</textarea>';
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="2">'.(GETPOSTISSET('address') ?GETPOST('address', 'alphanohtml') : $object->address).'</textarea>';
print '</td></tr>';
// Zip / Town
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td>';
print $formcompany->select_ziptown((GETPOST('zipcode', 'alphanohtml') ?GETPOST('zipcode', 'alphanohtml') : $object->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6);
print $formcompany->select_ziptown((GETPOSTISSET('zipcode') ? GETPOST('zipcode', 'alphanohtml') : $object->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6);
print ' ';
print $formcompany->select_ziptown((GETPOST('town', 'alphanohtml') ?GETPOST('town', 'alphanohtml') : $object->town), 'town', array('zipcode', 'selectcountry_id', 'state_id'));
print $formcompany->select_ziptown((GETPOSTISSET('town') ? GETPOST('town', 'alphanohtml') : $object->town), 'town', array('zipcode', 'selectcountry_id', 'state_id'));
print '</td></tr>';
// Country
$object->country_id = $object->country_id ? $object->country_id : $mysoc->country_id;
print '<tr><td width="25%">'.$langs->trans('Country').'</td><td>';
print $form->select_country(GETPOST('country_id', 'alpha') ?GETPOST('country_id', 'alpha') : $object->country_id, 'country_id');
print $form->select_country(GETPOSTISSET('country_id') ? GETPOST('country_id', 'alpha') : $object->country_id, 'country_id');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
print '</td></tr>';
@@ -1026,7 +1023,7 @@ else
print '<tr><td>'.$langs->trans('State').'</td><td>';
if ($object->country_id)
{
print $formcompany->select_state(GETPOST('state_id', 'int') ?GETPOST('state_id', 'int') : $object->state_id, $object->country_code);
print $formcompany->select_state(GETPOSTISSET('state_id') ? GETPOST('state_id', 'int') : $object->state_id, $object->country_code);
}
else
{
@@ -1036,18 +1033,18 @@ else
}
// Pro phone
print '<tr><td>'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePro").'</td><td><input type="text" name="phone" size="20" value="'.(GETPOST('phone', 'alpha') ?GETPOST('phone', 'alpha') : $object->phone).'"></td></tr>';
print '<tr><td>'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePro").'</td><td><input type="text" name="phone" size="20" value="'.(GETPOSTISSET('phone') ? GETPOST('phone', 'alpha') : $object->phone).'"></td></tr>';
// Personal phone
print '<tr><td>'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePerso").'</td><td><input type="text" name="phone_perso" size="20" value="'.(GETPOST('phone_perso', 'alpha') ?GETPOST('phone_perso', 'alpha') : $object->phone_perso).'"></td></tr>';
print '<tr><td>'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePerso").'</td><td><input type="text" name="phone_perso" size="20" value="'.(GETPOSTISSET('phone_perso') ? GETPOST('phone_perso', 'alpha') : $object->phone_perso).'"></td></tr>';
// Mobile phone
print '<tr><td>'.img_picto('', 'object_phoning_mobile').' '.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(GETPOST('phone_mobile', 'alpha') ?GETPOST('phone_mobile', 'alpha') : $object->phone_mobile).'"></td></tr>';
print '<tr><td>'.img_picto('', 'object_phoning_mobile').' '.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(GETPOSTISSET('phone_mobile') ? GETPOST('phone_mobile', 'alpha') : $object->phone_mobile).'"></td></tr>';
if (!empty($conf->socialnetworks->enabled)) {
foreach ($socialnetworks as $key => $value) {
if (!$value['active']) break;
print '<tr><td>'.$langs->trans($value['label']).'</td><td><input type="text" name="member_'.$key.'" size="40" value="'.(GETPOST('member_'.$key, 'alpha') ?GETPOST('member_'.$key, 'alpha') : $object->socialnetworks[$key]).'"></td></tr>';
print '<tr><td>'.$langs->trans($value['label']).'</td><td><input type="text" name="member_'.$key.'" size="40" value="'.(GETPOSTISSET('member_'.$key) ? GETPOST('member_'.$key, 'alpha') : $object->socialnetworks[$key]).'"></td></tr>';
}
}
@@ -1196,14 +1193,14 @@ else
$morphys["phy"] = $langs->trans("Physical");
$morphys["mor"] = $langs->trans("Moral");
print '<tr><td><span class="fieldrequired">'.$langs->trans("MemberNature").'</span></td><td>';
print $form->selectarray("morphy", $morphys, (GETPOSTISSET("morphy") ?GETPOST("morphy", 'alpha') : $object->morphy));
print $form->selectarray("morphy", $morphys, (GETPOSTISSET("morphy") ? GETPOST("morphy", 'alpha') : $object->morphy));
print "</td></tr>";
// Type
print '<tr><td class="fieldrequired">'.$langs->trans("Type").'</td><td>';
if ($user->rights->adherent->creer)
{
print $form->selectarray("typeid", $adht->liste_array(), (GETPOSTISSET("typeid") ?GETPOST("typeid", 'int') : $object->typeid));
print $form->selectarray("typeid", $adht->liste_array(), (GETPOSTISSET("typeid") ? GETPOST("typeid", 'int') : $object->typeid));
}
else
{
@@ -1213,27 +1210,27 @@ else
print "</td></tr>";
// Company
print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td><input type="text" name="societe" class="minwidth300" maxlength="128" value="'.(isset($_POST["societe"]) ?GETPOST("societe", '', 2) : $object->company).'"></td></tr>';
print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td><input type="text" name="societe" class="minwidth300" maxlength="128" value="'.(GETPOSTISSET("societe") ? GETPOST("societe", 'alphanohtml', 2) : $object->company).'"></td></tr>';
// Civility
print '<tr><td>'.$langs->trans("UserTitle").'</td><td>';
print $formcompany->select_civility(isset($_POST["civility_id"]) ? $_POST["civility_id"] : $object->civility_id)."\n";
print $formcompany->select_civility(GETPOSTISSET("civility_id") ? GETPOST("civility_id", 'alpha') : $object->civility_id)."\n";
print '</td>';
print '</tr>';
// Lastname
print '<tr><td id="tdlastname">'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" class="minwidth300" maxlength="50" value="'.(isset($_POST["lastname"]) ?GETPOST("lastname", '', 2) : $object->lastname).'"></td>';
print '<tr><td id="tdlastname">'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" class="minwidth300" maxlength="50" value="'.(GETPOSTISSET("lastname") ? GETPOST("lastname", 'alphanohtml', 2) : $object->lastname).'"></td>';
print '</tr>';
// Firstname
print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" class="minwidth300" maxlength="50" value="'.(isset($_POST["firstname"]) ?GETPOST("firstname", '', 3) : $object->firstname).'"></td>';
print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" class="minwidth300" maxlength="50" value="'.(GETPOSTISSET("firstname") ? GETPOST("firstname", 'alphanohtml', 3) : $object->firstname).'"></td>';
print '</tr>';
// Gender
print '<tr><td>'.$langs->trans("Gender").'</td>';
print '<td>';
$arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"));
print $form->selectarray('gender', $arraygender, GETPOST('gender') ?GETPOST('gender') : $object->gender, 1);
print $form->selectarray('gender', $arraygender, GETPOSTISSET('gender') ? GETPOST('gender', 'alphanohtml') : $object->gender, 1);
print '</td></tr>';
// Photo
@@ -1256,14 +1253,14 @@ else
// Address
print '<tr><td>'.$langs->trans("Address").'</td><td>';
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_2.'">'.(isset($_POST["address"]) ?GETPOST("address", '', 2) : $object->address).'</textarea>';
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_2.'">'.(GETPOSTISSET("address") ? GETPOST("address", 'alphanohtml', 2) : $object->address).'</textarea>';
print '</td></tr>';
// Zip / Town
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td>';
print $formcompany->select_ziptown((isset($_POST["zipcode"]) ?GETPOST("zipcode", '', 2) : $object->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6);
print $formcompany->select_ziptown((GETPOSTISSET("zipcode") ? GETPOST("zipcode", 'alphanohtml', 2) : $object->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6);
print ' ';
print $formcompany->select_ziptown((isset($_POST["town"]) ?GETPOST("town", '', 2) : $object->town), 'town', array('zipcode', 'selectcountry_id', 'state_id'));
print $formcompany->select_ziptown((GETPOSTISSET("town") ? GETPOST("town", 'alphanohtml', 2) : $object->town), 'town', array('zipcode', 'selectcountry_id', 'state_id'));
print '</td></tr>';
// Country
@@ -1282,18 +1279,18 @@ else
}
// Pro phone
print '<tr><td>'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePro").'</td><td><input type="text" name="phone" size="20" value="'.(isset($_POST["phone"]) ?GETPOST("phone") : $object->phone).'"></td></tr>';
print '<tr><td>'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePro").'</td><td><input type="text" name="phone" size="20" value="'.(GETPOSTISSET("phone") ? GETPOST("phone") : $object->phone).'"></td></tr>';
// Personal phone
print '<tr><td>'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePerso").'</td><td><input type="text" name="phone_perso" size="20" value="'.(isset($_POST["phone_perso"]) ?GETPOST("phone_perso") : $object->phone_perso).'"></td></tr>';
print '<tr><td>'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePerso").'</td><td><input type="text" name="phone_perso" size="20" value="'.(GETPOSTISSET("phone_perso") ? GETPOST("phone_perso") : $object->phone_perso).'"></td></tr>';
// Mobile phone
print '<tr><td>'.img_picto('', 'object_phoning_mobile').' '.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(isset($_POST["phone_mobile"]) ?GETPOST("phone_mobile") : $object->phone_mobile).'"></td></tr>';
print '<tr><td>'.img_picto('', 'object_phoning_mobile').' '.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(GETPOSTISSET("phone_mobile") ? GETPOST("phone_mobile") : $object->phone_mobile).'"></td></tr>';
if (!empty($conf->socialnetworks->enabled)) {
foreach ($socialnetworks as $key => $value) {
if (!$value['active']) break;
print '<tr><td>'.$langs->trans($value['label']).'</td><td><input type="text" name="'.$key.'" class="minwidth100" value="'.(isset($_POST[$key]) ?GETPOST($key) : $object->socialnetworks[$key]).'"></td></tr>';
print '<tr><td>'.$langs->trans($value['label']).'</td><td><input type="text" name="'.$key.'" class="minwidth100" value="'.(GETPOSTISSET($key) ? GETPOST($key, 'alphanohtml') : $object->socialnetworks[$key]).'"></td></tr>';
}
}
@@ -1304,7 +1301,7 @@ else
// Public profil
print "<tr><td>".$langs->trans("Public")."</td><td>\n";
print $form->selectyesno("public", (isset($_POST["public"]) ?GETPOST("public", '', 2) : $object->public), 1);
print $form->selectyesno("public", (GETPOSTISSET("public") ? GETPOST("public", 'alphanohtml', 2) : $object->public), 1);
print "</td></tr>\n";
// Categories
@@ -1773,8 +1770,10 @@ else
if ($action != 'editlogin' && $action != 'editthirdparty')
{
// Send
if ($object->statut == 1) {
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a></div>';
if (empty($user->socid)) {
if ($object->statut == 1) {
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a></div>';
}
}
// Send card by email

View File

@@ -259,7 +259,7 @@ print '<br>';
print img_picto('', 'puce').' '.$langs->trans("DocForAllMembersCards", ($conf->global->ADHERENT_CARD_TYPE?$conf->global->ADHERENT_CARD_TYPE:$langs->transnoentitiesnoconv("None"))).' ';
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="token" value="' . newToken() . '">';
print '<input type="hidden" name="foruserid" value="all">';
print '<input type="hidden" name="mode" value="card">';
print '<input type="hidden" name="action" value="builddoc">';
@@ -279,7 +279,7 @@ print '<br><br>';
print img_picto('', 'puce').' '.$langs->trans("DocForOneMemberCards", ($conf->global->ADHERENT_CARD_TYPE?$conf->global->ADHERENT_CARD_TYPE:$langs->transnoentitiesnoconv("None"))).' ';
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="token" value="' . newToken() . '">';
print '<input type="hidden" name="mode" value="cardlogin">';
print '<input type="hidden" name="action" value="builddoc">';
print $langs->trans("DescADHERENT_CARD_TYPE").' ';
@@ -299,7 +299,7 @@ print '<br><br>';
print img_picto('', 'puce').' '.$langs->trans("DocForLabels", $conf->global->ADHERENT_ETIQUETTE_TYPE).' ';
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="token" value="' . newToken() . '">';
print '<input type="hidden" name="mode" value="label">';
print '<input type="hidden" name="action" value="builddoc">';
print $langs->trans("DescADHERENT_ETIQUETTE_TYPE").' ';

View File

@@ -1376,48 +1376,49 @@ class Adherent extends CommonObject
require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
$sql = "SELECT c.rowid, c.fk_adherent, c.subscription, c.note, c.fk_bank,";
$sql.= " c.tms as datem,";
$sql.= " c.datec as datec,";
$sql.= " c.dateadh as dateh,";
$sql.= " c.datef as datef";
$sql.= " FROM ".MAIN_DB_PREFIX."subscription as c";
$sql.= " WHERE c.fk_adherent = ".$this->id;
$sql.= " ORDER BY c.dateadh";
$sql = "SELECT c.rowid, c.fk_adherent, c.fk_type, c.subscription, c.note, c.fk_bank,";
$sql .= " c.tms as datem,";
$sql .= " c.datec as datec,";
$sql .= " c.dateadh as dateh,";
$sql .= " c.datef as datef";
$sql .= " FROM ".MAIN_DB_PREFIX."subscription as c";
$sql .= " WHERE c.fk_adherent = ".$this->id;
$sql .= " ORDER BY c.dateadh";
dol_syslog(get_class($this)."::fetch_subscriptions", LOG_DEBUG);
$resql=$this->db->query($sql);
$resql = $this->db->query($sql);
if ($resql)
{
$this->subscriptions=array();
$this->subscriptions = array();
$i=0;
$i = 0;
while ($obj = $this->db->fetch_object($resql))
{
if ($i==0)
if ($i == 0)
{
$this->first_subscription_date=$this->db->jdate($obj->datec);
$this->first_subscription_date_start=$this->db->jdate($obj->dateh);
$this->first_subscription_date_end=$this->db->jdate($obj->datef);
$this->first_subscription_amount=$obj->subscription;
$this->first_subscription_date = $this->db->jdate($obj->datec);
$this->first_subscription_date_start = $this->db->jdate($obj->dateh);
$this->first_subscription_date_end = $this->db->jdate($obj->datef);
$this->first_subscription_amount = $obj->subscription;
}
$this->last_subscription_date=$this->db->jdate($obj->datec);
$this->last_subscription_date_start=$this->db->jdate($obj->datef);
$this->last_subscription_date_end=$this->db->jdate($obj->datef);
$this->last_subscription_amount=$obj->subscription;
$this->last_subscription_date = $this->db->jdate($obj->datec);
$this->last_subscription_date_start = $this->db->jdate($obj->datef);
$this->last_subscription_date_end = $this->db->jdate($obj->datef);
$this->last_subscription_amount = $obj->subscription;
$subscription=new Subscription($this->db);
$subscription->id=$obj->rowid;
$subscription->fk_adherent=$obj->fk_adherent;
$subscription->amount=$obj->subscription;
$subscription->note=$obj->note;
$subscription->fk_bank=$obj->fk_bank;
$subscription->datem=$this->db->jdate($obj->datem);
$subscription->datec=$this->db->jdate($obj->datec);
$subscription->dateh=$this->db->jdate($obj->dateh);
$subscription->datef=$this->db->jdate($obj->datef);
$subscription = new Subscription($this->db);
$subscription->id = $obj->rowid;
$subscription->fk_adherent = $obj->fk_adherent;
$subscription->fk_type = $obj->fk_type;
$subscription->amount = $obj->subscription;
$subscription->note = $obj->note;
$subscription->fk_bank = $obj->fk_bank;
$subscription->datem = $this->db->jdate($obj->datem);
$subscription->datec = $this->db->jdate($obj->datec);
$subscription->dateh = $this->db->jdate($obj->dateh);
$subscription->datef = $this->db->jdate($obj->datef);
$this->subscriptions[]=$subscription;
$this->subscriptions[] = $subscription;
$i++;
}
@@ -1425,7 +1426,7 @@ class Adherent extends CommonObject
}
else
{
$this->error=$this->db->error().' sql='.$sql;
$this->error = $this->db->error().' sql='.$sql;
return -1;
}
}
@@ -2281,7 +2282,7 @@ class Adherent extends CommonObject
$sql.= " WHERE a.fk_adherent_type = t.rowid";
$sql.= " AND a.statut = 1";
$sql.= " AND a.entity IN (".getEntity('adherent').")";
$sql.= " AND ((a.datefin IS NULL or a.datefin < '".$this->db->idate($now)."') AND t.subscription = 1)";
$sql.= " AND ((a.datefin IS NULL or a.datefin < '".$this->db->idate($now)."') AND t.subscription = '1')";
$resql=$this->db->query($sql);
if ($resql)

View File

@@ -52,6 +52,7 @@ $search_lastname = GETPOST("search_lastname", 'alpha');
$search_firstname = GETPOST("search_firstname", 'alpha');
$search_gender = GETPOST("search_gender", 'alpha');
$search_civility = GETPOST("search_civility", 'alpha');
$search_company = GETPOST('search_company', 'alphanohtml');
$search_login = GETPOST("search_login", 'alpha');
$search_address = GETPOST("search_address", 'alpha');
$search_zip = GETPOST("search_zip", 'alpha');
@@ -254,6 +255,7 @@ $sql = "SELECT d.rowid, d.login, d.lastname, d.firstname, d.gender, d.societe as
$sql .= " d.civility, d.datefin, d.address, d.zip, d.town, d.state_id, d.country,";
$sql .= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.skype, d.birth, d.public, d.photo,";
$sql .= " d.fk_adherent_type as type_id, d.morphy, d.statut, d.datec as date_creation, d.tms as date_update,";
$sql .= " s.nom,";
$sql .= " t.libelle as type, t.subscription,";
$sql .= " state.code_departement as state_code, state.nom as state_name,";
// Add fields from extrafields
@@ -269,6 +271,7 @@ if (is_array($extrafields->attributes[$object->table_element]['label']) && count
if (!empty($search_categ) || !empty($catid)) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_member as cm ON d.rowid = cm.fk_member"; // We need this table joined to the select in order to filter by categ
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = d.country)";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = d.state_id)";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on (s.rowid = d.fk_soc)";
$sql .= ", ".MAIN_DB_PREFIX."adherent_type as t";
$sql .= " WHERE d.fk_adherent_type = t.rowid ";
if ($catid > 0) $sql .= " AND cm.fk_categorie = ".$db->escape($catid);
@@ -289,6 +292,7 @@ if ($search_firstname) $sql .= natural_search("d.firstname", $search_firstname);
if ($search_lastname) $sql .= natural_search(array("d.firstname", "d.lastname", "d.societe"), $search_lastname);
if ($search_gender != '' && $search_gender != '-1') $sql .= " AND d.gender = '".$search_gender."'";
if ($search_login) $sql .= natural_search("d.login", $search_login);
if ($search_company) $sql .= natural_search("s.nom", $search_company);
if ($search_email) $sql .= natural_search("d.email", $search_email);
if ($search_town) $sql .= natural_search("d.town", $search_town);
if ($search_zip) $sql .= natural_search("d.zip", $search_zip);
@@ -868,7 +872,7 @@ while ($i < min($num, $limit))
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Date creation

View File

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

View File

@@ -145,6 +145,8 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
// Show filter box
/*print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<table class="border centpercent">';
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
print '<tr><td>'.$langs->trans("Member").'</td><td>';

View File

@@ -33,6 +33,7 @@ $langs->loadLangs(array("members", "companies"));
$action = GETPOST('action', 'aZ09');
$massaction = GETPOST('massaction', 'alpha');
$contextpage = GETPOST('contextpage', 'aZ09');
$confirm = GETPOST('confirm', 'alpha');
$toselect = GETPOST('toselect', 'array');
@@ -116,7 +117,6 @@ if (empty($reshook))
// Purge search criteria
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers
{
$search = "";
$search_type = "";
$search_ref = "";
$search_lastname = "";
@@ -338,7 +338,7 @@ if (!empty($arrayfields['t.libelle']['checked']))
if (!empty($arrayfields['d.bank']['checked']))
{
print '<td class="liste_titre">';
$form->select_comptes($search_account, 'search_account', 0, '', 1);
$form->select_comptes($search_account, 'search_account', 0, '', 1, '', 0, 'maxwidth150');
print '</td>';
}
@@ -446,7 +446,7 @@ while ($i < min($num, $limit))
// Type
if (!empty($arrayfields['d.fk_type']['checked']))
{
print '<td>';
print '<td class="nowraponall">';
if ($typeid > 0)
{
print $adht->getNomUrl(1);
@@ -466,14 +466,14 @@ while ($i < min($num, $limit))
// Firstname
if (!empty($arrayfields['d.firstname']['checked']))
{
print '<td>'.$adherent->firstname.'</td>';
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($adherent->firstname).'">'.$adherent->firstname.'</td>';
if (!$i) $totalarray['nbfield']++;
}
// Login
if (!empty($arrayfields['d.login']['checked']))
{
print '<td>'.$adherent->login.'</td>';
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($adherent->login).'">'.$adherent->login.'</td>';
if (!$i) $totalarray['nbfield']++;
}
@@ -489,7 +489,7 @@ while ($i < min($num, $limit))
// Banque
if (!empty($arrayfields['d.bank']['checked']))
{
print "<td>";
print '<td class="tdmaxoverflow150">';
if ($obj->fk_account > 0)
{
$accountstatic->id = $obj->fk_account;
@@ -524,7 +524,7 @@ while ($i < min($num, $limit))
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Date creation

View File

@@ -605,7 +605,7 @@ if ($rowid > 0)
}
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.$_SESSION ['newtoken'].'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input class="flat" type="hidden" name="rowid" value="'.$object->id.'" size="12"></td>';
print '<br>';

View File

@@ -324,7 +324,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
}
print '<form action="'.$_SERVER["PHP_SELF"].'" name="agenda">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="token" value="' . newToken() . '">';
print '<input type="hidden" name="action" value="set">';
print '<table class="noborder allwidth">'."\n";

View File

@@ -180,7 +180,7 @@ $head=agenda_prepare_head();
dol_fiche_head($head, 'reminders', $langs->trans("Agenda"), -1, 'action');
print '<form action="'.$_SERVER["PHP_SELF"].'" name="agenda">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="token" value="' . newToken() . '">';
print '<input type="hidden" name="action" value="set">';
print '<table class="noborder allwidth">'."\n";

View File

@@ -66,7 +66,7 @@ llxHeader('', $langs->trans("ClickToDialSetup"), $wikihelp);
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
print load_fiche_titre($langs->trans("ClickToDialSetup"), $linkback, 'title_setup');
print $langs->trans("ClickToDialDesc")."<br>\n";
print '<span class="opacitymedium">'.$langs->trans("ClickToDialDesc")."</span><br>\n";
print '<br>';
print '<form method="post" action="clicktodial.php">';
@@ -119,7 +119,7 @@ if (! empty($conf->global->CLICKTODIAL_URL))
if (GETPOST('phonefortest')) $phonefortest=GETPOST('phonefortest');
print '<form action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="token" value="' . newToken() . '">';
print $langs->trans("LinkToTestClickToDial", $user->login).' : ';
print '<input class="flat" type="text" name="phonefortest" value="'.dol_escape_htmltag($phonefortest).'">';
print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("RefreshPhoneLink")).'">';

View File

@@ -192,7 +192,8 @@ elseif ($action == 'set_ORDER_FREE_TEXT')
{
setEventMessages($langs->trans("Error"), null, 'errors');
}
} elseif ($action == "setshippableiconinlist") {
}
elseif ($action == "setshippableiconinlist") {
// Activate Set Shippable Icon In List
$setshippableiconinlist = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "SHIPPABLE_ORDER_ICON_IN_LIST", $setshippableiconinlist, 'yesno', 0, '', $conf->entity);
@@ -203,6 +204,25 @@ elseif ($action == 'set_ORDER_FREE_TEXT')
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
elseif ($action == 'setribchq')
{
$rib = GETPOST('rib', 'alpha');
$chq = GETPOST('chq', 'alpha');
$res = dolibarr_set_const($db, "FACTURE_RIB_NUMBER", $rib, 'chaine', 0, '', $conf->entity);
$res = dolibarr_set_const($db, "FACTURE_CHQ_NUMBER", $chq, 'chaine', 0, '', $conf->entity);
if (!$res > 0) $error++;
if (!$error)
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
else
{
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
// Activate ask for payment bank
elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_ORDER')
@@ -514,7 +534,122 @@ foreach ($dirmodels as $reldir)
}
print '</table>';
print "<br>";
/*
* Payment mode
*/
print '<br>';
print load_fiche_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInOrder"), '', '');
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="token" value="'.newToken().'" />';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>';
print '<input type="hidden" name="action" value="setribchq">';
print $langs->trans("PaymentMode").'</td>';
print '<td align="right">';
if (empty($conf->facture->enabled)) {
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
}
print '</td>';
print "</tr>\n";
print '<tr class="oddeven">';
print "<td>".$langs->trans("SuggestPaymentByRIBOnAccount")."</td>";
print "<td>";
if (empty($conf->facture->enabled))
{
if (!empty($conf->banque->enabled))
{
$sql = "SELECT rowid, label";
$sql .= " FROM ".MAIN_DB_PREFIX."bank_account";
$sql .= " WHERE clos = 0";
$sql .= " AND courant = 1";
$sql .= " AND entity IN (".getEntity('bank_account').")";
$resql = $db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
$i = 0;
if ($num > 0)
{
print '<select name="rib" class="flat" id="rib">';
print '<option value="0">'.$langs->trans("DoNotSuggestPaymentMode").'</option>';
while ($i < $num)
{
$row = $db->fetch_row($resql);
print '<option value="'.$row[0].'"';
print $conf->global->FACTURE_RIB_NUMBER == $row[0] ? ' selected' : '';
print '>'.$row[1].'</option>';
$i++;
}
print "</select>";
}
else
{
print "<i>".$langs->trans("NoActiveBankAccountDefined")."</i>";
}
}
}
else
{
print '<span class="opacitymedium">'.$langs->trans("BankModuleNotActive").'</span>';
}
}
else {
print '<span class="opacitymedium">'.$langs->trans("SeeSetupOfModule", $langs->transnoentitiesnoconv("Module30Name")).'</span>';
}
print "</td></tr>";
print '<tr class="oddeven">';
print "<td>".$langs->trans("SuggestPaymentByChequeToAddress")."</td>";
print "<td>";
if (empty($conf->facture->enabled))
{
print '<select class="flat" name="chq" id="chq">';
print '<option value="0">'.$langs->trans("DoNotSuggestPaymentMode").'</option>';
print '<option value="-1"'.($conf->global->FACTURE_CHQ_NUMBER ? ' selected' : '').'>'.$langs->trans("MenuCompanySetup").' ('.($mysoc->name ? $mysoc->name : $langs->trans("NotDefined")).')</option>';
$sql = "SELECT rowid, label";
$sql .= " FROM ".MAIN_DB_PREFIX."bank_account";
$sql .= " WHERE clos = 0";
$sql .= " AND courant = 1";
$sql .= " AND entity IN (".getEntity('bank_account').")";
$resql = $db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
$i = 0;
while ($i < $num)
{
$row = $db->fetch_row($resql);
print '<option value="'.$row[0].'"';
print $conf->global->FACTURE_CHQ_NUMBER == $row[0] ? ' selected' : '';
print '>'.$langs->trans("OwnerOfBankAccount", $row[1]).'</option>';
$i++;
}
}
print "</select>";
}
else {
print '<span class="opacitymedium">'.$langs->trans("SeeSetupOfModule", $langs->transnoentitiesnoconv("Module30Name")).'</span>';
}
print "</td></tr>";
print "</table>";
print "</form>";
print '<br>';
/*
* Other options

View File

@@ -408,7 +408,7 @@ print '<tr class="liste_titre"><th class="titlefield wordbreak">'.$langs->trans(
// Name
print '<tr class="oddeven"><td class="fieldrequired"><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
print '<tr class="oddeven"><td class="fieldrequired wordbreak"><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
print '<input name="nom" id="name" class="minwidth200" value="'. dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_NOM?$conf->global->MAIN_INFO_SOCIETE_NOM: GETPOST("nom", 'nohtml')) . '"'.(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '' : ' autofocus="autofocus"').'></td></tr>'."\n";
// Addresse
@@ -477,36 +477,36 @@ if (!empty($conf->barcode->enabled)) {
// Logo
print '<tr class="oddeven"><td><label for="logo">'.$form->textwithpicto($langs->trans("Logo"), 'png, jpg').'</label></td><td>';
print '<table width="100%" class="nobordernopadding"><tr class="nocellnopadd"><td valign="middle" class="nocellnopadd">';
print '<div class="centpertent nobordernopadding valignmiddle "><div class="inline-block marginrightonly">';
print '<input type="file" class="flat minwidth200" name="logo" id="logo" accept="image/*">';
print '</td><td class="nocellnopadd right" valign="middle">';
print '</div><div class="inline-block valignmiddle marginrightonly">';
if (!empty($mysoc->logo_mini)) {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=removelogo">'.img_delete($langs->trans("Delete")).'</a>';
if (file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) {
print ' &nbsp; ';
print '</div><div class="inline-block valignmiddle">';
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;file='.urlencode('logos/thumbs/'.$mysoc->logo_mini).'">';
}
} else {
print '<img height="30" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">';
}
print '</td></tr></table>';
print '</div>';
print '</td></tr>';
// Logo (squarred)
print '<tr class="oddeven"><td><label for="logo_squarred">'.$form->textwithpicto($langs->trans("LogoSquarred"), 'png, jpg').'</label></td><td>';
print '<table width="100%" class="nobordernopadding"><tr class="nocellnopadd"><td valign="middle" class="nocellnopadd">';
print '<div class="centpertent nobordernopadding valignmiddle"><div class="inline-block marginrightonly">';
print '<input type="file" class="flat minwidth200" name="logo_squarred" id="logo_squarred" accept="image/*">';
print '</td><td class="nocellnopadd right" valign="middle">';
print '</div><div class="inline-block valignmiddle marginrightonly">';
if (!empty($mysoc->logo_squarred_mini)) {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=removelogosquarred">'.img_delete($langs->trans("Delete")).'</a>';
if (file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_squarred_mini)) {
print ' &nbsp; ';
print '</div><div class="inline-block valignmiddle marginrightonly">';
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini).'">';
}
} else {
print '<img height="30" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">';
}
print '</td></tr></table>';
print '</div>';
print '</td></tr>';
// Note

View File

@@ -38,6 +38,7 @@ if (!$user->admin) accessforbidden();
$id = GETPOST('rowid', 'int');
$action = GETPOST('action', 'alpha');
$optioncss = GETPOST('optionscss', 'alphanohtml');
$mode = GETPOST('mode', 'aZ09') ?GETPOST('mode', 'aZ09') : 'createform'; // 'createform', 'filters', 'sortorder', 'focus'
@@ -212,10 +213,10 @@ print "<br>\n";
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
if ($defaulturl) $param .= '&defaulturl='.urlencode($defaulturl);
if ($defaultkey) $param .= '&defaultkey='.urlencode($defaultkey);
if ($defaultvalue) $param .= '&defaultvalue='.urlencode($defaultvalue);
if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
if ($defaulturl) $param .= '&defaulturl='.urlencode($defaulturl);
if ($defaultkey) $param .= '&defaultkey='.urlencode($defaultkey);
if ($defaultvalue) $param .= '&defaultvalue='.urlencode($defaultvalue);
print '<form action="'.$_SERVER["PHP_SELF"].((empty($user->entity) && $debug) ? '?debug=1' : '').'" method="POST">';
@@ -252,7 +253,7 @@ $texthelp = $langs->trans("PageUrlForDefaultValues");
if ($mode == 'createform') $texthelp .= $langs->trans("PageUrlForDefaultValuesCreate", 'societe/card.php', 'societe/card.php?abc=val1&def=val2');
else $texthelp .= $langs->trans("PageUrlForDefaultValuesList", 'societe/list.php', 'societe/list.php?abc=val1&def=val2');
$texthelp .= '<br><br>'.$langs->trans("AlsoDefaultValuesAreEffectiveForActionCreate");
$texturl = $form->textwithpicto($langs->trans("Url"), $texthelp);
$texturl = $form->textwithpicto($langs->trans("RelativeURL"), $texthelp);
print_liste_field_titre($texturl, $_SERVER["PHP_SELF"], 'page,param', '', $param, '', $sortfield, $sortorder);
// Field
$texthelp = $langs->trans("TheKeyIsTheNameOfHtmlField");

View File

@@ -644,6 +644,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
if ($value == 'localtax2' && empty($_POST['localtax2_type'])) continue;
if ($value == 'color' && empty($_POST['color'])) continue;
if ($value == 'formula' && empty($_POST['formula'])) continue;
if ($value == 'dayrule' && empty($_POST['dayrule'])) continue;
if ($value == 'sortorder') continue; // For a column name 'sortorder', we use the field name 'position'
if ((!isset($_POST[$value]) || $_POST[$value] == '')
&& (!in_array($listfield[$f], array('decalage', 'module', 'accountancy_code', 'accountancy_code_sell', 'accountancy_code_buy', 'tracking')) // Fields that are not mandatory
@@ -753,20 +754,33 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
$i = 0;
foreach ($listfieldinsert as $f => $value)
{
$keycode = $listfieldvalue[$i];
if (empty($keycode)) $keycode = $value;
if ($value == 'price' || preg_match('/^amount/i', $value) || $value == 'taux') {
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]], 'MU');
$_POST[$keycode] = price2num($_POST[$keycode], 'MU');
}
elseif ($value == 'entity') {
$_POST[$listfieldvalue[$i]] = getEntity($tabname[$id]);
$_POST[$keycode] = getEntity($tabname[$id]);
}
if ($i) $sql .= ",";
if ($listfieldvalue[$i] == 'sortorder') // For column name 'sortorder', we use the field name 'position'
if ($keycode == 'sortorder') // For column name 'sortorder', we use the field name 'position'
{
$sql .= "'".(int) $db->escape(GETPOST('position'))."'";
$sql .= "'".(int) GETPOST('position', 'int')."'";
}
elseif ($_POST[$listfieldvalue[$i]] == '' && !($listfieldvalue[$i] == 'code' && $id == 10)) $sql .= "null"; // For vat, we want/accept code = ''
else $sql .= "'".$db->escape(GETPOST($listfieldvalue[$i], 'nohtml'))."'";
elseif ($_POST[$keycode] == '' && !($keycode == 'code' && $id == 10)) $sql .= "null"; // For vat, we want/accept code = ''
elseif ($keycode == 'content') {
$sql .= "'".$db->escape(GETPOST($keycode, 'restricthtml'))."'";
}
elseif (in_array($keycode, array('joinfile', 'private', 'position', 'scale'))) {
$sql .= (int) GETPOST($keycode, 'int');
}
else {
$sql .= "'".$db->escape(GETPOST($keycode, 'nohtml'))."'";
}
$i++;
}
$sql .= ",1)";
@@ -806,23 +820,36 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
$i = 0;
foreach ($listfieldmodify as $field)
{
$keycode = $listfieldvalue[$i];
if (empty($keycode)) $keycode = $field;
if ($field == 'price' || preg_match('/^amount/i', $field) || $field == 'taux') {
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]], 'MU');
$_POST[$keycode] = price2num($_POST[$keycode], 'MU');
}
elseif ($field == 'entity') {
$_POST[$listfieldvalue[$i]] = getEntity($tabname[$id]);
$_POST[$keycode] = getEntity($tabname[$id]);
}
if ($i) $sql .= ",";
$sql .= $field."=";
if ($listfieldvalue[$i] == 'sortorder') // For column name 'sortorder', we use the field name 'position'
{
$sql .= "'".(int) $db->escape($_POST['position'])."'";
$sql .= (int) GETPOST('position', 'int');
}
elseif ($_POST[$listfieldvalue[$i]] == '' && !($listfieldvalue[$i] == 'code' && $id == 10)) $sql .= "null"; // For vat, we want/accept code = ''
else $sql .= "'".$db->escape($_POST[$listfieldvalue[$i]])."'";
elseif ($_POST[$keycode] == '' && !($keycode == 'code' && $id == 10)) $sql .= "null"; // For vat, we want/accept code = ''
elseif ($keycode == 'content') {
$sql .= "'".$db->escape(GETPOST($keycode, 'restricthtml'))."'";
}
elseif (in_array($keycode, array('private', 'position', 'scale'))) {
$sql .= (int) GETPOST($keycode, 'int');
}
else {
$sql .= "'".$db->escape(GETPOST($keycode, 'nohtml'))."'";
}
$i++;
}
$sql .= " WHERE ".$rowidcol." = '".$db->escape($rowid)."'";
$sql .= " WHERE ".$rowidcol." = ".(int) $db->escape($rowid);
if (in_array('entity', $listfieldmodify)) $sql .= " AND entity = '".getEntity($tabname[$id])."'";
dol_syslog("actionmodify", LOG_DEBUG);

View File

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

View File

@@ -479,7 +479,7 @@ while ($i < min($num, $limit))
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column

View File

@@ -640,7 +640,7 @@ if(!empty($conf->global->INVOICE_USE_DEFAULT_DOCUMENT)) // Hidden conf
}
/*
* Modes de reglement
* Payment modes
*/
print '<br>';
print load_fiche_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInInvoice"), '', '');

View File

@@ -185,7 +185,7 @@ else
print '<br>'."\n";
print '<form name="formtest" method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="token" value="' . newToken() . '">';
// Skins
show_skin(null, 1);

View File

@@ -58,6 +58,13 @@ if (GETPOST('cancel', 'alpha'))
$action='';
}
// Convert action set_XXX and del_XXX to set var (this is used when no javascript on for ajax_constantonoff)
$regs = array();
if (preg_match('/^(set|del)_([A-Z_]+)$/', $action, $regs)) {
if ($regs[1] == 'set') dolibarr_set_const($db, $regs[2], 1, 'chaine', 0, '', $conf->entity);
else dolibarr_del_const($db, $regs[2], $conf->entity);
}
if ($action == 'removebackgroundlogin' && ! empty($conf->global->MAIN_LOGIN_BACKGROUND))
{
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV+1, 'chaine', 0, '', $conf->entity);
@@ -81,15 +88,15 @@ if ($action == 'removebackgroundlogin' && ! empty($conf->global->MAIN_LOGIN_BACK
if ($action == 'update')
{
dolibarr_set_const($db, "MAIN_LANG_DEFAULT", $_POST["MAIN_LANG_DEFAULT"], 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_LANG_DEFAULT", GETPOST("MAIN_LANG_DEFAULT", 'aZ09'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV+1, 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MULTILANGS", $_POST["MAIN_MULTILANGS"], 'chaine', 0, '', $conf->entity);
//dolibarr_set_const($db, "MAIN_MULTILANGS", $_POST["MAIN_MULTILANGS"], 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_THEME", $_POST["main_theme"], 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_THEME", GETPOST("main_theme", 'aZ09'), 'chaine', 0, '', $conf->entity);
$val=GETPOST('THEME_TOPMENU_DISABLE_IMAGE');
/*$val=GETPOST('THEME_TOPMENU_DISABLE_IMAGE');
if (! $val) dolibarr_del_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', $conf->entity);
else dolibarr_set_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', GETPOST('THEME_TOPMENU_DISABLE_IMAGE'), 'chaine', 0, '', $conf->entity);
else dolibarr_set_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', GETPOST('THEME_TOPMENU_DISABLE_IMAGE'), 'chaine', 0, '', $conf->entity);*/
$val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_BACKBODY'), array()))));
if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_BACKBODY', $conf->entity);
@@ -141,25 +148,27 @@ if ($action == 'update')
if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_USE_CHECKED', $conf->entity);
else dolibarr_set_const($db, "THEME_ELDY_USE_CHECKED", $val, 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", $_POST["main_size_liste_limit"], 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_SIZE_SHORTLIST_LIMIT", $_POST["main_size_shortliste_limit"], 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["MAIN_DISABLE_JAVASCRIPT"], 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_BUTTON_HIDE_UNAUTHORIZED", $_POST["MAIN_BUTTON_HIDE_UNAUTHORIZED"], 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_START_WEEK", $_POST["MAIN_START_WEEK"], 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_DAYS", $_POST["MAIN_DEFAULT_WORKING_DAYS"], 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_HOURS", $_POST["MAIN_DEFAULT_WORKING_HOURS"], 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_SHOW_LOGO", $_POST["MAIN_SHOW_LOGO"], 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", $_POST["MAIN_FIRSTNAME_NAME_POSITION"], 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", GETPOST("main_size_liste_limit", 'int'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_SIZE_SHORTLIST_LIMIT", GETPOST("main_size_shortliste_limit", 'int'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_HELPCENTER_DISABLELINK", $_POST["MAIN_HELPCENTER_DISABLELINK"], 'chaine', 0, '', 0); // Param for all entities
dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr($_POST["main_motd"]), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_HOME", dol_htmlcleanlastbr($_POST["main_home"]), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", $_POST["MAIN_HELP_DISABLELINK"], 'chaine', 0, '', 0); // Param for all entities
dolibarr_set_const($db, "MAIN_BUGTRACK_ENABLELINK", $_POST["MAIN_BUGTRACK_ENABLELINK"], 'chaine', 0, '', $conf->entity);
//dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", GETPOST("MAIN_DISABLE_JAVASCRIPT", 'aZ09'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_BUTTON_HIDE_UNAUTHORIZED", GETPOST("MAIN_BUTTON_HIDE_UNAUTHORIZED", 'aZ09'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_START_WEEK", GETPOST("MAIN_START_WEEK", 'int'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_DAYS", GETPOST("MAIN_DEFAULT_WORKING_DAYS", 'alpha'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_HOURS", GETPOST("MAIN_DEFAULT_WORKING_HOURS", 'alpha'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_SHOW_LOGO", GETPOST("MAIN_SHOW_LOGO", 'aZ09'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", GETPOST("MAIN_FIRSTNAME_NAME_POSITION", 'aZ09'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_HELPCENTER_DISABLELINK", GETPOST('MAIN_HELPCENTER_DISABLELINK', 'aZ09'), 'chaine', 0, '', 0); // Param for all entities
dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr(GETPOST("main_motd", 'none')), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_HOME", dol_htmlcleanlastbr(GETPOST("main_home", 'none')), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", GETPOST("MAIN_HELP_DISABLELINK", 'aZ09'), 'chaine', 0, '', 0); // Param for all entities
dolibarr_set_const($db, "MAIN_BUGTRACK_ENABLELINK", GETPOST('MAIN_BUGTRACK_ENABLELINK', 'aZ09'), 'chaine', 0, '', $conf->entity);
$varforimage='imagebackground'; $dirforimage=$conf->mycompany->dir_output.'/logos/';
if ($_FILES[$varforimage]["tmp_name"])
{
$reg = array();
if (preg_match('/([^\\/:]+)$/i', $_FILES[$varforimage]["name"], $reg))
{
$original_file=$reg[1];
@@ -247,7 +256,7 @@ print '</tr>';
// Multilingual GUI
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("EnableMultilangInterface").'</td><td>';
print $form->selectyesno('MAIN_MULTILANGS', $conf->global->MAIN_MULTILANGS, 1);
print ajax_constantonoff("MAIN_MULTILANGS");
print '</td>';
print '<td width="20">&nbsp;</td>';
print '</tr>';
@@ -266,7 +275,7 @@ print '</tr>';
// Disable javascript and ajax
print '<tr class="oddeven"><td>'.$langs->trans("DisableJavascript").'</td><td>';
print $form->selectyesno('MAIN_DISABLE_JAVASCRIPT', isset($conf->global->MAIN_DISABLE_JAVASCRIPT)?$conf->global->MAIN_DISABLE_JAVASCRIPT:0, 1);
print ajax_constantonoff("MAIN_DISABLE_JAVASCRIPT");
print '</td>';
print '<td width="20">&nbsp;</td>';
print '</tr>';

View File

@@ -3,7 +3,7 @@
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006-2020 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
@@ -23,7 +23,7 @@
/**
* \file htdocs/admin/ldap.php
* \ingroup ldap
* \brief Page d'administration/configuration du module Ldap
* \brief Page to setup module LDAP
*/
require '../main.inc.php';
@@ -57,19 +57,19 @@ if (empty($reshook))
$error=0;
$db->begin();
if (! dolibarr_set_const($db, 'LDAP_SERVER_TYPE', GETPOST("type"), 'chaine', 0, '', $conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_SERVER_PROTOCOLVERSION', GETPOST("LDAP_SERVER_PROTOCOLVERSION"), 'chaine', 0, '', $conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_SERVER_HOST', GETPOST("host"), 'chaine', 0, '', $conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_SERVER_HOST_SLAVE', GETPOST("slave"), 'chaine', 0, '', $conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_SERVER_PORT', GETPOST("port"), 'chaine', 0, '', $conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_SERVER_DN', GETPOST("dn"), 'chaine', 0, '', $conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_ADMIN_DN', GETPOST("admin"), 'chaine', 0, '', $conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_ADMIN_PASS', GETPOST("pass"), 'chaine', 0, '', $conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_SERVER_USE_TLS', GETPOST("usetls"), 'chaine', 0, '', $conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_SYNCHRO_ACTIVE', GETPOST("activesynchro"), 'chaine', 0, '', $conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_CONTACT_ACTIVE', GETPOST("activecontact"), 'chaine', 0, '', $conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_MEMBER_ACTIVE', GETPOST("activemembers"), 'chaine', 0, '', $conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_MEMBER_TYPE_ACTIVE', GETPOST("activememberstypes"), 'chaine', 0, '', $conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_SERVER_TYPE', GETPOST("type", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_SERVER_PROTOCOLVERSION', GETPOST("LDAP_SERVER_PROTOCOLVERSION", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_SERVER_HOST', GETPOST("host", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_SERVER_HOST_SLAVE', GETPOST("slave", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_SERVER_PORT', GETPOST("port", 'int'), 'chaine', 0, '', $conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_SERVER_DN', GETPOST("dn", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_ADMIN_DN', GETPOST("admin", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_ADMIN_PASS', GETPOST("pass", 'none'), 'chaine', 0, '', $conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_SERVER_USE_TLS', GETPOST("usetls", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_SYNCHRO_ACTIVE', GETPOST("activesynchro", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_CONTACT_ACTIVE', GETPOST("activecontact", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_MEMBER_ACTIVE', GETPOST("activemembers", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_MEMBER_TYPE_ACTIVE', GETPOST("activememberstypes", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
if (! $error)
{

View File

@@ -99,6 +99,7 @@ $triggersendname = ''; // Disable triggers
$paramname = 'id';
$mode = 'emailfortest';
$trackid = (($action == 'testhtml') ? "testhtml" : "test");
$sendcontext='';
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
if ($action == 'presend' && GETPOST('trackid', 'alphanohtml') == 'test') $action = 'test';
@@ -791,7 +792,7 @@ else
print load_fiche_titre($langs->trans("DoTestServerAvailability"));
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
$mail = new CMailFile('', '', '', '');
$mail = new CMailFile('', '', '', '', array(), array(), array(), '', '', 0, '', '', '', '', $trackid, $sendcontext);
$result = $mail->check_server_port($server, $port);
if ($result) print '<div class="ok">'.$langs->trans("ServerAvailableOnIPOrPort", $server, $port).'</div>';
else

View File

@@ -535,8 +535,9 @@ else
print load_fiche_titre($langs->trans("DoTestServerAvailability"));
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
$mail = new CMailFile('', '', '', '');
$result=$mail->check_server_port($server, $port);
$mail = new CMailFile('', '', '', '', array(), array(), array(), '', '', 0, '', '', '', '', $trackid, $sendcontext);
$result = $mail->check_server_port($server, $port);
if ($result) print '<div class="ok">'.$langs->trans("ServerAvailableOnIPOrPort", $server, $port).'</div>';
else
{

View File

@@ -58,6 +58,8 @@ $search_topic = GETPOST('search_topic', 'alpha');
if (!empty($user->socid)) accessforbidden();
$acts = array();
$actl = array();
$acts[0] = "activate";
$acts[1] = "disable";
$actl[0] = img_picto($langs->trans("Disabled"), 'switch_off');
@@ -166,6 +168,7 @@ if ($conf->societe->enabled) $elementList['thirdparty'] = $langs->tran
if ($conf->adherent->enabled) $elementList['member'] = $langs->trans('MailToMember');
if ($conf->contrat->enabled) $elementList['contract'] = $langs->trans('MailToSendContract');
if ($conf->projet->enabled) $elementList['project'] = $langs->trans('MailToProject');
if ($conf->ticket->enabled) $elementList['ticket_send'] = $langs->trans('MailToTicket');
$elementList['user'] = $langs->trans('MailToUser');
$parameters = array('elementList'=>$elementList);
@@ -261,28 +264,39 @@ if (empty($reshook))
$i = 0;
foreach ($listfieldinsert as $f => $value)
{
//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 (empty($keycode)) $keycode = $value;
if ($value == 'entity') $_POST[$keycode] = $conf->entity;
if ($i) $sql .= ",";
if ($value == 'fk_user' && !($_POST[$keycode] > 0)) $_POST[$keycode] = '';
if ($value == 'private' && !is_numeric($_POST[$keycode])) $_POST[$keycode] = '0';
if ($value == 'position' && !is_numeric($_POST[$keycode])) $_POST[$keycode] = '1';
if ($_POST[$keycode] == '' && $keycode != 'langcode') $sql .= "null"; // lang must be '' if not defined so the unique key that include lang will work
elseif ($_POST[$keycode] == '0' && $keycode == 'langcode') $sql .= "''"; // lang must be '' if not defined so the unique key that include lang will work
else $sql .= "'".$db->escape($_POST[$keycode])."'";
//var_dump($keycode.' '.$value);
if ($i) $sql .= ", ";
if (GETPOST($keycode) == '' && $keycode != 'langcode') $sql .= "null"; // langcode must be '' if not defined so the unique key that include lang will work
elseif (GETPOST($keycode) == '0' && $keycode == 'langcode') $sql .= "''"; // langcode must be '' if not defined so the unique key that include lang will work
elseif ($keycode == 'content') {
$sql .= "'".$db->escape(GETPOST($keycode, 'restricthtml'))."'";
}
elseif (in_array($keycode, array('joinfile', 'private', 'position', 'scale'))) {
$sql .= (int) GETPOST($keycode, 'int');
}
else {
$sql .= "'".$db->escape(GETPOST($keycode, 'nohtml'))."'";
}
$i++;
}
$sql .= ",1)";
$sql .= ", 1)";
dol_syslog("actionadd", LOG_DEBUG);
$result = $db->query($sql);
if ($result) // Add is ok
{
setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs');
$_POST = array('id'=>$id); // Clean $_POST array, we keep only
$_POST = array('id'=>$id); // Clean $_POST array, we keep only id
}
else
{
@@ -308,6 +322,7 @@ if (empty($reshook))
{
$keycode = $listfieldvalue[$i];
if ($field == 'lang') $keycode = 'langcode';
if (empty($keycode)) $keycode = $field;
if ($field == 'fk_user' && !($_POST['fk_user'] > 0)) $_POST['fk_user'] = '';
if ($field == 'topic') $_POST['topic'] = $_POST['topic-'.$rowid];
@@ -315,15 +330,22 @@ if (empty($reshook))
if ($field == 'content') $_POST['content'] = $_POST['content-'.$rowid];
if ($field == 'content_lines') $_POST['content_lines'] = $_POST['content_lines-'.$rowid];
if ($field == 'entity') $_POST[$keycode] = $conf->entity;
if ($i) $sql .= ",";
if ($i) $sql .= ", ";
$sql .= $field."=";
//print $keycode.' - '.$_POST[$keycode].'<br>';
if ($_POST[$keycode] == '' || ($keycode != 'langcode' && $keycode != 'position' && $keycode != 'private' && empty($_POST[$keycode]))) $sql .= "null"; // lang must be '' if not defined so the unique key that include lang will work
elseif ($_POST[$keycode] == '0' && $keycode == 'langcode') $sql .= "''"; // lang must be '' if not defined so the unique key that include lang will work
elseif ($keycode == 'private') $sql .= ((int) $_POST[$keycode]); // private must be 0 or 1
elseif ($keycode == 'position') $sql .= ((int) $_POST[$keycode]);
else $sql .= "'".$db->escape($_POST[$keycode])."'";
if (GETPOST($keycode) == '' || ($keycode != 'langcode' && $keycode != 'position' && $keycode != 'private' && ! GETPOST($keycode))) $sql .= "null"; // langcode,... must be '' if not defined so the unique key that include lang will work
elseif (GETPOST($keycode) == '0' && $keycode == 'langcode') $sql .= "''"; // langcode must be '' if not defined so the unique key that include lang will work
elseif ($keycode == 'content') {
$sql .= "'".$db->escape(GETPOST($keycode, 'restricthtml'))."'";
}
elseif (in_array($keycode, array('joinfile', 'private', 'position', 'scale'))) {
$sql .= (int) GETPOST($keycode, 'int');
}
else {
$sql .= "'".$db->escape(GETPOST($keycode, 'nohtml'))."'";
}
$i++;
}
$sql .= " WHERE ".$rowidcol." = '".$rowid."'";

View File

@@ -118,6 +118,7 @@ if ($action == 'install')
// $original_file should match format module_modulename-x.y[.z].zip
$original_file = basename($_FILES["fileinstall"]["name"]);
$original_file = preg_replace('/\(\d+\)\.zip$/i', '.zip', $original_file);
$newfile = $conf->admin->dir_temp.'/'.$original_file.'/'.$original_file;
if (!$original_file)
@@ -930,7 +931,7 @@ if ($mode == 'marketplace')
?>
<form method="POST" class="centpercent" id="searchFormList" action="<?php echo $dolistore->url ?>">
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken'] ?>">
<input type="hidden" name="token" value="<?php echo newToken(); ?>">
<input type="hidden" name="mode" value="marketplace">
<div class="divsearchfield"><?php echo $langs->trans('Keyword') ?>:
<input name="search_keyword" placeholder="<?php echo $langs->trans('Chercher un module') ?>" id="search_keyword" type="text" size="50" value="<?php echo $options['search'] ?>"><br>

View File

@@ -512,29 +512,35 @@ foreach ($dirmodels as $reldir)
print '</table>';
/*
* Payment mode
*/
print '<br>';
print load_fiche_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInProposal"), '', '');
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="token" value="'.newToken().'" />';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>';
print '<input type="hidden" name="action" value="setribchq">';
print $langs->trans("PaymentMode").'</td>';
print '<td align="right">';
if (empty($conf->facture->enabled)) {
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
}
print '</td>';
print "</tr>\n";
print '<tr class="oddeven">';
print "<td>".$langs->trans("SuggestPaymentByRIBOnAccount")."</td>";
print "<td>";
if (empty($conf->facture->enabled))
{
print '<br>';
print load_fiche_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInProposal"), '', '');
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="token" value="'.newToken().'" />';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>';
print '<input type="hidden" name="action" value="setribchq">';
print $langs->trans("PaymentMode").'</td>';
print '<td align="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
print "</tr>\n";
print '<tr class="oddeven">';
print "<td>".$langs->trans("SuggestPaymentByRIBOnAccount")."</td>";
print "<td>";
if (!empty($conf->banque->enabled))
{
$sql = "SELECT rowid, label";
@@ -571,13 +577,19 @@ if (empty($conf->facture->enabled))
}
else
{
print $langs->trans("BankModuleNotActive");
print '<span class="opacitymedium">'.$langs->trans("BankModuleNotActive").'</span>';
}
print "</td></tr>";
}
else {
print '<span class="opacitymedium">'.$langs->trans("SeeSetupOfModule", $langs->transnoentitiesnoconv("Module30Name")).'</span>';
}
print "</td></tr>";
print '<tr class="oddeven">';
print "<td>".$langs->trans("SuggestPaymentByChequeToAddress")."</td>";
print "<td>";
print '<tr class="oddeven">';
print "<td>".$langs->trans("SuggestPaymentByChequeToAddress")."</td>";
print "<td>";
if (empty($conf->facture->enabled))
{
print '<select class="flat" name="chq" id="chq">';
print '<option value="0">'.$langs->trans("DoNotSuggestPaymentMode").'</option>';
print '<option value="-1"'.($conf->global->FACTURE_CHQ_NUMBER ? ' selected' : '').'>'.$langs->trans("MenuCompanySetup").' ('.($mysoc->name ? $mysoc->name : $langs->trans("NotDefined")).')</option>';
@@ -605,10 +617,14 @@ if (empty($conf->facture->enabled))
}
}
print "</select>";
print "</td></tr>";
print "</table>";
print "</form>";
}
else {
print '<span class="opacitymedium">'.$langs->trans("SeeSetupOfModule", $langs->transnoentitiesnoconv("Module30Name")).'</span>';
}
print "</td></tr>";
print "</table>";
print "</form>";
print '<br>';

View File

@@ -197,6 +197,7 @@ dol_fiche_end();
print load_fiche_titre($langs->trans("TicketNumberingModules"));
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td width="100">'.$langs->trans("Name").'</td>';
@@ -287,7 +288,9 @@ foreach ($dirmodels as $reldir) {
}
}
print '</table><br>';
print '</table>';
print '</div>';
print '<br>';
if (!$conf->use_javascript_ajax) {
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'" enctype="multipart/form-data" >';

View File

@@ -167,7 +167,7 @@ $head = ticketAdminPrepareHead();
dol_fiche_head($head, 'public', $langs->trans("Module56000Name"), -1, "ticket");
print '<span class="opacitymedium">'.$langs->trans("TicketPublicAccess").'</span> : <a href="'.dol_buildpath('/public/ticket/index.php', 1).'" target="_blank" >'.dol_buildpath('/public/ticket/index.php', 2).'</a>';
print '<span class="opacitymedium">'.$langs->trans("TicketPublicAccess").'</span> : <a class="wordbreak" href="'.dol_buildpath('/public/ticket/index.php', 1).'" target="_blank" >'.dol_buildpath('/public/ticket/index.php', 2).'</a>';
dol_fiche_end();
@@ -176,14 +176,14 @@ $enabledisablehtml = $langs->trans("TicketsActivatePublicInterface").' ';
if (empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE))
{
// Button off, click to enable
$enabledisablehtml .= '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setTICKET_ENABLE_PUBLIC_INTERFACE&value=1'.$param.'">';
$enabledisablehtml .= '<a class="reposition valignmiddle" href="'.$_SERVER["PHP_SELF"].'?action=setTICKET_ENABLE_PUBLIC_INTERFACE&value=1'.$param.'">';
$enabledisablehtml .= img_picto($langs->trans("Disabled"), 'switch_off');
$enabledisablehtml .= '</a>';
}
else
{
// Button on, click to disable
$enabledisablehtml .= '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setTICKET_ENABLE_PUBLIC_INTERFACE&value=0'.$param.'">';
$enabledisablehtml .= '<a class="reposition valignmiddle" href="'.$_SERVER["PHP_SELF"].'?action=setTICKET_ENABLE_PUBLIC_INTERFACE&value=0'.$param.'">';
$enabledisablehtml .= img_picto($langs->trans("Activated"), 'switch_on');
$enabledisablehtml .= '</a>';
}
@@ -200,6 +200,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE))
print '<input type="hidden" name="action" value="setvarother">';
}
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><td>'.$langs->trans("Parameters").'</td>';
print '<td class="left">';
@@ -279,7 +280,9 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE))
print '</tr>';
}
print '</table><br>';
print '</table>';
print '</div>';
print '<br>';
if (!$conf->use_javascript_ajax) {
print '</form>';
@@ -288,6 +291,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE))
// Admin var of module
print load_fiche_titre($langs->trans("TicketParamMail"));
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">';
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'" enctype="multipart/form-data" >';
@@ -369,13 +373,14 @@ if (!empty($conf->global->TICKET_ENABLE_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 '<input type="text" class="minwidth500" name="TICKET_URL_PUBLIC_INTERFACE" value="'.$conf->global->TICKET_URL_PUBLIC_INTERFACE.'"></td>';
print '</td>';
print '<td class="center">';
print $form->textwithpicto('', $langs->trans("TicketUrlPublicInterfaceHelpAdmin"), 1, 'help');
print '</td></tr>';
print '</table>';
print '</div>';
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></div>';

View File

@@ -200,7 +200,6 @@ if (in_array($type, array('mysql', 'mysqli'))) {
print '<div class="formelementrow">';
print '<input type="checkbox" name="use_transaction" value="yes" id="checkbox_use_transaction" />';
print '<label for="checkbox_use_transaction">'.$langs->trans("UseTransactionnalMode").'</label>';
print '</div>';
if (! empty($conf->global->MYSQL_OLD_OPTION_DISABLE_FK)) {

View File

@@ -137,6 +137,15 @@ class DolibarrApi
unset($object->labelStatus);
unset($object->labelStatusShort);
unset($object->stats_propale);
unset($object->stats_commande);
unset($object->stats_contrat);
unset($object->stats_facture);
unset($object->stats_commande_fournisseur);
unset($object->stats_reception);
unset($object->stats_mrptoconsume);
unset($object->stats_mrptoproduce);
unset($object->element);
unset($object->fk_element);
unset($object->table_element);

View File

@@ -230,7 +230,7 @@ class Documents extends DolibarrApi
/**
* Return the list of documents of a dedicated element (from its ID or Ref)
*
* @param string $modulepart Name of module or area concerned ('thirdparty', 'member', 'proposal', 'order', 'invoice', 'shipment', 'project', ...)
* @param string $modulepart Name of module or area concerned ('thirdparty', 'member', 'proposal', 'order', 'invoice', 'supplier_invoice', 'shipment', 'project', ...)
* @param int $id ID of element
* @param string $ref Ref of element
* @param string $sortfield Sort criteria ('','fullname','relativename','name','date','size')
@@ -355,6 +355,24 @@ class Documents extends DolibarrApi
$upload_dir = $conf->facture->dir_output."/".get_exdir(0, 0, 0, 1, $object, 'invoice');
}
elseif ($modulepart == 'facture_fournisseur' || $modulepart == 'supplier_invoice')
{
$modulepart = 'supplier_invoice';
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
if (!DolibarrApiAccess::$user->rights->fournisseur->facture->lire) {
throw new RestException(401);
}
$object = new FactureFournisseur($this->db);
$result = $object->fetch($id, $ref);
if (!$result) {
throw new RestException(404, 'Invoice not found');
}
$upload_dir = $conf->fournisseur->dir_output."/facture/".get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier').dol_sanitizeFileName($object->ref);
}
elseif ($modulepart == 'produit' || $modulepart == 'product')
{
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
@@ -387,6 +405,22 @@ class Documents extends DolibarrApi
$upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($object->ref);
}
elseif ($modulepart == 'expensereport')
{
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
if (!DolibarrApiAccess::$user->rights->expensereport->read && !DolibarrApiAccess::$user->rights->expensereport->read) {
throw new RestException(401);
}
$object = new ExpenseReport($this->db);
$result = $object->fetch($id, $ref);
if (!$result) {
throw new RestException(404, 'Expense report not found');
}
$upload_dir = $conf->expensereport->dir_output.'/'.dol_sanitizeFileName($object->ref);
}
else
{
throw new RestException(500, 'Modulepart '.$modulepart.' not implemented yet.');
@@ -418,8 +452,9 @@ class Documents extends DolibarrApi
/**
* Upload a file.
*
* Test sample 1: { "filename": "mynewfile.txt", "modulepart": "facture", "ref": "FA1701-001", "subdir": "", "filecontent": "content text", "fileencoding": "", "overwriteifexists": "0" }.
* Test sample 2: { "filename": "mynewfile.txt", "modulepart": "medias", "ref": "", "subdir": "image/mywebsite", "filecontent": "Y29udGVudCB0ZXh0Cg==", "fileencoding": "base64", "overwriteifexists": "0" }.
* Test sample for invoice: { "filename": "mynewfile.txt", "modulepart": "invoice", "ref": "FA1701-001", "subdir": "", "filecontent": "content text", "fileencoding": "", "overwriteifexists": "0" }.
* Test sample for supplier invoice: { "filename": "mynewfile.txt", "modulepart": "supplier_invoice", "ref": "FA1701-001", "subdir": "", "filecontent": "content text", "fileencoding": "", "overwriteifexists": "0" }.
* Test sample for medias file: { "filename": "mynewfile.txt", "modulepart": "medias", "ref": "", "subdir": "image/mywebsite", "filecontent": "Y29udGVudCB0ZXh0Cg==", "fileencoding": "base64", "overwriteifexists": "0" }.
*
* @param string $filename Name of file to create ('FA1705-0123.txt')
* @param string $modulepart Name of module or area concerned by file upload ('facture', 'project', 'project_task', ...)
@@ -476,6 +511,13 @@ class Documents extends DolibarrApi
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
$object = new Facture($this->db);
}
elseif ($modulepart == 'facture_fournisseur' || $modulepart == 'supplier_invoice')
{
$modulepart = 'supplier_invoice';
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
$object = new FactureFournisseur($this->db);
}
elseif ($modulepart == 'project')
{
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
@@ -510,6 +552,11 @@ class Documents extends DolibarrApi
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
$object = new Product($this->db);
}
elseif ($modulepart == 'expensereport')
{
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
$object = new ExpenseReport($this->db);
}
// TODO Implement additional moduleparts
else
{
@@ -535,6 +582,12 @@ class Documents extends DolibarrApi
throw new RestException(404, 'The object '.$modulepart." with ref '".$ref."' was not found.");
}
// Special cases that need to use get_exdir to get real dir of object
// If future, all object should use this to define path of documents.
if ($modulepart == 'supplier_invoice') {
$tmpreldir = get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier');
}
$relativefile = $tmpreldir.dol_sanitizeFileName($object->ref);
$tmp = dol_check_secure_access_document($modulepart, $relativefile, $entity, DolibarrApiAccess::$user, $ref, 'write');

View File

@@ -281,7 +281,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if (empty($reshook))
{
// Send
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>'."\n";
if (empty($user->socid)) {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>'."\n";
}
if ($user->rights->asset->write)
{

View File

@@ -459,7 +459,7 @@ while ($i < min($num, $limit))
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column

View File

@@ -278,6 +278,7 @@ dol_htmloutput_errors($mesg);
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="mode" value="label">';
print '<input type="hidden" name="action" value="builddoc">';
print '<input type="hidden" name="token" value="'.newtoken().'">';
print '<div class="tagtable">';

View File

@@ -546,7 +546,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$result = $object->getLinesArray();
print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#addline' : '#line_'.GETPOST('lineid', 'int')).'" method="POST">
<input type="hidden" name="token" value="' . $_SESSION ['newtoken'].'">
<input type="hidden" name="token" value="' . newToken().'">
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">
<input type="hidden" name="mode" value="">
<input type="hidden" name="id" value="' . $object->id.'">
@@ -601,7 +601,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if (empty($reshook))
{
// Send
//print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=presend&mode=init#formmailbeforetitle">' . $langs->trans('SendMail') . '</a>'."\n";
//if (empty($user->socid)) {
// print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=presend&mode=init#formmailbeforetitle">' . $langs->trans('SendMail') . '</a>'."\n";
//}
// Back to draft
if ($object->status == $object::STATUS_VALIDATED)

View File

@@ -482,7 +482,7 @@ $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfi
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
// Fields title search
@@ -502,7 +502,7 @@ foreach ($object->fields as $key => $val)
elseif (strpos($val['type'], 'integer:') === 0) {
print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1);
}
elseif (! preg_match('/^(date|timestamp)/', $val['type'])) print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">';
elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">';
print '</td>';
}
}
@@ -582,6 +582,7 @@ while ($i < ($limit ? min($num, $limit) : $num))
elseif ($key == 'ref') $cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'status') $cssforfield .= ($cssforfield ? ' ' : '').'right';
if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100';
if (!empty($arrayfields['t.'.$key]['checked']))
{

View File

@@ -34,6 +34,7 @@ function printBookmarksList()
if (! empty($conf->use_javascript_ajax)) { // Bookmark autosubmit can't work when javascript is off.
require_once DOL_DOCUMENT_ROOT.'/bookmarks/class/bookmark.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php';
if (! isset($conf->global->BOOKMARKS_SHOW_IN_MENU)) $conf->global->BOOKMARKS_SHOW_IN_MENU=5;
$langs->load("bookmarks");

View File

@@ -226,7 +226,7 @@ class Categories extends DolibarrApi
throw new RestException(404, 'category not found');
}
if (!DolibarrApi::_checkAccessToResource('category', $this->category->id)) {
if (!DolibarrApi::_checkAccessToResource('categorie', $this->category->id)) {
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
}
@@ -261,7 +261,7 @@ class Categories extends DolibarrApi
throw new RestException(404, 'category not found');
}
if (!DolibarrApi::_checkAccessToResource('category', $this->category->id)) {
if (!DolibarrApi::_checkAccessToResource('categorie', $this->category->id)) {
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
}
@@ -750,7 +750,7 @@ class Categories extends DolibarrApi
throw new RestException(404, 'category not found');
}
if (!DolibarrApi::_checkAccessToResource('category', $this->category->id)) {
if (!DolibarrApi::_checkAccessToResource('categorie', $this->category->id)) {
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
}

View File

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

View File

@@ -831,7 +831,7 @@ if ($action == 'create')
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="add">';
print '<input type="hidden" name="donotclearsession" value="1">';
if ($backtopage) print '<input type="hidden" name="backtopage" value="'.($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"]).'">';
if ($backtopage) print '<input type="hidden" name="backtopage" value="'.($backtopage != '1' ? $backtopage : htmlentities($_SERVER["HTTP_REFERER"])).'">';
if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) print '<input type="hidden" name="actioncode" value="'.dol_getIdFromCode($db, 'AC_OTH', 'c_actioncomm').'">';
if (GETPOST("actioncode", 'aZ09') == 'AC_RDV') print load_fiche_titre($langs->trans("AddActionRendezVous"), '', 'title_agenda');
@@ -1053,7 +1053,7 @@ if ($action == 'create')
$numproject = $formproject->select_projects((!empty($societe->id) ? $societe->id : -1), $projectid, 'projectid', 0, 0, 1, 1);
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$societe->id.'&action=create"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddProject").'"></span></a>';
$urloption = '?action=create';
$urloption = '?action=create&donotclearsession=1';
$url = dol_buildpath('comm/action/card.php', 2).$urloption;
// update task list
@@ -1232,7 +1232,7 @@ if ($id > 0)
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="id" value="'.$id.'">';
print '<input type="hidden" name="ref_ext" value="'.$object->ref_ext.'">';
if ($backtopage) print '<input type="hidden" name="backtopage" value="'.($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"]).'">';
if ($backtopage) print '<input type="hidden" name="backtopage" value="'.($backtopage != '1' ? $backtopage : htmlentities($_SERVER["HTTP_REFERER"])).'">';
if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) print '<input type="hidden" name="actioncode" value="'.$object->type_code.'">';
dol_fiche_head($head, 'card', $langs->trans("Action"), 0, 'action');
@@ -1473,7 +1473,7 @@ if ($id > 0)
{
print '<td id="project-task-input-container" >';
$urloption = '?action=create'; // we use create not edit for more flexibility
$urloption = '?action=create&donotclearsession=1'; // we use create not edit for more flexibility
$url = DOL_URL_ROOT.'/comm/action/card.php'.$urloption;
// update task list

View File

@@ -681,6 +681,7 @@ class ActionComm extends CommonObject
$sql = "SELECT a.id,";
$sql .= " a.id as ref,";
$sql .= " a.entity,";
$sql .= " a.ref_ext,";
$sql .= " a.datep,";
$sql .= " a.datep2,";
@@ -717,6 +718,7 @@ class ActionComm extends CommonObject
$obj = $this->db->fetch_object($resql);
$this->id = $obj->id;
$this->entity = $obj->entity;
$this->ref = $obj->ref;
$this->ref_ext = $obj->ref_ext;
@@ -903,7 +905,7 @@ class ActionComm extends CommonObject
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
$res=$this->db->query($sql);
if ($res < 0) {
if (!$res) {
$this->error=$this->db->lasterror();
$error++;
}
@@ -914,7 +916,7 @@ class ActionComm extends CommonObject
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
$res=$this->db->query($sql);
if ($res < 0) {
if (!$res) {
$this->error=$this->db->lasterror();
$error++;
}

View File

@@ -718,7 +718,7 @@ if ($resql)
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;

View File

@@ -248,7 +248,7 @@ $nav .= " &nbsp; (<a href=\"?year=".$nowyear."&amp;month=".$nowmonth."&amp;day="
$picto = 'calendarweek';
$nav .= ' &nbsp; <form name="dateselect" action="'.$_SERVER["PHP_SELF"].'?action=show_peruser'.$param.'">';
$nav .= '<input type="hidden" name="token" value="'.$_SESSION ['newtoken'].'">';
$nav .= '<input type="hidden" name="token" value="'.newToken().'">';
$nav .= '<input type="hidden" name="action" value="'.$action.'">';
$nav .= '<input type="hidden" name="filtert" value="'.$filtert.'">';
$nav .= '<input type="hidden" name="usergroup" value="'.$usergroup.'">';

View File

@@ -289,7 +289,7 @@ $nav .= " &nbsp; <a href=\"?year=".$next_year."&amp;month=".$next_month."&amp;da
$nav .= " &nbsp; (<a href=\"?year=".$nowyear."&amp;month=".$nowmonth."&amp;day=".$nowday.$param."\">".$langs->trans("Today")."</a>)";
/*$nav.=' &nbsp; <form name="dateselect" action="'.$_SERVER["PHP_SELF"].'?action=show_peruser'.$param.'">';
$nav.='<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
$nav.='<input type="hidden" name="token" value="' . newToken() . '">';
$nav.='<input type="hidden" name="action" value="' . $action . '">';
$nav.='<input type="hidden" name="filtert" value="' . $filtert . '">';
$nav.='<input type="hidden" name="usergroup" value="' . $usergroup . '">';

View File

@@ -5,7 +5,7 @@
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2020 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2015-2019 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
@@ -581,7 +581,7 @@ if ($object->id > 0)
$boxstat .= '<table summary="'.dol_escape_htmltag($langs->trans("DolibarrStateBoard")).'" class="border boxtable boxtablenobottom boxtablenotop" width="100%">';
$boxstat .= '<tr class="impair"><td colspan="2" class="tdboxstats nohover">';
if (!empty($conf->propal->enabled))
if (!empty($conf->propal->enabled) && $user->rights->propal->lire)
{
// Box proposals
$tmp = $object->getOutstandingProposals();
@@ -599,7 +599,7 @@ if ($object->id > 0)
if ($link) $boxstat .= '</a>';
}
if (!empty($conf->commande->enabled))
if (!empty($conf->commande->enabled) && $user->rights->commande->lire)
{
// Box commandes
$tmp = $object->getOutstandingOrders();
@@ -617,7 +617,7 @@ if ($object->id > 0)
if ($link) $boxstat .= '</a>';
}
if (!empty($conf->facture->enabled))
if (!empty($conf->facture->enabled) && $user->rights->facture->lire)
{
// Box factures
$tmp = $object->getOutstandingBills();
@@ -666,7 +666,7 @@ if ($object->id > 0)
$now = dol_now();
/*
* Last proposals
* Latest proposals
*/
if (!empty($conf->propal->enabled) && $user->rights->propal->lire)
{
@@ -738,7 +738,7 @@ if ($object->id > 0)
}
/*
* Last orders
* Latest orders
*/
if (!empty($conf->commande->enabled) && $user->rights->commande->lire)
{
@@ -751,7 +751,7 @@ if ($object->id > 0)
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande as c";
$sql .= " WHERE c.fk_soc = s.rowid ";
$sql .= " AND s.rowid = ".$object->id;
$sql .= " AND c.entity = ".$conf->entity;
$sql .= " AND c.entity IN (".getEntity('commande').')';
$sql .= " ORDER BY c.date_commande DESC";
$resql = $db->query($sql);
@@ -824,7 +824,7 @@ if ($object->id > 0)
}
/*
* Last shipments
* Latest shipments
*/
if (!empty($conf->expedition->enabled) && $user->rights->expedition->lire)
{
@@ -897,7 +897,7 @@ if ($object->id > 0)
}
/*
* Last linked contracts
* Latest linked contracts
*/
if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire)
{
@@ -905,7 +905,7 @@ if ($object->id > 0)
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c";
$sql .= " WHERE c.fk_soc = s.rowid ";
$sql .= " AND s.rowid = ".$object->id;
$sql .= " AND c.entity = ".$conf->entity;
$sql .= " AND c.entity IN (".getEntity('contract').")";
$sql .= " ORDER BY c.datec DESC";
$resql = $db->query($sql);
@@ -967,7 +967,7 @@ if ($object->id > 0)
}
/*
* Last interventions
* Latest interventions
*/
if (!empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire)
{
@@ -975,7 +975,7 @@ if ($object->id > 0)
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."fichinter as f";
$sql .= " WHERE f.fk_soc = s.rowid";
$sql .= " AND s.rowid = ".$object->id;
$sql .= " AND f.entity = ".$conf->entity;
$sql .= " AND f.entity IN (".getEntity('intervention').")";
$sql .= " ORDER BY f.tms DESC";
$resql = $db->query($sql);
@@ -1028,7 +1028,7 @@ if ($object->id > 0)
}
/*
* Last invoices templates
* Latest invoices templates
*/
if (!empty($conf->facture->enabled) && $user->rights->facture->lire)
{
@@ -1044,7 +1044,7 @@ if ($object->id > 0)
$sql .= ', s.nom, s.rowid as socid';
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture_rec as f";
$sql .= " WHERE f.fk_soc = s.rowid AND s.rowid = ".$object->id;
$sql .= " AND f.entity = ".$conf->entity;
$sql .= " AND f.entity IN (".getEntity('invoice').")";
$sql .= ' GROUP BY f.rowid, f.titre, f.amount, f.total, f.tva, f.total_ttc,';
$sql .= ' f.date_last_gen, f.datec, f.frequency, f.unit_frequency,';
$sql .= ' f.suspended, f.date_when,';
@@ -1063,7 +1063,7 @@ if ($object->id > 0)
print '<table class="noborder centpercent lastrecordtable">';
print '<tr class="liste_titre">';
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LatestCustomerTemplateInvoices", ($num <= $MAXLIST ? "" : $MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/compta/facture/list.php?socid='.$object->id.'">'.$langs->trans("AllCustomerTemplateInvoices").'<span class="badge marginleftonlyshort">'.$num.'</span></a></td>';
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LatestCustomerTemplateInvoices", ($num <= $MAXLIST ? "" : $MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/compta/facture/invoicetemplate_list.php?socid='.$object->id.'">'.$langs->trans("AllCustomerTemplateInvoices").'<span class="badge marginleftonlyshort">'.$num.'</span></a></td>';
print '</tr></table></td>';
print '</tr>';
}

View File

@@ -4,6 +4,7 @@
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -149,6 +150,9 @@ if (!empty($conf->propal->enabled) && $user->rights->propal->lire)
$sql = "SELECT p.rowid, p.ref, p.ref_client, p.total_ht, p.tva as total_tva, p.total as total_ttc, s.rowid as socid, s.nom as name, s.client, s.canvas";
$sql .= ", s.code_client";
$sql .= ", s.email";
$sql .= ", s.entity";
$sql .= ", s.code_compta";
$sql .= " FROM ".MAIN_DB_PREFIX."propal as p";
$sql .= ", ".MAIN_DB_PREFIX."societe as s";
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
@@ -167,7 +171,7 @@ if (!empty($conf->propal->enabled) && $user->rights->propal->lire)
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<th colspan="3">'.$langs->trans("ProposalsDraft").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?viewstatut=0"><span class="badge">'.$num.'</span></a></th></tr>';
print '<th colspan="3">'.$langs->trans("ProposalsDraft").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?search_status=0"><span class="badge">'.$num.'</span></a></th></tr>';
if ($num > 0)
{
@@ -193,6 +197,9 @@ if (!empty($conf->propal->enabled) && $user->rights->propal->lire)
$companystatic->code_client = $obj->code_client;
$companystatic->code_fournisseur = $obj->code_fournisseur;
$companystatic->canvas = $obj->canvas;
$companystatic->entity = $obj->entity;
$companystatic->email = $obj->email;
$companystatic->code_compta = $obj->code_compta;
print $companystatic->getNomUrl(1, 'customer', 16);
print '</td>';
print '<td class="nowrap right">'.price($obj->total_ht).'</td></tr>';
@@ -233,6 +240,9 @@ if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposa
$sql = "SELECT p.rowid, p.ref, p.total_ht, p.tva as total_tva, p.total as total_ttc, s.rowid as socid, s.nom as name, s.client, s.canvas";
$sql .= ", s.code_client";
$sql .= ", s.code_fournisseur";
$sql .= ", s.entity";
$sql .= ", s.email";
$sql .= " FROM ".MAIN_DB_PREFIX."supplier_proposal as p";
$sql .= ", ".MAIN_DB_PREFIX."societe as s";
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
@@ -276,6 +286,8 @@ if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposa
$companystatic->code_client = $obj->code_client;
$companystatic->code_fournisseur = $obj->code_fournisseur;
$companystatic->canvas = $obj->canvas;
$companystatic->entity = $obj->entity;
$companystatic->email = $obj->email;
print $companystatic->getNomUrl(1, 'supplier', 16);
print '</td>';
print '<td class="nowrap right">'.price($obj->total_ht).'</td></tr>';
@@ -315,6 +327,9 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire)
$sql = "SELECT c.rowid, c.ref, c.ref_client, c.total_ht, c.tva as total_tva, c.total_ttc, s.rowid as socid, s.nom as name, s.client, s.canvas";
$sql .= ", s.code_client";
$sql .= ", s.email";
$sql .= ", s.entity";
$sql .= ", s.code_compta";
$sql .= " FROM ".MAIN_DB_PREFIX."commande as c";
$sql .= ", ".MAIN_DB_PREFIX."societe as s";
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
@@ -358,6 +373,8 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire)
$companystatic->code_client = $obj->code_client;
$companystatic->code_fournisseur = $obj->code_fournisseur;
$companystatic->canvas = $obj->canvas;
$companystatic->email = $obj->email;
$companystatic->entity = $obj->entity;
print $companystatic->getNomUrl(1, 'customer', 16);
print '</td>';
if (!empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT)) {
@@ -404,6 +421,8 @@ if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande-
$sql = "SELECT cf.rowid, cf.ref, cf.ref_supplier, cf.total_ttc, s.rowid as socid, s.nom as name, s.client, s.canvas";
$sql .= ", s.code_client";
$sql .= ", s.code_fournisseur";
$sql .= ", s.entity";
$sql .= ", s.email";
$sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as cf";
$sql .= ", ".MAIN_DB_PREFIX."societe as s";
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
@@ -447,6 +466,8 @@ if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande-
$companystatic->code_client = $obj->code_client;
$companystatic->code_fournisseur = $obj->code_fournisseur;
$companystatic->canvas = $obj->canvas;
$companystatic->entity = $obj->entity;
$companystatic->email = $obj->email;
print $companystatic->getNomUrl(1, 'supplier', 16);
print '</td>';
if (!empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT)) {
@@ -496,6 +517,9 @@ if (!empty($conf->societe->enabled) && $user->rights->societe->lire)
$sql = "SELECT s.rowid, s.nom as name, s.client, s.datec, s.tms, s.canvas";
$sql .= ", s.code_client";
$sql .= ", s.code_compta";
$sql .= ", s.entity";
$sql .= ", s.email";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql .= " WHERE s.client IN (1, 2, 3)";
@@ -532,6 +556,9 @@ if (!empty($conf->societe->enabled) && $user->rights->societe->lire)
$companystatic->code_client = $objp->code_client;
$companystatic->code_fournisseur = $objp->code_fournisseur;
$companystatic->canvas = $objp->canvas;
$companystatic->code_compta = $objp->code_compta;
$companystatic->entity = $objp->entity;
$companystatic->email = $objp->email;
print '<tr class="oddeven">';
print '<td class="nowrap">'.$companystatic->getNomUrl(1, 'customer', 48).'</td>';
print '<td class="right" nowrap>';
@@ -560,6 +587,8 @@ if (!empty($conf->fournisseur->enabled) && $user->rights->societe->lire)
$sql = "SELECT s.nom as name, s.rowid, s.datec as dc, s.canvas, s.tms as dm";
$sql .= ", s.code_fournisseur";
$sql .= ", s.entity";
$sql .= ", s.email";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql .= " WHERE s.fournisseur = 1";
@@ -591,6 +620,8 @@ if (!empty($conf->fournisseur->enabled) && $user->rights->societe->lire)
$companystatic->code_client = $objp->code_client;
$companystatic->code_fournisseur = $objp->code_fournisseur;
$companystatic->canvas = $objp->canvas;
$companystatic->entity = $objp->entity;
$companystatic->email = $objp->email;
print '<tr class="oddeven">';
print '<td class="nowrap">'.$companystatic->getNomUrl(1, 'supplier', 44).'</td>';
print '<td class="right">'.dol_print_date($db->jdate($objp->dm), 'day').'</td>';
@@ -636,6 +667,8 @@ if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire && 0) // TOD
$sql = "SELECT s.nom as name, s.rowid, s.canvas, ";
$sql .= ", s.code_client";
$sql .= ", s.entity";
$sql .= ", s.email";
$sql .= " c.statut, c.rowid as contratid, p.ref, c.mise_en_service as datemes, c.fin_validite as datefin, c.date_cloture as dateclo";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql .= ", ".MAIN_DB_PREFIX."contrat as c";
@@ -673,6 +706,8 @@ if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire && 0) // TOD
$companystatic->code_client = $objp->code_client;
$companystatic->code_fournisseur = $objp->code_fournisseur;
$companystatic->canvas = $objp->canvas;
$companystatic->entity = $objp->entity;
$companystatic->email = $objp->email;
print $companystatic->getNomUrl(1, 'customer', 44);
print '</td>'."\n";
print "<td class=\"right\">".$staticcontrat->LibStatut($obj->statut, 3)."</td></tr>\n";
@@ -697,6 +732,8 @@ if (!empty($conf->propal->enabled) && $user->rights->propal->lire)
$langs->load("propal");
$sql = "SELECT s.nom as name, s.rowid, s.code_client";
$sql .= ", s.entity";
$sql .= ", s.email";
$sql .= ", p.rowid as propalid, p.entity, p.total as total_ttc, p.total_ht, p.tva as total_tva, p.ref, p.ref_client, p.fk_statut, p.datep as dp, p.fin_validite as dfv";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql .= ", ".MAIN_DB_PREFIX."propal as p";
@@ -718,7 +755,7 @@ if (!empty($conf->propal->enabled) && $user->rights->propal->lire)
{
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><th colspan="5">'.$langs->trans("ProposalsOpened").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?viewstatut=1"><span class="badge">'.$num.'</span></th></tr>';
print '<tr class="liste_titre"><th colspan="5">'.$langs->trans("ProposalsOpened").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?search_status=1"><span class="badge">'.$num.'</span></th></tr>';
$nbofloop = min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD));
while ($i < $nbofloop)
@@ -760,6 +797,8 @@ if (!empty($conf->propal->enabled) && $user->rights->propal->lire)
$companystatic->code_client = $obj->code_client;
$companystatic->code_fournisseur = $obj->code_fournisseur;
$companystatic->canvas = $obj->canvas;
$companystatic->entity = $obj->entity;
$companystatic->email = $obj->email;
print $companystatic->getNomUrl(1, 'customer', 44);
print '</td>';
print '<td class="right">';
@@ -802,6 +841,8 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire)
$sql = "SELECT s.nom as name, s.rowid, c.rowid as commandeid, c.total_ttc, c.total_ht, c.tva as total_tva, c.ref, c.ref_client, c.fk_statut, c.date_valid as dv, c.facture as billed";
$sql .= ", s.code_client";
$sql .= ", s.entity";
$sql .= ", s.email";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql .= ", ".MAIN_DB_PREFIX."commande as c";
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
@@ -822,7 +863,7 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire)
{
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><th class="liste_titre" colspan="5">'.$langs->trans("OrdersOpened").' <a href="'.DOL_URL_ROOT.'/commande/list.php?viewstatut=1"><span class="badge">'.$num.'</span></th></tr>';
print '<tr class="liste_titre"><th class="liste_titre" colspan="5">'.$langs->trans("OrdersOpened").' <a href="'.DOL_URL_ROOT.'/commande/list.php?search_status=1"><span class="badge">'.$num.'</span></th></tr>';
$nbofloop = min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD));
while ($i < $nbofloop)
@@ -864,6 +905,8 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire)
$companystatic->code_client = $obj->code_client;
$companystatic->code_fournisseur = $obj->code_fournisseur;
$companystatic->canvas = $obj->canvas;
$companystatic->entity = $obj->entity;
$companystatic->email = $obj->email;
print $companystatic->getNomUrl(1, 'customer', 44);
print '</td>';
print '<td class="right">';

View File

@@ -90,13 +90,13 @@ if (empty($reshook))
// Action clone object
if ($action == 'confirm_clone' && $confirm == 'yes')
{
if (empty($_REQUEST["clone_content"]) && empty($_REQUEST["clone_receivers"]))
if (! GETPOST("clone_content", 'alpha') && ! GETPOST("clone_receivers", 'alpha'))
{
setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors');
}
else
{
$result = $object->createFromClone($user, $object->id, $_REQUEST["clone_content"], $_REQUEST["clone_receivers"]);
$result = $object->createFromClone($user, $object->id, GETPOST("clone_content", 'alpha'), GETPOST("clone_receivers", 'alpha'));
if ($result > 0)
{
header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result);
@@ -345,6 +345,7 @@ if (empty($reshook))
if (!empty($conf->global->MAILING_DELAY))
{
dol_syslog("Wait a delay of MAILING_DELAY=".$conf->global->MAILING_DELAY);
sleep($conf->global->MAILING_DELAY);
}
@@ -992,7 +993,7 @@ else
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=settodraft&amp;id='.$object->id.'">'.$langs->trans("SetToDraft").'</a>';
}
if (($object->statut == 0 || $object->statut == 1) && $user->rights->mailing->creer)
if (($object->statut == 0 || $object->statut == 1 || $object->statut == 2) && $user->rights->mailing->creer)
{
if (!empty($conf->fckeditor->enabled) && !empty($conf->global->FCKEDITOR_ENABLE_MAILING))
{

View File

@@ -48,8 +48,8 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined,
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortfield) $sortfield = "email";
if (!$sortorder) $sortorder = "ASC";
if (!$sortfield) $sortfield = "mc.statut,email";
if (!$sortorder) $sortorder = "DESC,ASC";
$id = GETPOST('id', 'int');
$rowid = GETPOST('rowid', 'int');

View File

@@ -615,7 +615,8 @@ class AdvanceTargetingMailing extends CommonObject
//Standard Extrafield feature
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) {
$elementtype = Societe::$table_element;
$socstatic = new Societe($this->db);
$elementtype = $socstatic->table_element;
$extrafields->fetch_name_optionals_label($elementtype);
@@ -752,7 +753,8 @@ class AdvanceTargetingMailing extends CommonObject
//Standard Extrafield feature
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) {
$elementtype = Contact::$table_element;
$contactstatic = new Contact($this->db);
$elementtype = $contactstatic->table_element;
// fetch optionals attributes and labels
dol_include_once('/core/class/extrafields.class.php');
@@ -854,7 +856,8 @@ class AdvanceTargetingMailing extends CommonObject
//Standard Extrafield feature
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) {
$elementtype = Societe::$table_element;
$socstatic = new Societe($this->db);
$elementtype = $socstatic->table_element;
// fetch optionals attributes and labels
dol_include_once('/core/class/extrafields.class.php');

View File

@@ -65,7 +65,7 @@ class FormAdvTargetEmailing extends Form
$sql .= " FROM ".MAIN_DB_PREFIX."c_prospectlevel";
$sql .= " WHERE active > 0";
$sql .= " ORDER BY sortorder";
dol_syslog(get_class($this).'::multiselectProspectionStatus sql='.$sql, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$num = $this->db->num_rows($resql);
@@ -111,7 +111,6 @@ class FormAdvTargetEmailing extends Form
$sql .= " WHERE active = 1 AND code<>''";
$sql .= " ORDER BY code ASC";
dol_syslog(get_class($this)."::select_country sql=".$sql);
$resql = $this->db->query($sql);
if ($resql) {
$num = $this->db->num_rows($resql);
@@ -260,7 +259,6 @@ class FormAdvTargetEmailing extends Form
}
// $sql.= ' WHERE entity = '.$conf->entity;
dol_syslog(get_class($this)."::".__METHOD__, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$num = $this->db->num_rows($resql);
@@ -297,7 +295,7 @@ class FormAdvTargetEmailing extends Form
$sql = "SELECT rowid, code, label as civilite, active FROM ".MAIN_DB_PREFIX."c_civility";
$sql .= " WHERE active = 1";
dol_syslog(get_class($this)."::".__METHOD__, LOG_DEBUG);
dol_syslog(__METHOD__, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{
@@ -385,7 +383,7 @@ class FormAdvTargetEmailing extends Form
$sql = "SELECT rowid, label FROM ".MAIN_DB_PREFIX."categorie";
$sql .= " WHERE type=".$type;
dol_syslog(get_class($this)."::".__METHOD__, LOG_DEBUG);
dol_syslog(__METHOD__, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{
@@ -432,7 +430,7 @@ class FormAdvTargetEmailing extends Form
$sql .= " WHERE type_element='$type_element'";
$sql .= " ORDER BY c.name";
dol_syslog(get_class($this)."::".__METHOD__, LOG_DEBUG);
dol_syslog(__METHOD__, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$out .= '<select id="'.$htmlname.'" class="flat'.($morecss?' '.$morecss:'').'" name="'.$htmlname.'">';

View File

@@ -273,8 +273,8 @@ class Mailing extends CommonObject
*
* @param User $user User making the clone
* @param int $fromid Id of object to clone
* @param int $option1 1=Copy content, 0=Forget content
* @param int $option2 Not used
* @param int $option1 1=Clone content, 0=Forget content
* @param int $option2 1=Clone recipients
* @return int New id of clone
*/
public function createFromClone(User $user, $fromid, $option1, $option2)
@@ -305,7 +305,7 @@ class Mailing extends CommonObject
$object->bgcolor = '';
$object->bgimage = '';
$object->email_from = '';
//$object->email_from = ''; // We do not reset from email because it is a mandatory value
$object->email_replyto = '';
$object->email_errorsto = '';
@@ -331,7 +331,7 @@ class Mailing extends CommonObject
if (! $error)
{
//Clone target
// Clone recipient targets
if (!empty($option2)) {
require_once DOL_DOCUMENT_ROOT .'/core/modules/mailings/modules_mailings.php';

View File

@@ -157,6 +157,7 @@ print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
$limit = 10;
$sql = "SELECT m.rowid, m.titre, m.nbemail, m.statut, m.date_creat";
$sql .= " FROM ".MAIN_DB_PREFIX."mailing as m";
$sql .= " WHERE m.entity = ".$conf->entity;
$sql .= " ORDER BY m.date_creat DESC";
$sql .= " LIMIT ".$limit;
$result = $db->query($sql);

View File

@@ -27,7 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/comm/mailing/class/mailing.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/emailing.lib.php';
$id = GETPOST('id');
$id = GETPOST('id', 'int');
// Load translation files required by the page
$langs->load("mails");

View File

@@ -1541,7 +1541,7 @@ if ($action == 'create')
$object = new Propal($db);
print '<form name="addprop" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION ['newtoken'].'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="add">';
if ($origin != 'project' && $originid) {
print '<input type="hidden" name="origin" value="'.$origin.'">';
@@ -1675,7 +1675,7 @@ if ($action == 'create')
$langs->load("projects");
print '<tr>';
print '<td>'.$langs->trans("Project").'</td><td>';
$numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 1);
$numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth500');
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddProject").'"></span></a>';
print '</td>';
print '</tr>';
@@ -2052,7 +2052,7 @@ if ($action == 'create')
print '</td><td>';
if ($object->statut == Propal::STATUS_DRAFT && $action == 'editdate' && $usercancreate) {
print '<form name="editdate" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION ['newtoken'].'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="setdate">';
print $form->selectDate($object->date, 're', '', '', 0, "editdate");
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
@@ -2078,7 +2078,7 @@ if ($action == 'create')
print '</td><td>';
if ($object->statut == Propal::STATUS_DRAFT && $action == 'editecheance' && $usercancreate) {
print '<form name="editecheance" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION ['newtoken'].'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="setecheance">';
print $form->selectDate($object->fin_validite, 'ech', '', '', '', "editecheance");
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
@@ -2412,7 +2412,7 @@ if ($action == 'create')
$result = $object->getLinesArray();
print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#addline' : '#line_'.GETPOST('lineid')).'" method="POST">
<input type="hidden" name="token" value="' . $_SESSION ['newtoken'].'">
<input type="hidden" name="token" value="' . newToken().'">
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">
<input type="hidden" name="mode" value="">
<input type="hidden" name="id" value="' . $object->id.'">
@@ -2498,11 +2498,13 @@ if ($action == 'create')
}
// Send
if ($object->statut == Propal::STATUS_VALIDATED || $object->statut == Propal::STATUS_SIGNED || !empty($conf->global->PROPOSAL_SENDBYEMAIL_FOR_ALL_STATUS)) {
if ($usercansend) {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>';
} else
print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans('SendMail').'</a>';
if (empty($user->socid)) {
if ($object->statut == Propal::STATUS_VALIDATED || $object->statut == Propal::STATUS_SIGNED || !empty($conf->global->PROPOSAL_SENDBYEMAIL_FOR_ALL_STATUS)) {
if ($usercansend) {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>';
} else
print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans('SendMail').'</a>';
}
}
// Create a sale order

View File

@@ -223,6 +223,90 @@ class Propal extends CommonObject
public $oldcopy;
/**
* 'type' if the field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password')
* Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)"
* 'label' the translation key.
* 'enabled' is a condition when the field must be managed.
* 'position' is the sort order of field.
* 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0).
* 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing)
* 'noteditable' says if field is not editable (1 or 0)
* 'default' is a default value for creation (can still be overwrote by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created.
* 'index' if we want an index in database.
* 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...).
* 'searchall' is 1 if we want to search in this field when making a search from the quick search button.
* 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8).
* 'css' is the CSS style to use on field. For example: 'maxwidth200'
* 'help' is a string visible as a tooltip on field
* 'showoncombobox' if value of the field must be visible into the label of the combobox that list record
* 'disabled' is 1 if we want to have the field locked by a 'disabled' attribute. In most cases, this is never set into the definition of $fields into class, but is set dynamically by some part of code.
* 'arraykeyval' to set list of value if type is a list of predefined values. For example: array("0"=>"Draft","1"=>"Active","-1"=>"Cancel")
* 'comment' is not used. You can store here any text of your choice. It is not used by application.
*
* Note: To have value dynamic, you can set value to 0 in definition and edit the value on the fly into the constructor.
*/
// BEGIN MODULEBUILDER PROPERTIES
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
public $fields=array(
'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10),
'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'enabled'=>1, 'visible'=>-1, 'position'=>15),
'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Fk projet', 'enabled'=>1, 'visible'=>-1, 'position'=>20),
'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>25),
'ref' =>array('type'=>'varchar(30)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'showoncombobox'=>1, 'position'=>30),
'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>35, 'index'=>1),
'ref_ext' =>array('type'=>'varchar(255)', 'label'=>'Ref ext', 'enabled'=>1, 'visible'=>0, 'position'=>40),
'ref_int' =>array('type'=>'varchar(255)', 'label'=>'Ref int', 'enabled'=>1, 'visible'=>-1, 'position'=>45),
'ref_client' =>array('type'=>'varchar(255)', 'label'=>'Ref client', 'enabled'=>1, 'visible'=>-1, 'position'=>50),
'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-1, 'position'=>55),
'datep' =>array('type'=>'date', 'label'=>'Datep', 'enabled'=>1, 'visible'=>-1, 'position'=>60),
'fin_validite' =>array('type'=>'datetime', 'label'=>'Fin validite', 'enabled'=>1, 'visible'=>-1, 'position'=>65),
'date_valid' =>array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>70),
'date_cloture' =>array('type'=>'datetime', 'label'=>'Date cloture', 'enabled'=>1, 'visible'=>-1, 'position'=>75),
'fk_user_author' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fk user author', 'enabled'=>1, 'visible'=>-1, 'position'=>80),
'fk_user_modif' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>85),
'fk_user_valid' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>90),
'fk_user_cloture' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fk user cloture', 'enabled'=>1, 'visible'=>-1, 'position'=>95),
'fk_statut' =>array('type'=>'smallint(6)', 'label'=>'Fk statut', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>500),
'price' =>array('type'=>'double', 'label'=>'Price', 'enabled'=>1, 'visible'=>-1, 'position'=>105),
'remise_percent' =>array('type'=>'double', 'label'=>'Remise percent', 'enabled'=>1, 'visible'=>-1, 'position'=>110),
'remise_absolue' =>array('type'=>'double', 'label'=>'Remise absolue', 'enabled'=>1, 'visible'=>-1, 'position'=>115),
'remise' =>array('type'=>'double', 'label'=>'Remise', 'enabled'=>1, 'visible'=>-1, 'position'=>120),
'total_ht' =>array('type'=>'double(24,8)', 'label'=>'Total ht', 'enabled'=>1, 'visible'=>-1, 'position'=>125),
'tva' =>array('type'=>'double(24,8)', 'label'=>'Tva', 'enabled'=>1, 'visible'=>-1, 'position'=>130),
'localtax1' =>array('type'=>'double(24,8)', 'label'=>'Localtax1', 'enabled'=>1, 'visible'=>-1, 'position'=>135),
'localtax2' =>array('type'=>'double(24,8)', 'label'=>'Localtax2', 'enabled'=>1, 'visible'=>-1, 'position'=>140),
'total' =>array('type'=>'double(24,8)', 'label'=>'Total', 'enabled'=>1, 'visible'=>-1, 'position'=>145),
'fk_account' =>array('type'=>'integer', 'label'=>'Fk account', 'enabled'=>1, 'visible'=>-1, 'position'=>150),
'fk_currency' =>array('type'=>'varchar(3)', 'label'=>'Fk currency', 'enabled'=>1, 'visible'=>-1, 'position'=>155),
'fk_cond_reglement' =>array('type'=>'integer', 'label'=>'Fk cond reglement', 'enabled'=>1, 'visible'=>-1, 'position'=>160),
'fk_mode_reglement' =>array('type'=>'integer', 'label'=>'Fk mode reglement', 'enabled'=>1, 'visible'=>-1, 'position'=>165),
'note_private' =>array('type'=>'text', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>170),
'note_public' =>array('type'=>'text', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>175),
'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>1, 'visible'=>0, 'position'=>180),
'date_livraison' =>array('type'=>'date', 'label'=>'Date livraison', 'enabled'=>1, 'visible'=>-1, 'position'=>185),
'fk_shipping_method' =>array('type'=>'integer', 'label'=>'Fk shipping method', 'enabled'=>1, 'visible'=>-1, 'position'=>190),
'fk_availability' =>array('type'=>'integer', 'label'=>'Fk availability', 'enabled'=>1, 'visible'=>-1, 'position'=>195),
'fk_delivery_address' =>array('type'=>'integer', 'label'=>'Fk delivery address', 'enabled'=>1, 'visible'=>-1, 'position'=>200),
'fk_input_reason' =>array('type'=>'integer', 'label'=>'Fk input reason', 'enabled'=>1, 'visible'=>-1, 'position'=>205),
'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>900),
'extraparams' =>array('type'=>'varchar(255)', 'label'=>'Extraparams', 'enabled'=>1, 'visible'=>-1, 'position'=>215),
'fk_incoterms' =>array('type'=>'integer', 'label'=>'Fk incoterms', 'enabled'=>1, 'visible'=>-1, 'position'=>220),
'location_incoterms' =>array('type'=>'varchar(255)', 'label'=>'Location incoterms', 'enabled'=>1, 'visible'=>-1, 'position'=>225),
'fk_multicurrency' =>array('type'=>'integer', 'label'=>'Fk multicurrency', 'enabled'=>1, 'visible'=>-1, 'position'=>230),
'multicurrency_code' =>array('type'=>'varchar(255)', 'label'=>'Multicurrency code', 'enabled'=>1, 'visible'=>-1, 'position'=>235),
'multicurrency_tx' =>array('type'=>'double(24,8)', 'label'=>'Multicurrency tx', 'enabled'=>1, 'visible'=>-1, 'position'=>240),
'multicurrency_total_ht' =>array('type'=>'double(24,8)', 'label'=>'Multicurrency total ht', 'enabled'=>1, 'visible'=>-1, 'position'=>245),
'multicurrency_total_tva' =>array('type'=>'double(24,8)', 'label'=>'Multicurrency total tva', 'enabled'=>1, 'visible'=>-1, 'position'=>250),
'multicurrency_total_ttc' =>array('type'=>'double(24,8)', 'label'=>'Multicurrency total ttc', 'enabled'=>1, 'visible'=>-1, 'position'=>255),
'last_main_doc' =>array('type'=>'varchar(255)', 'label'=>'Last main doc', 'enabled'=>1, 'visible'=>-1, 'position'=>260),
);
// END MODULEBUILDER PROPERTIES
/**
* Draft status
*/
@@ -2908,8 +2992,11 @@ class Propal extends CommonObject
if (!$error)
{
$main = MAIN_DB_PREFIX . 'propaldet';
$ef = $main . "_extrafields";
$sqlef = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_propal = " . $this->id . ")";
$sql = "DELETE FROM ".MAIN_DB_PREFIX."propaldet WHERE fk_propal = ".$this->id;
if ($this->db->query($sql))
if ($this->db->query($sqlef) && $this->db->query($sql))
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."propal WHERE rowid = ".$this->id;
if ($this->db->query($sql))
@@ -3309,8 +3396,8 @@ class Propal extends CommonObject
$response->warning_delay = $delay_warning / 60 / 60 / 24;
$response->label = $label;
$response->labelShort = $labelShort;
$response->url = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$status.'&mainmenu=commercial&leftmenu=propals';
$response->url_late = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$status.'&mainmenu=commercial&leftmenu=propals&sortfield=p.datep&sortorder=asc';
$response->url = DOL_URL_ROOT.'/comm/propal/list.php?search_status='.$status.'&mainmenu=commercial&leftmenu=propals';
$response->url_late = DOL_URL_ROOT.'/comm/propal/list.php?search_status='.$status.'&mainmenu=commercial&leftmenu=propals&sortfield=p.datep&sortorder=asc';
$response->img = img_object('', "propal");
// This assignment in condition is not a bug. It allows walking the results.

View File

@@ -186,7 +186,7 @@ if (!empty($conf->propal->enabled))
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
$langs->load("propal");
print '<td colspan="2">'.$langs->trans("DraftPropals").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?viewstatut=0"><span class="badge">'.$num.'</span></a></td></tr>';
print '<td colspan="2">'.$langs->trans("DraftPropals").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?search_status=0"><span class="badge">'.$num.'</span></a></td></tr>';
$i = 0;
$nbofloop = min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD));
@@ -335,7 +335,7 @@ if (!empty($conf->propal->enabled) && $user->rights->propale->lire)
{
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("ProposalsOpened").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?viewstatut=1"><span class="badge">'.$num.'</span></a></td></tr>';
print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("ProposalsOpened").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?search_status=1"><span class="badge">'.$num.'</span></a></td></tr>';
$nbofloop = min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD));
while ($i < $nbofloop)
@@ -423,7 +423,7 @@ if (! empty($conf->propal->enabled))
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td colspan="3">'.$langs->trans("ProposalsToProcess").' <a href="'.DOL_URL_ROOT.'/commande/list.php?viewstatut=1"><span class="badge">'.$num.'</span></a></td></tr>';
print '<td colspan="3">'.$langs->trans("ProposalsToProcess").' <a href="'.DOL_URL_ROOT.'/commande/list.php?search_status=1"><span class="badge">'.$num.'</span></a></td></tr>';
if ($num)
{
@@ -496,7 +496,7 @@ if (! empty($conf->propal->enabled))
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td colspan="3">'.$langs->trans("OnProcessOrders").' <a href="'.DOL_URL_ROOT.'/commande/list.php?viewstatut=2"><span class="badge">'.$num.'</span></a></td></tr>';
print '<td colspan="3">'.$langs->trans("OnProcessOrders").' <a href="'.DOL_URL_ROOT.'/commande/list.php?search_status=2"><span class="badge">'.$num.'</span></a></td></tr>';
if ($num)
{

View File

@@ -89,7 +89,7 @@ $search_categ_cus = trim(GETPOST("search_categ_cus", 'int'));
$search_btn = GETPOST('button_search', 'alpha');
$search_remove_btn = GETPOST('button_removefilter', 'alpha');
$viewstatut = GETPOST('viewstatut', 'alpha');
$search_status = GETPOST('search_status', 'alpha');
$optioncss = GETPOST('optioncss', 'alpha');
$object_statut = GETPOST('search_statut', 'alpha');
@@ -164,8 +164,8 @@ $arrayfields = array(
'p.total_ht'=>array('label'=>"AmountHT", 'checked'=>1),
'p.total_vat'=>array('label'=>"AmountVAT", 'checked'=>0),
'p.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0),
'p.total_ht_invoiced'=>array('label'=>$langs->trans("AmountInvoicedHT"), 'checked'=>0, 'enabled'=>$conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT),
'p.total_invoiced'=>array('label'=>$langs->trans("AmountInvoicedTTC"), 'checked'=>0, 'enabled'=>$conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT),
'p.total_ht_invoiced'=>array('label'=>"AmountInvoicedHT", 'checked'=>0, 'enabled'=>$conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT),
'p.total_invoiced'=>array('label'=>"AmountInvoicedTTC", 'checked'=>0, 'enabled'=>$conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT),
'u.login'=>array('label'=>"Author", 'checked'=>1, 'position'=>10),
'sale_representative'=>array('label'=>"SaleRepresentativesOfThirdParty", 'checked'=>1),
'p.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500),
@@ -229,13 +229,13 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
$search_monthdelivery = '';
$search_daydelivery = '';
$search_availability = '';
$viewstatut = '';
$search_status = '';
$object_statut = '';
$toselect = '';
$search_array_options = array();
$search_categ_cus = 0;
}
if ($object_statut != '') $viewstatut = $object_statut;
if ($object_statut != '') $search_status = $object_statut;
if (empty($reshook))
{
@@ -338,9 +338,9 @@ if ($search_categ_cus == -2) $sql .= " AND cc.fk_categorie IS NULL";
if ($search_product_category > 0) $sql .= " AND cp.fk_categorie = ".$db->escape($search_product_category);
if ($socid > 0) $sql .= ' AND s.rowid = '.$socid;
if ($viewstatut != '' && $viewstatut != '-1')
if ($search_status != '' && $search_status != '-1')
{
$sql .= ' AND p.fk_statut IN ('.$db->escape($viewstatut).')';
$sql .= ' AND p.fk_statut IN ('.$db->escape($search_status).')';
}
$sql .= dolSqlDateFilter("p.datep", $search_day, $search_month, $search_year);
$sql .= dolSqlDateFilter("p.fin_validite", $search_dayfin, $search_month_end, $search_yearfin);
@@ -412,7 +412,7 @@ if ($resql)
llxHeader('', $langs->trans('Proposal'), $help_url);
$param = '&viewstatut='.urlencode($viewstatut);
$param = '&search_status='.urlencode($search_status);
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
if ($sall) $param .= '&sall='.urlencode($sall);
@@ -468,7 +468,7 @@ if ($resql)
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit);
$topicmail = "SendPropalRef";
$modelmail = "proposal_send";
$modelmail = "propal_send";
$objecttmp = new Propal($db);
$trackid = 'pro'.$object->id;
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
@@ -706,7 +706,7 @@ if ($resql)
if (!empty($arrayfields['p.fk_statut']['checked']))
{
print '<td class="liste_titre maxwidthonsmartphone right">';
$formpropal->selectProposalStatus($viewstatut, 1, 0, 1, 'customer', 'search_statut');
$formpropal->selectProposalStatus($search_status, 1, 0, 1, 'customer', 'search_statut');
print '</td>';
}
// Action column
@@ -1029,9 +1029,7 @@ if ($resql)
$nbofsalesrepresentative = count($listsalesrepresentatives);
if ($nbofsalesrepresentative > 3) // We print only number
{
print '<a href="'.DOL_URL_ROOT.'/societe/commerciaux.php?socid='.$companystatic->id.'">';
print $nbofsalesrepresentative;
print '</a>';
}
elseif ($nbofsalesrepresentative > 0)
{
@@ -1067,7 +1065,7 @@ if ($resql)
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i);
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Date creation

View File

@@ -242,7 +242,9 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
//{
// Show filter box
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="mode" value="'.$mode.'">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
// Company

View File

@@ -111,6 +111,7 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
$newdiscount1->description = $discount->description.' (1)';
$newdiscount2->description = $discount->description.' (2)';
}
$newdiscount1->fk_user = $discount->fk_user;
$newdiscount2->fk_user = $discount->fk_user;
$newdiscount1->fk_soc = $discount->fk_soc;
@@ -121,13 +122,20 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
$newdiscount2->datec = $discount->datec;
$newdiscount1->tva_tx = $discount->tva_tx;
$newdiscount2->tva_tx = $discount->tva_tx;
$newdiscount1->amount_ttc = $_POST["amount_ttc_1"];
$newdiscount1->amount_ttc = $amount_ttc_1;
$newdiscount2->amount_ttc = price2num($discount->amount_ttc - $newdiscount1->amount_ttc);
$newdiscount1->amount_ht = price2num($newdiscount1->amount_ttc / (1 + $newdiscount1->tva_tx / 100), 'MT');
$newdiscount2->amount_ht = price2num($newdiscount2->amount_ttc / (1 + $newdiscount2->tva_tx / 100), 'MT');
$newdiscount1->amount_tva = price2num($newdiscount1->amount_ttc - $newdiscount1->amount_ht);
$newdiscount2->amount_tva = price2num($newdiscount2->amount_ttc - $newdiscount2->amount_ht);
$newdiscount1->multicurrency_amount_ttc = $amount_ttc_1 * ($discount->multicurrency_amount_ttc / $discount->amount_ttc);
$newdiscount2->multicurrency_amount_ttc = price2num($discount->multicurrency_amount_ttc - $newdiscount1->multicurrency_amount_ttc);
$newdiscount1->multicurrency_amount_ht = price2num($newdiscount1->multicurrency_amount_ttc / (1 + $newdiscount1->tva_tx / 100), 'MT');
$newdiscount2->multicurrency_amount_ht = price2num($newdiscount2->multicurrency_amount_ttc / (1 + $newdiscount2->tva_tx / 100), 'MT');
$newdiscount1->multicurrency_amount_tva = price2num($newdiscount1->multicurrency_amount_ttc - $newdiscount1->multicurrency_amount_ht);
$newdiscount2->multicurrency_amount_tva = price2num($newdiscount2->multicurrency_amount_ttc - $newdiscount2->multicurrency_amount_ht);
$db->begin();
$discount->fk_facture_source = 0; // This is to delete only the require record (that we will recreate with two records) and not all family with same fk_facture_source
// This is to delete only the require record (that we will recreate with two records) and not all family with same fk_invoice_supplier_source

View File

@@ -1594,8 +1594,8 @@ if ($action == 'create' && $usercancreate)
$note_public = $object->getDefaultCreateValueFor('note_public');
}
print '<form name="crea_commande" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<form name="crea_commande" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="add">';
print '<input type="hidden" name="socid" value="' . $soc->id . '">' . "\n";
print '<input type="hidden" name="remise_percent" value="' . $soc->remise_percent . '">';
@@ -1734,7 +1734,7 @@ if ($action == 'create' && $usercancreate)
$langs->load("projects");
print '<tr>';
print '<td>'.$langs->trans("Project").'</td><td>';
$numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0);
$numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0, 'maxwidth500');
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="fa fa-plus-circle valignmiddle" title="'.$langs->trans("AddProject").'"></span></a>';
print '</td>';
print '</tr>';
@@ -2100,7 +2100,7 @@ if ($action == 'create' && $usercancreate)
$morehtmlref .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
$morehtmlref .= '<input type="hidden" name="action" value="classin">';
$morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">';
$morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
$morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', 0, 0, 1, 0, 1, 0, 0, '', 1, 0, 'maxwidth500');
$morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
$morehtmlref .= '</form>';
} else {
@@ -2177,7 +2177,7 @@ if ($action == 'create' && $usercancreate)
print '</td><td>';
if ($action == 'editdate') {
print '<form name="setdate" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION ['newtoken'].'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="setdate">';
print $form->selectDate($object->date, 'order_', '', '', '', "setdate");
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
@@ -2198,7 +2198,7 @@ if ($action == 'create' && $usercancreate)
print '</td><td>';
if ($action == 'editdate_livraison') {
print '<form name="setdate_livraison" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION ['newtoken'].'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="setdate_livraison">';
print $form->selectDate($object->date_livraison ? $object->date_livraison : - 1, 'liv_', '', '', '', "setdate_livraison");
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
@@ -2492,7 +2492,7 @@ if ($action == 'create' && $usercancreate)
$result = $object->getLinesArray();
print '<form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#addline' : '#line_'.GETPOST('lineid')).'" method="POST">
<input type="hidden" name="token" value="' . $_SESSION ['newtoken'].'">
<input type="hidden" name="token" value="' . newToken().'">
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">
<input type="hidden" name="mode" value="">
<input type="hidden" name="id" value="' . $object->id.'">';
@@ -2548,11 +2548,13 @@ if ($action == 'create' && $usercancreate)
}
// Send
if ($object->statut > Commande::STATUS_DRAFT || !empty($conf->global->COMMANDE_SENDBYEMAIL_FOR_ALL_STATUS)) {
if ($usercansend) {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>';
} else
print '<a class="butActionRefused classfortooltip" href="#">'.$langs->trans('SendMail').'</a>';
if (empty($user->socid)) {
if ($object->statut > Commande::STATUS_DRAFT || !empty($conf->global->COMMANDE_SENDBYEMAIL_FOR_ALL_STATUS)) {
if ($usercansend) {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>';
} else
print '<a class="butActionRefused classfortooltip" href="#">'.$langs->trans('SendMail').'</a>';
}
}
// Valid

View File

@@ -232,6 +232,94 @@ class Commande extends CommonOrder
//! key of pos source ('0', '1', ...)
public $pos_source;
/**
* 'type' if the field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password')
* Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)"
* 'label' the translation key.
* 'enabled' is a condition when the field must be managed.
* 'position' is the sort order of field.
* 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0).
* 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing)
* 'noteditable' says if field is not editable (1 or 0)
* 'default' is a default value for creation (can still be overwrote by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created.
* 'index' if we want an index in database.
* 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...).
* 'searchall' is 1 if we want to search in this field when making a search from the quick search button.
* 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8).
* 'css' is the CSS style to use on field. For example: 'maxwidth200'
* 'help' is a string visible as a tooltip on field
* 'showoncombobox' if value of the field must be visible into the label of the combobox that list record
* 'disabled' is 1 if we want to have the field locked by a 'disabled' attribute. In most cases, this is never set into the definition of $fields into class, but is set dynamically by some part of code.
* 'arraykeyval' to set list of value if type is a list of predefined values. For example: array("0"=>"Draft","1"=>"Active","-1"=>"Cancel")
* 'comment' is not used. You can store here any text of your choice. It is not used by application.
*
* Note: To have value dynamic, you can set value to 0 in definition and edit the value on the fly into the constructor.
*/
// BEGIN MODULEBUILDER PROPERTIES
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
public $fields=array(
'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10),
'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>15),
'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>20),
'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Fk projet', 'enabled'=>1, 'visible'=>-1, 'position'=>25),
'ref' =>array('type'=>'varchar(30)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'showoncombobox'=>1, 'position'=>30),
'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>35, 'index'=>1),
'ref_ext' =>array('type'=>'varchar(255)', 'label'=>'Ref ext', 'enabled'=>1, 'visible'=>0, 'position'=>40),
'ref_int' =>array('type'=>'varchar(255)', 'label'=>'Ref int', 'enabled'=>1, 'visible'=>-1, 'position'=>45),
'ref_client' =>array('type'=>'varchar(255)', 'label'=>'Ref client', 'enabled'=>1, 'visible'=>-1, 'position'=>50),
'date_creation' =>array('type'=>'datetime', 'label'=>'Date creation', 'enabled'=>1, 'visible'=>-1, 'position'=>55),
'date_valid' =>array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>60),
'date_cloture' =>array('type'=>'datetime', 'label'=>'Date cloture', 'enabled'=>1, 'visible'=>-1, 'position'=>65),
'date_commande' =>array('type'=>'date', 'label'=>'Date commande', 'enabled'=>1, 'visible'=>-1, 'position'=>70),
'fk_user_author' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fk user author', 'enabled'=>1, 'visible'=>-1, 'position'=>75),
'fk_user_modif' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>80),
'fk_user_valid' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>85),
'fk_user_cloture' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fk user cloture', 'enabled'=>1, 'visible'=>-1, 'position'=>90),
'source' =>array('type'=>'smallint(6)', 'label'=>'Source', 'enabled'=>1, 'visible'=>-1, 'position'=>95),
'fk_statut' =>array('type'=>'smallint(6)', 'label'=>'Fk statut', 'enabled'=>1, 'visible'=>-1, 'position'=>500),
'amount_ht' =>array('type'=>'double(24,8)', 'label'=>'Amount ht', 'enabled'=>1, 'visible'=>-1, 'position'=>105),
'remise_percent' =>array('type'=>'double', 'label'=>'Remise percent', 'enabled'=>1, 'visible'=>-1, 'position'=>110),
'remise_absolue' =>array('type'=>'double', 'label'=>'Remise absolue', 'enabled'=>1, 'visible'=>-1, 'position'=>115),
'remise' =>array('type'=>'double', 'label'=>'Remise', 'enabled'=>1, 'visible'=>-1, 'position'=>120),
'tva' =>array('type'=>'double(24,8)', 'label'=>'Tva', 'enabled'=>1, 'visible'=>-1, 'position'=>125),
'localtax1' =>array('type'=>'double(24,8)', 'label'=>'Localtax1', 'enabled'=>1, 'visible'=>-1, 'position'=>130),
'localtax2' =>array('type'=>'double(24,8)', 'label'=>'Localtax2', 'enabled'=>1, 'visible'=>-1, 'position'=>135),
'total_ht' =>array('type'=>'double(24,8)', 'label'=>'Total ht', 'enabled'=>1, 'visible'=>-1, 'position'=>140),
'total_ttc' =>array('type'=>'double(24,8)', 'label'=>'Total ttc', 'enabled'=>1, 'visible'=>-1, 'position'=>145),
'note_private' =>array('type'=>'text', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>150),
'note_public' =>array('type'=>'text', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>155),
'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>1, 'visible'=>0, 'position'=>160),
'facture' =>array('type'=>'tinyint(4)', 'label'=>'Facture', 'enabled'=>1, 'visible'=>-1, 'position'=>165),
'fk_account' =>array('type'=>'integer', 'label'=>'Fk account', 'enabled'=>1, 'visible'=>-1, 'position'=>170),
'fk_currency' =>array('type'=>'varchar(3)', 'label'=>'Fk currency', 'enabled'=>1, 'visible'=>-1, 'position'=>175),
'fk_cond_reglement' =>array('type'=>'integer', 'label'=>'Fk cond reglement', 'enabled'=>1, 'visible'=>-1, 'position'=>180),
'fk_mode_reglement' =>array('type'=>'integer', 'label'=>'Fk mode reglement', 'enabled'=>1, 'visible'=>-1, 'position'=>185),
'date_livraison' =>array('type'=>'date', 'label'=>'Date livraison', 'enabled'=>1, 'visible'=>-1, 'position'=>190),
'fk_shipping_method' =>array('type'=>'integer', 'label'=>'Fk shipping method', 'enabled'=>1, 'visible'=>-1, 'position'=>195),
'fk_warehouse' =>array('type'=>'integer:Entrepot:product/stock/class/entrepot.class.php', 'label'=>'Fk warehouse', 'enabled'=>1, 'visible'=>-1, 'position'=>200),
'fk_availability' =>array('type'=>'integer', 'label'=>'Fk availability', 'enabled'=>1, 'visible'=>-1, 'position'=>205),
'fk_input_reason' =>array('type'=>'integer', 'label'=>'Fk input reason', 'enabled'=>1, 'visible'=>-1, 'position'=>210),
'fk_delivery_address' =>array('type'=>'integer', 'label'=>'Fk delivery address', 'enabled'=>1, 'visible'=>-1, 'position'=>215),
'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>900),
'extraparams' =>array('type'=>'varchar(255)', 'label'=>'Extraparams', 'enabled'=>1, 'visible'=>-1, 'position'=>225),
'fk_incoterms' =>array('type'=>'integer', 'label'=>'Fk incoterms', 'enabled'=>1, 'visible'=>-1, 'position'=>230),
'location_incoterms' =>array('type'=>'varchar(255)', 'label'=>'Location incoterms', 'enabled'=>1, 'visible'=>-1, 'position'=>235),
'fk_multicurrency' =>array('type'=>'integer', 'label'=>'Fk multicurrency', 'enabled'=>1, 'visible'=>-1, 'position'=>240),
'multicurrency_code' =>array('type'=>'varchar(255)', 'label'=>'Multicurrency code', 'enabled'=>1, 'visible'=>-1, 'position'=>245),
'multicurrency_tx' =>array('type'=>'double(24,8)', 'label'=>'Multicurrency tx', 'enabled'=>1, 'visible'=>-1, 'position'=>250),
'multicurrency_total_ht' =>array('type'=>'double(24,8)', 'label'=>'Multicurrency total ht', 'enabled'=>1, 'visible'=>-1, 'position'=>255),
'multicurrency_total_tva' =>array('type'=>'double(24,8)', 'label'=>'Multicurrency total tva', 'enabled'=>1, 'visible'=>-1, 'position'=>260),
'multicurrency_total_ttc' =>array('type'=>'double(24,8)', 'label'=>'Multicurrency total ttc', 'enabled'=>1, 'visible'=>-1, 'position'=>265),
'last_main_doc' =>array('type'=>'varchar(255)', 'label'=>'Last main doc', 'enabled'=>1, 'visible'=>-1, 'position'=>270),
'module_source' =>array('type'=>'varchar(32)', 'label'=>'Module source', 'enabled'=>1, 'visible'=>-1, 'position'=>275),
'pos_source' =>array('type'=>'varchar(32)', 'label'=>'Pos source', 'enabled'=>1, 'visible'=>-1, 'position'=>280),
);
// END MODULEBUILDER PROPERTIES
/**
* ERR Not enough stock
*/
@@ -3308,6 +3396,19 @@ class Commande extends CommonOrder
$error++;
}
if (!$error)
{
// Delete extrafields of order details
$main = MAIN_DB_PREFIX . 'commandedet';
$ef = $main . "_extrafields";
$sql = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_commande = " . $this->id . ")";
if (!$this->db->query($sql))
{
$error++;
$this->errors[] = $this->db->lasterror();
}
}
if (!$error)
{
// Delete order details
@@ -3439,7 +3540,7 @@ class Commande extends CommonOrder
$response->warning_delay=$conf->commande->client->warning_delay/60/60/24;
$response->label=$langs->trans("OrdersToProcess");
$response->labelShort = $langs->trans("Opened");
$response->url=DOL_URL_ROOT.'/commande/list.php?viewstatut=-3&mainmenu=commercial&leftmenu=orders';
$response->url=DOL_URL_ROOT.'/commande/list.php?search_status=-3&mainmenu=commercial&leftmenu=orders';
$response->img=img_object('', "order");
$generic_commande = new Commande($this->db);
@@ -4321,7 +4422,7 @@ class OrderLine extends CommonOrderLine
foreach ($this->errors as $errmsg)
{
dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR);
dol_syslog(get_class($this)."::insert ".$errmsg, LOG_ERR);
$this->error .= ($this->error ? ', '.$errmsg : $errmsg);
}
$this->db->rollback();

View File

@@ -155,7 +155,7 @@ if ($resql)
{
print '<tr class="oddeven">';
print '<td>'.$commandestatic->LibStatut($status, $bool, 0).'</td>';
print '<td class="right"><a href="list.php?viewstatut='.$status.'">'.(isset($vals[$status.$bool]) ? $vals[$status.$bool] : 0).' ';
print '<td class="right"><a href="list.php?search_status='.$status.'">'.(isset($vals[$status.$bool]) ? $vals[$status.$bool] : 0).' ';
print $commandestatic->LibStatut($status, $bool, 3);
print '</a>';
print '</td>';
@@ -347,7 +347,7 @@ if (!empty($conf->commande->enabled))
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<th colspan="3">'.$langs->trans("OrdersToProcess").' <a href="'.DOL_URL_ROOT.'/commande/list.php?viewstatut=1"><span class="badge">'.$num.'</span></a></th></tr>';
print '<th colspan="3">'.$langs->trans("OrdersToProcess").' <a href="'.DOL_URL_ROOT.'/commande/list.php?search_status=1"><span class="badge">'.$num.'</span></a></th></tr>';
if ($num)
{
@@ -429,7 +429,7 @@ if (!empty($conf->commande->enabled))
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<th colspan="3">'.$langs->trans("OnProcessOrders").' <a href="'.DOL_URL_ROOT.'/commande/list.php?viewstatut=2"><span class="badge">'.$num.'</span></a></th></tr>';
print '<th colspan="3">'.$langs->trans("OnProcessOrders").' <a href="'.DOL_URL_ROOT.'/commande/list.php?search_status=2"><span class="badge">'.$num.'</span></a></th></tr>';
if ($num)
{

View File

@@ -80,7 +80,7 @@ $search_total_ttc = GETPOST('search_total_ttc', 'alpha');
$search_categ_cus = trim(GETPOST("search_categ_cus", 'int'));
$optioncss = GETPOST('optioncss', 'alpha');
$billed = GETPOST('billed', 'int');
$viewstatut = GETPOST('viewstatut', 'int');
$search_status = GETPOST('search_status', 'int');
$search_btn = GETPOST('button_search', 'alpha');
$search_remove_btn = GETPOST('button_removefilter', 'alpha');
$search_project_ref = GETPOST('search_project_ref', 'alpha');
@@ -205,7 +205,7 @@ if (empty($reshook))
$search_deliveryyear = '';
$search_project_ref = '';
$search_project = '';
$viewstatut = '';
$search_status = '';
$billed = '';
$toselect = '';
$search_array_options = array();
@@ -288,23 +288,23 @@ if ($search_ref) $sql .= natural_search('c.ref', $search_ref);
if ($search_ref_customer) $sql .= natural_search('c.ref_client', $search_ref_customer);
if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall);
if ($billed != '' && $billed >= 0) $sql .= ' AND c.facture = '.$billed;
if ($viewstatut <> '')
if ($search_status <> '')
{
if ($viewstatut < 4 && $viewstatut > -3)
if ($search_status < 4 && $search_status > -3)
{
if ($viewstatut == 1 && empty($conf->expedition->enabled)) $sql .= ' AND c.fk_statut IN (1,2)'; // If module expedition disabled, we include order with status 'sending in process' into 'validated'
else $sql .= ' AND c.fk_statut = '.$viewstatut; // brouillon, validee, en cours, annulee
if ($search_status == 1 && empty($conf->expedition->enabled)) $sql .= ' AND c.fk_statut IN (1,2)'; // If module expedition disabled, we include order with status 'sending in process' into 'validated'
else $sql .= ' AND c.fk_statut = '.$search_status; // brouillon, validee, en cours, annulee
}
if ($viewstatut == 4)
if ($search_status == 4)
{
$sql .= ' AND c.facture = 1'; // invoice created
}
if ($viewstatut == -2) // To process
if ($search_status == -2) // To process
{
//$sql.= ' AND c.fk_statut IN (1,2,3) AND c.facture = 0';
$sql .= " AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))"; // If status is 2 and facture=1, it must be selected
}
if ($viewstatut == -3) // To bill
if ($search_status == -3) // To bill
{
//$sql.= ' AND c.fk_statut in (1,2,3)';
//$sql.= ' AND c.facture = 0'; // invoice not created
@@ -367,21 +367,21 @@ if ($resql)
{
$title = $langs->trans('ListOfOrders');
}
if (strval($viewstatut) == '0')
if (strval($search_status) == '0')
$title .= ' - '.$langs->trans('StatusOrderDraftShort');
if ($viewstatut == 1)
if ($search_status == 1)
$title .= ' - '.$langs->trans('StatusOrderValidatedShort');
if ($viewstatut == 2)
if ($search_status == 2)
$title .= ' - '.$langs->trans('StatusOrderSentShort');
if ($viewstatut == 3)
if ($search_status == 3)
$title .= ' - '.$langs->trans('StatusOrderToBillShort');
if ($viewstatut == 4)
if ($search_status == 4)
$title .= ' - '.$langs->trans('StatusOrderProcessedShort');
if ($viewstatut == -1)
if ($search_status == -1)
$title .= ' - '.$langs->trans('StatusOrderCanceledShort');
if ($viewstatut == -2)
if ($search_status == -2)
$title .= ' - '.$langs->trans('StatusOrderToProcessShort');
if ($viewstatut == -3)
if ($search_status == -3)
$title .= ' - '.$langs->trans('StatusOrderValidated').', '.(empty($conf->expedition->enabled) ? '' : $langs->trans("StatusOrderSent").', ').$langs->trans('StatusOrderToBill');
$num = $db->num_rows($resql);
@@ -404,7 +404,7 @@ if ($resql)
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
if ($sall) $param .= '&sall='.urlencode($sall);
if ($socid > 0) $param .= '&socid='.urlencode($socid);
if ($viewstatut != '') $param .= '&viewstatut='.urlencode($viewstatut);
if ($search_status != '') $param .= '&search_status='.urlencode($search_status);
if ($search_orderday) $param .= '&search_orderday='.urlencode($search_orderday);
if ($search_ordermonth) $param .= '&search_ordermonth='.urlencode($search_ordermonth);
if ($search_orderyear) $param .= '&search_orderyear='.urlencode($search_orderyear);
@@ -462,7 +462,7 @@ if ($resql)
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
print '<input type="hidden" name="search_status" value="'.$search_status.'">';
print '<input type="hidden" name="socid" value="'.$socid.'">';
@@ -717,7 +717,7 @@ if ($resql)
-3=>$langs->trans("StatusOrderValidatedShort").'+'.$langs->trans("StatusOrderSentShort").'+'.$langs->trans("StatusOrderDelivered"),
Commande::STATUS_CANCELED=>$langs->trans("StatusOrderCanceledShort")
);
print $form->selectarray('viewstatut', $liststatus, $viewstatut, -4, 0, 0, '', 0, 0, 0, '', 'maxwidth100');
print $form->selectarray('search_status', $liststatus, $search_status, -4, 0, 0, '', 0, 0, 0, '', 'maxwidth100');
print '</td>';
}
// Status billed
@@ -820,7 +820,7 @@ if ($resql)
$generic_commande->getLinesArray(); // This set ->lines
print $generic_commande->getNomUrl(1, ($viewstatut != 2 ? 0 : $obj->fk_statut), 0, 0, 0, 1, 1);
print $generic_commande->getNomUrl(1, ($search_status != 2 ? 0 : $obj->fk_statut), 0, 0, 0, 1, 1);
// Show shippable Icon (create subloop, so may be slow)
if ($conf->stock->enabled)
@@ -1075,7 +1075,7 @@ if ($resql)
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i);
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Date creation

View File

@@ -57,7 +57,7 @@ $socid = GETPOST('socid', 'int');
$selected = GETPOST('orders_to_invoice');
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$viewstatut = GETPOST('viewstatut', 'alpha');
$search_status = GETPOST('search_status', 'alpha');
$error = 0;

View File

@@ -255,7 +255,9 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
// Show filter box
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="mode" value="'.$mode.'">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
// Company

View File

@@ -16,11 +16,17 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
/**
* \file htdocs/compta/accounting-files.php
* \ingroup compta
* \brief Page to show portoflio and files of a thirdparty and download it
*/
if ((array_key_exists('action', $_GET) && $_GET['action'] == 'dl') || (array_key_exists('action', $_POST) && $_POST['action'] == 'dl')) { // To not replace token when downloading file
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1');
}
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
@@ -77,7 +83,22 @@ if ($user->socid > 0) {
accessforbidden();
}
$entity = GETPOST('entity', 'int') ?GETPOST('entity', 'int') : $conf->entity;
// Define $arrayofentities if multientity is set.
$arrayofentities = array();
if (!empty($conf->multicompany->enabled) && is_object($mc)) {
$arrayofentities = $mc->getEntitiesList();
}
$entity = (GETPOSTISSET('entity') ? GETPOST('entity', 'int') : (GETPOSTISSET('search_entity') ? GETPOST('search_entity', 'int') : $conf->entity));
if (!empty($conf->multicompany->enabled) && is_object($mc)) {
if (empty($entity) && ! empty($conf->global->MULTICOMPANY_ALLOW_EXPORT_ACCOUNTING_DOC_FOR_ALL_ENTITIES)) {
$entity = '0,'.join(',', array_keys($arrayofentities));
}
}
if (empty($entity)) $entity = $conf->entity;
$error = 0;
/*
@@ -91,7 +112,7 @@ $entity = GETPOST('entity', 'int') ?GETPOST('entity', 'int') : $conf->entity;
$filesarray = array();
$result = false;
if (($action == "searchfiles" || $action == "dl")) {
if (($action == 'searchfiles' || $action == 'dl')) {
if (empty($date_start))
{
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateStart")), null, 'errors');
@@ -108,42 +129,42 @@ if (($action == "searchfiles" || $action == "dl")) {
$wheretail = " '".$db->idate($date_start)."' AND '".$db->idate($date_stop)."'";
// Customer invoices
$sql = "SELECT t.rowid as id, t.ref, t.paye as paid, total as total_ht, total_ttc, tva as total_vat, fk_soc, t.datef as date, 'Invoice' as item, s.nom as thirdparty_name, s.code_client as thirdparty_code, c.code as country_code, s.tva_intra as vatnum";
$sql = "SELECT t.rowid as id, t.entity, t.ref, t.paye as paid, total as total_ht, total_ttc, tva as total_vat, fk_soc, t.datef as date, 'Invoice' as item, s.nom as thirdparty_name, s.code_client as thirdparty_code, c.code as country_code, s.tva_intra as vatnum";
$sql .= " FROM ".MAIN_DB_PREFIX."facture as t LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = t.fk_soc LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = s.fk_pays";
$sql .= " WHERE datef between ".$wheretail;
$sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')';
$sql .= " AND t.fk_statut <> ".Facture::STATUS_DRAFT;
$sql .= " UNION ALL";
// Vendor invoices
$sql .= " SELECT t.rowid as id, t.ref, paye as paid, total_ht, total_ttc, total_tva as total_vat, fk_soc, datef as date, 'SupplierInvoice' as item, s.nom as thirdparty_name, s.code_fournisseur as thirdparty_code, c.code as country_code, s.tva_intra as vatnum";
$sql .= " SELECT t.rowid as id, t.entity, t.ref, paye as paid, total_ht, total_ttc, total_tva as total_vat, fk_soc, datef as date, 'SupplierInvoice' as item, s.nom as thirdparty_name, s.code_fournisseur as thirdparty_code, c.code as country_code, s.tva_intra as vatnum";
$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as t LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = t.fk_soc LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = s.fk_pays";
$sql .= " WHERE datef between ".$wheretail;
$sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')';
$sql .= " AND t.fk_statut <> ".FactureFournisseur::STATUS_DRAFT;
$sql .= " UNION ALL";
// Expense reports
$sql .= " SELECT t.rowid as id, t.ref, paid, total_ht, total_ttc, total_tva as total_vat, fk_user_author as fk_soc, date_fin as date, 'ExpenseReport' as item, CONCAT(CONCAT(u.lastname, ' '), u.firstname) as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum";
$sql .= " SELECT t.rowid as id, t.entity, t.ref, paid, total_ht, total_ttc, total_tva as total_vat, fk_user_author as fk_soc, date_fin as date, 'ExpenseReport' as item, CONCAT(CONCAT(u.lastname, ' '), u.firstname) as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum";
$sql .= " FROM ".MAIN_DB_PREFIX."expensereport as t LEFT JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = t.fk_user_author LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = u.fk_country";
$sql .= " WHERE date_fin between ".$wheretail;
$sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')';
$sql .= " AND t.fk_statut <> ".ExpenseReport::STATUS_DRAFT;
$sql .= " UNION ALL";
// Donations
$sql .= " SELECT t.rowid as id, t.ref, paid, amount as total_ht, amount as total_ttc, 0 as total_vat, 0 as fk_soc, datedon as date, 'Donation' as item, t.societe as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum";
$sql .= " SELECT t.rowid as id, t.entity, t.ref, paid, amount as total_ht, amount as total_ttc, 0 as total_vat, 0 as fk_soc, datedon as date, 'Donation' as item, t.societe as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum";
$sql .= " FROM ".MAIN_DB_PREFIX."don as t LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = t.fk_country";
$sql .= " WHERE datedon between ".$wheretail;
$sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')';
$sql .= " AND t.fk_statut <> ".Don::STATUS_DRAFT;
$sql .= " UNION ALL";
// Paiements of salaries
$sql .= " SELECT t.rowid as id, t.ref as ref, 1 as paid, amount as total_ht, amount as total_ttc, 0 as total_vat, t.fk_user as fk_soc, datep as date, 'SalaryPayment' as item, CONCAT(CONCAT(u.lastname, ' '), u.firstname) as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum";
$sql .= " SELECT t.rowid as id, t.entity, t.ref as ref, 1 as paid, amount as total_ht, amount as total_ttc, 0 as total_vat, t.fk_user as fk_soc, datep as date, 'SalaryPayment' as item, CONCAT(CONCAT(u.lastname, ' '), u.firstname) as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum";
$sql .= " FROM ".MAIN_DB_PREFIX."payment_salary as t LEFT JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = t.fk_user LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = u.fk_country";
$sql .= " WHERE datep between ".$wheretail;
$sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')';
//$sql.=" AND fk_statut <> ".PaymentSalary::STATUS_DRAFT;
$sql .= " UNION ALL";
// Social contributions
$sql .= " SELECT t.rowid as id, t.libelle as ref, paye as paid, amount as total_ht, amount as total_ttc, 0 as total_tva, 0 as fk_soc, date_creation as date, 'SocialContributions' as item, '' as thirdparty_name, '' as thirdparty_code, '' as country_code, '' as vatnum";
$sql .= " SELECT t.rowid as id, t.entity, t.libelle as ref, paye as paid, amount as total_ht, amount as total_ttc, 0 as total_tva, 0 as fk_soc, date_creation as date, 'SocialContributions' as item, '' as thirdparty_name, '' as thirdparty_code, '' as country_code, '' as vatnum";
$sql .= " FROM ".MAIN_DB_PREFIX."chargesociales as t";
$sql .= " WHERE date_creation between ".$wheretail;
$sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')';
@@ -220,7 +241,7 @@ if (($action == "searchfiles" || $action == "dl")) {
{
$result = true;
$files = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview\.png)$', '', SORT_ASC, 1);
$files = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', '', SORT_ASC, 1);
//var_dump($upload_dir);
//var_dump($files);
@@ -228,6 +249,7 @@ if (($action == "searchfiles" || $action == "dl")) {
{
$nofile = array();
$nofile['id'] = $objd->id;
$nofile['entity'] = $objd->entity;
$nofile['date'] = $db->idate($objd->date);
$nofile['paid'] = $objd->paid;
$nofile['amount_ht'] = $objd->total_ht;
@@ -248,6 +270,7 @@ if (($action == "searchfiles" || $action == "dl")) {
foreach ($files as $key => $file)
{
$file['id'] = $objd->id;
$file['entity'] = $objd->entity;
$file['date'] = $db->idate($objd->date);
$file['paid'] = $objd->paid;
$file['amount_ht'] = $objd->total_ht;
@@ -314,6 +337,10 @@ if ($result && $action == "dl" && !$error)
dol_mkdir($dirfortmpfile);
$log = $langs->transnoentitiesnoconv("Type");
if (!empty($conf->multicompany->enabled) && is_object($mc))
{
$log .= ','.$langs->transnoentitiesnoconv("Entity");
}
$log .= ','.$langs->transnoentitiesnoconv("Date");
$log .= ','.$langs->transnoentitiesnoconv("Ref");
$log .= ','.$langs->transnoentitiesnoconv("TotalHT");
@@ -342,6 +369,10 @@ if ($result && $action == "dl" && !$error)
}
$log .= $file['item'];
if (!empty($conf->multicompany->enabled) && is_object($mc))
{
$log .= ','.(empty($arrayofentities[$file['entity']]) ? $file['entity'] : $arrayofentities[$file['entity']]);
}
$log .= ','.dol_print_date($file['date'], 'dayrfc');
$log .= ','.$file['ref'];
$log .= ','.$file['amount_ht'];
@@ -383,11 +414,13 @@ $form = new Form($db);
$userstatic = new User($db);
$title = $langs->trans("ComptaFiles").' - '.$langs->trans("List");
$help_url = '';
llxHeader('', $title, $help_url);
$h = 0;
$head[$h][0] = $_SERVER["PHP_SELF"].$varlink;
$head = array();
$head[$h][0] = $_SERVER["PHP_SELF"];
$head[$h][1] = $langs->trans("AccountantFiles");
$head[$h][2] = 'AccountancyFiles';
@@ -400,13 +433,18 @@ print '<input type="hidden" name="token" value="'.newToken().'">';
print $langs->trans("ReportPeriod").': '.$form->selectDate($date_start, 'date_start', 0, 0, 0, "", 1, 1, 0);
print ' - '.$form->selectDate($date_stop, 'date_stop', 0, 0, 0, "", 1, 1, 0)."\n</a>";
// Export is for current company only !
// Export is for current company only
if (!empty($conf->multicompany->enabled) && is_object($mc))
{
$mc->getInfo($conf->entity);
print '<span class="marginleftonly marginrightonly">('.$langs->trans("Entity").' : ';
$mc->dao->getEntities();
$mc->dao->fetch($conf->entity);
print $mc->dao->label;
print "<td>";
if (! empty($conf->global->MULTICOMPANY_ALLOW_EXPORT_ACCOUNTING_DOC_FOR_ALL_ENTITIES)) {
print $mc->select_entities(GETPOSTISSET('search_entity') ? GETPOST('search_entity', 'int') : $mc->id, 'search_entity', '', false, false, false, false, true);
} else {
print $mc->label;
}
print "</td>";
print ")</span>\n";
}
@@ -427,7 +465,7 @@ if (!empty($date_start) && !empty($date_stop))
$param .= '&date_stopyear='.GETPOST('date_stopyear', 'int');
print '<form name="dl" action="?action=dl" method="POST" >'."\n";
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="token" value="'.currentToken().'">';
echo dol_print_date($date_start, 'day')." - ".dol_print_date($date_stop, 'day');

View File

@@ -92,12 +92,12 @@ include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
* View
*/
$form = new Form($db);
$title = $langs->trans("FinancialAccount").' - '.$langs->trans("Documents");
$helpurl = "";
llxHeader('', $title, $helpurl);
$form = new Form($db);
if ($id > 0 || !empty($ref)) {
if ($object->fetch($id, $ref)) {
$upload_dir = $conf->bank->dir_output."/".$id."/statement/".dol_sanitizeFileName($num);
@@ -114,13 +114,9 @@ if ($id > 0 || !empty($ref)) {
$totalsize += $file['size'];
}
$morehtmlref = '';
$title = $langs->trans("AccountStatement").' '.$num.' - '.$langs->trans("BankAccount").' '.$object->getNomUrl(1, 'receipts');
print load_fiche_titre($title, '', '');
print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>';
@@ -137,9 +133,9 @@ if ($id > 0 || !empty($ref)) {
$modulepart = 'bank';
$permission = $user->rights->banque->modifier;
$permtoedit = $user->rights->banque->modifier;
$param = '&id='.$object->id.'&num='.$num;
$uri = '&num='.$num;
$relativepathwithnofile = $id."/statement/".$num."/";
$param = '&id='.$object->id.'&num='.urlencode($num);
$moreparam = '&num='.urlencode($num);;
$relativepathwithnofile = $id."/statement/".dol_sanitizeFileName($num)."/";
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
}
else {

View File

@@ -1157,14 +1157,14 @@ if ($resql)
} else {
$color = '#'.$conf->global->BANK_COLORIZE_MOVEMENT_COLOR1;
}
$backgroundcolor = 'style="background-color: '.$color.';"';
$backgroundcolor = 'style="background: '.$color.';"';
} else {
if (empty($conf->global->BANK_COLORIZE_MOVEMENT_COLOR2)) {
$color = '#7fdb86';
} else {
$color = '#'.$conf->global->BANK_COLORIZE_MOVEMENT_COLOR2;
}
$backgroundcolor = 'style="background-color: '.$color.';"';
$backgroundcolor = 'style="background: '.$color.';"';
}
}
print '<tr class="oddeven" '.$backgroundcolor.'>';

View File

@@ -214,6 +214,76 @@ class Account extends CommonObject
*/
public $date_solde;
/**
* 'type' if the field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password')
* Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)"
* 'label' the translation key.
* 'enabled' is a condition when the field must be managed.
* 'position' is the sort order of field.
* 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0).
* 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing)
* 'noteditable' says if field is not editable (1 or 0)
* 'default' is a default value for creation (can still be overwrote by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created.
* 'index' if we want an index in database.
* 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...).
* 'searchall' is 1 if we want to search in this field when making a search from the quick search button.
* 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8).
* 'css' is the CSS style to use on field. For example: 'maxwidth200'
* 'help' is a string visible as a tooltip on field
* 'showoncombobox' if value of the field must be visible into the label of the combobox that list record
* 'disabled' is 1 if we want to have the field locked by a 'disabled' attribute. In most cases, this is never set into the definition of $fields into class, but is set dynamically by some part of code.
* 'arraykeyval' to set list of value if type is a list of predefined values. For example: array("0"=>"Draft","1"=>"Active","-1"=>"Cancel")
* 'comment' is not used. You can store here any text of your choice. It is not used by application.
*
* Note: To have value dynamic, you can set value to 0 in definition and edit the value on the fly into the constructor.
*/
// BEGIN MODULEBUILDER PROPERTIES
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
public $fields=array(
'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10),
'ref' =>array('type'=>'varchar(12)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'showoncombobox'=>1, 'position'=>25),
'label' =>array('type'=>'varchar(30)', 'label'=>'Label', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>30),
'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>35, 'index'=>1),
'bank' =>array('type'=>'varchar(60)', 'label'=>'Bank', 'enabled'=>1, 'visible'=>-1, 'position'=>40),
'code_banque' =>array('type'=>'varchar(128)', 'label'=>'Code banque', 'enabled'=>1, 'visible'=>-1, 'position'=>45),
'code_guichet' =>array('type'=>'varchar(6)', 'label'=>'Code guichet', 'enabled'=>1, 'visible'=>-1, 'position'=>50),
'number' =>array('type'=>'varchar(255)', 'label'=>'Number', 'enabled'=>1, 'visible'=>-1, 'position'=>55),
'cle_rib' =>array('type'=>'varchar(5)', 'label'=>'Cle rib', 'enabled'=>1, 'visible'=>-1, 'position'=>60),
'bic' =>array('type'=>'varchar(11)', 'label'=>'Bic', 'enabled'=>1, 'visible'=>-1, 'position'=>65),
'iban_prefix' =>array('type'=>'varchar(34)', 'label'=>'Iban prefix', 'enabled'=>1, 'visible'=>-1, 'position'=>70),
'country_iban' =>array('type'=>'varchar(2)', 'label'=>'Country iban', 'enabled'=>1, 'visible'=>-1, 'position'=>75),
'cle_iban' =>array('type'=>'varchar(2)', 'label'=>'Cle iban', 'enabled'=>1, 'visible'=>-1, 'position'=>80),
'domiciliation' =>array('type'=>'varchar(255)', 'label'=>'Domiciliation', 'enabled'=>1, 'visible'=>-1, 'position'=>85),
'state_id' =>array('type'=>'integer', 'label'=>'State id', 'enabled'=>1, 'visible'=>-1, 'position'=>90),
'fk_pays' =>array('type'=>'integer', 'label'=>'Fk pays', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>95),
'proprio' =>array('type'=>'varchar(60)', 'label'=>'Proprio', 'enabled'=>1, 'visible'=>-1, 'position'=>100),
'owner_address' =>array('type'=>'text', 'label'=>'Owner address', 'enabled'=>1, 'visible'=>-1, 'position'=>105),
'courant' =>array('type'=>'smallint(6)', 'label'=>'Courant', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>110),
'clos' =>array('type'=>'smallint(6)', 'label'=>'Clos', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>115),
'rappro' =>array('type'=>'smallint(6)', 'label'=>'Rappro', 'enabled'=>1, 'visible'=>-1, 'position'=>120),
'url' =>array('type'=>'varchar(128)', 'label'=>'Url', 'enabled'=>1, 'visible'=>-1, 'position'=>125),
'account_number' =>array('type'=>'varchar(32)', 'label'=>'Account number', 'enabled'=>1, 'visible'=>-1, 'position'=>130),
'accountancy_journal' =>array('type'=>'varchar(20)', 'label'=>'Accountancy journal', 'enabled'=>1, 'visible'=>-1, 'position'=>135),
'currency_code' =>array('type'=>'varchar(3)', 'label'=>'Currency code', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>140),
'min_allowed' =>array('type'=>'integer', 'label'=>'Min allowed', 'enabled'=>1, 'visible'=>-1, 'position'=>145),
'min_desired' =>array('type'=>'integer', 'label'=>'Min desired', 'enabled'=>1, 'visible'=>-1, 'position'=>150),
'comment' =>array('type'=>'text', 'label'=>'Comment', 'enabled'=>1, 'visible'=>-1, 'position'=>155),
'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-1, 'position'=>156),
'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>157),
'fk_user_author' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fk user author', 'enabled'=>1, 'visible'=>-1, 'position'=>160),
'fk_user_modif' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>165),
'note_public' =>array('type'=>'text', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>170),
'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>1, 'visible'=>0, 'position'=>175),
'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>180),
'extraparams' =>array('type'=>'varchar(255)', 'label'=>'Extraparams', 'enabled'=>1, 'visible'=>-1, 'position'=>185),
'fk_accountancy_journal' =>array('type'=>'integer', 'label'=>'Fk accountancy journal', 'enabled'=>1, 'visible'=>-1, 'position'=>190),
);
// END MODULEBUILDER PROPERTIES
/**
* Current account
*/

View File

@@ -422,7 +422,11 @@ class PaymentVarious extends CommonObject
$sign * abs($this->amount),
$this->num_payment,
($this->category_transaction > 0 ? $this->category_transaction : 0),
$user
$user,
'',
'',
'',
$this->datev
);
// Update fk_bank into llx_paiement.

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