2
0
forked from Wavyzz/dolibarr

Compare commits

...

292 Commits

Author SHA1 Message Date
Laurent Destailleur
7c0a6946a7 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2020-01-10 19:42:15 +01:00
Laurent Destailleur
1ecc1afa9e Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.8 2020-01-10 19:41:49 +01:00
Laurent Destailleur
ceb1e699b7 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.7 2020-01-10 19:37:16 +01:00
Laurent Destailleur
c028819cab FIX clone of purchase order 2020-01-10 19:35:49 +01:00
Laurent Destailleur
d59b1bb0c6 Merge 2018-11-23 11:44:07 +01:00
Laurent Destailleur
9d582a53ca Fix compatibility with new mysql versions 2018-11-23 11:28:28 +01:00
Laurent Destailleur
3d85407619 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2018-11-10 15:46:31 +01:00
Laurent Destailleur
ca1e3b4d55 Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.8 2018-11-10 15:15:33 +01:00
Laurent Destailleur
94bb1ac511 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.7 2018-11-10 12:49:22 +01:00
Laurent Destailleur
8893d8d59f Fix compatiblity with new version of PHP 2018-11-10 11:56:23 +01:00
Laurent Destailleur
9253fed754 Revert "Code comment"
This reverts commit 8000777864.
2018-01-11 00:17:32 +01:00
Laurent Destailleur
8000777864 Code comment 2018-01-10 20:43:56 +01:00
Laurent Destailleur
141df52dd6 Merge pull request #7741 from frederic34/patch-1
swap llxfooter() and $db->close()
2017-11-02 09:53:06 +01:00
Frédéric FRANCE
01a3787664 swap llxfooter() and $db->close() 2017-10-31 13:45:13 +01:00
Laurent Destailleur
8ac7dd8e9a Merge pull request #7660 from atm-gauthier/fix_project_time_spent
FIX : wrong personnal project time spent
2017-10-22 02:26:34 +02:00
gauthier
3793ae323a FIX : wrong personnal project time spent 2017-10-19 09:46:19 +02:00
Laurent Destailleur
e61bcd03ed Fix travis 2017-09-16 13:03:27 +02:00
Laurent Destailleur
3295498e9e Remove code comment 2017-09-16 12:50:34 +02:00
Laurent Destailleur
d5d337c631 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2017-08-22 11:14:27 +02:00
Laurent Destailleur
71818da6a5 Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.8 2017-08-22 11:13:58 +02:00
Laurent Destailleur
c53aef9955 Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.7 2017-08-22 10:51:30 +02:00
Laurent Destailleur
a18995d3dc Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.7 2017-08-22 10:47:47 +02:00
Laurent Destailleur
d345b9503a Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2017-08-04 15:28:03 +02:00
Laurent Destailleur
f8d6eb0d40 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2017-08-04 15:25:41 +02:00
Laurent Destailleur
7d9b9f96f0 Merge pull request #7234 from fmarcet/3.9
Fix: Correction in the calculation of the next week
2017-08-04 15:25:05 +02:00
Laurent Destailleur
3017e2b3a0 Merge pull request #7232 from ATM-Marc/FIX_future_accounting
FIX calculate correct remain to pay for planned bank transactions
2017-08-04 15:23:00 +02:00
Ferran Marcet
09c271b7c5 Fix: Correction in the calculation of the next week 2017-08-02 10:31:16 +02:00
Marc de Lima Lucio
adbb41799c FIX: calculate correct remain to pay for planned bank transactions 2017-08-01 11:08:58 +02:00
Laurent Destailleur
1fcc2c4918 Merge pull request #7172 from atm-gauthier/3.9_fix_positivebuyingprice
FIX : Buying prices must always be in positive valueo
2017-07-21 15:13:48 +02:00
Laurent Destailleur
e19167dffa Merge pull request #7154 from atm-ph/fix_3.9_contrat_updateline_extra
Fix updateline extrafields contrat fail
2017-07-18 14:30:55 +02:00
gauthier
ccbeb162cf FIX : Buying prices must always be in positive valueo 2017-07-17 11:27:57 +02:00
phf
f1c23f25f0 Fix updateline extrafields contrat fail 2017-07-13 16:49:58 +02:00
Laurent Destailleur
724392a557 Merge pull request #7073 from fmarcet/3.9
FIX: User id correction on holiday request
2017-06-29 02:45:53 +02:00
fmarcet
4283b1ee30 FIX: User id correction on holiday request 2017-06-28 18:31:37 +02:00
Laurent Destailleur
f899408fc9 Merge pull request #7063 from atm-arnaud/FIX_invoice_page_list
FIX invoice page list
2017-06-27 18:37:51 +02:00
arnaud
65b9b70ff8 FIX invoice page list 2017-06-27 15:23:51 +02:00
Laurent Destailleur
a8d7764146 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2017-06-27 12:06:16 +02:00
Laurent Destailleur
99c7867522 Fix travis 2017-06-27 12:06:01 +02:00
Laurent Destailleur
1f83bef1b5 Merge pull request #7035 from fmarcet/3.9
Fix: User id correction on holiday request
2017-06-20 00:57:10 +02:00
Laurent Destailleur
1745d06bb7 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2017-06-19 19:56:16 +02:00
Laurent Destailleur
12d7b92556 Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.8 2017-06-19 19:52:49 +02:00
Laurent Destailleur
6fb0fc7b71 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.7 2017-06-19 19:42:56 +02:00
Laurent Destailleur
f694939fc7 Fix migration with pgsql 2017-06-19 19:39:37 +02:00
fmarcet
c4546b6da6 FIX: User id correction on holiday request 2017-06-19 16:23:44 +02:00
Ferran Marcet
03eadcebf1 FIX: User id correction on holiday request 2017-06-19 12:25:00 +02:00
Laurent Destailleur
ebc18cd2d4 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2017-06-19 04:13:24 +02:00
Laurent Destailleur
d0d9de37f4 Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.8 2017-06-19 04:05:40 +02:00
Laurent Destailleur
1bfdc7438a Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.7 2017-06-19 04:03:26 +02:00
Regis Houssin
9352ecca1f Fix: PHP 7 - Fatal error: 'break' not in the 'loop' or 'switch' context 2017-06-19 04:01:34 +02:00
Laurent Destailleur
39419bb411 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2017-06-19 02:59:16 +02:00
Laurent Destailleur
774c624687 Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.8 2017-06-19 02:58:44 +02:00
Laurent Destailleur
5439390461 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.7 2017-06-19 02:57:12 +02:00
Laurent Destailleur
6fc4dacd42 Fix migration opensurvey 2017-06-19 02:55:33 +02:00
Laurent Destailleur
36a72de080 Merge pull request #6924 from atm-maxime/3.9
Fix : SEPA XML address should also have dolEscapeXML
2017-06-06 10:26:46 +02:00
Maxime Kohlhaas
6787d717f9 Update bonprelevement.class.php 2017-06-03 18:23:19 +02:00
Maxime Kohlhaas
0e175ba373 Fix : SEPA XML address should also have dolEscapeXML 2017-06-01 11:48:14 +02:00
Laurent Destailleur
d55cc58b8b Merge pull request #6914 from atm-maxime/3.9
Fix special char and size limit in SEPA XML
2017-05-31 19:08:05 +02:00
Laurent Destailleur
d70c14a411 Update bonprelevement.class.php 2017-05-31 19:07:39 +02:00
Maxime Kohlhaas
510b1aedcf Fix xml SEPA $ListOfFactures not used and was listing all invoices in each XML line 2017-05-30 16:13:49 +02:00
Maxime Kohlhaas
200f4010d8 Fix special char and size limit in SEPA XML 2017-05-30 16:00:39 +02:00
Laurent Destailleur
d7b142beb7 Merge pull request #6830 from jfefe/patch-12
Fix #6504: CVE-2017-7886
2017-05-10 23:41:19 +02:00
Laurent Destailleur
61a4382bd8 Merge pull request #6814 from fmarcet/3.9
FIX: Correction with author and validator user on orders
2017-05-10 23:11:21 +02:00
jfefe
d410a320d7 WIP #6504: CVE-2017-7886
'defaultlang' attribute was not filtered before database request which cause an SQL injection.
2017-05-10 20:32:54 +02:00
Ferran Marcet
dbcb60433b FIX: Correction with author and validator user on orders 2017-05-09 13:31:20 +02:00
Laurent Destailleur
0c9f268f99 Merge pull request #6759 from ATM-Marc/FIX_supplier_order_rang
FIX supplier order line creation with rang = 0
2017-05-04 21:06:58 +02:00
Laurent Destailleur
4adfe6de70 Merge pull request #6725 from atm-gauthier/FIX_restrictedarea_document_contact
FIX : forgotten parameter for right multicompany use
2017-05-04 09:37:24 +02:00
Marc de Lima Lucio
56e749df9f FIX: supplier order line were always created with rang = 0 2017-04-26 16:12:27 +02:00
Laurent Destailleur
a2287fd183 Add example of sql request to fix llx_product_price 2017-04-24 13:46:41 +02:00
Laurent Destailleur
587f5a76e6 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2017-04-24 12:59:51 +02:00
Laurent Destailleur
cd099bf3b1 Fix bad update of prices 2017-04-24 12:42:54 +02:00
Juanjo Menent
9bbfeed1bc Merge pull request #6722 from Christian-Seiler/3.9
Fix #5911 Added missing Slashes
2017-04-16 12:23:52 +02:00
Christian Seiler
e23a44bcdf Added missing Slashes
fixed line where two slashes were missing, that caused an error when creating barcodes.
2017-04-16 11:09:18 +02:00
Laurent Destailleur
72ff353e9f Fix repair of product_stock 2017-04-15 16:22:15 +02:00
Laurent Destailleur
2e759d5156 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2017-04-15 16:19:02 +02:00
Laurent Destailleur
086fa4385f Fix clean of product_batch 2017-04-15 16:17:22 +02:00
gauthier
30d58f77db FIX : forgotten parameter for right multicompany use 2017-04-11 11:33:05 +02:00
Laurent Destailleur
44302f1aea Merge pull request #6650 from atm-arnaud/FIX_total_line_on_list_facture
Fix total line on list facture
2017-04-06 21:11:32 +02:00
arnaud
6b2d8a3c34 FIX limit+1 dosn't show Total line 2017-04-06 11:14:15 +02:00
arnaud
ef7a334414 Merge branch '3.9' of github.com:Dolibarr/dolibarr into 3.9_dolibarr 2017-04-04 14:56:33 +02:00
Laurent Destailleur
b44143d24d Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2017-03-31 18:29:15 +02:00
Laurent Destailleur
b970596310 Merge pull request #6481 from Hugome/fix-agenda-merge
FIX : Agenda getCalendarEvents hook
2017-03-31 18:26:45 +02:00
Laurent Destailleur
9827887643 Merge pull request #6519 from marcosgdf/bug-multiprices
FIX Corrected bug where product multiprices admin page would not render properly due to a PHP fatal error
2017-03-14 10:45:47 +01:00
Laurent Destailleur
9e7230e63a Merge pull request #6484 from fmarcet/3.9
Fix: Error when references are numeric
2017-03-14 10:24:44 +01:00
Marcos García de La Fuente
15d0e6abc5 Corrected bug where product multiprices admin page would not render properly due to a PHP fatal error 2017-03-13 20:33:21 +01:00
hugome
38ccf7ffdd Fix : Agenda getCalendarEvents hook
Return of getCalendarEvents on agenda page :
The array_merge change key of merged array.
2017-03-13 11:35:49 +01:00
Laurent Destailleur
3ff456d8ef Merge pull request #6472 from atm-gauthier/FIX_param_billed
FIX : param billed when we change page
2017-03-05 21:33:42 +01:00
fmarcet
e1f459d67a Fix: Error when references are numeric 2017-03-03 12:57:52 +01:00
gauthier
9cd807af1a FIX : param billed when we change page 2017-02-28 12:31:45 +01:00
Laurent Destailleur
9ecc56ad4d Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2017-02-27 10:48:36 +01:00
Laurent Destailleur
290caba160 Merge pull request #6413 from atm-gauthier/3.8_FIX_delete_bank_class_when_delete_bank_categ
FIX : delete bank class lines when we delete bank_categ
2017-02-12 20:45:57 +01:00
gauthier
c01988ba43 FIX : delete bank class lines when we delete bank_categ 2017-02-09 17:28:37 +01:00
Laurent Destailleur
882423f935 Merge pull request #6390 from fmarcet/3.9
Fix: Wrong vat calculation when split discounts
2017-02-08 11:01:08 +01:00
fmarcet
d5978a5092 Fix: Wrong vat calculation when split discounts 2017-02-07 14:02:27 +01:00
Laurent Destailleur
68a6a08a01 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2017-02-02 01:20:45 +01:00
Laurent Destailleur
797b68fc20 Merge pull request #6351 from atm-maxime/fix_banklink_expensereport
Fix : link to user in bank was wrong regarding expensereport payment
2017-02-02 01:18:04 +01:00
Maxime Kohlhaas
90e8f062e9 Fix : link to user in bank was wrong regarding expensereport payment 2017-01-31 10:23:03 +01:00
Laurent Destailleur
dae3e03603 Merge pull request #6323 from fappels/Fix_3.9_elephant_code_verif
Fix verify of elephant code model for services
2017-01-27 00:53:56 +01:00
Laurent Destailleur
84fec7c5c7 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9
Conflicts:
	htdocs/core/class/html.formprojet.class.php
2017-01-24 18:40:01 +01:00
fappels
2be6011069 Fix product elephant verify for service 2017-01-23 20:59:32 +01:00
fappels
fcf99c9bc2 Merge remote-tracking branch 'refs/remotes/Dolibarr/3.9' into 3.9 2017-01-23 20:52:32 +01:00
Laurent Destailleur
a47f3cb0e5 Merge pull request #6309 from atm-arnaud/FIX_calcul_marge_by_user_with_multicompany
FIX bug margin calcul by user with multicompany
2017-01-20 17:46:56 +01:00
arnaud
2cedcfece2 FIX bug margin calcul by user with multicompany 2017-01-20 12:01:20 +01:00
arnaud
ddbd6c371d MERGE DEGUEU 2017-01-20 11:58:30 +01:00
Laurent Destailleur
f49552f6b7 Merge pull request #6297 from atm-arnaud/FIX_ajax_project_list_where
FIX all dolibarr versions about project list and ajax completion bug
2017-01-18 16:33:23 +01:00
arnaud
39f35bbaab FIX all dolibarr versions about project list and ajax completion bug 2017-01-17 11:17:40 +01:00
Laurent Destailleur
c953ae2a3d Merge pull request #6228 from marcosgdf/bug-6227
FIX #6227 Document models table header "Unit" is shown in 2 lines in Spanish
2016-12-31 16:35:00 +01:00
Marcos García de La Fuente
98599b0bbf FIX #6227 Document models table header "Unit" is shown in 2 lines in Spanish 2016-12-27 12:56:49 +01:00
Laurent Destailleur
cdcbf58ca8 Prepare 3.9.5 2016-12-23 17:33:54 +01:00
Laurent Destailleur
9cc2a74221 Update changelog 2016-12-23 16:29:15 +01:00
Laurent Destailleur
f7e5898b4a Fix show a more accurate translation 2016-12-20 10:58:31 +01:00
Laurent Destailleur
94eeaf9ed0 Fix typo error 2016-12-19 18:47:21 +01:00
Laurent Destailleur
876722733a Better fix to get localtax 2016-12-19 02:33:54 +01:00
Laurent Destailleur
74e00c4d80 More comment and hidden option to solve problems when sending emails. 2016-12-19 01:04:17 +01:00
Laurent Destailleur
dbf96b8f59 Log at wrong place 2016-12-18 23:32:31 +01:00
Laurent Destailleur
e0db9a8ca7 Merge pull request #6169 from atm-gauthier/FIX_ttc_and_ht_must_always_be_available
FIX : HT and TTC price should always be displayed together
2016-12-18 11:08:33 +01:00
Laurent Destailleur
b3d5f40f37 Merge pull request #6166 from atm-gauthier/3.9_fix_wrong_test
FIX : wrong test on dict.php
2016-12-18 10:58:32 +01:00
Laurent Destailleur
6830fdca98 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9
Conflicts:
	htdocs/product/class/product.class.php
2016-12-18 02:12:34 +01:00
Laurent Destailleur
321933f267 Fix deletion of product 2016-12-18 02:10:26 +01:00
Laurent Destailleur
73e6663230 Fix help/messages for emailing to warn users. 2016-12-17 14:47:06 +01:00
Laurent Destailleur
c5db333af8 Fix translation of error message when sending email 2016-12-17 14:00:39 +01:00
Laurent Destailleur
534e2b1282 FIX Security to restrict email sending was not efficient 2016-12-16 13:46:39 +01:00
Laurent Destailleur
2c4c48ad6f Better fix to add server name into email id. 2016-12-15 12:11:39 +01:00
gauthier
1f1c75adfb FIX : HT and TTC price should always be displayed together 2016-12-14 15:50:50 +01:00
Laurent Destailleur
e4dd020887 Fix bad concat 2016-12-14 11:23:55 +01:00
Laurent Destailleur
af407a094a FIX Introduce hidden option MAIL_PREFIX_FOR_EMAIL_ID to solve pb of
tracking email.
2016-12-14 11:20:44 +01:00
Laurent Destailleur
56b3f2c011 FIX Introduce hidden option MAIL_PREFIX_FOR_EMAIL_ID to solve pb of
tracking email.
2016-12-14 10:36:11 +01:00
Laurent Destailleur
530d3503f5 FIX Introduce hidden option MAIL_PREFIX_FOR_EMAIL_ID to solve pb of
tracking email.
2016-12-14 10:32:31 +01:00
gauthier
4dd740fe2f FIX : wrong test on dict.php 2016-12-13 11:41:26 +01:00
Juanjo Menent
5c4ab99a9a Merge pull request #6132 from simnandez/3.9
Fix #5646 Error editing Sell Price on products/services
2016-12-11 14:32:00 +01:00
Laurent Destailleur
7fd75c793a FIX Regression when deleting product 2016-12-11 10:39:48 +01:00
Laurent Destailleur
b42a2616bc Merge remote-tracking branch 'origin/3.8' into 3.9
Conflicts:
	htdocs/install/mysql/migration/3.8.0-3.9.0.sql
2016-12-11 02:34:59 +01:00
Juanjo Menent
56aafa4660 Fix #5646 Error editing Sell Price on products/services 2016-12-10 23:25:13 +01:00
Laurent Destailleur
6e9d6b4e49 Merge pull request #6128 from simnandez/3.9
FIX #5853 $conf->global->$calc==0 || $conf->global->$calc==1
2016-12-10 23:17:33 +01:00
Juanjo Menent
5a2b8ff53c FIX #5853 $conf->global->$calc==0 || $conf->global->$calc==1 2016-12-10 22:41:53 +01:00
Laurent Destailleur
f49d332b73 Merge pull request #6113 from atm-maxime/3.8
Fix : delete product was not possible if batch stock
2016-12-10 13:16:50 +01:00
Laurent Destailleur
46d84f8f11 Merge pull request #6111 from simnandez/3.8
Fix: Delete surplus migration file
2016-12-10 13:16:16 +01:00
Maxime Kohlhaas
97e21cb775 Fix : delete product was not possible if batch stock 2016-12-10 13:05:46 +01:00
Juanjo Menent
829ff2299e Fix: Delete surplus migration file 2016-12-10 12:46:26 +01:00
Laurent Destailleur
c2bee0f937 FIX #6088 2016-12-07 12:44:56 +01:00
Laurent Destailleur
ad467989bf Merge pull request #6065 from atm-florian/3.9
FIX : delete contract extrafields on contract deletion
2016-12-07 11:54:04 +01:00
florian HENRY
de5ad57af4 FIX : export extrafields must not include separe type 2016-12-02 12:02:08 +01:00
florian HENRY
191474a5db FIX : Update intervention lline crash with PgSQL 2016-12-02 11:35:12 +01:00
florian HENRY
5b6d5df159 FIX : delete contract extrafields on contract deletion 2016-11-30 16:02:55 +01:00
Laurent Destailleur
196428edf5 FIX #6051 2016-11-28 16:34:38 +01:00
Laurent Destailleur
423391f12d Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-11-26 15:46:55 +01:00
Laurent Destailleur
e539842c28 Fix eatdate and selldate not correctly set. 2016-11-26 15:46:41 +01:00
Laurent Destailleur
ae36daefbe Merge pull request #5981 from hregis/3.9_bug
Fix: missing encrypt data for llx_const
2016-11-12 11:01:47 +01:00
Regis Houssin
a1cccc021e Fix: missing encrypt data for llx_const 2016-11-12 09:48:34 +01:00
Laurent Destailleur
f7e780fa9e Merge pull request #5967 from marcosgdf/bug-5966
FIX #5966 Bug: getNomUrl tooltips show Proposal info even if user has no rights to read them
2016-11-11 14:07:10 +01:00
Laurent Destailleur
94544fb9ae Merge pull request #5968 from philazerty/patch-6
Update companies.lang
2016-11-11 14:06:21 +01:00
philazerty
24c12df356 Update companies.lang
Ajout du Gabon
2016-11-09 12:16:41 +01:00
Marcos García de La Fuente
c6f96a81d1 Little correction 2016-11-09 11:30:55 +01:00
Marcos García de La Fuente
0b594eab59 FIX #5966 Bug: getNomUrl tooltips show Proposal info even if user has no rights to read them 2016-11-09 11:28:05 +01:00
Laurent Destailleur
f0151c5a4c Merge pull request #5955 from hregis/3.9_bug
FIX external access of fckeditor image (external emailing)
2016-11-08 14:29:52 +01:00
Laurent Destailleur
75cc6bcf75 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-11-06 14:12:57 +01:00
Laurent Destailleur
f516660c0f Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.8 2016-11-06 14:10:37 +01:00
Laurent Destailleur
73f0159578 Fix phpunit 2016-11-06 14:08:55 +01:00
Regis Houssin
e33654cc45 Merge remote-tracking branch 'origin/3.9' into 3.9_bug 2016-11-04 10:22:43 +01:00
Regis Houssin
718adef600 Fix: external access of fkeditor image with multicompany 2016-11-04 10:21:20 +01:00
Regis Houssin
8b16eeb554 Fix: no login are required for fckeditor (external emailing) 2016-11-04 10:06:53 +01:00
Laurent Destailleur
b8f8b6dcde Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-10-29 18:45:19 +02:00
Laurent Destailleur
78eaeab168 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-10-29 18:44:55 +02:00
Laurent Destailleur
7c3356baff Merge pull request #5938 from hregis/3.9_bug
Fix: missing path of user photo
2016-10-29 17:58:57 +02:00
Regis Houssin
d0bd1d5d36 Fix: missing path of user photo 2016-10-28 14:22:06 +02:00
Juanjo Menent
7acc14903c Merge pull request #5937 from atm-maxime/fix_supporder_vars_set
Fix : vars were not set after commande function
2016-10-28 11:18:15 +02:00
Juanjo Menent
57a8e053b4 Merge pull request #5936 from atm-maxime/fix_pdfmuscadet_hook_call
Fix bad parameter in hook call
2016-10-28 11:17:21 +02:00
Maxime Kohlhaas
3dbab863a7 Fix : vars were not set after commande function 2016-10-28 10:24:31 +02:00
Maxime Kohlhaas
be493fcf09 Fix bad parameter in hook call 2016-10-28 10:16:58 +02:00
Laurent Destailleur
5e7c72068d Merge pull request #5923 from olsesacl/#5907
FIX: #5907 No translation string for PDF Proposal
2016-10-26 10:56:15 +02:00
Sergio Sanchis Climent
2a4517e1bc FIX: #5907 2016-10-24 19:21:41 +02:00
Laurent Destailleur
e4da87d31c Merge pull request #5903 from atm-gauthier/FIX_thirdparty_margin
FIX : margin tab on customer card must filter on current entity invoices
2016-10-24 03:18:37 +02:00
Laurent Destailleur
acf8874c6a Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9
Conflicts:
	htdocs/core/lib/functions.lib.php
2016-10-24 02:11:49 +02:00
Laurent Destailleur
a6c2758ca2 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9
Conflicts:
	htdocs/core/lib/functions.lib.php
2016-10-24 02:10:17 +02:00
Laurent Destailleur
adb05ec05b Merge pull request #5887 from simnandez/3.9
Fix: Bad localtaxes calc for Spain if VAT is 0. For >= 3.9.x
2016-10-24 01:01:42 +02:00
Laurent Destailleur
fe71c0cb2d Merge pull request #5886 from simnandez/3.8
Fix: Bad localtaxes calc for Spain if VAT is 0
2016-10-24 01:01:04 +02:00
gauthier
a814e02d53 FIX : margin tab on customer card must filter on current entity invoices 2016-10-21 12:40:19 +02:00
Juanjo Menent
f28c7bbc6d Fix: Bad localtaxes calc for Spain if VAT is 0. For >= 3.9.x 2016-10-18 10:20:09 +02:00
Juanjo Menent
6a944bb6a3 Fix: Bad localtaxes calc for Spain if VAT is 0 2016-10-18 10:11:42 +02:00
Laurent Destailleur
47ed731242 Fix group by 2016-10-17 10:37:01 +02:00
Laurent Destailleur
ab34885a89 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-10-16 18:34:31 +02:00
Laurent Destailleur
3d1ddbb923 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-10-16 18:34:20 +02:00
Juanjo Menent
87e8ac51be Merge pull request #5843 from simnandez/3.8
FIX: Error when CATEGORIE_RECURSIV_ADD is enabled and new category is daughter of an already linked to object
2016-10-15 17:18:35 +02:00
Laurent Destailleur
dda248cb57 Merge pull request #5870 from olsesacl/#5340
FIX: #5340 Importing Tiers problem with capital field
2016-10-15 02:16:00 +02:00
Sergio Sanchis Climent
567f7e5365 FIX: #5340 2016-10-14 00:43:10 +02:00
Juanjo Menent
ffd486e3d6 Fix #5843 best way fixing 2016-10-07 22:54:08 +02:00
Juanjo Menent
45dfb8ca62 Fix #5843 best way fixing 2016-10-07 22:32:11 +02:00
Juanjo Menent
298e5cee61 Fix #5843 best way fixing 2016-10-07 22:21:50 +02:00
Juanjo Menent
b7b18e3355 FIX: Error when CATEGORIE_RECURSIV_ADD is enabled and new category is daughter of an already linked to object 2016-10-07 10:12:25 +02:00
Laurent Destailleur
b19b624908 Merge pull request #5834 from simnandez/3.8
FIX: only show projects of related third if external user
2016-10-06 23:58:24 +02:00
Laurent Destailleur
02f4f6d039 Merge pull request #5839 from atm-florian/3.9
FIX : missing column into SQL on thridparty list
2016-10-06 23:56:18 +02:00
florian HENRY
ee20704a8a FIX : missing column into SQL on thridparty list 2016-10-05 17:20:56 +02:00
Juanjo Menent
56245e2c9a FIX: only show projects of related third if external user 2016-10-04 16:51:44 +02:00
Laurent Destailleur
0b49d6316e Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-09-29 10:48:14 +02:00
Laurent Destailleur
a90111cbf3 Merge pull request #5804 from simnandez/3.8
FIX: Failed to export contact categories with contact extra fields
2016-09-28 18:18:29 +02:00
Juanjo Menent
30050b51f0 FIX: Failed to export contact categories with contact extra fields 2016-09-28 10:15:41 +02:00
Laurent Destailleur
5d7f182f59 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-09-26 14:14:56 +02:00
Laurent Destailleur
8775a51cec Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.8 2016-09-26 14:14:26 +02:00
Laurent Destailleur
67a1bf2b59 Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.8 2016-09-26 14:13:26 +02:00
Laurent Destailleur
8829db7d65 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-09-25 16:45:16 +02:00
Laurent Destailleur
4cccaae831 Fix warning 2016-09-25 16:44:55 +02:00
Laurent Destailleur
f9f95dec42 Merge pull request #5765 from hregis/3.9_bug
Fix: Using $this when not in object context
2016-09-22 09:10:56 +02:00
Laurent Destailleur
2c42697cae Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-09-21 01:26:22 +02:00
Laurent Destailleur
f1bb69eecf Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-09-21 01:26:03 +02:00
Regis Houssin
937f1fd3ee Fix: Using $this when not in object context 2016-09-20 12:19:17 +02:00
Laurent Destailleur
bef5c2748c Merge pull request #5756 from atm-maxime/fix_pgsql_supplierorder_list
FIX No ORDER BY needed for a COUNT sql, causes PGSQL error
2016-09-17 17:49:19 +02:00
Maxime Kohlhaas
5840ed8258 No ORDER BY needed for a COUNT sql, causes PGSQL error 2016-09-15 12:08:47 +02:00
Juanjo Menent
b69f037dd3 Merge pull request #5740 from GPCsolutions/3.9-lineedit
Fixed product description field name in line edit.
2016-09-14 16:32:21 +02:00
Raphaël Doursenaud
1d95720644 Fixed product description field name in line edit.
The POST value 'desc' was never evaluated and caused fields to blank
out on update action.
2016-09-13 11:38:57 +02:00
Laurent Destailleur
4096981378 FIX #3128 2016-09-12 03:10:18 +02:00
Laurent Destailleur
3d8722ee69 FIX #2853 2016-09-12 02:19:25 +02:00
Laurent Destailleur
da41c3ffa7 Fix better fix to increase size of login_block to allow external icon. 2016-09-12 01:34:37 +02:00
Laurent Destailleur
f5884999a9 Merge pull request #5716 from hregis/3.9_bug
Fix: increase max-width when use externals modules
2016-09-10 14:33:13 +02:00
Laurent Destailleur
87fb00c293 Merge pull request #5727 from fmarcet/3.9
Fix: Search all  is lost on lists when pagination or when the columns…
2016-09-10 14:25:16 +02:00
Ferran Marcet
4777faf49b Fix: Search all is lost on lists when pagination or when the columns are sorted 2016-09-09 14:02:27 +02:00
Ferran Marcet
b5db70342b Fix: Search all is lost on lists when pagination or when the columns are sorted 2016-09-09 13:58:41 +02:00
Juanjo Menent
e3c2299c67 Merge remote-tracking branch 'upstream/3.8' into 3.9
Conflicts:
	htdocs/admin/dict.php
	htdocs/fourn/class/fournisseur.commande.class.php
2016-09-08 18:52:44 +02:00
Juanjo Menent
ff632718fa Merge pull request #5719 from philippe-opendsi/3.8_patch_1
FIX #5705 Supplier Order's lines array initalisation
2016-09-08 18:06:25 +02:00
Juanjo Menent
b72794216e Merge pull request #5702 from simnandez/3.8
FIX: vat dictionary should allow enter and edit multiple values for localtaxes, separated by: (ex -19:-15)
2016-09-08 18:05:57 +02:00
Philippe
972a2db3a3 No initialisation of the array before filling it. May cause some trouble when fetch is call several times and lines added or deleted 2016-09-08 11:40:39 +02:00
Regis Houssin
5de88f6af1 Fix: increase max-width when use externals modules 2016-09-08 10:09:14 +02:00
Juanjo Menent
3078e6fa4b FIX: vat dictionary should allow enter and edit multiple values for localtaxes, separated by: (ex -19:-15) 2016-09-06 13:44:07 +02:00
Juanjo Menent
d2ef56f3f1 Merge remote-tracking branch 'origin/3.9' into 3.9 2016-09-06 13:03:27 +02:00
Juanjo Menent
4e5105c220 Merge remote-tracking branch 'upstream/3.9' into 3.9 2016-09-06 13:03:01 +02:00
Laurent Destailleur
e19743519b FIX #5660 2016-09-02 21:44:52 +02:00
Laurent Destailleur
78b2e9e4bf FIX #5651 2016-09-02 21:40:07 +02:00
Laurent Destailleur
9c8145eb88 Better fix for 416a0892d7 2016-09-02 19:19:13 +02:00
Laurent Destailleur
696b54c6c3 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-09-02 19:03:50 +02:00
Laurent Destailleur
70de814c3c Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-09-02 19:03:31 +02:00
Laurent Destailleur
5c2af9b7bd Merge pull request #5694 from atm-ph/fix_3.8_address_empty
Fix lost value if use double quote
2016-09-02 18:42:32 +02:00
Laurent Destailleur
d6a4b58a68 Merge pull request #5685 from atm-gauthier/3.8_fix_header_title_commercial_area
FIX : header title in commercial area
2016-09-02 18:36:47 +02:00
Laurent Destailleur
570c228ee1 Merge pull request #5692 from fmarcet/3.9
Fix: An empty variable is used to update multiprice
2016-09-02 18:24:09 +02:00
Laurent Destailleur
5dc7c9c6e5 Merge pull request #5691 from fappels/3.9_fix_check_lot_dates
FIX #5642 Ignore time when checking lot dates
2016-09-02 18:23:04 +02:00
phf
fcd5e1fb2c Fix lost value if use double quote 2016-09-02 15:30:42 +02:00
Ferran Marcet
416a0892d7 Fix: An empty variable is used to update multiprice 2016-09-02 12:32:14 +02:00
fappels
1c626c01ee Ignore time when checking lot dates 2016-09-02 11:29:28 +02:00
Laurent Destailleur
10ced563b3 Fix var $conf not defined 2016-08-31 19:39:12 +02:00
gauthier
18cf2f8f8b FIX : header title in commercial area 2016-08-31 10:19:40 +02:00
Juanjo Menent
b1401d6566 Merge remote-tracking branch 'upstream/3.9' into 3.9 2016-08-31 01:50:04 +02:00
Laurent Destailleur
a9e5668ea4 Fix for jmobile 2016-08-28 16:31:22 +02:00
Laurent Destailleur
bc8e203019 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-08-28 01:58:43 +02:00
Laurent Destailleur
5d7414dcc3 Solve php regression failing travis 2016-08-28 01:58:11 +02:00
Juanjo Menent
874db10dbe Merge pull request #5648 from hregis/3.8_bug
Fix: wrong "lastoutput" and "lastresult" if jobtype is "method" or "function"
2016-08-25 13:43:06 +02:00
Juanjo Menent
c298bb62ba Merge pull request #5644 from grandoc/3.9
fix : translation
2016-08-25 13:38:18 +02:00
Regis Houssin
6b3cbc918d Fix: wrong "lastoutput" and "lastresult" if jobtype is "method" or
"function"
2016-08-22 20:49:14 +02:00
philippe grand
919b73b4c4 fix : translation 2016-08-19 16:29:54 +02:00
Laurent Destailleur
7e8b8e9462 Merge pull request #5638 from atm-florian/3.9_fix_5637
FIX : PgSQL Module Ressource list crash #5637
2016-08-17 16:34:40 +02:00
Laurent Destailleur
f9d707ff48 Merge pull request #5630 from atm-florian/3.9
FIX : #5629 PgSQL Interger string stylish error
2016-08-17 16:24:40 +02:00
florian HENRY
ddc480b6c9 other fix for PgSQL and style 2016-08-17 14:51:25 +02:00
florian HENRY
5c51cb0f29 FIX : PgSQL Module Ressource list crash #5637 2016-08-17 14:40:05 +02:00
florian HENRY
00443dae3a Merge branch '3.9' of https://github.com/Dolibarr/dolibarr.git into 3.9 2016-08-17 14:30:15 +02:00
Laurent Destailleur
0cb7440647 Merge pull request #5635 from joseplluis/patch-3
Fix Bug: delivery date value is not hide with global ORDER_DISABLE_DELIVE…
2016-08-17 14:05:56 +02:00
florian HENRY
a1323756a9 FIX : in PgSQL no quote "word style" is permitted around column name 2016-08-17 10:23:23 +02:00
Josep Lluís
c385b86793 Bug: delivery date value is not hide with global ORDER_DISABLE_DELIVERY_DATE
In title and in filter the delivery date column is well hidden. 
The error is only in column value,
2016-08-16 23:12:02 +02:00
florian HENRY
3932a32399 FIX : #5629 PgSQL Interger string stylish error 2016-08-16 09:00:52 +02:00
Juanjo Menent
bf2955909a Merge pull request #5600 from atm-florian/FIX_5594
Fix 5594
2016-08-11 20:38:35 +02:00
florian HENRY
8718edc5fd Merge branch '3.9' of https://github.com/Dolibarr/dolibarr.git into FIX_5594 2016-08-09 15:17:57 +02:00
florian HENRY
321814fae3 better fix for #5594 2016-08-09 15:17:19 +02:00
Laurent Destailleur
4a1fbffba3 Merge pull request #5595 from atm-florian/FIX_5594
FIX #5594
2016-08-09 13:28:07 +02:00
florian HENRY
90cb71f341 revert better fix 2016-08-08 13:54:51 +02:00
florian HENRY
15f187c466 better test 2016-08-08 13:54:03 +02:00
florian HENRY
94487cf411 FIX #5594 2016-08-08 13:43:44 +02:00
Laurent Destailleur
112b945e6b Merge pull request #5583 from atm-florian/3.9
FIX : update limit stock on product stock
2016-08-05 00:34:32 +02:00
Laurent Destailleur
16c7d51abc Merge pull request #5576 from atm-florian/3.9_fixPHPStrict
FIX php Strict
2016-08-05 00:26:47 +02:00
Juanjo Menent
1253b73879 Merge remote-tracking branch 'upstream/3.9' into 3.9 2016-08-04 17:24:43 +02:00
florian HENRY
5f415478ac FIX : update limit stock on product stock 2016-08-03 17:29:04 +02:00
Juanjo Menent
965011c8bc Merge pull request #5579 from atm-florian/3.8
FIX : Weather icon is not calculated correctly
2016-08-03 10:33:29 +02:00
Juanjo Menent
597f5dae15 Merge pull request #5551 from marcosgdf/bug-5549
FIX #5549 getNomUrl tooltips show Order info even if user has no rights to read them
2016-08-03 10:27:44 +02:00
Juanjo Menent
aadf52fe59 Merge remote-tracking branch 'upstream/3.9' into 3.9 2016-08-03 10:11:37 +02:00
florian HENRY
0d536bff54 Fix dashboard 2016-08-03 09:04:24 +02:00
florian HENRY
5144f21c6c FIX php Strict 2016-08-02 15:36:00 +02:00
Laurent Destailleur
7dec327995 FIX #5568 2016-08-01 15:43:40 +02:00
Laurent Destailleur
621a7d93fa Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-08-01 15:05:57 +02:00
Laurent Destailleur
58c18f438c Move changelog at correct place 2016-08-01 15:02:23 +02:00
Laurent Destailleur
803fe68061 Merge remote-tracking branch 'origin/3.8' into 3.9
Conflicts:
	htdocs/compta/facture.php
	htdocs/core/modules/expedition/doc/pdf_rouget.modules.php
	htdocs/filefunc.inc.php
2016-08-01 15:01:14 +02:00
BENKE Charlie
9a0494bd64 Update bonprelevement.class.php 2016-08-01 14:11:58 +02:00
Laurent Destailleur
e998a4b8a5 Merge pull request #5572 from fmarcet/3.8
Fix: Can't set PRODUIT_LIMIT_SIZE to value 0
2016-08-01 13:40:11 +02:00
Ferran Marcet
fb2444c7a3 Fix: Can't set PRODUIT_LIMIT_SIZE to value 0 2016-08-01 10:20:10 +02:00
Laurent Destailleur
69247afd06 FIX #4447 2016-07-29 17:26:24 +02:00
Laurent Destailleur
9a4240c292 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.8 2016-07-29 17:20:30 +02:00
Laurent Destailleur
45e38efdfa FIX #5473 2016-07-29 17:20:14 +02:00
Marcos García de La Fuente
86c2ced714 Missing $user variable 2016-07-29 11:53:24 +02:00
Marcos García de La Fuente
1ef27913d7 FIX #5549 getNomUrl tooltips show Order info even if user has no rights to read them 2016-07-26 17:07:56 +02:00
Juanjo Menent
71b8ab8336 Merge pull request #5542 from hregis/3.8_bug
Fix: missing sourcetype can create false positive
2016-07-25 18:21:44 +02:00
Regis Houssin
d8f77abf31 Fix: missing sourcetype can create fault positive 2016-07-25 14:36:20 +02:00
Juanjo Menent
9e67249b98 Merge remote-tracking branch 'upstream/3.9' into 3.9 2016-07-25 12:43:44 +02:00
Juanjo Menent
600a10fa16 Merge remote-tracking branch 'upstream/3.9' into 3.9 2016-07-25 10:25:07 +02:00
Laurent Destailleur
c0d8bce2df Prepare 3.8.5 2016-07-21 19:44:25 +02:00
Laurent Destailleur
1624894346 Fix missing load 2016-07-21 19:35:45 +02:00
fappels
8b275c6e5c Merge remote-tracking branch 'refs/remotes/Dolibarr/3.9' into 3.9 2016-06-22 13:03:51 +02:00
fappels
bd002656cd Merge remote-tracking branch 'refs/remotes/Dolibarr/3.9' into 3.9 2016-04-25 16:29:19 +02:00
fappels
f68d956eaa Merge remote-tracking branch 'refs/remotes/upstream/3.9' into 3.9 2016-03-14 17:50:18 +01:00
fappels
e020a859f0 Merge remote-tracking branch 'refs/remotes/upstream/3.9' into 3.9 2016-01-22 11:02:57 +01:00
143 changed files with 1023 additions and 581 deletions

View File

@@ -10,7 +10,7 @@ php:
- '5.3'
- '5.4'
- '5.5'
- '5.6'
- '5.6.29'
- '7.0'
- nightly
@@ -126,10 +126,10 @@ before_script:
echo "Set timezone"
echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
if [ "$TRAVIS_PHP_VERSION" = '5.3' ] || [ "$TRAVIS_PHP_VERSION" = '5.4' ]; then
echo
echo "Enabling APC for PHP <= 5.4"
#echo
#echo "Enabling APC for PHP <= 5.4"
# Documentation says it should be available for PHP <= 5.6 but it's not for 5.5 and 5.6!
echo 'extension = apc.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
#echo 'extension = apc.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
echo
echo "Enabling Memcached for PHP <= 5.4"
# Documentation says it should be available for all PHP versions but it's not for 5.5 and 5.6, 7.0 and nightly!

117
ChangeLog
View File

@@ -12,6 +12,60 @@ Upgrading to any other version or any other database system is abolutely require
make a Dolibarr upgrade.
***** ChangeLog for 3.9.4 compared to 3.9.3 *****
FIX: #2853
FIX: #3128
FIX: #4447
FIX: #5128 if create method return duplicated code error not use GETPOST in order to get a new code
FIX: #5340
FIX: #5473
FIX: #5474 Country_id of "Don" object is still empty
FIX: #5534
FIX: #5535 bad dependency.
FIX: #5537 AJAX project search does not work properly
FIX: #5540 getFormMail is not registered as addReplace hook
FIX: #5544 Disabled Contact still appear in lists to send emails
FIX: #5549 getNomUrl tooltips show Order info even if user has no rights to read them
FIX: #5568
FIX: #5594
FIX: #5629 PgSQL Interger string stylish error
FIX: #5651
FIX: #5660
FIX: #5853 $conf->global->$calc==0 || $conf->global->$calc==1
FIX: #5907
FIX: #5966 Bug: getNomUrl tooltips show Proposal info even if user has no rights to read them
FIX: #6051
FIX: #6088
FIX: Can correct stock of lot using eatby or sell by date
FIX: Can make a movement on "out of sell" products
FIX: cannot update bank account on invoice if module order not activated
FIX: Can't create withdrawal document
FIX: delete contract extrafields on contract deletion
FIX: Direction of movement lost if an error occurs
FIX: Error when CATEGORIE_RECURSIV_ADD is enabled and new category is daughter of an already linked to object
FIX: export extrafields must not include separe type
FIX: External user must not be able to edit its discounts
FIX: Failed to export contact categories with contact extra fields
FIX: header title in commercial area
FIX: HT and TTC price should always be displayed together
FIX: incoterms
FIX: incoterms do not output into crabe invoice PDF
FIX: in PgSQL no quote "word style" is permitted around column name
FIX: Introduce hidden option MAIL_PREFIX_FOR_EMAIL_ID to solve pb of tracking email.
FIX: margin tab on customer card must filter on current entity invoices
FIX: missing column into SQL on thridparty list
FIX: only show projects of related third if external user
FIX: PgSQL Module Ressource list crash #5637
FIX: php Strict
FIX: Regression when deleting product
FIX: Security to restrict email sending was not efficient
FIX: tag for date rfc in odt substitution
FIX: Update intervention lline crash with PgSQL
FIX: update limit stock on product stock
FIX: vat dictionary should allow enter and edit multiple values for localtaxes, separated by: (ex -19:-15)
FIX: wrong test on dict.php
***** ChangeLog for 3.9.3 compared to 3.9.2 *****
FIX: #4383 $userid not defined
FIX: #4448 $filebonprev is not used, $this->filename now
@@ -311,7 +365,68 @@ This is list of hooks modified:
- Remove deprecated Product::hidden property
***** ChangeLog for 3.8.5 compared to 3.8.4 *****
FIX: #3815 Call to undefined function local_by_date().
FIX: #4424 Missing email of user popup in supplier orders area
FIX: #4442 Missing translation in Banks menu
FIX: #4448 $filebonprev is not used, $this->filename now
FIX: #4455
FIX: #4737 Bank transacion type selector translation is cropped
FIX: #4742 Able to delete a supplier invoice with a registered payment
FIX: #4743 UI glitch in project summary page
FIX: #4747 Missing UI background when registering a supplier invoice payment
FIX: #4748 Supplier invoice payment confirmation amount is not translated
FIX: #4749
FIX: #4756
FIX: #4766 VAT not shown in supplier invoice popup
FIX: #4809 - Duplicate functions with different content
FIX: #4851 Project selector in supplier invoices shows the project label twice
FIX: #4870
FIX: #5008 SQL error when editing the reference of a supplier invoice that already exists
FIX: #5048 Product supplier list display only one produc
FIX: #5170 tva sign with INVOICE_POSITIVE_CREDIT_NOTE option
FIX: #5203
FIX: #5207
FIX: #5338 use of not initialized var $aphour, $apmin, etc
FIX: #5380
FIX: #5383 bad object id on don delete
FIX: #5474 Country_id of "Don" object is still empty
FIX: Accountancy - 3.8 - Chart of accounts are limited on only one country
FIX: Bad include and param for project numbering module call
FIX: Box disabled because bugged
FIX: bug on email template
FIX: Can correct stock of lot using eatby or sell by date
FIX: Can make a movement on "out of sell" products
FIX: Can't create thirdparty or validate invoice if profid is mandatory and profid does not exists for other countries
FIX: can't fetch by siret or siren because of first "if"
FIX: Check stock of product by warehouse if $entrepot_id defined on shippings
FIX: correct display of minimum buying price
FIX: Creation of thumb image for size "small" was not done.
FIX: Direction of movement lost if an error occurs
FIX: dont retrieve new buying price on margin display
FIX: Duplicate records into export
FIX: Email templates not compatible with Multicompany
FIX: end of select when no fournprice
FIX: finished parameters not used
FIX: hook on group card called but not initialized
FIX: It doesn't check if there is enough stock to update the lines of orders/invoices
FIX: large expense note
FIX: missing column when module was installed before standard integration
FIX: Missing database escaping on supplier price insert/update
FIX: Not filtering correctly when come from dashboard
FIX: PROPAL_MERGE_PDF with PRODUCT_USE_OLD_PATH
FIX: real min buying price
FIX: receiving link never works
FIX: same page added several times on mergepropal option
FIX: search on date into supplier invoice list dont work because of status -1
FIX: Search supplier ref on contract
FIX: SQL error function on getAvailableDiscounts function, on bill create mode if socid is empty
FIX: systematic rounding causes prices to be updated without reason
FIX: task ODT company object not correctly retrieved
FIX: Template email must take care of positino column
FIX: VAT rate can be negative. Example spain selling to morroco.
***** ChangeLog for 3.8.4 compared to 3.8.3 *****
FIX: #3694
FIX: #3798 #2519 Cron jobs would never be executed

View File

@@ -222,7 +222,13 @@ $dolibarr_main_prod='0';
# $dolibarr_main_limit_users='0';
# dolibarr_mailing_limit_sendbyweb
# Can set a limit for mailing send by web, can be used for a restricted mode.
# Can set a limit for mailing send by web. This overwrite database value. Can be used to restrict on OS level.
# Default value: 0 (use database value if exist)
# Examples:
# $dolibarr_mailing_limit_sendbyweb='0';
# dolibarr_mailing_limit_sendbycli
# Can set a limit for mailing send by cli. This overwrite database value. Can be used to restrict on OS level.
# Default value: 0 (use database value if exist)
# Examples:
# $dolibarr_mailing_limit_sendbycli='0';

View File

@@ -42,7 +42,7 @@
<Char_Desc_80>DoliWamp, the easy to use Dolibarr for Windows to manage your company,foundation</Char_Desc_80>
<Char_Desc_250>DoliWamp is the Dolibarr ERP/CRM for Windows, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs.</Char_Desc_250>
<Char_Desc_450>DoliWamp is the Dolibarr ERP/CRM autoinstaller for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. Dolibarr ERP/CRM is a software package built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations.</Char_Desc_450>
<Char_Desc_2000>DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP &amp; CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop.
<Char_Desc_2000>DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP &amp; CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop.
DoliWamp is the auto-installer for Windows users with no technical knowledge to install Dolibarr ERP/CRM and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file.</Char_Desc_2000>
</English>
<French>

View File

@@ -42,10 +42,10 @@
<Char_Desc_80>Dolibarr ERP &amp; CRM, the easy to use open source software to manage your activity</Char_Desc_80>
<Char_Desc_250>Dolibarr ERP &amp; CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to follow.</Char_Desc_250>
<Char_Desc_450>Dolibarr ERP &amp; CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450>
<Char_Desc_2000>Dolibarr ERP &amp; CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple:
Simple to install
Simple to use
Simple to develop
<Char_Desc_2000>Dolibarr ERP &amp; CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple:
Simple to install
Simple to use
Simple to develop
Note that Dolibarr is also available with an auto-installer for Windows or Ubuntu users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. This version is called DoliWamp (for Windows) or DoliBuntu (for Ubuntu/Debian).</Char_Desc_2000>
</English>
<Italian>
@@ -62,10 +62,10 @@ Note that Dolibarr is also available with an auto-installer for Windows or Ubunt
<Char_Desc_80>Dolibarr ERP &amp; CRM, le gestionnaire simple pour gérer votre activité</Char_Desc_80>
<Char_Desc_250>Dolibarr ERP &amp; CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
<Char_Desc_450>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP).</Char_Desc_450>
<Char_Desc_2000>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S):
Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle)
Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie)
Simple pour le développement (pas de frameworks lourds).
<Char_Desc_2000>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S):
Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle)
Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie)
Simple pour le développement (pas de frameworks lourds).
Dolibarr intègre en effet sa propre architecture (design patterns) permettant à tout développeur d'être tout de suite opérationnel sans connaissances particulières autre que le PHP. </Char_Desc_2000>
</French>
</Program_Descriptions>

View File

@@ -72,10 +72,10 @@
<Char_Desc_80>Dolibarr ERP &amp; CRM, the easy to use open source software to manage your activity</Char_Desc_80>
<Char_Desc_250>Dolibarr ERP &amp; CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to manage.</Char_Desc_250>
<Char_Desc_450>Dolibarr ERP &amp; CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450>
<Char_Desc_2000>Dolibarr ERP &amp; CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple:
Simple to install
Simple to use
Simple to develop
<Char_Desc_2000>Dolibarr ERP &amp; CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple:
Simple to install
Simple to use
Simple to develop
Note that Dolibarr is also available with an auto-installer for Windows or Ubuntu users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. This version is called DoliWamp (for Windows) or DoliBuntu (for Ubuntu/Debian).</Char_Desc_2000>
</English>
<French>
@@ -84,10 +84,10 @@ Note that Dolibarr is also available with an auto-installer for Windows or Ubunt
<Char_Desc_80>Dolibarr ERP &amp; CRM, le gestionnaire simple pour gérer votre activité</Char_Desc_80>
<Char_Desc_250>Dolibarr ERP &amp; CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
<Char_Desc_450>Dolibarr ERP &amp; CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP).</Char_Desc_450>
<Char_Desc_2000>Dolibarr ERP &amp; CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S):
Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle)
Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie)
Simple pour le développement (pas de frameworks lourds).
<Char_Desc_2000>Dolibarr ERP &amp; CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S):
Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle)
Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie)
Simple pour le développement (pas de frameworks lourds).
Dolibarr intègre en effet sa propre architecture (design patterns) permettant à tout développeur d'être tout de suite opérationnel sans connaissances particulières autre que le PHP. </Char_Desc_2000>
</French>
<Italian>

View File

@@ -72,7 +72,7 @@
<Char_Desc_80>DoliWamp, the easy to use Dolibarr for Windows to manage your company,foundation</Char_Desc_80>
<Char_Desc_250>DoliWamp is the Dolibarr ERP/CRM for Windows, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs.</Char_Desc_250>
<Char_Desc_450>DoliWamp is the Dolibarr ERP/CRM autoinstaller for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. Dolibarr ERP/CRM is a software package built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations.</Char_Desc_450>
<Char_Desc_2000>DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP &amp; CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop.
<Char_Desc_2000>DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP &amp; CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop.
DoliWamp is the auto-installer for Windows users with no technical knowledge to install Dolibarr ERP/CRM and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file.</Char_Desc_2000>
</English>
<French>

View File

@@ -3,7 +3,7 @@
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2011 Remy Younes <ryounes@gmail.com>
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
@@ -624,7 +624,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
$i=0;
foreach ($listfieldinsert as $f => $value)
{
if ($value == 'price' || preg_match('/^amount/i',$value) || preg_match('/^localtax/i',$value) || $value == 'taux') {
if ($value == 'price' || preg_match('/^amount/i',$value) || $value == 'taux') {
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
}
else if ($value == 'entity') {
@@ -672,7 +672,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
$i = 0;
foreach ($listfieldmodify as $field)
{
if ($field == 'price' || preg_match('/^amount/i',$field) || preg_match('/^localtax/i',$field) || $field == 'taux') {
if ($field == 'price' || preg_match('/^amount/i',$field) || $field == 'taux') {
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
}
else if ($field == 'entity') {
@@ -1290,23 +1290,10 @@ if ($id)
$valuetoshow = '';
$align="center";
}
else if ($fieldlist[$field]=='localtax1') {
else if ($fieldlist[$field]=='taux') {
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
if ($obj->localtax1 == 0)
$valuetoshow = '';
$align="right";
}
else if ($fieldlist[$field]=='localtax2') {
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
if ($obj->localtax2 == 0)
$valuetoshow = '';
$align="right";
}
else if (in_array($fieldlist[$field],array('taux','localtax1','localtax2')))
{
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
$align="right";
}
else if (in_array($fieldlist[$field],array('recuperableonly')))
{
$align="center";

View File

@@ -167,7 +167,7 @@ if ($action == 'edit') // Edit
print '<td width="20">&nbsp;</td>';
print '</tr>';
// Multilangual GUI
// Multilingual GUI
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("EnableMultilangInterface").'</td><td>';
print $form->selectyesno('main_multilangs',$conf->global->MAIN_MULTILANGS,1);
@@ -181,7 +181,7 @@ if ($action == 'edit') // Edit
show_theme(null,1);
print '<br>';
// Liste des zone de recherche permanantes supportees
// List of permanent supported search box
if (! empty($searchform))
{
print '<table summary="search" class="noborder" width="100%">';

View File

@@ -90,7 +90,8 @@ $configfileparameters=array(
'?dolibarr_font_DOL_DEFAULT_TTF_BOLD',
'separator',
'?dolibarr_mailing_limit_sendbyweb',
'?dolibarr_strict_mode'
'?dolibarr_mailing_limit_sendbycli',
'?dolibarr_strict_mode'
);
$configfilelib=array(
// 'separator',

View File

@@ -284,7 +284,8 @@ $configfileparameters=array(
'separator4' => '',
'dolibarr_main_prod' => 'Production mode (Hide all error messages)',
'?dolibarr_mailing_limit_sendbyweb' => 'Limit nb of email sent by page',
'?dolibarr_strict_mode' => 'Strict mode is on/off',
'?dolibarr_mailing_limit_sendbycli' => 'Limit nb of email sent by cli',
'?dolibarr_strict_mode' => 'Strict mode is on/off',
'?dolibarr_pdf_force_fpdf' => 'Force fpdf usage to generate PDF'
);

View File

@@ -5,7 +5,7 @@
* Copyright (C) 2006-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013-2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
@@ -602,17 +602,19 @@ class Categorie extends CommonObject
{
if ($this->db->num_rows($resql) > 0)
{
$objparent = $this->db->fetch_object($resql);
$objparent = $this->db->fetch_object($resql);
if (!empty($objparent->fk_parent))
{
$cat = new Categorie($this->db);
$cat->id=$objparent->fk_parent;
$result=$cat->add_type($obj, $type);
if ($result < 0)
{
$this->error=$cat->error;
$error++;
$cat->id = $objparent->fk_parent;
if (!$cat->containsObject($type, $obj->id)) {
$result = $cat->add_type($obj, $type);
if ($result < 0)
{
$this->error = $cat->error;
$error++;
}
}
}
}

View File

@@ -928,7 +928,14 @@ if (count($listofextcals))
// Complete $eventarray with events coming from external module
$parameters=array(); $object=null;
$reshook=$hookmanager->executeHooks('getCalendarEvents',$parameters,$object,$action);
if (! empty($hookmanager->resArray['eventarray'])) $eventarray=array_merge($eventarray, $hookmanager->resArray['eventarray']);
if (! empty($hookmanager->resArray['eventarray'])) {
foreach ($hookmanager->resArray['eventarray'] as $keyDate => $events) {
if (!isset($eventarray[$keyDate])) {
$eventarray[$keyDate]=array();
}
$eventarray[$keyDate]=array_merge($eventarray[$keyDate], $events);
}
}

View File

@@ -69,7 +69,7 @@ if (! empty($conf->propal->enabled)) $propalstatic=new Propal($db);
if (! empty($conf->commande->enabled)) $orderstatic=new Commande($db);
if (! empty($conf->fournisseur->enabled)) $supplierorderstatic=new CommandeFournisseur($db);
llxHeader();
llxHeader("",$langs->trans("CommercialArea"));
print load_fiche_titre($langs->trans("CommercialArea"),'','title_commercial.png');

View File

@@ -761,10 +761,12 @@ else
$sendingmode=$conf->global->MAIN_MAIL_SENDMODE;
if (empty($sendingmode)) $sendingmode='mail'; // If not defined, we use php mail function
// MAILING_NO_USING_PHPMAIL may be defined or not
// MAILING_LIMIT_SENDBYWEB is always defined to something != 0, MAILING_LIMIT_SENDBYCLI may be defined ot not.
if (! empty($conf->global->MAILING_NO_USING_PHPMAIL) && $sendingmode == 'mail')
{
// EMailing feature may be a spam problem, so when you host several users/instance, having this option may force each user to use their own SMTP agent.
// You ensure that every user is using its own SMTP server.
// You ensure that every user is using its own SMTP server when using the mass emailing module.
$linktoadminemailbefore='<a href="'.DOL_URL_ROOT.'/admin/mails.php">';
$linktoadminemailend='</a>';
setEventMessages($langs->trans("MailSendSetupIs", $listofmethods[$sendingmode]), null, 'warnings');
@@ -772,19 +774,27 @@ else
if (! empty($conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS)) setEventMessages($langs->trans("MailSendSetupIs3", $conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS), null, 'warnings');
$_GET["action"]='';
}
else if (empty($conf->global->MAILING_LIMIT_SENDBYWEB))
else if ($conf->global->MAILING_LIMIT_SENDBYWEB == '-1')
{
// Pour des raisons de securite, on ne permet pas cette fonction via l'IHM,
// on affiche donc juste un message
setEventMessages($langs->trans("MailingNeedCommand"), null, 'warnings');
if (! empty($conf->global->MAILING_LIMIT_WARNING_PHPMAIL) && $sendingmode == 'mail') setEventMessages($conf->global->MAILING_LIMIT_WARNING_PHPMAIL, null, 'warnings');
if (! empty($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL) && $sendingmode != 'mail') setEventMessages($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL, null, 'warnings');
// The feature is forbidden from GUI, we show just message to use from command line.
setEventMessages($langs->trans("MailingNeedCommand"), null, 'warnings');
setEventMessages('<textarea cols="60" rows="'.ROWS_1.'" wrap="soft">php ./scripts/emailings/mailing-send.php '.$object->id.'</textarea>', null, 'warnings');
setEventMessages($langs->trans("MailingNeedCommand2"), null, 'warnings');
if ($conf->file->mailing_limit_sendbyweb != '-1') // MAILING_LIMIT_SENDBYWEB was set to -1 in database, but it is allowed ot increase it.
{
setEventMessages($langs->trans("MailingNeedCommand2"), null, 'warnings'); // You can send online with constant...
}
$_GET["action"]='';
}
else
{
$text='';
if ($conf->file->mailing_limit_sendbyweb == 0)
if (! empty($conf->global->MAILING_LIMIT_WARNING_PHPMAIL) && $sendingmode == 'mail') setEventMessages($conf->global->MAILING_LIMIT_WARNING_PHPMAIL, null, 'warnings');
if (! empty($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL) && $sendingmode != 'mail') setEventMessages($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL, null, 'warnings');
$text='';
if ($conf->global->MAILING_LIMIT_SENDBYCLI >= 0)
{
$text.=$langs->trans("MailingNeedCommand");
$text.='<br><textarea cols="60" rows="'.ROWS_2.'" wrap="soft">php ./scripts/emailings/mailing-send.php '.$object->id.' '.$user->login.'</textarea>';

View File

@@ -2734,20 +2734,33 @@ class Propal extends CommonObject
*/
function getNomUrl($withpicto=0,$option='', $get_params='')
{
global $langs, $conf;
global $langs, $conf, $user;
$result='';
$label = '<u>' . $langs->trans("ShowPropal") . '</u>';
if (! empty($this->ref))
$label.= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
if (! empty($this->ref_client))
$label.= '<br><b>'.$langs->trans('RefCustomer').':</b> '.$this->ref_client;
if (! empty($this->total_ht))
$label.= '<br><b>' . $langs->trans('AmountHT') . ':</b> ' . price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency);
if (! empty($this->total_tva))
$label.= '<br><b>' . $langs->trans('VAT') . ':</b> ' . price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency);
if (! empty($this->total_ttc))
$label.= '<br><b>' . $langs->trans('AmountTTC') . ':</b> ' . price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency);
$label = '';
if ($user->rights->propal->lire) {
$label .= '<u>'.$langs->trans("ShowPropal").'</u>';
if (!empty($this->ref)) {
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
}
if (!empty($this->ref_client)) {
$label .= '<br><b>'.$langs->trans('RefCustomer').':</b> '.$this->ref_client;
}
if (!empty($this->total_ht)) {
$label .= '<br><b>'.$langs->trans('AmountHT').':</b> '.price($this->total_ht, 0, $langs, 0, -1, -1,
$conf->currency);
}
if (!empty($this->total_tva)) {
$label .= '<br><b>'.$langs->trans('VAT').':</b> '.price($this->total_tva, 0, $langs, 0, -1, -1,
$conf->currency);
}
if (!empty($this->total_ttc)) {
$label .= '<br><b>'.$langs->trans('AmountTTC').':</b> '.price($this->total_ttc, 0, $langs, 0, -1, -1,
$conf->currency);
}
}
$linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
if ($option == '') {
$link = '<a href="'.DOL_URL_ROOT.'/comm/propal.php?id='.$this->id. $get_params .$linkclose;

View File

@@ -10,6 +10,7 @@
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -255,6 +256,7 @@ if ($result)
}
$param='&socid='.$socid.'&viewstatut='.$viewstatut;
if ($sall) $param.='&sall='.$sall;
if ($month) $param.='&month='.$month;
if ($year) $param.='&year='.$year;
if ($search_ref) $param.='&search_ref=' .$search_ref;

View File

@@ -109,7 +109,7 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
$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-$newdiscount2->amount_ht);
$newdiscount1->amount_tva=price2num($newdiscount1->amount_ttc-$newdiscount1->amount_ht);
$newdiscount2->amount_tva=price2num($newdiscount2->amount_ttc-$newdiscount2->amount_ht);
$db->begin();

View File

@@ -9,7 +9,7 @@
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2016-2017 Ferran Marcet <fmarcet@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -134,6 +134,7 @@ class Commande extends CommonOrder
var $linked_objects=array();
var $user_author_id;
var $user_valid;
/**
* @var OrderLine[]
@@ -1460,7 +1461,7 @@ class Commande extends CommonOrder
// Check parameters
if (empty($id) && empty($ref) && empty($ref_ext) && empty($ref_int)) return -1;
$sql = 'SELECT c.rowid, c.date_creation, c.ref, c.fk_soc, c.fk_user_author, c.fk_statut';
$sql = 'SELECT c.rowid, c.date_creation, c.ref, c.fk_soc, c.fk_user_author, c.fk_user_valid, c.fk_statut';
$sql.= ', c.amount_ht, c.total_ht, c.total_ttc, c.tva as total_tva, c.localtax1 as total_localtax1, c.localtax2 as total_localtax2, c.fk_cond_reglement, c.fk_mode_reglement, c.fk_availability, c.fk_input_reason';
$sql.= ', c.fk_account';
$sql.= ', c.date_commande';
@@ -1502,6 +1503,7 @@ class Commande extends CommonOrder
$this->socid = $obj->fk_soc;
$this->statut = $obj->fk_statut;
$this->user_author_id = $obj->fk_user_author;
$this->user_valid = $obj->fk_user_valid;
$this->total_ht = $obj->total_ht;
$this->total_tva = $obj->total_tva;
$this->total_localtax1 = $obj->total_localtax1;
@@ -2692,8 +2694,8 @@ class Commande extends CommonOrder
$sql.= " total_ht=".(isset($this->total_ht)?$this->total_ht:"null").",";
$sql.= " total_ttc=".(isset($this->total_ttc)?$this->total_ttc:"null").",";
$sql.= " fk_statut=".(isset($this->statut)?$this->statut:"null").",";
$sql.= " fk_user_author=".(isset($this->user_author)?$this->user_author:"null").",";
$sql.= " fk_user_valid=".(isset($this->fk_user_valid)?$this->fk_user_valid:"null").",";
$sql.= " fk_user_author=".(isset($this->user_author_id)?$this->user_author_id:"null").",";
$sql.= " fk_user_valid=".(isset($this->user_valid)?$this->user_valid:"null").",";
$sql.= " fk_projet=".(isset($this->fk_project)?$this->fk_project:"null").",";
$sql.= " fk_cond_reglement=".(isset($this->cond_reglement_id)?$this->cond_reglement_id:"null").",";
$sql.= " fk_mode_reglement=".(isset($this->mode_reglement_id)?$this->mode_reglement_id:"null").",";
@@ -3071,7 +3073,7 @@ class Commande extends CommonOrder
*/
function getNomUrl($withpicto=0,$option=0,$max=0,$short=0)
{
global $conf, $langs;
global $conf, $langs, $user;
$result='';
@@ -3081,17 +3083,29 @@ class Commande extends CommonOrder
if ($short) return $url;
$picto = 'order';
$label = '<u>' . $langs->trans("ShowOrder") . '</u>';
if (! empty($this->ref))
$label .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
if (! empty($this->ref_client))
$label.= '<br><b>' . $langs->trans('RefCustomer') . ':</b> ' . $this->ref_client;
if (! empty($this->total_ht))
$label.= '<br><b>' . $langs->trans('AmountHT') . ':</b> ' . price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency);
if (! empty($this->total_tva))
$label.= '<br><b>' . $langs->trans('VAT') . ':</b> ' . price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency);
if (! empty($this->total_ttc))
$label.= '<br><b>' . $langs->trans('AmountTTC') . ':</b> ' . price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency);
$label = '';
if ($user->rights->commande->lire) {
$label = '<u>'.$langs->trans("ShowOrder").'</u>';
if (!empty($this->ref)) {
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
}
if (!empty($this->ref_client)) {
$label .= '<br><b>'.$langs->trans('RefCustomer').':</b> '.$this->ref_client;
}
if (!empty($this->total_ht)) {
$label .= '<br><b>'.$langs->trans('AmountHT').':</b> '.price($this->total_ht, 0, $langs, 0, -1, -1,
$conf->currency);
}
if (!empty($this->total_tva)) {
$label .= '<br><b>'.$langs->trans('VAT').':</b> '.price($this->total_tva, 0, $langs, 0, -1, -1,
$conf->currency);
}
if (!empty($this->total_ttc)) {
$label .= '<br><b>'.$langs->trans('AmountTTC').':</b> '.price($this->total_ttc, 0, $langs, 0, -1, -1,
$conf->currency);
}
}
$linkstart = '<a href="'.$url.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
$linkend='</a>';

View File

@@ -259,6 +259,7 @@ if ($resql)
$title.=' - '.$langs->trans('StatusOrderValidated').', '.(empty($conf->expedition->enabled)?'':$langs->trans("StatusOrderSent").', ').$langs->trans('StatusOrderToBill');
$param='';
if ($sall) $param.='&sall='.$sall;
if ($socid > 0) $param.='&socid='.$socid;
if ($viewstatut != '') $param.='&viewstatut='.$viewstatut;
if ($orderday) $param.='&orderday='.$orderday;
@@ -274,6 +275,7 @@ if ($resql)
if ($search_sale > 0) $param.='&search_sale='.$search_sale;
if ($search_total_ht != '') $param.='&search_total_ht='.$search_total_ht;
if ($optioncss != '') $param.='&optioncss='.$optioncss;
if ($billed != '') $param.='&billed='.$billed;
$num = $db->num_rows($resql);
print_barre_liste($title, $page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords,'title_commercial.png');
@@ -587,10 +589,13 @@ if ($resql)
print dol_print_date($db->jdate($objp->date_commande), 'day');
print '</td>';
// Delivery date
print '<td align="center">';
print dol_print_date($db->jdate($objp->date_delivery), 'day');
print '</td>';
if (empty($conf->global->ORDER_DISABLE_DELIVERY_DATE))
{
// Delivery date
print '<td align="center">';
print dol_print_date($db->jdate($objp->date_delivery), 'day');
print '</td>';
}
// Amount HT
print '<td align="right" class="nowrap">'.price($objp->total_ht).'</td>';

View File

@@ -87,6 +87,17 @@ if ($action == 'delete')
{
if (GETPOST('categid'))
{
// Delete bank class
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class";
$sql.= " WHERE fk_categ = '".GETPOST('categid')."'";
$result = $db->query($sql);
if (!$result)
{
dol_print_error($db);
}
// Delete bank categ
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_categ";
$sql.= " WHERE rowid = '".GETPOST('categid')."'";
$sql.= " AND entity = ".$conf->entity;

View File

@@ -282,6 +282,8 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
$refcomp=$societestatic->getNomUrl(1,'',24);
$paiement = $facturestatic->getSommePaiement(); // Payment already done
$paiement+= $facturestatic->getSumDepositsUsed();
$paiement+= $facturestatic->getSumCreditNotesUsed();
}
if ($obj->family == 'social_contribution')
{

View File

@@ -66,7 +66,6 @@ if (!empty($conf->incoterm->enabled)) $langs->load('incoterm');
if (! empty($conf->margin->enabled))
$langs->load('margins');
$sall = trim(GETPOST('sall'));
$projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0);
$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility
@@ -772,7 +771,7 @@ if (empty($reshook))
$line->fk_parent_line = $fk_parent_line;
$line->subprice =-$line->subprice; // invert price for object
$line->pa_ht = -$line->pa_ht;
$line->pa_ht = $line->pa_ht;
$line->total_ht=-$line->total_ht;
$line->total_tva=-$line->total_tva;
$line->total_ttc=-$line->total_ttc;

View File

@@ -4,6 +4,7 @@
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2017 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -164,6 +165,6 @@ else
print $langs->trans("ErrorUnknown");
}
$db->close();
llxFooter();
$db->close();

View File

@@ -530,7 +530,7 @@ if ($search_user > 0)
}
if (! $sall)
{
$sql.= ' GROUP BY f.rowid, f.facnumber, ref_client, f.type, f.note_private, f.note_public, f.increment, f.total, f.tva, f.total_ttc,';
$sql.= ' GROUP BY f.rowid, f.facnumber, ref_client, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.total, f.tva, f.total_ttc,';
$sql.= ' f.datef, f.date_lim_reglement,';
$sql.= ' f.paye, f.fk_statut,';
$sql.= ' s.nom, s.rowid, s.code_client, s.client';
@@ -551,7 +551,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
$nbtotalofrecords = $db->num_rows($result);
}
$sql.= $db->plimit($limit+1,$offset);
$sql.= $db->plimit($limit + 1,$offset);
//print $sql;
$resql = $db->query($sql);
@@ -568,6 +568,7 @@ if ($resql)
}
$param='&socid='.$socid;
if ($sall) $param.='&sall='.$sall;
if ($day) $param.='&day='.$day;
if ($month) $param.='&month='.$month;
if ($year) $param.='&year=' .$year;
@@ -590,7 +591,6 @@ if ($resql)
$i = 0;
print '<form method="POST" name="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
print_barre_liste($langs->trans('BillsCustomers').' '.($socid?' '.$soc->name:''),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,$massactionbutton,$num,$nbtotalofrecords,'title_accountancy.png');
if ($massaction == 'presend')

View File

@@ -106,7 +106,7 @@ $fsearch.=' <input type="text" name="min" id="min" value="'.$min.'" size="6">';
$calc=$conf->global->MAIN_INFO_LOCALTAX_CALC.$local;
// Affiche en-tete du rapport
if ($conf->global->$calc==0 || $conf->global->$calc==1) // Calculate on invoice for goods and services
if ($calc==0 || $calc==1) // Calculate on invoice for goods and services
{
$nom=$langs->transcountry($local==1?"LT1ReportByCustomersInInputOutputMode":"LT2ReportByCustomersInInputOutputMode",$mysoc->country_code);
$calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec");
@@ -124,7 +124,7 @@ if ($conf->global->$calc==0 || $conf->global->$calc==1) // Calculate on invoice
$productsup=$langs->trans("Description");
$amountsup=$langs->trans("AmountHT");
}
if ($conf->global->$calc==2) // Invoice for goods, payment for services
if ($calc==2) // Invoice for goods, payment for services
{
$nom=$langs->transcountry($local==1?"LT1ReportByCustomersInInputOutputMode":"LT2ReportByCustomersInInputOutputMode",$mysoc->country_code);
$calcmode=$langs->trans("CalcModeLT2Debt");
@@ -149,7 +149,7 @@ $vatcust=$langs->transcountry($local==1?"LT1":"LT2",$mysoc->country_code);
$vatsup=$langs->transcountry($local==1?"LT1":"LT2",$mysoc->country_code);
// IRPF that the customer has retained me
if($conf->global->$calc ==0 || $conf->global->$calc == 2)
if($calc ==0 || $calc == 2)
{
print "<table class=\"noborder\" width=\"100%\">";
print "<tr class=\"liste_titre\">";
@@ -232,7 +232,7 @@ if($conf->global->$calc ==0 || $conf->global->$calc == 2)
}
// IRPF I retained my supplier
if($conf->global->$calc ==0 || $conf->global->$calc == 1){
if($calc ==0 || $calc == 1){
print "<table class=\"noborder\" width=\"100%\">";
print "<tr class=\"liste_titre\">";
print '<td align="left">'.$langs->trans("Num")."</td>";
@@ -309,7 +309,7 @@ if($conf->global->$calc ==0 || $conf->global->$calc == 1){
}
}
if($conf->global->$calc ==0){
if($calc ==0){
// Total to pay
print '<br><br>';
print '<table class="noborder" width="100%">';

View File

@@ -273,7 +273,8 @@ $sql.= " WHERE f.entity = ".$conf->entity;
$sql.= " AND f.datev >= '".$db->idate(dol_get_first_day($y,1,false))."'";
$sql.= " AND f.datev <= '".$db->idate(dol_get_last_day($y,12,false))."'";
$sql.= " AND localtaxtype=".$localTaxType;
$sql.= " GROUP BY dm ASC";
$sql.= " GROUP BY dm";
$sql.= " ORDER BY dm ASC";
pt($db, $sql,$langs->trans("Year")." $y");

View File

@@ -919,7 +919,7 @@ class BonPrelevement extends CommonObject
$dir=$conf->prelevement->dir_output.'/receipts';
if (! is_dir($dir)) dol_mkdir($dir);
$this->filename = $dir.$ref.'.xml';
$this->filename = $dir.'/'.$ref.'.xml';
// Create withdraw receipt in database
$sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_bons (";
@@ -1265,18 +1265,6 @@ class BonPrelevement extends CommonObject
* section Debiteur (sepa Debiteurs bloc lines)
*/
$tmp_invoices = array();
$sql = "SELECT f.facnumber as fac FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl, ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."prelevement_facture as pf, ".MAIN_DB_PREFIX."societe as soc, ".MAIN_DB_PREFIX."c_country as p, ".MAIN_DB_PREFIX."societe_rib as rib WHERE pl.fk_prelevement_bons = ".$this->id." AND pl.rowid = pf.fk_prelevement_lignes AND pf.fk_facture = f.rowid AND soc.fk_pays = p.rowid AND soc.rowid = f.fk_soc AND rib.fk_soc = f.fk_soc AND rib.default_rib = 1";
$resql=$this->db->query($sql);
if ($resql) {
while ($objfac = $this->db->fetch_object($resql)) {
$tmp_invoices[] = $objfac->fac;
}
}
$ListOfFactures = implode($tmp_invoices);
$sql = "SELECT soc.code_client as code, soc.address, soc.zip, soc.town, c.code as country_code,";
$sql.= " pl.client_nom as nom, pl.code_banque as cb, pl.code_guichet as cg, pl.number as cc, pl.amount as somme,";
$sql.= " f.facnumber as fac, pf.fk_facture as idfac, rib.datec, rib.iban_prefix as iban, rib.bic as bic, rib.rowid as drum";
@@ -1303,7 +1291,7 @@ class BonPrelevement extends CommonObject
while ($i < $num)
{
$obj = $this->db->fetch_object($resql);
$fileDebiteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->nom, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $ListOfFactures, $obj->idfac, $obj->iban, $obj->bic, $this->db->jdate($obj->datec), $obj->drum);
$fileDebiteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->nom, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $obj->fac, $obj->idfac, $obj->iban, $obj->bic, $this->db->jdate($obj->datec), $obj->drum);
$this->total = $this->total + $obj->somme;
$i++;
}
@@ -1558,7 +1546,7 @@ class BonPrelevement extends CommonObject
$XML_DEBITOR ='';
$XML_DEBITOR .=' <DrctDbtTxInf>'.$CrLf;
$XML_DEBITOR .=' <PmtId>'.$CrLf;
$XML_DEBITOR .=' <EndToEndId>'.('AS-'.$row_facnumber.'-'.$Rowing).'</EndToEndId>'.$CrLf;
$XML_DEBITOR .=' <EndToEndId>'.('AS-'.dol_trunc($row_facnumber,20).'-'.$Rowing).'</EndToEndId>'.$CrLf; // ISO20022 states that EndToEndId has a MaxLength of 35 characters
$XML_DEBITOR .=' </PmtId>'.$CrLf;
$XML_DEBITOR .=' <InstdAmt Ccy="EUR">'.round($row_somme, 2).'</InstdAmt>'.$CrLf;
$XML_DEBITOR .=' <DrctDbtTx>'.$CrLf;
@@ -1574,11 +1562,11 @@ class BonPrelevement extends CommonObject
$XML_DEBITOR .=' </FinInstnId>'.$CrLf;
$XML_DEBITOR .=' </DbtrAgt>'.$CrLf;
$XML_DEBITOR .=' <Dbtr>'.$CrLf;
$XML_DEBITOR .=' <Nm>'.strtoupper(dol_string_unaccent($row_nom)).'</Nm>'.$CrLf;
$XML_DEBITOR .=' <Nm>'.strtoupper(dolEscapeXML(dol_string_unaccent($row_nom))).'</Nm>'.$CrLf;
$XML_DEBITOR .=' <PstlAdr>'.$CrLf;
$XML_DEBITOR .=' <Ctry>'.$row_country_code.'</Ctry>'.$CrLf;
$XML_DEBITOR .=' <AdrLine>'.dol_string_unaccent(strtr($row_address, array(CHR(13) => ", ", CHR(10) => ""))).'</AdrLine>'.$CrLf;
$XML_DEBITOR .=' <AdrLine>'.dol_string_unaccent($row_zip.' '.$row_town).'</AdrLine>'.$CrLf;
$XML_DEBITOR .=' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_unaccent(strtr($row_address, array(CHR(13) => ", ", CHR(10) => "")))),70,'right','UTF-8',true).'</AdrLine>'.$CrLf;
$XML_DEBITOR .=' <AdrLine>'.dolEscapeXML(dol_string_unaccent($row_zip.' '.$row_town)).'</AdrLine>'.$CrLf;
$XML_DEBITOR .=' </PstlAdr>'.$CrLf;
$XML_DEBITOR .=' </Dbtr>'.$CrLf;
$XML_DEBITOR .=' <DbtrAcct>'.$CrLf;
@@ -1673,8 +1661,9 @@ class BonPrelevement extends CommonObject
* @return string String with SEPA Sender
*/
function EnregEmetteurSEPA($configuration, $ladate, $nombre, $total, $CrLf='\n')
{ // SEPA INITIALISATION
global $confs;
{
// SEPA INITIALISATION
global $conf;
$dateTime_YMD = dol_print_date($ladate, '%Y%m%d');
$dateTime_ETAD = dol_print_date($ladate, '%Y-%m-%d');

View File

@@ -141,7 +141,7 @@ if ($prev_id)
print price($row[0]);
print '</td><td align="right">';
print round($row[0]/$bon->amount*100,2)." %";
if ($bon->amount) print round($row[0]/$bon->amount*100,2)." %";
print '</td>';
print "</tr>\n";

View File

@@ -262,9 +262,15 @@ $dolibarr_main_db_prefix='';
// $dolibarr_main_limit_users='0';
// dolibarr_mailing_limit_sendbyweb
// Can set a limit for mailing send by web. Can be used for a restricted mode.
// Default value: 0 (use database value if exist)
// Examples:
// Can set a limit for mailing send by web. This overwrite database value. Can be used to restrict on OS level.
// Default value: '0' (no overwrite, use database value if exists)
// Examples: '-1' (sending by web is forbidden)
// $dolibarr_mailing_limit_sendbyweb='0';
// dolibarr_mailing_limit_sendbycli
// Can set a limit for mailing send by cli. This overwrite database value. Can be used to restrict on OS level.
// Default value: '0' (no overwrite, use database value if exists)
// Examples: '-1' (sending by cli is forbidden)
// $dolibarr_mailing_limit_sendbyweb='0';
// dolibarr_strict_mode

View File

@@ -39,7 +39,7 @@ $confirm = GETPOST('confirm', 'alpha');
// Security check
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'contact', $id, '','');
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe');
// Get parameters
$sortfield = GETPOST("sortfield",'alpha');

View File

@@ -364,6 +364,7 @@ if ($result)
$param ='&begin='.urlencode($begin).'&view='.urlencode($view).'&userid='.urlencode($userid).'&contactname='.urlencode($sall);
$param.='&type='.urlencode($type).'&view='.urlencode($view).'&search_lastname='.urlencode($search_lastname).'&search_firstname='.urlencode($search_firstname).'&search_societe='.urlencode($search_societe).'&search_email='.urlencode($search_email);
if (!empty($search_categ)) $param.='&search_categ='.urlencode($search_categ);
if ($sall != '') $param.='&amp;sall='.urlencode($sall);
if ($search_lastname != '') $param.='&amp;search_lastname='.urlencode($search_lastname);
if ($search_firstname != '') $param.='&amp;search_firstname='.urlencode($search_firstname);
if ($search_zip != '') $param.='&amp;search_zip='.urlencode($search_zip);

View File

@@ -56,7 +56,7 @@ class Contrat extends CommonObject
* @var string
*/
var $ref_customer;
/**
* Supplier reference of the contract
* @var string
@@ -536,7 +536,7 @@ class Contrat extends CommonObject
return -1;
}
}
/**
* Load a contract from database
*
@@ -1134,6 +1134,16 @@ class Contrat extends CommonObject
}
}
// Removed extrafields
if (! $error) {
$result=$this->deleteExtraFields();
if ($result < 0)
{
$error++;
dol_syslog(get_class($this)."::delete error -3 ".$this->error, LOG_ERR);
}
}
if (! $error)
{
// We remove directory
@@ -1333,7 +1343,7 @@ class Contrat extends CommonObject
$localtaxes_type=getLocalTaxesFromRate($txtva, 0, $this->societe, $mysoc);
$txtva = preg_replace('/\s*\(.*\)/','',$txtva); // Remove code into vatrate.
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, 1,$mysoc, $localtaxes_type);
$total_ht = $tabprice[0];
$total_tva = $tabprice[1];
@@ -1356,9 +1366,9 @@ class Contrat extends CommonObject
if (empty($pa_ht)) $pa_ht=0;
// if buy price not defined, define buyprice as configured in margin admin
if ($this->pa_ht == 0)
if ($this->pa_ht == 0)
{
if (($result = $this->defineBuyPrice($pu_ht, $remise_percent, $fk_product)) < 0)
{
@@ -1515,7 +1525,7 @@ class Contrat extends CommonObject
$localtaxes_type=getLocalTaxesFromRate($tvatx, 0, $this->societe, $mysoc);
$tvatx = preg_replace('/\s*\(.*\)/','',$tvatx); // Remove code into vatrate.
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $tvatx, $localtax1tx, $localtax2tx, 0, $price_base_type, $info_bits, 1, $mysoc, $localtaxes_type);
$total_ht = $tabprice[0];
$total_tva = $tabprice[1];
@@ -1539,7 +1549,7 @@ class Contrat extends CommonObject
if (empty($pa_ht)) $pa_ht=0;
// if buy price not defined, define buyprice as configured in margin admin
if ($this->pa_ht == 0)
if ($this->pa_ht == 0)
{
if (($result = $this->defineBuyPrice($pu_ht, $remise_percent)) < 0)
{
@@ -1591,8 +1601,8 @@ class Contrat extends CommonObject
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($array_options) && count($array_options)>0) // For avoid conflicts if trigger used
{
$contractline = new ContratLigne($this->db);
$contractline->array_options=$array_option;
$contractline->id= $this->db->last_insert_id(MAIN_DB_PREFIX.$contractline->table_element);
$contractline->array_options=$array_options;
$contractline->id= $rowid;
$result=$contractline->insertExtraFields();
if ($result < 0)
{
@@ -2571,7 +2581,7 @@ class ContratLigne extends CommonObjectLine
if (empty($this->pa_ht)) $this->pa_ht=0;
// if buy price not defined, define buyprice as configured in margin admin
if ($this->pa_ht == 0)
if ($this->pa_ht == 0)
{
if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0)
{

View File

@@ -6,6 +6,7 @@
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Claudio Aschieri <c.aschieri@19.coop>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -222,6 +223,7 @@ if ($resql)
$param.='&search_name='.$search_name;
$param.='&search_ref_supplier='.$search_ref_supplier;
$param.='&search_sale=' .$search_sale;
if ($sall != '') $param.='&sall='.$sall;
if ($optioncss != '') $param.='&optioncss='.$optioncss;
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "c.rowid","","$param",'',$sortfield,$sortorder);

View File

@@ -80,11 +80,11 @@ if(! empty($_POST['removAll']))
{
$pathtodelete = $value;
$filetodelete = $listofnames[$key];
$result = dol_delete_file($pathtodelete,1); // Delete uploded Files
$result = dol_delete_file($pathtodelete,1); // Delete uploded Files
$langs->load("other");
setEventMessages($langs->trans("FileWasRemoved",$filetodelete), null, 'mesgs');
$formmail->remove_attached_files($key); // Update Session
}
}
@@ -117,29 +117,29 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
$dolimail = new Dolimail($db);
$possibleaccounts=$dolimail->get_societe_by_email($_POST['sendto'],"1");
$possibleuser=$dolimail->get_from_user_by_mail($_POST['sendto'],"1"); // suche in llx_societe and socpeople
if (!$possibleaccounts && !$possibleuser)
if (!$possibleaccounts && !$possibleuser)
{
setEventMessages($langs->trans('ErrorFailedToFindSocieteRecord',$_POST['sendto']), null, 'errors');
}
elseif (count($possibleaccounts)>1)
elseif (count($possibleaccounts)>1)
{
$sendtosocid=$possibleaccounts[1]['id'];
$result=$object->fetch($sendtosocid);
setEventMessages($langs->trans('ErrorFoundMoreThanOneRecordWithEmail',$_POST['sendto'],$object->name), null, 'mesgs');
}
else
else
{
if($possibleaccounts){
if($possibleaccounts){
$sendtosocid=$possibleaccounts[1]['id'];
$result=$object->fetch($sendtosocid);
}elseif($possibleuser){
}elseif($possibleuser){
$sendtosocid=$possibleuser[0]['id'];
$result=$uobject->fetch($sendtosocid);
$object=$uobject;
}
}
}
}
@@ -236,35 +236,35 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
$mailboxconfig = new IMAP($db);
$mailboxconfig->fetch($mbid);
if ($mailboxconfig->mailbox_imap_host) $ref=$mailboxconfig->get_ref();
$mailboxconfig->folder_id=$mailboxconfig->mailbox_imap_outbox;
$mailboxconfig->userfolder_fetch();
if ($mailboxconfig->mailbox_save_sent_mails == 1)
{
$folder=str_replace($ref, '', $mailboxconfig->folder_cache_key);
if (!$folder) $folder = "Sent"; // Default Sent folder
$mailboxconfig->mbox = imap_open($mailboxconfig->get_connector_url().$folder, $mailboxconfig->mailbox_imap_login, $mailboxconfig->mailbox_imap_password);
if (FALSE === $mailboxconfig->mbox)
if (FALSE === $mailboxconfig->mbox)
{
$info = FALSE;
$err = $langs->trans('Error3_Imap_Connection_Error');
setEventMessages($err,$mailboxconfig->element, null, 'errors');
}
else
}
else
{
$mailboxconfig->mailboxid=$_POST['frommail'];
$mailboxconfig->foldername=$folder;
$from = $mailfromid[0] . $mailfromid[2];
$imap=1;
}
}
}
}
}
// Send mail
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
$mailfile = new CMailFile($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,$sendtobcc,$deliveryreceipt,-1,'','',$trackid);
@@ -278,7 +278,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
if ($result)
{
$error=0;
// FIXME This must be moved into a trigger for action $trigger_name
if (! empty($conf->dolimail->enabled))
{
@@ -289,13 +289,13 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
$dolimail=new DoliMail($db);
$dolimail->id = $mid;
$res=$dolimail->set_prop($user, 'answered',1);
}
}
if ($imap==1)
{
// write mail to IMAP Server
$movemail = $mailboxconfig->putMail($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,$folder,$deliveryreceipt,$mailfile);
$movemail = $mailboxconfig->putMail($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,$folder,$deliveryreceipt,$mailfile);
if ($movemail) setEventMessages($langs->trans("MailMovedToImapFolder",$folder), null, 'mesgs');
else setEventMessages($langs->trans("MailMovedToImapFolder_Warning",$folder), null, 'warnings');
else setEventMessages($langs->trans("MailMovedToImapFolder_Warning",$folder), null, 'warnings');
}
}
@@ -313,7 +313,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
$interface=new Interfaces($db);
$result=$interface->run_triggers($trigger_name,$object,$user,$langs,$conf);
if ($result < 0) {
$error++; $this->errors=$interface->errors;
$error++; $errors=$interface->errors;
}
// End call of triggers
@@ -327,8 +327,8 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
// This avoid sending mail twice if going out and then back to page
$mesg=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2));
setEventMessages($mesg, null, 'mesgs');
if($conf->dolimail->enabled) header('Location: '.$_SERVER["PHP_SELF"].'?'.($paramname?$paramname:'id').'='.$object->id.'&'.($paramname2?$paramname2:'mid').'='.$parm2val);
else header('Location: '.$_SERVER["PHP_SELF"].'?'.($paramname?$paramname:'id').'='.$object->id);
if ($conf->dolimail->enabled) header('Location: '.$_SERVER["PHP_SELF"].'?'.($paramname?$paramname:'id').'='.$object->id.'&'.($paramname2?$paramname2:'mid').'='.$parm2val);
else header('Location: '.$_SERVER["PHP_SELF"].'?'.($paramname?$paramname:'id').'='.$object->id);
exit;
}
}

View File

@@ -2,6 +2,7 @@
/* Copyright (C) 2012-2014 Charles-François BENKE <charles.fr@benke.fr>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
* Copyright (C) 2016 Juan José Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -79,8 +80,10 @@ class box_project extends ModeleBoxes
$sql = "SELECT p.rowid, p.ref, p.title, p.fk_statut ";
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
if($user->socid) $sql.= " INNER JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid=p.fk_soc";
$sql.= " WHERE p.entity = ".$conf->entity;
$sql.= " AND p.fk_statut = 1"; // Seulement les projets ouverts
if($user->socid) $sql.= " AND s.rowid = ".$user->socid;
$sql.= " AND p.fk_statut = 1"; // Seulement les projets ouverts
$sql.= " ORDER BY p.datec DESC";
$sql.= $db->plimit($max, 0);

View File

@@ -143,6 +143,8 @@ class CMailFile
$this->msgishtml = $msgishtml;
}
if (! empty($conf->global->MAIN_MAIL_FORCE_CONTENT_TYPE_TO_HTML)) $this->msgishtml=1; // To force to send everything with content type html.
// Detect images
if ($this->msgishtml)
{
@@ -366,7 +368,7 @@ class CMailFile
*/
function sendfile()
{
global $conf,$db;
global $conf,$db,$langs;
$errorlevel=error_reporting();
error_reporting($errorlevel ^ E_WARNING); // Desactive warnings
@@ -388,7 +390,31 @@ class CMailFile
return $reshook;
}
// Check number of recipient is lower or equal than MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL
if (empty($conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL)) $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL=10;
$tmparray = explode(',', $this->addr_to);
if (count($tmparray) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL)
{
$this->error = 'Too much recipients in to:';
dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING);
return false;
}
$tmparray = explode(',', $this->addr_cc);
if (count($tmparray) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL)
{
$this->error = 'Too much recipients in cc:';
dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING);
return false;
}
$tmparray = explode(',', $this->addr_bcc);
if (count($tmparray) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL)
{
$this->error = 'Too much recipients in bcc:';
dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING);
return false;
}
// Action according to choosed sending method
if ($conf->global->MAIN_MAIL_SENDMODE == 'mail')
{
@@ -417,8 +443,6 @@ class CMailFile
}
else
{
dol_syslog("CMailFile::sendfile: mail start HOST=".ini_get('SMTP').", PORT=".ini_get('smtp_port'), LOG_DEBUG);
$bounce = ''; // By default
if (! empty($conf->global->MAIN_MAIL_ALLOW_SENDMAIL_F))
{
@@ -431,7 +455,8 @@ class CMailFile
{
$bounce .= ($bounce?' ':'').'-ba';
}
dol_syslog("CMailFile::sendfile: mail start HOST=".ini_get('SMTP').", PORT=".ini_get('smtp_port').", additionnal_parameters=".$bounce, LOG_DEBUG);
$this->message=stripslashes($this->message);
if (! empty($conf->global->MAIN_MAIL_DEBUG)) $this->dump_mail();
@@ -449,7 +474,8 @@ class CMailFile
{
$this->error.=" to HOST=".ini_get('SMTP').", PORT=".ini_get('smtp_port'); // This values are value used only for non linuxlike systems
}
$this->error.=".<br>Check your server logs and your firewalls setup";
$this->error.=".<br>";
$this->error.=$langs->trans("ErrorPhpMailDelivery");
dol_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_ERR);
}
else
@@ -680,7 +706,7 @@ class CMailFile
global $conf;
$out = "";
$host = dol_getprefix();
$host = dol_getprefix('email');
// Sender
//$out.= "Sender: ".getValidAddress($this->addr_from,2)).$this->eol2;
@@ -798,8 +824,9 @@ class CMailFile
$strContent = preg_replace("/\r\n/si", "\n", $strContent);
}
//$strContent = rtrim(chunk_split($strContent)); // Function chunck_split seems bugged
$strContent = rtrim(wordwrap($strContent));
// Make RFC2045 Compliant, split lines
//$strContent = rtrim(chunk_split($strContent)); // Function chunck_split seems ko if not used on a base64 content
$strContent = rtrim(wordwrap($strContent)); // TODO Using this method creates unexpected line break on text/plain content.
if ($this->msgishtml)
{

View File

@@ -35,8 +35,8 @@ abstract class CommonDocGenerator
{
var $error='';
protected $db;
/**
* Constructor
*
@@ -59,6 +59,8 @@ abstract class CommonDocGenerator
{
global $conf;
$logotouse=$conf->user->dir_output.'/'.get_exdir($user->id, 2, 0, 1, $user, 'user').'/'.$user->photo;
return array(
'myuser_lastname'=>$user->lastname,
'myuser_firstname'=>$user->firstname,
@@ -75,7 +77,7 @@ abstract class CommonDocGenerator
'myuser_fax'=>$user->office_fax,
'myuser_mobile'=>$user->user_mobile,
'myuser_email'=>$user->email,
'myuser_logo'=>$user->photo,
'myuser_logo'=>$logotouse,
'myuser_job'=>$user->job,
'myuser_web'=>'' // url not exist in $user object
);
@@ -390,7 +392,7 @@ abstract class CommonDocGenerator
// Add vat by rates
foreach ($object->lines as $line)
{
// $line->tva_tx format depends on database field accuraty, no reliable. This is kept for backward comaptibility
// $line->tva_tx format depends on database field accuraty, no reliable. This is kept for backward comaptibility
if (empty($resarray[$array_key.'_total_vat_'.$line->tva_tx])) $resarray[$array_key.'_total_vat_'.$line->tva_tx]=0;
$resarray[$array_key.'_total_vat_'.$line->tva_tx]+=$line->total_tva;
$resarray[$array_key.'_total_vat_locale_'.$line->tva_tx]=price($resarray[$array_key.'_total_vat_'.$line->tva_tx]);
@@ -582,7 +584,7 @@ abstract class CommonDocGenerator
$object->array_options['options_'.$key] = $extrafields->attribute_param[$key]['options'][$object->array_options['options_'.$key]];
}
else if($extrafields->attribute_type[$key] == 'date')
{
{
if (strlen($object->array_options['options_'.$key])>0)
{
$object->array_options['options_'.$key] = dol_print_date($object->array_options['options_'.$key],'day'); // using company output language

View File

@@ -448,7 +448,7 @@ abstract class CommonObject
global $conf, $langs;
$countriesusingstate=array('AU','US','IN','GB','ES','UK','TR'); // See also option MAIN_FORCE_STATE_INTO_ADDRESS
$contactid=0;
$thirdpartyid=0;
if ($this->element == 'societe')
@@ -465,12 +465,12 @@ abstract class CommonObject
$contactid=$this->contact_id;
$thirdpartyid=$object->fk_soc;
}
$out='<!-- BEGIN part to show address block -->';
$outdone=0;
$coords = $this->getFullAddress(1,', ');
if ($coords)
if ($coords)
{
if (! empty($conf->use_javascript_ajax))
{
@@ -485,7 +485,7 @@ abstract class CommonObject
}
if (! in_array($this->country_code,$countriesusingstate) && empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS) // If MAIN_FORCE_STATE_INTO_ADDRESS is on, state is already returned previously with getFullAddress
&& empty($conf->global->SOCIETE_DISABLE_STATE) && $this->state)
&& empty($conf->global->SOCIETE_DISABLE_STATE) && $this->state)
{
$out.=($outdone?' - ':'').$this->state;
$outdone++;
@@ -516,15 +516,15 @@ abstract class CommonObject
if (! empty($this->office_fax)) {
$out.=dol_print_phone($this->fax,$this->country_code,$contactid,$thirdpartyid,'AC_FAX','&nbsp;','fax',$langs->trans("Fax")); $outdone++;
}
$out.='<div style="clear: both;"></div>';
$outdone=0;
if (! empty($this->email))
if (! empty($this->email))
{
$out.=dol_print_email($this->email,$this->id,$object->id,'AC_EMAIL',0,0,1);
$outdone++;
}
if (! empty($this->url))
if (! empty($this->url))
{
$out.=dol_print_url($this->url,'',0,1);
$outdone++;
@@ -535,12 +535,12 @@ abstract class CommonObject
if ($this->skype) $out.=dol_print_skype($this->skype,$this->id,$object->id,'AC_SKYPE');
$outdone++;
}
$out.='<!-- END Part to show address block -->';
return $out;
}
/**
* Add a link between element $this->element and a contact
*
@@ -595,50 +595,56 @@ abstract class CommonObject
}
}
$datecreate = dol_now();
$this->db->begin();
// Insertion dans la base
$sql = "INSERT INTO ".MAIN_DB_PREFIX."element_contact";
$sql.= " (element_id, fk_socpeople, datecreate, statut, fk_c_type_contact) ";
$sql.= " VALUES (".$this->id.", ".$fk_socpeople." , " ;
$sql.= "'".$this->db->idate($datecreate)."'";
$sql.= ", 4, '". $id_type_contact . "' ";
$sql.= ")";
dol_syslog(get_class($this)."::add_contact", LOG_DEBUG);
$resql=$this->db->query($sql);
if ($resql)
{
if (! $notrigger)
{
$result=$this->call_trigger(strtoupper($this->element).'_ADD_CONTACT', $user);
if ($result < 0)
{
$this->db->rollback();
if(! empty($id_type_contact)) {
$datecreate = dol_now();
$this->db->begin();
// Insertion dans la base
$sql = "INSERT INTO ".MAIN_DB_PREFIX."element_contact";
$sql.= " (element_id, fk_socpeople, datecreate, statut, fk_c_type_contact) ";
$sql.= " VALUES (".$this->id.", ".$fk_socpeople." , " ;
$sql.= "'".$this->db->idate($datecreate)."'";
$sql.= ", 4, ". $id_type_contact . " ";
$sql.= ")";
dol_syslog(get_class($this)."::add_contact", LOG_DEBUG);
$resql=$this->db->query($sql);
if ($resql)
{
if (! $notrigger)
{
$result=$this->call_trigger(strtoupper($this->element).'_ADD_CONTACT', $user);
if ($result < 0)
{
$this->db->rollback();
return -1;
}
}
$this->db->commit();
return 1;
}
else
{
if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS')
{
$this->error=$this->db->errno();
$this->db->rollback();
return -2;
}
else
{
$this->error=$this->db->error();
$this->db->rollback();
return -1;
}
}
$this->db->commit();
return 1;
}
else
{
if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS')
{
$this->error=$this->db->errno();
$this->db->rollback();
return -2;
}
else
{
$this->error=$this->db->error();
$this->db->rollback();
return -1;
}
}
}
return 1;
}
/**
@@ -1196,7 +1202,7 @@ abstract class CommonObject
if (!empty($id) && !empty($field) && !empty($table)) {
$sql = "SELECT ".$field." FROM ".MAIN_DB_PREFIX.$table;
$sql.= " WHERE rowid = ".$id;
dol_syslog(get_class($this).'::getValueFrom', LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
@@ -2275,8 +2281,8 @@ abstract class CommonObject
* - all parameters empty -> we look all link to current object (current object can be source or target)
* - one couple id+type is provided -> this will set $justsource or $justtarget
* - one couple id+type is provided and other type is provided -> this will set $justsource or $justtarget + criteria on other type
*
*
*
*
* @param int $sourceid Object source id (if not defined, id of object)
* @param string $sourcetype Object source type (if not defined, element name of object)
* @param int $targetid Object target id (if not defined, id of object)
@@ -3223,7 +3229,7 @@ abstract class CommonObject
$text.= ' - '.(! empty($line->label)?$line->label:$label);
$description.=(! empty($conf->global->PRODUIT_DESC_IN_FORM)?'':dol_htmlentitiesbr($line->description)); // Description is what to show on popup. We shown nothing if already into desc.
}
$line->pu_ttc = price2num($line->subprice * (1 + ($line->tva_tx/100)), 'MU');
// Output template part (modules that overwrite templates must declare this into descriptor)
@@ -3662,7 +3668,7 @@ abstract class CommonObject
return -1;
}
}
// We save charset_output to restore it because write_file can change it if needed for
// output format that does not support UTF8.
$sav_charset_output=$outputlangs->charset_output;
@@ -3726,13 +3732,13 @@ abstract class CommonObject
/* For default values */
/**
* Return the default value to use for a field when showing the create form of object.
* Return the default value to use for a field when showing the create form of object.
* Return values in this order:
* 1) If parameter is available into POST, we return it first.
* 2) If not but an alternate value was provided as parameter of function, we return it.
* 3) If not but a constant $conf->global->OBJECTELEMENT_FIELDNAME is set, we return it (It is better to use the dedicated table).
* 3) If not but a constant $conf->global->OBJECTELEMENT_FIELDNAME is set, we return it (It is better to use the dedicated table).
* 4) Return value found into database (TODO No yet implemented)
*
*
* @param string $fieldname Name of field
* @param string $alternatevalue Alternate value to use
* @return string Default value
@@ -3743,27 +3749,27 @@ abstract class CommonObject
// If param is has been posted with use this value first.
if (isset($_POST[$fieldname])) return GETPOST($fieldname, 2);
if (isset($alternatevalue)) return $alternatevalue;
$newelement=$this->element;
if ($newelement == 'facture') $newelement='invoice';
if ($newelement == 'commande') $newelement='order';
if (empty($newelement))
if (empty($newelement))
{
dol_syslog("Ask a default value using common method getDefaultCreateValueForField on an object with no property ->element defined. Return empty string.", LOG_WARNING);
return '';
}
$keyforfieldname=strtoupper($newelement.'_DEFAULT_'.$fieldname);
//var_dump($keyforfieldname);
if (isset($conf->global->$keyforfieldname)) return $conf->global->$keyforfieldname;
// TODO Ad here a scan into table llx_overwrite_default with a filter on $this->element and $fieldname
// TODO Ad here a scan into table llx_overwrite_default with a filter on $this->element and $fieldname
}
/* For triggers */
@@ -3963,7 +3969,7 @@ abstract class CommonObject
{
$res=$object->fetch(0,$value);
if ($res > 0) $this->array_options[$key]=$object->id;
else
else
{
$this->error="Ref '".$value."' for object '".$object->element."' not found";
$this->db->rollback();
@@ -4196,25 +4202,25 @@ abstract class CommonObject
return true;
}
/**
* define buy price if not defined
* set buy price = sell price if ForceBuyingPriceIfNull configured,
* else if calculation MARGIN_TYPE = 'pmp' and pmp is calculated, set pmp as buyprice
* else set min buy price as buy price
*
*
* @param float $unitPrice product unit price
* @param float $discountPercent line discount percent
* @param int $fk_product product id
*
* @return float <0 if ko, buyprice if ok
*/
public function defineBuyPrice($unitPrice = 0, $discountPercent = 0, $fk_product = 0)
public function defineBuyPrice($unitPrice = 0, $discountPercent = 0, $fk_product = 0)
{
global $conf;
$buyPrice = 0;
if (($unitPrice > 0) && (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1))
{
$buyPrice = $unitPrice * (1 - $discountPercent / 100);

View File

@@ -108,7 +108,7 @@ class DolEditor
// Dolibarr utilise toujours liens avec modulepart='fckeditor' quelque soit modulepart.
// Ou se trouve donc cette valeur /viewimage.php?modulepart=fckeditor&file=' ?
$modulepart='fckeditor';
$this->editor->Config['UserFilesPath'] = '/viewimage.php?modulepart='.$modulepart.'&file=';
$this->editor->Config['UserFilesPath'] = '/viewimage.php?modulepart='.$modulepart.'&entity='.$conf->entity.'&file=';
$this->editor->Config['UserFilesAbsolutePath'] = DOL_DATA_ROOT.'/'.$modulepart.'/' ;
$this->editor->Config['LinkBrowser']=($uselocalbrowser?'true':'false');

View File

@@ -675,7 +675,7 @@ class ExtraFields
if ($showsize > 48) $showsize=48;
}
}
if (in_array($type,array('date','datetime')))
{
$tmp=explode(',',$size);
@@ -729,7 +729,7 @@ class ExtraFields
}
elseif ($type == 'price')
{
$out='<input type="text" class="flat" name="'.$keysuffix.'options_'.$key.$keyprefix.'" size="6" value="'.price($value).'" '.($moreparam?$moreparam:'').'> '.$langs->getCurrencySymbol($conf->currency);
$out='<input type="text" class="flat" name="'.$keysuffix.'options_'.$key.$keyprefix.'" size="6" value="'.price2num($value).'" '.($moreparam?$moreparam:'').'> '.$langs->getCurrencySymbol($conf->currency);
}
elseif ($type == 'double')
{
@@ -812,7 +812,7 @@ class ExtraFields
if (strpos($InfoFieldList[4], '$SEL$')!==false) {
$InfoFieldList[4]=str_replace('$SEL$','SELECT',$InfoFieldList[4]);
}
// current object id can be use into filter
if (strpos($InfoFieldList[4], '$ID$')!==false && !empty($objectid)) {
$InfoFieldList[4]=str_replace('$ID$',$objectid,$InfoFieldList[4]);
@@ -830,14 +830,14 @@ class ExtraFields
$sqlwhere.= ' WHERE '.$InfoFieldList[4];
}
}
else
else
{
$sqlwhere.= ' WHERE 1=1';
}
// Some tables may have field, some other not. For the moment we disable it.
if (in_array($InfoFieldList[0],array('tablewithentity')))
if (in_array($InfoFieldList[0],array('tablewithentity')))
{
$sqlwhere.= ' AND entity = '.$conf->entity;
$sqlwhere.= ' AND entity = '.$conf->entity;
}
$sql.=$sqlwhere;
//print $sql;
@@ -996,19 +996,19 @@ class ExtraFields
$sql = 'SELECT ' . $keyList;
$sql .= ' FROM ' . MAIN_DB_PREFIX . $InfoFieldList[0];
if (! empty($InfoFieldList[4])) {
// can use SELECT request
if (strpos($InfoFieldList[4], '$SEL$')!==false) {
$InfoFieldList[4]=str_replace('$SEL$','SELECT',$InfoFieldList[4]);
}
// current object id can be use into filter
if (strpos($InfoFieldList[4], '$ID$')!==false && !empty($objectid)) {
$InfoFieldList[4]=str_replace('$ID$',$objectid,$InfoFieldList[4]);
} else {
$InfoFieldList[4]=str_replace('$ID$','0',$InfoFieldList[4]);
}
// We have to join on extrafield table
if (strpos($InfoFieldList[4], 'extra') !== false) {
$sql .= ' as main, ' . MAIN_DB_PREFIX . $InfoFieldList[0] . '_extrafields as extra';
@@ -1020,13 +1020,13 @@ class ExtraFields
$sqlwhere .= ' WHERE 1=1';
}
// Some tables may have field, some other not. For the moment we disable it.
if (in_array($InfoFieldList[0], array ('tablewithentity')))
if (in_array($InfoFieldList[0], array ('tablewithentity')))
{
$sqlwhere .= ' AND entity = ' . $conf->entity;
}
// $sql.=preg_replace('/^ AND /','',$sqlwhere);
// print $sql;
$sql .= $sqlwhere;
dol_syslog(get_class($this) . '::showInputField type=chkbxlst',LOG_DEBUG);
$resql = $this->db->query($sql);
@@ -1232,7 +1232,14 @@ class ExtraFields
{
$sql.= ' as main';
}
$sql.= " WHERE ".$selectkey."='".$this->db->escape($value)."'";
if ($selectkey=='rowid' && empty($value)) {
$sql.= " WHERE ".$selectkey."=0";
} elseif ($selectkey=='rowid') {
$sql.= " WHERE ".$selectkey."=".$this->db->escape($value);
}else {
$sql.= " WHERE ".$selectkey."='".$this->db->escape($value)."'";
}
//$sql.= ' AND entity = '.$conf->entity;
dol_syslog(get_class($this).':showOutputField:$type=sellist', LOG_DEBUG);
@@ -1391,10 +1398,10 @@ class ExtraFields
$showsize=round($size);
if ($showsize > 48) $showsize=48;
}
//print $type.'-'.$size;
$out=$value;
return $out;
}
@@ -1411,7 +1418,7 @@ class ExtraFields
$type=$this->attribute_type[$key];
$align='';
if ($type == 'date')
{
$align="center";
@@ -1440,10 +1447,10 @@ class ExtraFields
{
$align="center";
}
return $align;
}
/**
* Return HTML string to print separator extrafield
*
@@ -1523,7 +1530,7 @@ class ExtraFields
return 0;
}
}
/**
* return array_options array for object by extrafields value (using for data send by forms)
*

View File

@@ -135,13 +135,15 @@ class FormProjets
// Search all projects
$sql = 'SELECT p.rowid, p.ref, p.title, p.fk_soc, p.fk_statut, p.public';
$sql.= ' FROM '.MAIN_DB_PREFIX .'projet as p';
$sql.= " WHERE p.entity = ".$conf->entity;
$sql.= " WHERE p.entity IN (".getEntity('project',1).")";
if ($projectsListId !== false) $sql.= " AND p.rowid IN (".$projectsListId.")";
if ($socid == 0) $sql.= " AND (p.fk_soc=0 OR p.fk_soc IS NULL)";
if ($socid > 0) $sql.= " AND (p.fk_soc=".$socid." OR p.fk_soc IS NULL)";
if (!empty($filterkey)) {
$sql .= " AND p.title LIKE '%".$this->db->escape($filterkey)."%'";
$sql .= " OR p.ref LIKE '%".$this->db->escape($filterkey)."%'";
$sql .= ' AND (';
$sql .= ' p.title LIKE "%'.$this->db->escape($filterkey).'%"';
$sql .= ' OR p.ref LIKE "%'.$this->db->escape($filterkey).'%"';
$sql .= ')';
}
$sql.= " ORDER BY p.ref ASC";

View File

@@ -1126,6 +1126,8 @@ class SMTPs
$host=preg_replace('@tcp://@i','',$host); // Remove prefix
$host=preg_replace('@ssl://@i','',$host); // Remove prefix
$host=dol_getprefix('email').'-'.$host;
//NOTE: Message-ID should probably contain the username of the user who sent the msg
$_header .= 'Subject: ' . $this->getSubject() . "\r\n";
$_header .= 'Date: ' . date("r") . "\r\n";
@@ -1186,7 +1188,9 @@ class SMTPs
// Make RFC821 Compliant, replace bare linefeeds
$strContent = preg_replace("/(?<!\r)\n/si", "\r\n", $strContent);
$strContent = rtrim(wordwrap($strContent, 75, "\r\n"));
// Make RFC2045 Compliant
//$strContent = rtrim(chunk_split($strContent)); // Function chunck_split seems ko if not used on a base64 content
$strContent = rtrim(wordwrap($strContent, 75, "\r\n")); // TODO Using this method creates unexpected line break on text/plain content.
$this->_msgContent[$strType] = array();

View File

@@ -439,7 +439,7 @@ class Translate
if (! $found)
{
// Overwrite translation with database read
$sql="SELECT transkey, transvalue FROM ".MAIN_DB_PREFIX."overwrite_trans where lang='".$this->defaultlang."'";
$sql="SELECT transkey, transvalue FROM ".MAIN_DB_PREFIX."overwrite_trans where lang='".$db->escape($this->defaultlang)."'";
$resql=$db->query($sql);
if ($resql)

View File

@@ -1093,7 +1093,7 @@ class DoliDBPgsql extends DoliDB
*/
function DDLDropField($table,$field_name)
{
$sql= "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`";
$sql= "ALTER TABLE ".$table." DROP COLUMN ".$field_name;
dol_syslog($sql,LOG_DEBUG);
if (! $this->query($sql))
{

View File

@@ -1,4 +1,4 @@
<?php
<?php
if (empty($keyforselect) || empty($keyforelement) || empty($keyforaliasextra))
{
@@ -15,36 +15,38 @@ if ($resql) // This can fail when class is used on old database (during migra
{
while ($obj=$this->db->fetch_object($resql))
{
$fieldname=$keyforaliasextra.'.'.$obj->name;
$fieldlabel=ucfirst($obj->label);
$typeFilter="Text";
switch($obj->type)
{
case 'int':
case 'double':
case 'price':
$typeFilter="Numeric";
break;
case 'date':
case 'datetime':
$typeFilter="Date";
break;
case 'boolean':
$typeFilter="Boolean";
break;
case 'sellist':
$tmp='';
$tmpparam=unserialize($obj->param); // $tmp ay be array 'options' => array 'c_currencies:code_iso:code_iso' => null
if ($tmpparam['options'] && is_array($tmpparam['options'])) {
$tmpkeys=array_keys($tmpparam['options']);
$tmp=array_shift($tmpkeys);
}
if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter="List:".$tmp;
break;
if ($obj->type!='separate') {
$fieldname=$keyforaliasextra.'.'.$obj->name;
$fieldlabel=ucfirst($obj->label);
$typeFilter="Text";
switch($obj->type)
{
case 'int':
case 'double':
case 'price':
$typeFilter="Numeric";
break;
case 'date':
case 'datetime':
$typeFilter="Date";
break;
case 'boolean':
$typeFilter="Boolean";
break;
case 'sellist':
$tmp='';
$tmpparam=unserialize($obj->param); // $tmp ay be array 'options' => array 'c_currencies:code_iso:code_iso' => null
if ($tmpparam['options'] && is_array($tmpparam['options'])) {
$tmpkeys=array_keys($tmpparam['options']);
$tmp=array_shift($tmpkeys);
}
if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter="List:".$tmp;
break;
}
$this->export_fields_array[$r][$fieldname]=$fieldlabel;
$this->export_TypeFields_array[$r][$fieldname]=$typeFilter;
$this->export_entities_array[$r][$fieldname]=$keyforelement;
}
$this->export_fields_array[$r][$fieldname]=$fieldlabel;
$this->export_TypeFields_array[$r][$fieldname]=$typeFilter;
$this->export_entities_array[$r][$fieldname]=$keyforelement;
}
}
// End add axtra fields

View File

@@ -44,7 +44,8 @@ $Config['Enabled'] = true ;
// Path to user files relative to the document root.
$Config['UserFilesPath'] = DOL_URL_ROOT.'/viewimage.php?modulepart=fckeditor&file=' ;
$extEntity=(empty($entity) ? 1 : $entity); // For multicompany with external access
$Config['UserFilesPath'] = DOL_URL_ROOT.'/viewimage.php?modulepart=fckeditor&entity='.$extEntity.'&file=' ;
// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Useful if you are using a virtual directory, symbolic

View File

@@ -2,6 +2,7 @@
/* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2011-2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -407,7 +408,7 @@ function dol_get_next_week($day, $week, $month, $year)
{
$tmparray = dol_get_first_day_week($day, $month, $year);
$time=dol_mktime(12,0,0,$month,$tmparray['first_day'],$year,1,0);
$time=dol_mktime(12,0,0,$tmparray['first_month'],$tmparray['first_day'],$tmparray['first_year'],1,0);
$time+=24*60*60*7;
$tmparray=dol_getdate($time,true);

View File

@@ -7,7 +7,7 @@
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2013 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2014 Cédric GROSS <c.gross@kreiz-it.fr>
@@ -286,10 +286,20 @@ function GETPOST($paramname,$check='',$method=0,$filter=NULL,$options=NULL)
* This prefix is unique for instance and avoid conflict between multi-instances,
* even when having two instances with one root dir or two instances in virtual servers
*
* @param string $mode '' or 'email'
* @return string A calculated prefix
*/
function dol_getprefix()
function dol_getprefix($mode='')
{
global $conf;
// If MAIL_PREFIX_FOR_EMAIL_ID is set and prefix is for email
if ($mode == 'email' && ! empty($conf->global->MAIL_PREFIX_FOR_EMAIL_ID))
{
if ($conf->global->MAIL_PREFIX_FOR_EMAIL_ID != 'SERVER_NAME') return $conf->global->MAIL_PREFIX_FOR_EMAIL_ID;
else if (isset($_SERVER["SERVER_NAME"])) return $_SERVER["SERVER_NAME"];
}
if (isset($_SERVER["SERVER_NAME"]) && isset($_SERVER["DOCUMENT_ROOT"]))
{
return dol_hash($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"].DOL_DOCUMENT_ROOT.DOL_URL_ROOT);
@@ -3320,7 +3330,7 @@ function price2num($amount,$rounding='',$alreadysqlnb=0)
* @param float $vatrate Vat rate. Can be '8.5' or '8.5 (VATCODEX)' for example
* @param int $local Local tax to search and return (1 or 2 return only tax rate 1 or tax rate 2)
* @param Societe $thirdparty_buyer Object of buying third party
* @param Societe $thirdparty_seller Object of selling third party
* @param Societe $thirdparty_seller Object of selling third party ($mysoc if not defined)
* @param int $vatnpr If vat rate is NPR or not
* @return mixed 0 if not found, localtax rate if found
* @see get_default_tva
@@ -3336,7 +3346,7 @@ function get_localtax($vatrate, $local, $thirdparty_buyer="", $thirdparty_seller
$vatratecleaned = $vatrate;
if (preg_match('/^(.*)\s*\((.*)\)$/', $vatrate, $reg)) // If vat is "xx (yy)"
{
$vatratecleaned = $reg[1];
$vatratecleaned = trim($reg[1]);
$vatratecode = $reg[2];
}
@@ -3350,7 +3360,7 @@ function get_localtax($vatrate, $local, $thirdparty_buyer="", $thirdparty_seller
{
if ($local == 1)
{
if (! $mysoc->localtax1_assuj) return 0;
if (! $mysoc->localtax1_assuj || (string) $vatratecleaned == "0") return 0;
if ($thirdparty_seller->id == $mysoc->id)
{
if (! $thirdparty_buyer->localtax1_assuj) return 0;
@@ -3363,7 +3373,7 @@ function get_localtax($vatrate, $local, $thirdparty_buyer="", $thirdparty_seller
if ($local == 2)
{
if (! $mysoc->localtax2_assuj) return 0;
if (! $mysoc->localtax2_assuj || (string) $vatratecleaned == "0") return 0;
if ($thirdparty_seller->id == $mysoc->id)
{
if (! $thirdparty_buyer->localtax2_assuj) return 0;
@@ -3379,18 +3389,15 @@ function get_localtax($vatrate, $local, $thirdparty_buyer="", $thirdparty_seller
if ($local == 1 && ! $thirdparty_seller->localtax1_assuj) return 0;
if ($local == 2 && ! $thirdparty_seller->localtax2_assuj) return 0;
}
//if ($local == 0 && ! $thirdparty_seller->localtax1_assuj && ! $thirdparty_seller->localtax2_assuj) return array('localtax1'=>0,'localtax2'=>0);
// Do not enabled this. We want localtax that match the vat rate.
// If we forced a vat, we must also force local tax
/*
if (is_object($thirdparty_buyer))
// For some country MAIN_GET_LOCALTAXES_VALUES_FROM_THIRDPARTY is forced to on.
if (in_array($mysoc->country_code, array('ES')))
{
if ($thirdparty_seller->country_code != $thirdparty_buyer->country_code) return 0;
}*/
$conf->global->MAIN_GET_LOCALTAXES_VALUES_FROM_THIRDPARTY = 1;
}
// Search local taxes
if ($mysoc->country_code == 'ES' || ! empty($conf->global->MAIN_GET_LOCALTAXES_VALUES_FROM_THIRDPARTY))
if (! empty($conf->global->MAIN_GET_LOCALTAXES_VALUES_FROM_THIRDPARTY))
{
if ($local==1)
{
@@ -5195,7 +5202,7 @@ function printCommonFooter($zone='private')
print 'window.console && console.log("';
if (! empty($conf->global->MEMCACHED_SERVER)) print 'MEMCACHED_SERVER='.$conf->global->MEMCACHED_SERVER.' - ';
print 'MAIN_OPTIMIZE_SPEED='.(isset($conf->global->MAIN_OPTIMIZE_SPEED)?$conf->global->MAIN_OPTIMIZE_SPEED:'off');
if ($micro_start_time)
if (! empty($micro_start_time)) // Works only if MAIN_SHOW_TUNING_INFO is defined at $_SERVER level. Not in global variable.
{
$micro_end_time = microtime(true);
print ' - Build time: '.ceil(1000*($micro_end_time-$micro_start_time)).' ms';

View File

@@ -1074,7 +1074,7 @@ function check_value($mask,$value)
// If an offset is asked
if (! empty($reg[2]) && preg_match('/^\+/',$reg[2])) $maskoffset=preg_replace('/^\+/','',$reg[2]);
if (! empty($reg[3]) && preg_match('^\+',$reg[3])) $maskoffset=preg_replace('/^\+/','',$reg[3]);
if (! empty($reg[3]) && preg_match('/^\+/',$reg[3])) $maskoffset=preg_replace('/^\+/','',$reg[3]);
// Define $sqlwhere
@@ -1493,7 +1493,8 @@ function getListOfModels($db,$type,$maxfilenamelength=0)
/**
* This function evaluates a string that should be a valid IPv4
*
* Note: For ip 169.254.0.0, it returns 0 with some PHP (5.6.24) and 2 with some minor patchs of PHP (5.6.25). See https://github.com/php/php-src/pull/1954.
*
* @param string $ip IP Address
* @return int 0 if not valid or reserved range, 1 if valid and public IP, 2 if valid and private range IP
*/

View File

@@ -762,7 +762,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
// Time spent by user
print '<td align="right">';
$tmptimespent=$taskstatic->getSummaryOfTimeSpent();
$tmptimespent=$taskstatic->getSummaryOfTimeSpent('', $fuser->id);
if ($tmptimespent['total_duration']) print convertSecondToTime($tmptimespent['total_duration'],'allhourmin');
else print '--:--';
print "</td>\n";

View File

@@ -278,7 +278,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
}
dol_syslog(get_class($this).'::verif_syntax codefortest='.$codefortest." typefortest=".$typefortest);
$newcodefortest=$codefortest;
// Special case, if mask is on 12 digits instead of 13, we remove last char into code to test
@@ -290,7 +290,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
dol_syslog(get_class($this).'::verif_syntax newcodefortest='.$newcodefortest);
}
}
$result=check_value($mask,$newcodefortest);
return $result;

View File

@@ -87,11 +87,11 @@ abstract class ModeleNumRefBarCode
/**
* Return next value available
*
* @param Societe $objsoc Object thirdparty
* @param Societe $objproduct Object Product
* @param int $type Type
* @return string Value
*/
function getNextValue($objsoc=0,$type=-1)
function getNextValue($objproduct,$type='')
{
global $langs;
return $langs->trans("Function_getNextValue_InModuleNotWorking");

View File

@@ -110,8 +110,8 @@ class pdf_einstein extends ModelePDFCommandes
{
$this->posxtva=99;
$this->posxup=114;
$this->posxqty=133;
$this->posxunit=150;
$this->posxqty=130;
$this->posxunit=147;
}
else
{

View File

@@ -100,7 +100,8 @@ class pdf_merou extends ModelePdfExpedition
$outputlangs->load("propal");
$outputlangs->load("deliveries");
$outputlangs->load("sendings");
$outputlangs->load("productbatch");
if ($conf->expedition->dir_output)
{
$object->fetch_thirdparty();

View File

@@ -110,7 +110,8 @@ class pdf_rouget extends ModelePdfExpedition
$outputlangs->load("propal");
$outputlangs->load("deliveries");
$outputlangs->load("sendings");
$outputlangs->load("productbatch");
$nblignes = count($object->lines);
// Loop on each lines to detect if there is at least one image to show

View File

@@ -120,8 +120,8 @@ class pdf_crabe extends ModelePDFFactures
{
$this->posxtva=99;
$this->posxup=114;
$this->posxqty=133;
$this->posxunit=150;
$this->posxqty=130;
$this->posxunit=147;
}
else
{

View File

@@ -504,6 +504,10 @@ class ImportCsv extends ModeleImports
}
if (empty($newval)) $arrayrecord[($key-1)]['type']=-1; // If we get empty value, we will use "null"
}
elseif ($objimport->array_import_convertvalue[0][$val]['rule']=='numeric')
{
$newval = price2num($newval);
}
//print 'Val to use as insert is '.$newval.'<br>';
}

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
* Copyright (C) 2005-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012-2016 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -302,6 +302,7 @@ class modCategorie extends DolibarrModules
$this->export_sql_end[$r] = ' FROM ' . MAIN_DB_PREFIX . 'categorie as u, '.MAIN_DB_PREFIX . 'categorie_contact as cp, '.MAIN_DB_PREFIX . 'socpeople as p';
$this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'c_country as country ON p.fk_pays = country.rowid';
$this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'societe as s ON s.rowid = p.fk_soc';
$this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'socpeople_extrafields as extra ON extra.fk_object = p.rowid';
$this->export_sql_end[$r] .= ' WHERE u.rowid = cp.fk_categorie AND cp.fk_socpeople = p.rowid AND u.entity IN ('.getEntity('category',1).')';
$this->export_sql_end[$r] .= ' AND u.type = 4'; // contact categories

View File

@@ -405,7 +405,8 @@ class modSociete extends DolibarrModules
's.code_client'=>array('rule'=>'getcustomercodeifauto'),
's.code_fournisseur'=>array('rule'=>'getsuppliercodeifauto'),
's.code_compta'=>array('rule'=>'getcustomeraccountancycodeifauto'),
's.code_compta_fournisseur'=>array('rule'=>'getsupplieraccountancycodeifauto')
's.code_compta_fournisseur'=>array('rule'=>'getsupplieraccountancycodeifauto'),
's.capital'=>array('rule'=>'numeric')
);
//$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t');
$this->import_regex_array[$r]=array('s.status'=>'^[0|1]','s.client'=>'^[0|1|2|3]','s.fournisseur'=>'^[0|1]','s.fk_typent'=>'id@'.MAIN_DB_PREFIX.'c_typent','s.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]( [0-9][0-9]:[0-9][0-9]:[0-9][0-9])?$');

View File

@@ -252,7 +252,7 @@ class mod_codeproduct_elephant extends ModeleProductCode
// Get Mask value
$mask = '';
if ($type==0) $mask = empty($conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT)?'':$conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT;
if ($type==1) $mask = empty($conf->global->PRODUCT_ELEPHANT_MASK_SSERVICE)?'':$conf->global->PRODUCT_ELEPHANT_MASK_SERVICE;
if ($type==1) $mask = empty($conf->global->PRODUCT_ELEPHANT_MASK_SERVICE)?'':$conf->global->PRODUCT_ELEPHANT_MASK_SERVICE;
if (! $mask)
{
$this->error='NotConfigured';

View File

@@ -108,8 +108,8 @@ class pdf_azur extends ModelePDFPropales
{
$this->posxtva=99;
$this->posxup=114;
$this->posxqty=133;
$this->posxunit=150;
$this->posxqty=130;
$this->posxunit=147;
}
else
{

View File

@@ -102,8 +102,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
if($conf->global->PRODUCT_USE_UNITS) {
$this->posxtva=99;
$this->posxup=114;
$this->posxqty=133;
$this->posxunit=150;
$this->posxqty=130;
$this->posxunit=147;
}
//if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup;
$this->posxpicture=$this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH)?20:$conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images

View File

@@ -111,8 +111,8 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
{
$this->posxtva=99;
$this->posxup=114;
$this->posxqty=133;
$this->posxunit=150;
$this->posxqty=130;
$this->posxunit=147;
} else {
$this->posxtva=112;
$this->posxup=126;
@@ -211,7 +211,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$hookmanager->initHooks(array('pdfgeneration'));
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('beforePDFCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
$reshook=$hookmanager->executeHooks('beforePDFCreation',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
$nblignes = count($object->lines);

View File

@@ -99,7 +99,7 @@ $coldisplay=-1; // We remove first td
$doleditor=new DolEditor('product_desc',$line->description,'',164,$toolbarname,'',false,true,$enable,$nbrows,'98%');
$doleditor->Create();
} else {
print '<textarea id="desc" class="flat" name="desc" readonly style="width: 200px; height:80px;">' . $line->description . '</textarea>';
print '<textarea id="product_desc" class="flat" name="product_desc" readonly style="width: 200px; height:80px;">' . $line->description . '</textarea>';
}
?>
</td>

View File

@@ -1023,21 +1023,21 @@ class Cronjob extends CommonObject
}
if (! empty($conf->global->MAIN_UMASK)) @chmod($outputfile, octdec($conf->global->MAIN_UMASK));
}
}
dol_syslog(get_class($this)."::run_jobs output_arr:".var_export($output_arr,true), LOG_DEBUG);
dol_syslog(get_class($this)."::run_jobs output_arr:".var_export($output_arr,true), LOG_DEBUG);
// Update with result
$this->lastoutput='';
if (is_array($output_arr) && count($output_arr)>0)
{
foreach($output_arr as $val)
// Update with result
$this->lastoutput='';
if (is_array($output_arr) && count($output_arr)>0)
{
$this->lastoutput.=$val."\n";
foreach($output_arr as $val)
{
$this->lastoutput.=$val."\n";
}
}
$this->lastresult=$retval;
}
$this->lastresult=$retval;
$this->datelastresult=dol_now();
$result = $this->update($user);
if ($result < 0)

View File

@@ -712,7 +712,7 @@ if (! empty($id) && $action != 'edit')
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?rowid='.$object->id.'&action=valid_promesse">'.$langs->trans("ValidPromess").'</a></div>';
}
if (($object->statut == 0 || $object->statut == 1) && $remaintopay == 0 && $object->paye == 0)
if (($object->statut == 0 || $object->statut == 1) && $remaintopay == 0 && $object->paid == 0)
{
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?rowid='.$object->id.'&action=set_cancel">'.$langs->trans("ClassifyCanceled")."</a></div>";
}

View File

@@ -2,6 +2,7 @@
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -124,6 +125,7 @@ if ($resql)
$expedition = new Expedition($db);
$param="";
if ($sall) $param.= "&amp;sall=".$sall;
if ($search_ref_exp) $param.= "&amp;search_ref_exp=".$search_ref_exp;
if ($search_ref_liv) $param.= "&amp;search_ref_liv=".$search_ref_liv;
if ($search_company) $param.= "&amp;search_company=".$search_company;

View File

@@ -524,13 +524,14 @@ class PaymentExpenseReport extends CommonObject
{
if ($mode == 'payment_expensereport')
{
$euser = new User($this->db);
$euser->fetch($key);
$er = new ExpenseReport($this->db);
$er->fetch($key);
$er->fetch_user($er->fk_user_author);
$result=$acc->add_url_line(
$bank_line_id,
$euser->id,
$er->user->id,
DOL_URL_ROOT.'/user/card.php?id=',
$euser->getFullName($langs),
$er->user->getFullName($langs),
'user'
);
if ($result <= 0)

View File

@@ -193,6 +193,7 @@ if ($resql)
$i = 0;
$param="";
if ($sall) $param.="&sall=".$sall;
if ($search_ref) $param.="&search_ref=".$search_ref;
if ($search_user) $param.="&search_user=".$search_user;
if ($search_amount_ht) $param.="&search_amount_ht=".$search_amount_ht;

View File

@@ -1202,7 +1202,7 @@ class FichinterLigne extends CommonObjectLine
// Mise a jour ligne en base
$sql = "UPDATE ".MAIN_DB_PREFIX."fichinterdet SET";
$sql.= " description='".$this->db->escape($this->desc)."'";
$sql.= ",date=".$this->db->idate($this->datei);
$sql.= ",date='".$this->db->idate($this->datei)."'";
$sql.= ",duree=".$this->duration;
$sql.= ",rang='".$this->rang."'";
$sql.= " WHERE rowid = ".$this->rowid;

View File

@@ -139,6 +139,7 @@ if ($result)
$num = $db->num_rows($result);
$urlparam='';
if ($sall) $urlparam.="&sall=".$sall;
if ($socid) $urlparam.="&socid=".$socid;
if ($search_ref) $urlparam.="&search_ref=".urlencode($search_ref);
if ($search_company) $urlparam.="&search_company=".urlencode($search_company);

View File

@@ -31,7 +31,7 @@
*/
if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE','Dolibarr');
if (! defined('DOL_VERSION')) define('DOL_VERSION','3.9.3');
if (! defined('DOL_VERSION')) define('DOL_VERSION','3.9.5');
if (! defined('EURO')) define('EURO',chr(128));
@@ -122,6 +122,7 @@ if (empty($dolibarr_main_db_encryption)) $dolibarr_main_db_encryption=0;
if (empty($dolibarr_main_db_cryptkey)) $dolibarr_main_db_cryptkey='';
if (empty($dolibarr_main_limit_users)) $dolibarr_main_limit_users=0;
if (empty($dolibarr_mailing_limit_sendbyweb)) $dolibarr_mailing_limit_sendbyweb=0;
if (empty($dolibarr_mailing_limit_sendbycli)) $dolibarr_mailing_limit_sendbycli=0;
if (empty($dolibarr_strict_mode)) $dolibarr_strict_mode=0; // For debug in php strict mode
// TODO Multicompany Remove this. Useless.
if (empty($multicompany_transverse_mode)) $multicompany_transverse_mode=0;

View File

@@ -383,7 +383,6 @@ if ($object->id > 0)
$sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as p ";
$sql.= " WHERE p.fk_soc =".$object->id;
$sql.= " AND p.entity =".$conf->entity;
$sql.= " ORDER BY p.date_commande DESC";
$resql=$db->query($sql);
if ($resql)
{

View File

@@ -65,7 +65,7 @@ class CommandeFournisseur extends CommonOrder
// -> 9=Refused -> (reopen) 1=Validated
// Note: billed or not is on another field "billed"
var $statuts; // List of status
var $socid;
var $fourn_id;
var $date;
@@ -254,6 +254,8 @@ class CommandeFournisseur extends CommonOrder
$this->fetchObjectLinked();
$this->lines=array();
$sql = "SELECT l.rowid, l.ref as ref_supplier, l.fk_product, l.product_type, l.label, l.description,";
$sql.= " l.qty,";
$sql.= " l.tva_tx, l.remise_percent, l.subprice,";
@@ -517,7 +519,7 @@ class CommandeFournisseur extends CommonOrder
$billedtext='';
//if ($statut==5 && $this->billed == 1) $statut = 8;
if ($billed == 1) $billedtext=$langs->trans("Billed");
// List of language codes for status
$statutshort[0] = 'StatusOrderDraftShort';
$statutshort[1] = 'StatusOrderValidatedShort';
@@ -991,6 +993,8 @@ class CommandeFournisseur extends CommonOrder
$this->date_commande = $this->db->idate($date);
$result = 1;
$this->log($user, 3, $date, $comment);
$this->date_commande = $date;
$this->methode_commande = $methode;
}
else
{
@@ -1095,6 +1099,7 @@ class CommandeFournisseur extends CommonOrder
$this->lines[$i]->remise_percent,
'HT',
0,
$this->lines[$i]->product_type,
$this->lines[$i]->info_bits
);
if ($result < 0)
@@ -1356,7 +1361,7 @@ class CommandeFournisseur extends CommonOrder
$localtaxes_type=getLocalTaxesFromRate($txtva,0,$mysoc,$this->thirdparty);
$txtva = preg_replace('/\s*\(.*\)/','',$txtva); // Remove code into vatrate.
$tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $product_type, $this->thirdparty, $localtaxes_type);
$total_ht = $tabprice[0];
$total_tva = $tabprice[1];
@@ -1368,10 +1373,13 @@ class CommandeFournisseur extends CommonOrder
$localtax2_type=$localtaxes_type[2];
$subprice = price2num($pu,'MU');
$rangmax = $this->line_max();
$rang = $rangmax + 1;
$sql = "INSERT INTO ".MAIN_DB_PREFIX."commande_fournisseurdet";
$sql.= " (fk_commande, label, description, date_start, date_end,";
$sql.= " fk_product, product_type,";
$sql.= " fk_product, product_type, rang,";
$sql.= " qty, tva_tx, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type, remise_percent, subprice, ref,";
$sql.= " total_ht, total_tva, total_localtax1, total_localtax2, total_ttc, fk_unit";
$sql.= ")";
@@ -1380,7 +1388,7 @@ class CommandeFournisseur extends CommonOrder
$sql.= " ".($date_end?"'".$this->db->idate($date_end)."'":"null").",";
if ($fk_product) { $sql.= $fk_product.","; }
else { $sql.= "null,"; }
$sql.= "'".$product_type."',";
$sql.= "'".$product_type."', ".$rang.",";
$sql.= "'".$qty."', ".$txtva.", ".$txlocaltax1.", ".$txlocaltax2;
$sql.= ", '".$localtax1_type."',";
@@ -2115,7 +2123,7 @@ class CommandeFournisseur extends CommonOrder
$localtaxes_type=getLocalTaxesFromRate($txtva,0,$mysoc, $this->thirdparty);
$txtva = preg_replace('/\s*\(.*\)/','',$txtva); // Remove code into vatrate.
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $this->thirdparty, $localtaxes_type);
$total_ht = $tabprice[0];
$total_tva = $tabprice[1];
@@ -2533,10 +2541,10 @@ class CommandeFournisseur extends CommonOrder
public function hasDelay()
{
global $conf;
$now = dol_now();
$date_to_test = empty($this->date_livraison) ? $this->date_commande : $this->date_livraison;
return ($this->statut != 3) && $date_to_test && $date_to_test < ($now - $conf->commande->fournisseur->warning_delay);
}
}

View File

@@ -5,6 +5,7 @@
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -208,6 +209,7 @@ if ($resql)
$i = 0;
$param="";
if ($sall) $param.="&search_all=".$sall;
if ($search_ref) $param.="&search_ref=".$search_ref;
if ($search_company) $param.="&search_company=".$search_company;
if ($search_user) $param.="&search_user=".$search_user;

View File

@@ -3,7 +3,7 @@
* Copyright (C) 2012-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012-2016 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2014-2017 Ferran Marcet <fmarcet@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -39,7 +39,6 @@ require_once DOL_DOCUMENT_ROOT.'/holiday/common.inc.php';
$myparam = GETPOST("myparam");
$action=GETPOST('action', 'alpha');
$id=GETPOST('id', 'int');
$userid = GETPOST('userid')?GETPOST('userid'):$user->id;
// Protection if external user
if ($user->societe_id > 0) accessforbidden();
@@ -57,7 +56,8 @@ if ($action == 'create')
$cp = new Holiday($db);
// If no right to create a request
if (($userid == $user->id && empty($user->rights->holiday->write)) || ($userid != $user->id && empty($user->rights->holiday->write_all)))
$fuserid = GETPOST('fuserid');
if (($fuserid == $user->id && empty($user->rights->holiday->write)) || ($fuserid != $user->id && empty($user->rights->holiday->write_all)))
{
$error++;
setEventMessages($langs->trans('CantCreateCP'), null, 'errors');
@@ -82,7 +82,6 @@ if ($action == 'create')
$valideur = GETPOST('valideur');
$description = trim(GETPOST('description'));
$userID = GETPOST('userID');
// If no type
if ($type <= 0)
@@ -112,7 +111,7 @@ if ($action == 'create')
}
// Check if there is already holiday for this period
$verifCP = $cp->verifDateHolidayCP($userID, $date_debut, $date_fin, $halfday);
$verifCP = $cp->verifDateHolidayCP($fuserid, $date_debut, $date_fin, $halfday);
if (! $verifCP)
{
header('Location: '.$_SERVER["PHP_SELF"].'?action=request&error=alreadyCP');
@@ -140,7 +139,7 @@ if ($action == 'create')
if (! $error)
{
$cp->fk_user = $userid;
$cp->fk_user = $fuserid;
$cp->description = $description;
$cp->date_debut = $date_debut;
$cp->date_fin = $date_fin;
@@ -682,7 +681,7 @@ llxHeader(array(),$langs->trans('CPTitreMenu'));
if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create')
{
// Si l'utilisateur n'a pas le droit de faire une demande
if (($userid == $user->id && empty($user->rights->holiday->write)) || ($userid != $user->id && empty($user->rights->holiday->write_all)))
if (($fuserid == $user->id && empty($user->rights->holiday->write)) || ($fuserid != $user->id && empty($user->rights->holiday->write_all)))
{
$errors[]=$langs->trans('CantCreateCP');
}
@@ -762,7 +761,6 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create
// Formulaire de demande
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'" onsubmit="return valider()" name="demandeCP">'."\n";
print '<input type="hidden" name="action" value="create" />'."\n";
print '<input type="hidden" name="userID" value="'.$userid.'" />'."\n";
dol_fiche_head();
@@ -793,10 +791,10 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create
print '<td>';
if (empty($user->rights->holiday->write_all))
{
print $form->select_dolusers($userid, 'useridbis', 0, '', 1, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
print '<input type="hidden" name="userid" value="'.$userid.'">';
print $form->select_dolusers($fuserid, 'useridbis', 0, '', 1, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
print '<input type="hidden" name="fuserid" value="'.($fuserid?$fuserid:$user->id).'">';
}
else print $form->select_dolusers(GETPOST('userid')?GETPOST('userid'):$user->id,'userid',0,'',0);
else print $form->select_dolusers(GETPOST('fuserid')?GETPOST('fuserid'):$user->id,'fuserid',0,'',0);
print '</td>';
print '</tr>';

View File

@@ -1,6 +1,6 @@
##
## PHPExcel
##
##
## Copyright (c) 2006 - 2013 PHPExcel
##
## This library is free software; you can redistribute it and/or

View File

@@ -1,6 +1,6 @@
##
## PHPExcel
##
##
## Copyright (c) 2006 - 2013 PHPExcel
##
## This library is free software; you can redistribute it and/or

View File

@@ -1,6 +1,6 @@
##
## PHPExcel
##
##
## Copyright (c) 2006 - 2013 PHPExcel
##
## This library is free software; you can redistribute it and/or
@@ -37,7 +37,7 @@ currencySymbol = kr
##
## Excel Error Codes (For future use)
## Excel Error Codes (For future use)
##
NULL = #NUL!
DIV0 = #DIVISION/0!

View File

@@ -1,6 +1,6 @@
##
## PHPExcel
##
##
## Copyright (c) 2006 - 2013 PHPExcel
##
## This library is free software; you can redistribute it and/or

View File

@@ -1,6 +1,6 @@
##
## PHPExcel
##
##
## Copyright (c) 2006 - 2013 PHPExcel
##
## This library is free software; you can redistribute it and/or
@@ -36,7 +36,7 @@ currencySymbol = €
##
## Excel Error Codes (For future use)
## Excel Error Codes (For future use)
##
NULL = #NULL!
DIV0 = #DIV/0!

View File

@@ -1,6 +1,6 @@
##
## PHPExcel
##
##
## Copyright (c) 2006 - 2013 PHPExcel
##
## This library is free software; you can redistribute it and/or

View File

@@ -1,6 +1,6 @@
##
## PHPExcel
##
##
## Copyright (c) 2006 - 2013 PHPExcel
##
## This library is free software; you can redistribute it and/or

View File

@@ -1,6 +1,6 @@
##
## PHPExcel
##
##
## Copyright (c) 2006 - 2013 PHPExcel
##
## This library is free software; you can redistribute it and/or
@@ -36,7 +36,7 @@ currencySymbol = $ ## I'm surprised that the Excel Documentation suggests $ rath
##
## Excel Error Codes (For future use)
## Excel Error Codes (For future use)
##
NULL = #¡NULO!
DIV0 = #¡DIV/0!

View File

@@ -1,6 +1,6 @@
##
## PHPExcel
##
##
## Copyright (c) 2006 - 2013 PHPExcel
##
## This library is free software; you can redistribute it and/or

View File

@@ -1,6 +1,6 @@
##
## PHPExcel
##
##
## Copyright (c) 2006 - 2013 PHPExcel
##
## This library is free software; you can redistribute it and/or
@@ -36,7 +36,7 @@ currencySymbol = $ # Symbol not known, should it be a € (Euro)?
##
## Excel Error Codes (For future use)
## Excel Error Codes (For future use)
##
NULL = #TYHJÄ!
DIV0 = #JAKO/0!

View File

@@ -1,6 +1,6 @@
##
## PHPExcel
##
##
## Copyright (c) 2006 - 2013 PHPExcel
##
## This library is free software; you can redistribute it and/or

View File

@@ -1,6 +1,6 @@
##
## PHPExcel
##
##
## Copyright (c) 2006 - 2013 PHPExcel
##
## This library is free software; you can redistribute it and/or
@@ -36,7 +36,7 @@ currencySymbol = €
##
## Excel Error Codes (For future use)
## Excel Error Codes (For future use)
##
NULL = #NUL!
DIV0 = #DIV/0!

View File

@@ -1,6 +1,6 @@
##
## PHPExcel
##
##
## Copyright (c) 2006 - 2013 PHPExcel
##
## This library is free software; you can redistribute it and/or

View File

@@ -1,6 +1,6 @@
##
## PHPExcel
##
##
## Copyright (c) 2006 - 2013 PHPExcel
##
## This library is free software; you can redistribute it and/or

View File

@@ -1,6 +1,6 @@
##
## PHPExcel
##
##
## Copyright (c) 2006 - 2013 PHPExcel
##
## This library is free software; you can redistribute it and/or

View File

@@ -1,6 +1,6 @@
##
## PHPExcel
##
##
## Copyright (c) 2006 - 2013 PHPExcel
##
## This library is free software; you can redistribute it and/or
@@ -36,7 +36,7 @@ currencySymbol = €
##
## Excel Error Codes (For future use)
## Excel Error Codes (For future use)
##
NULL = #NULLO!
DIV0 = #DIV/0!

View File

@@ -1,6 +1,6 @@
##
## PHPExcel
##
##
## Copyright (c) 2006 - 2013 PHPExcel
##
## This library is free software; you can redistribute it and/or

View File

@@ -1,6 +1,6 @@
##
## PHPExcel
##
##
## Copyright (c) 2006 - 2013 PHPExcel
##
## This library is free software; you can redistribute it and/or
@@ -36,7 +36,7 @@ currencySymbol = €
##
## Excel Error Codes (For future use)
## Excel Error Codes (For future use)
##
NULL = #LEEG!
DIV0 = #DEEL/0!

View File

@@ -1,6 +1,6 @@
##
## PHPExcel
##
##
## Copyright (c) 2006 - 2013 PHPExcel
##
## This library is free software; you can redistribute it and/or

View File

@@ -1,6 +1,6 @@
##
## PHPExcel
##
##
## Copyright (c) 2006 - 2013 PHPExcel
##
## This library is free software; you can redistribute it and/or
@@ -36,7 +36,7 @@ currencySymbol = kr
##
## Excel Error Codes (For future use)
## Excel Error Codes (For future use)
##
NULL = #NULL!
DIV0 = #DIV/0!

View File

@@ -1,6 +1,6 @@
##
## PHPExcel
##
##
## Copyright (c) 2006 - 2013 PHPExcel
##
## This library is free software; you can redistribute it and/or

View File

@@ -1,6 +1,6 @@
##
## PHPExcel
##
##
## Copyright (c) 2006 - 2013 PHPExcel
##
## This library is free software; you can redistribute it and/or
@@ -36,7 +36,7 @@ currencySymbol = zł
##
## Excel Error Codes (For future use)
## Excel Error Codes (For future use)
##
NULL = #ZERO!
DIV0 = #DZIEL/0!

View File

@@ -1,6 +1,6 @@
##
## PHPExcel
##
##
## Copyright (c) 2006 - 2013 PHPExcel
##
## This library is free software; you can redistribute it and/or

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