2
0
forked from Wavyzz/dolibarr

Compare commits

...

394 Commits
3.9.2 ... 3.9.4

Author SHA1 Message Date
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
Laurent Destailleur
b3cdb1f163 FIX tag for date rfc in odt substitution 2016-07-29 16:21:28 +02:00
Laurent Destailleur
27243069cb FIX #5535 bad dependency.
Conflicts:
	htdocs/fourn/facture/list.php
2016-07-29 15:19:04 +02:00
Marcos García de La Fuente
86c2ced714 Missing $user variable 2016-07-29 11:53:24 +02:00
Laurent Destailleur
537a51b367 Finally, better without the test 2016-07-29 11:19:16 +02:00
Juanjo Menent
4cadf0e5a3 Merge pull request #5563 from fmarcet/3.9
FIX: Can't create withdrawal document
2016-07-29 08:35:26 +02:00
Juanjo Menent
a40ea9387b Merge pull request #5562 from atm-florian/3.9
FIX: incoterms do not output into crabe invoice PDF
2016-07-29 08:34:01 +02:00
Juanjo Menent
e4f8b9a4b0 Merge pull request #5561 from olsesacl/#5544
FIX #5544 Disabled Contact still appear in lists to send emails
2016-07-29 08:33:29 +02:00
Ferran Marcet
5bc51a3439 FIX: Can't create withdrawal document 2016-07-28 16:56:23 +02:00
florian HENRY
7b72965315 FIX incoterms 2016-07-28 16:48:16 +02:00
florian HENRY
c13c15188b FIX: incoterms do not output into crabe invoice PDF 2016-07-28 16:44:08 +02:00
Sergio Sanchis Climent
b47e6e4520 FIX #5544 Disabled Contact still appear in lists to send emails 2016-07-28 15:58:45 +02:00
Laurent Destailleur
0e79cae9d4 FIX #5534 2016-07-27 18:51:33 +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
Laurent Destailleur
fc1c38420c Revert "Fix Performance improvement with many extrafields"
This reverts commit ae18178d56.
2016-07-25 19:47:07 +02:00
Juanjo Menent
8f0738f792 Merge pull request #5541 from marcosgdf/bug-5540
FIX #5540 getFormMail is not registered as addReplace hook
2016-07-25 18:23:08 +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
Marcos García de La Fuente
3029fd0fe1 FIX #5540 getFormMail is not registered as addReplace hook 2016-07-25 13:18:41 +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
e59a4d510b Merge pull request #5538 from marcosgdf/bug-5537
FIX #5537 AJAX project search does not work properly
2016-07-25 12:19:29 +02:00
Marcos García de La Fuente
3ef3a038cf Merge branch '3.9' into bug-5537 2016-07-25 11:50:08 +02:00
Marcos García de La Fuente
a9d75b2c91 FIX #5537 AJAX project search does not work properly 2016-07-25 11:49:04 +02:00
Juanjo Menent
600a10fa16 Merge remote-tracking branch 'upstream/3.9' into 3.9 2016-07-25 10:25:07 +02:00
Juanjo Menent
250d29542f Merge pull request #5527 from simnandez/3.9
Fix Performance improvement with many extrafields
2016-07-25 10:23:14 +02:00
Laurent Destailleur
5bbd8eded9 Code comment 2016-07-22 18:32:45 +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
Laurent Destailleur
3a08a14d56 Merge remote-tracking branch 'origin/3.8' into 3.9 2016-07-21 18:45:53 +02:00
Laurent Destailleur
80354cd8d6 FIX Can correct stock of lot using eatby or sell by date 2016-07-21 18:43:44 +02:00
Laurent Destailleur
2d037eb34e FIX Direction of movement lost if an error occurs 2016-07-21 18:36:43 +02:00
Laurent Destailleur
441a8c4a74 FIX Can make a movement on "out of sell" products 2016-07-21 18:28:06 +02:00
Juanjo Menent
ae18178d56 Fix Performance improvement with many extrafields 2016-07-21 18:21:09 +02:00
Laurent Destailleur
972d998f7e Merge remote-tracking branch 'origin/3.8' into 3.9 2016-07-21 10:25:03 +02:00
Laurent Destailleur
9ebe704506 Merge pull request #5422 from atm-alexis/FIX_3.9_bug_5128
FIX #5128 if create method return duplicated code error
2016-07-21 09:55:26 +02:00
Laurent Destailleur
ffa1102949 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-07-20 02:16:22 +02:00
Laurent Destailleur
01c140ecac FIX External user must not be able to edit its discounts 2016-07-20 02:16:10 +02:00
Laurent Destailleur
455add4130 Merge pull request #5505 from atm-florian/3.9_fix_editbank_invoice
FIX : cannot update bank account on invoice if module order not activated
2016-07-19 18:24:40 +02:00
florian HENRY
5ea72c8d56 FIX : cannot update bank account on invoice if module order not
activated
2016-07-19 07:46:27 +02:00
Juanjo Menent
c37c3d1939 Merge pull request #5496 from olsesacl/3.8_#5450
Fix #5450 Bug: Expenses Form : SQL error on updating line
2016-07-17 15:46:03 +02:00
Laurent Destailleur
4382724b86 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-07-17 12:48:27 +02:00
Laurent Destailleur
9b47d7e05d Keep only us file 2016-07-17 12:46:09 +02:00
Sergio Sanchis Climent
e52d6db3fd Fix #5450 2016-07-17 12:18:29 +02:00
Juanjo Menent
60384f6d66 Merge pull request #5492 from simnandez/3.8
FIX #5474 Country_id of "Don" object is still empty
2016-07-17 09:45:56 +02:00
Juanjo Menent
970d088510 Merge pull request #5494 from EuskalMoneta/bug-5493
FIX #5493 The login field is ignored when doing a "search in all" for members
2016-07-17 09:45:16 +02:00
Sergio Sanchis Climent
3b56370060 Fix #5450 2016-07-17 02:48:04 +02:00
Laurent Destailleur
25d9969590 Fix watch to use orig.tar.gz on package_ubuntu directory 2016-07-16 23:47:37 +02:00
Laurent Destailleur
653bfd5d43 Fix missing orig file in upload. 2016-07-16 22:19:26 +02:00
Xebax
8a303fd4d8 FIX #5493 The login field is ignored when doing a "search in all" for
members.
2016-07-16 20:16:46 +02:00
Laurent Destailleur
587484fabb Prepare 3.9.3 2016-07-16 20:03:04 +02:00
Juanjo Menent
1232e25859 FIX #5474 Country_id of "Don" object is still empty 2016-07-16 20:00:55 +02:00
Laurent Destailleur
87c31d0761 Prepare 3.9.3 2016-07-16 19:38:58 +02:00
Laurent Destailleur
931531232c FIX duplicate jquery.js files 2016-07-16 19:38:18 +02:00
Laurent Destailleur
e299bad2b5 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-07-16 19:20:15 +02:00
Laurent Destailleur
6f489c1fbd FIX Missing original .js file (license violation if sources are not
provided)
2016-07-16 19:19:52 +02:00
Juanjo Menent
feef5b2eff Merge pull request #5489 from simnandez/3.9
FIX Option strict mode compatibility
2016-07-15 20:04:00 +02:00
Juanjo Menent
cd0849209c FIX Failed to open file 2016-07-15 19:44:45 +02:00
Juanjo Menent
2ed446d014 FIX Option strict mode compatibility 2016-07-15 19:35:01 +02:00
Laurent Destailleur
10e7fa51fc Fix missing parameters to provide all information required for
substitution hooks
2016-07-13 23:06:41 +02:00
Laurent Destailleur
dc51eb0b75 Fix missing badge 2016-07-13 22:21:18 +02:00
Laurent Destailleur
baeedd3690 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-07-12 19:26:55 +02:00
Laurent Destailleur
f972b15f5f FIX #5068 2016-07-12 19:22:14 +02:00
Laurent Destailleur
f1b348da34 Merge pull request #5477 from atm-alexis/FIX_3.9_invoice_late_dashboard
FIX dasboard wrong for late invoice
2016-07-12 19:07:19 +02:00
Alexis Algoud
572b2fdec7 FIX dasboard wrong for late invoice 2016-07-12 15:01:43 +02:00
Laurent Destailleur
d5f221452e Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-07-11 11:34:28 +02:00
Laurent Destailleur
0367cee671 FIX We must take the last recent defined price when using price level 2016-07-11 11:34:11 +02:00
Laurent Destailleur
0291b6f5d7 Merge pull request #5471 from marcosgdf/bug-5470
FIX #5470 User of expense report in bank transactions page is not correct
2016-07-11 02:52:23 +02:00
Marcos García de La Fuente
d01796a214 FIX #5470 User of expense report in bank transactions page is not correct 2016-07-09 14:31:41 +02:00
Laurent Destailleur
47d7ac8031 Fix the repair tool to correct corrupted stock for batch numbers 2016-07-08 23:11:55 +02:00
Laurent Destailleur
a48c79b68b Fix corrupted stock 2016-07-08 23:02:25 +02:00
Laurent Destailleur
0f23cef46c Fix warning of the repair tool. 2016-07-08 18:59:36 +02:00
Juanjo Menent
02439bed8b Merge pull request #5458 from hregis/3.8_bug
Fix: wrong multicompany filter
2016-07-07 17:12:59 +02:00
Regis Houssin
4503659cba Fix: wrong multicompany filter 2016-07-06 16:50:10 +02:00
Laurent Destailleur
a8f06d78b1 Merge remote-tracking branch 'origin/3.8' into 3.9
Conflicts:
	htdocs/install/pgsql/functions/functions.sql
2016-07-06 14:53:05 +02:00
Laurent Destailleur
148f2e4c00 Merge pull request #5449 from fmarcet/3.8
Fix: Don't load extrafields on orderstoinvoice
2016-07-06 11:56:05 +02:00
Laurent Destailleur
b77edf9f32 Merge pull request #5448 from atm-maxime/fix_task_odt_model
FIX task ODT company object not correctly retrieved
2016-07-06 11:55:13 +02:00
fmarcet
50c5efc374 Fix: Don't load extrafields on orderstoinvoice 2016-07-05 16:41:46 +02:00
Maxime Kohlhaas
d658e2cf31 FIX task ODT company object not correctly retrieved 2016-07-05 16:04:18 +02:00
Laurent Destailleur
e9797538b3 Merge pull request #5432 from atm-florian/3.9
FIX #4926
2016-07-02 20:31:58 +02:00
Laurent Destailleur
ad82909d08 Merge pull request #5431 from atm-florian/3.8
FIX #4756
2016-07-02 20:31:36 +02:00
Laurent Destailleur
6a903b17e6 Merge pull request #5440 from frederic34/patch-8
FIX Search on billed
2016-07-02 20:30:51 +02:00
Laurent Destailleur
29cbab1647 Merge pull request #5438 from atm-arnaud/FIX_product_blocstat_without_module_enabled
FIX product stats all bloc module without enabled test
2016-07-02 20:29:41 +02:00
Laurent Destailleur
838852619e Merge pull request #5439 from atm-arnaud/FIX_ASK_DELETE_PAYMENT_SUPPLIER_INVOICE
FIX form_confirm to delete payment on supplier invoice
2016-07-02 20:28:18 +02:00
Frédéric FRANCE
0639bafa6b Update list.php 2016-07-02 10:19:38 +02:00
arnaud
cf5de9d0c8 FIX form_confirm to delete payment on supplier invoice 2016-07-01 16:59:03 +02:00
arnaud
09b824d819 FIX product stats all bloc module without enbaled test 2016-07-01 16:44:05 +02:00
florian HENRY
2520ee921a llx_ecm_directories 2016-07-01 08:37:24 +02:00
florian HENRY
08fbc21bb1 llx_ecm_directories 2016-07-01 08:36:20 +02:00
florian HENRY
7118c8b39b Merge branch '3.9' of https://github.com/Dolibarr/dolibarr.git into 3.9 2016-07-01 08:34:10 +02:00
florian HENRY
bfcc72b8d8 Merge branch '3.8' of https://github.com/Dolibarr/dolibarr.git into 3.8 2016-07-01 08:33:45 +02:00
Laurent Destailleur
f8b1d0d7ca Merge remote-tracking branch 'origin/3.8' into 3.9 2016-07-01 03:51:23 +02:00
Laurent Destailleur
07fd911770 Merge pull request #5401 from atm-alexis/FIX_3.8_bug_5383
# FIX #5383 bad object id on don delete
2016-07-01 03:42:59 +02:00
Laurent Destailleur
2c5e1c17fe Fix hard coded table prefix 2016-07-01 03:42:19 +02:00
Laurent Destailleur
74378e2c65 Merge pull request #5407 from atm-alexis/FIX_3.8_bug_5338
FIX #5338 use of not initialized var $aphour, $apmin, etc
2016-07-01 03:27:26 +02:00
Laurent Destailleur
625213580c Merge remote-tracking branch 'origin/3.8' into 3.9
Conflicts:
	htdocs/core/lib/pdf.lib.php
2016-07-01 03:17:20 +02:00
Laurent Destailleur
9e82a8b4e6 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-07-01 03:12:02 +02:00
Laurent Destailleur
102179028c FIX #5414 2016-07-01 03:11:41 +02:00
Laurent Destailleur
3645bd8f69 Merge pull request #5420 from atm-alexis/FIX_3.8_bug_5170
FIX #5170 tva sign with INVOICE_POSITIVE_CREDIT_NOTE option
2016-07-01 03:06:31 +02:00
Laurent Destailleur
1d0e14be62 Merge pull request #5423 from atm-alexis/FIX_3.9_bug_4964
FIX #4964 buyprice in customer from shipping
2016-07-01 02:52:15 +02:00
Laurent Destailleur
6066b711af Merge pull request #5427 from atm-geoffrey/FIX_project_select_on_event
Fix #4828
2016-07-01 02:47:43 +02:00
Laurent Destailleur
29e26c2342 Merge remote-tracking branch 'origin/3.8' into 3.9
Conflicts:
	htdocs/core/lib/sendings.lib.php
2016-07-01 02:06:30 +02:00
Laurent Destailleur
c9300bae35 Merge pull request #5415 from fmarcet/3.8
Fix: Incorrect document link on supplier invoices's list
2016-06-30 22:31:18 +02:00
Laurent Destailleur
a439661ac7 Merge pull request #5421 from atm-arnaud/fix_5004
FIX #5004
2016-06-30 22:23:53 +02:00
Laurent Destailleur
5c11192c7c Merge pull request #5425 from atm-arnaud/fix_4749
FIX #4749
2016-06-30 22:20:18 +02:00
Laurent Destailleur
d4226a038e Merge pull request #5418 from atm-maxime/fix_time_spent_right
FIX #5319
2016-06-30 21:56:25 +02:00
Laurent Destailleur
3ddd56a326 Merge pull request #5410 from frederic34/patch-8
FIX Bad link on supplier orders area
2016-06-30 21:40:45 +02:00
Laurent Destailleur
f2bb51ad02 Merge pull request #5406 from atm-gauthier/3.8_fix_linked_receiving
FIX : receiving link never works
2016-06-30 21:38:29 +02:00
Laurent Destailleur
05a5a2b6c5 Merge pull request #5428 from atm-maxime/fix_userid_not_defined
FIX #4383 $userid not defined
2016-06-30 21:35:34 +02:00
Laurent Destailleur
578a58527f Merge pull request #5430 from atm-arnaud/fix_4455
FIX #4455
2016-06-30 21:32:17 +02:00
Laurent Destailleur
b09c6533ee Merge pull request #5433 from atm-maxime/fix_filename_bonprelevement
FIX #4448 $filebonprev is not used, $this->filename now
2016-06-30 21:03:00 +02:00
Maxime Kohlhaas
d004f3a538 FIX #4448 $filebonprev is not used, $this->filename now 2016-06-30 17:03:56 +02:00
florian HENRY
855550e274 FIX 4926 2016-06-30 17:00:09 +02:00
florian HENRY
8097298c80 FIX #4756 2016-06-30 16:55:59 +02:00
arnaud
38dcb0de49 FIX #4455 2016-06-30 16:53:24 +02:00
Maxime Kohlhaas
aa67a29115 FIX #4383 $userid not defined 2016-06-30 16:40:38 +02:00
atm-geoffrey
75bb161930 FIX #4828 2016-06-30 16:20:53 +02:00
arnaud
0ffe106e2c FIX #4749 2016-06-30 16:03:48 +02:00
Alexis Algoud
02169478d0 FIX #4964 buyprice in customer from shipping
buyprice wasn't load in expedition::fetch_lines
2016-06-30 15:30:07 +02:00
Alexis Algoud
fa73dbe8e9 FIX #5128 if create method return duplicated code error
not use GETPOST in order to get a new code
2016-06-30 15:12:35 +02:00
arnaud
97fe75f198 FIX #5004 2016-06-30 14:57:23 +02:00
Alexis Algoud
22bc44620b FIX #5170 tva sign with INVOICE_POSITIVE_CREDIT_NOTE option 2016-06-30 14:27:58 +02:00
Maxime Kohlhaas
c73c1a577a Time spent can be saved with project read right 2016-06-30 14:24:03 +02:00
fmarcet
e4a2b5abb3 Fix: Incorrect document link on supplier invoices's list 2016-06-30 11:27:29 +02:00
Frédéric FRANCE
76a113257e Update index.php 2016-06-29 16:16:56 +02:00
Alexis Algoud
7e8506e25f FIX #5338 use of not initialized var $aphour, $apmin, etc 2016-06-28 13:25:47 +02:00
gauthier
d9035e5308 FIX : receiving link never works 2016-06-28 11:41:23 +02:00
Alexis Algoud
eb9d26a9e0 FIX #5383 bad object id on don delete 2016-06-27 11:36:13 +02:00
Laurent Destailleur
b6700c70d6 Merge pull request #5399 from atm-geoffrey/fix_PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS
FIX Hide a non relevant message when PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS is on on project edit view
2016-06-24 21:54:36 +02:00
Laurent Destailleur
aa1207d77a Merge pull request #5398 from atm-geoffrey/fix_project_clone_extrafields
FIX extrafields cloned on project clone
2016-06-24 21:53:02 +02:00
Laurent Destailleur
1368e6d462 Fix: error message was not enough to understand
Conflicts:
	htdocs/langs/en_US/errors.lang
2016-06-24 21:32:38 +02:00
geoffrey.girard
321ccce438 Fix PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS on project edit view 2016-06-24 15:57:08 +02:00
geoffrey.girard
0a5ded20a3 FIX extrafield cloned on project clone 2016-06-24 15:27:47 +02:00
Laurent Destailleur
f6119cfee8 Merge remote-tracking branch 'origin/3.8' into 3.9
Conflicts:
	htdocs/core/modules/expensereport/doc/pdf_standard.modules.php
2016-06-23 21:03:08 +02:00
Laurent Destailleur
d78eb4495e Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.8 2016-06-23 20:55:31 +02:00
Laurent Destailleur
9b50150fe8 FIX #5380 2016-06-23 20:54:04 +02:00
Laurent Destailleur
05cbf37aca Merge pull request #5387 from frederic34/patch-8
FIX Using parm instead of this in function pdfGetHeightForHtmlContent
2016-06-23 20:22:17 +02:00
Laurent Destailleur
c53429dcae Merge pull request #5391 from atm-florian/3.9
FIX : Translate group perms as it is done into user perms
2016-06-23 20:20:55 +02:00
florian HENRY
c67fa41298 FIX : Translate group perms as it is done into user perms 2016-06-23 16:29:06 +02:00
Frédéric FRANCE
3690d11ca2 Update pdf.lib.php 2016-06-23 10:48:52 +02:00
Laurent Destailleur
7f0ed90652 Merge pull request #5385 from simnandez/3.9
FIX: Bad column totalizing if MAIN_SHOW_HT_ON_SUMMARY activated
2016-06-23 10:01:34 +02:00
Laurent Destailleur
f514400d87 FIX a case of corrupted ODT by Word that insert <text:s> when it should
not.
2016-06-22 20:08:29 +02:00
Juanjo Menent
0d62bd704e Fix: Bad column totalizing if MAIN_SHOW_HT_ON_SUMMARY activated 2016-06-22 18:59:51 +02:00
Laurent Destailleur
386b19d4b1 Fix regression. Add hidden option PROPAL_DISABLE_SIGNATURE to restore
old behaviour.
2016-06-19 17:56:34 +02:00
Laurent Destailleur
d717757594 Protect against bad value of accurancy to avoid javascript error 2016-06-17 10:40:11 +02:00
Laurent Destailleur
76df7afa85 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-06-17 10:35:30 +02:00
Laurent Destailleur
a3d53b269f FIX javascript error with german-switzerland language 2016-06-17 10:35:18 +02:00
Laurent Destailleur
19eacba248 Merge pull request #5348 from frederic34/patch-8
FIX Bad name of table into sql request llx_accountingaccount instead of llx_accounting_account
2016-06-16 20:35:21 +02:00
Laurent Destailleur
c9d743ac26 Merge pull request #5330 from atm-alexis/FIX_large_expense_note_and_large_logo
FIX 3.8 large expense note
2016-06-16 20:24:39 +02:00
Laurent Destailleur
b4384c13e1 Merge pull request #5349 from atm-maxime/3.9
FIX #5343
2016-06-16 20:19:08 +02:00
Frédéric FRANCE
bc22f39aa4 Update import.php 2016-06-16 20:18:58 +02:00
Laurent Destailleur
252ca09717 Merge pull request #5358 from ndrosis/patch-24
Greece VAT 23 -> 24
2016-06-16 20:09:11 +02:00
Laurent Destailleur
84e13c153d Merge pull request #5354 from atm-maxime/fix_travis
FIX PHP 5.3 compatibility
2016-06-16 20:07:59 +02:00
Drosis Nikos
5a51850d54 Greece VAT 23 -> 24 2016-06-16 14:03:11 +03:00
Laurent Destailleur
f94d140d2a Fix bad sql field name 2016-06-16 13:00:23 +02:00
Laurent Destailleur
9781baa743 FIX Filter on opportunity amount and budget 2016-06-16 12:42:21 +02:00
Maxime Kohlhaas
31f6cd7353 Merge branch '3.9' of https://github.com/Dolibarr/dolibarr into 3.9 2016-06-16 09:26:16 +02:00
Laurent Destailleur
a13c0e5462 Merge remote-tracking branch 'origin/3.8' into 3.9 2016-06-15 18:28:59 +02:00
Maxime Kohlhaas
af5a75c39b Merge branch '3.9' of https://github.com/Dolibarr/dolibarr into 3.9 2016-06-15 18:25:45 +02:00
Laurent Destailleur
630a063283 FIX Can't create thirdparty or validate invoice if profid is mandatory
and profid does not exists for other countries

Conflicts:
	htdocs/compta/facture.php
2016-06-15 18:24:15 +02:00
Laurent Destailleur
4c922f073b FIX Can't create thirdparty or validate invoice if profid is mandatory
and profid does not exists for other countries
2016-06-15 18:21:58 +02:00
Maxime Kohlhaas
748b3bb2ba Fix travis error for GETPOST in empty 2016-06-15 14:16:56 +02:00
Maxime Kohlhaas
f51386c59f FIX #5343 2016-06-15 08:06:22 +02:00
Frédéric FRANCE
3646b5f5ae Update import.php 2016-06-14 16:04:10 +02:00
Frédéric FRANCE
5234e8fc8f Update index.php 2016-06-14 15:32:55 +02:00
root
b3d58e9510 FIX large expense note 2016-06-08 14:36:52 +02:00
Laurent Destailleur
fb254d3287 Update changelog for 3.9.2 2016-06-06 13:47:46 +02:00
Laurent Destailleur
788c20516c Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-06-06 13:37:59 +02:00
Laurent Destailleur
62c93ddd12 Merge pull request #5311 from aspangaro/3.9-p22
Fix: Accountancy - Access rights
2016-06-06 13:37:18 +02:00
Laurent Destailleur
e10db62b3a Fix a deadlock situation. If order set to billed by error, no way to
solve situation.
2016-06-06 13:29:37 +02:00
aspangaro
23b748aca3 Fix: Accountancy - Access rights 2016-06-05 14:22:13 +02:00
Laurent Destailleur
4870cd7616 Merge pull request #5306 from atm-maxime/fix_projecttaskarray
FIX #5087
2016-06-05 02:25:36 +02:00
Maxime Kohlhaas
0ab4827091 FIX #5087 2016-06-05 02:06:32 +02:00
Laurent Destailleur
c07933729a Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-06-05 00:29:40 +02:00
Laurent Destailleur
0d08231cd8 Merge pull request #5305 from atm-maxime/fix_ecm_removefile
FIX #5108
2016-06-05 00:29:22 +02:00
Laurent Destailleur
c09dbe05b3 Merge remote-tracking branch 'origin/3.8' into 3.9
Conflicts:
	htdocs/core/class/ldap.class.php
	htdocs/expensereport/card.php
	htdocs/langs/en_US/admin.lang
2016-06-05 00:25:08 +02:00
Maxime Kohlhaas
a5472b58d1 FIX #5108 2016-06-05 00:24:00 +02:00
Laurent Destailleur
db2269b9dd Merge remote-tracking branch 'origin/3.7' into 3.8
Conflicts:
	htdocs/core/class/ldap.class.php
	htdocs/langs/en_US/admin.lang
2016-06-05 00:12:34 +02:00
Laurent Destailleur
d9553212ac Merge pull request #5302 from atm-maxime/fix_sanitizefilename
FIX #5153
2016-06-05 00:08:30 +02:00
Maxime Kohlhaas
7866fb9dae Fix #5153 2016-06-04 19:11:32 +02:00
Laurent Destailleur
454d054fdf Merge pull request #5294 from atm-maxime/fix_productprice_multicompany
FIX #4762 Fix product supplier price modification with multicompany
2016-06-04 18:51:33 +02:00
Laurent Destailleur
a4411c7fe7 Merge pull request #5299 from atm-maxime/fix_expensereport_rights
Fix rights check on expense reports
2016-06-04 18:40:45 +02:00
Maxime Kohlhaas
abe84ef991 Fix rights check on expense reports 2016-06-04 18:32:00 +02:00
Maxime Kohlhaas
3ef9fe2c40 Fix product supplier price modification with multicompany 2016-06-04 18:10:40 +02:00
Laurent Destailleur
acc8cca84a Merge pull request #5290 from atm-ph/fix_3.7_issue_2777
Fix #2777
2016-06-04 18:07:16 +02:00
Laurent Destailleur
aebc7b1233 Merge pull request #5285 from atm-maxime/fix_menus_dashboard_links
FIX #3243
2016-06-04 17:33:25 +02:00
phf
a62f5bd5b4 Fix #2777 2016-06-04 17:17:22 +02:00
Laurent Destailleur
1552e7f41f Merge pull request #5286 from atm-ph/fix_3.7_call_function_not_exists
Fix call function ldap_connect but not exists
2016-06-04 14:56:42 +02:00
phf
8ccda16ef3 Fix call function ldap_connect but not exists 2016-06-04 14:50:32 +02:00
Maxime Kohlhaas
bd2fe75d08 Fix menus in dashboard links 2016-06-04 14:45:03 +02:00
Laurent Destailleur
c7aa486d93 Merge pull request #5282 from atm-ph/fix_3.9_miss_value_extrafield_on_builddoc
Fix builddoc with odt lost value of extrafields as "sellist" on view …
2016-06-04 14:38:12 +02:00
phf
01b881a0a6 Fix builddoc with odt lost value of extrafields as "sellist" on view card 2016-06-04 13:24:42 +02:00
Laurent Destailleur
5a105b75ec Merge pull request #5276 from atm-maxime/fix_import_mapping
FIX #5229
2016-06-04 11:35:27 +02:00
Juanjo Menent
43d475aa42 Merge pull request #5272 from simnandez/3.9
Fix issues with strict mode
2016-06-04 10:07:01 +02:00
Laurent Destailleur
c9834117c9 Fix #5156 2016-06-04 02:03:30 +02:00
Laurent Destailleur
32b6766a7d FIX #5195 2016-06-04 01:50:01 +02:00
Maxime Kohlhaas
a1c7632a50 Fix import mapping #5229 2016-06-04 01:28:51 +02:00
Laurent Destailleur
ff6daebee6 FIX #5203 2016-06-04 01:19:27 +02:00
Laurent Destailleur
085fa6902b Merge remote-tracking branch 'origin/3.8' into 3.9
Conflicts:
	htdocs/contrat/list.php
	htdocs/fourn/ajax/getSupplierPrices.php
2016-06-04 00:58:16 +02:00
Laurent Destailleur
609cc1dd70 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-06-04 00:53:09 +02:00
Laurent Destailleur
9c3365aefc FIX #5163 2016-06-04 00:52:55 +02:00
Laurent Destailleur
6cef3b8a96 Merge pull request #5273 from atm-maxime/fix_import_model_type_size
Fix import model not correctly saved #5185
2016-06-04 00:18:23 +02:00
Maxime Kohlhaas
8901b99e2d Fix import model not correctly saved #5185 2016-06-04 00:14:08 +02:00
Laurent Destailleur
b47db3e9e1 Merge pull request #5266 from atm-maxime/fix_project_time_spent_access
Fix access to project task time spent creation #5249
2016-06-04 00:13:32 +02:00
Laurent Destailleur
b9feae0883 Merge pull request #5270 from atm-maxime/fix_pmp_when_stock_enabled
Fix pmp when stock enabled
2016-06-04 00:12:53 +02:00
Juanjo Menent
66c73015b2 Fix issues with strict mode 2016-06-03 23:58:54 +02:00
Juanjo Menent
9e85ae3d47 Merge remote-tracking branch 'origin/3.9' into 3.9 2016-06-03 23:53:14 +02:00
Maxime Kohlhaas
8b0b3b1a9d PMP available only if stock module enabled 2016-06-03 23:49:34 +02:00
Laurent Destailleur
d20d88e1af Merge pull request #5265 from atm-ph/fix_3.8_soc.php_with_wrong_id
Fix #4632
2016-06-03 23:43:54 +02:00
Maxime Kohlhaas
c9c7045a6f Fix access to project task time spent creation #5249 2016-06-03 23:34:37 +02:00
phf
778b05c341 Fix #4632 2016-06-03 23:06:53 +02:00
Juanjo Menent
fde6909530 Merge pull request #5258 from atm-maxime/3.8
Fix SQL error on order stats
2016-06-03 16:19:56 +02:00
Maxime Kohlhaas
ab44adc6d5 Fix SQL error on order stats 2016-06-02 12:37:37 +02:00
Juanjo Menent
7773afcbbe Merge remote-tracking branch 'upstream/3.9' into 3.9 2016-06-01 10:36:18 +02:00
Laurent Destailleur
c2d8bd99dc Merge pull request #5244 from atm-gauthier/3.8_fix_mergepropal
FIX : same page added several times on mergepropal option
2016-05-29 12:03:35 +02:00
Laurent Destailleur
3f49f0df33 Merge pull request #5245 from atm-gauthier/3.8_fix_sql_error_on_facture_create
FIX : SQL error function on getAvailableDiscounts function, on bill c…
2016-05-29 11:58:28 +02:00
Juanjo Menent
071a230000 Merge remote-tracking branch 'upstream/3.9' into 3.9
Conflicts:
	htdocs/compta/localtax/quadri_detail.php
2016-05-26 10:46:44 +02:00
gauthier
71ee941cf8 FIX : SQL error function on getAvailableDiscounts function, on bill create mode if socid is empty 2016-05-25 12:25:39 +02:00
gauthier
1ce91bac06 FIX : same page added several times on mergepropal option 2016-05-25 11:25:19 +02:00
Laurent Destailleur
24d7c6aae7 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.8 2016-05-23 12:27:15 +02:00
Laurent Destailleur
e2e95641a3 FIX Search supplier ref on contract 2016-05-23 12:27:02 +02:00
Juanjo Menent
44746c1899 Merge remote-tracking branch 'upstream/3.8' into 3.9
Conflicts:
	htdocs/compta/localtax/quadri_detail.php
2016-04-15 13:46:20 +02:00
Juanjo Menent
2d645c74dc Merge remote-tracking branch 'upstream/3.9' into 3.9 2016-04-15 13:36:08 +02:00
Juanjo Menent
d52a93ce4d Merge remote-tracking branch 'upstream/3.8' into 3.9
Conflicts:
	htdocs/compta/localtax/quadri_detail.php
2016-04-15 13:33:21 +02:00
193 changed files with 14196 additions and 8184 deletions

191
ChangeLog
View File

@@ -12,6 +12,136 @@ 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
FIX: #4455
FIX: #4749
FIX: #4756
FIX: #4828
FIX: #4926
FIX: #4964 buyprice in customer from shipping buyprice wasn't load in expedition::fetch_lines
FIX: #5004
FIX: #5068
FIX: #5170 tva sign with INVOICE_POSITIVE_CREDIT_NOTE option
FIX: #5338 use of not initialized var $aphour, $apmin, etc
FIX: #5343
FIX: #5380
FIX: #5383 bad object id on don delete
FIX: #5414
FIX: #5470 User of expense report in bank transactions page is not correct
FIX: a case of corrupted ODT by Word that insert <text:s> when it should not.
FIX: Can't create thirdparty or validate invoice if profid is mandatory and profid does not exists for other countries
FIX: dasboard wrong for late invoice
FIX: duplicate jquery.js files
FIX: extrafield cloned on project clone
FIX: Failed to open file
FIX: Filter on opportunity amount and budget
FIX: form_confirm to delete payment on supplier invoice
FIX: javascript error with german-switzerland language
FIX: large expense note
FIX: Missing original .js file (license violation if sources are not provided)
FIX: Option strict mode compatibility
FIX: product stats all bloc module without enbaled test
FIX: receiving link never works
FIX: task ODT company object not correctly retrieved
FIX: Translate group perms as it is done into user perms
FIX: We must take the last recent defined price when using price level
***** ChangeLog for 3.9.2 compared to 3.9.1 *****
FIX: #4813 Won translation for the key OppStatusWON instead OppStatusWIN
FIX: #5008 SQL error when editing the reference of a supplier invoice that already exists
FIX: #5236 Cron module activated but "Modules tools" does not appear in the left menu.
FIX: Accountancy - 3.9 - Chart of accounts are limited on only one country
FIX: bug on email template
FIX: Can't create a stock transfer from product card
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: Compatible with multicompany
FIX: Creation of the second ressource type fails.
FIX: end of select when no fournprice
FIX: Filter on assigned to was preselected on current user on list "All events" (instead of no filtering)
FIX: Filter on category tag for suppliers
FIX: hook on group card called but not initialized
FIX: Infinite loop on menu tree output for edition
FIX: Can show tree of entries added by external modules using fk_mainmenu and fk_leftmenu instead of fk_menu.
FIX: init var at wrong place report incorrect "shippable" flag on draft order.
FIX: It doesn't check if there is enough stock to update the lines of orders/invoices
FIX: Menu statistics was not visible if module proposal was not enabled
FIX: Merge manually PR #5161 - Bad translation key
FIX: missing column when module was installed before standard integration
FIX: Missing number total of modules
FIX: Not filtering correctly when coming from dashboard
FIX: PROPAL_MERGE_PDF with PRODUCT_USE_OLD_PATH
FIX: Remove PHP Warning: Creating default object from empty value.
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: Split of credit note into discount page generates records not correctly recognised as credit note.
FIX: SQL error function on getAvailableDiscounts function, on bill create mode if socid is empty
FIX: #5087
FIX: #5108
FIX: #5163
FIX: #5195
FIX: #5203
FIX: #5207
FIX: #5209
FIX: #5230
***** ChangeLog for 3.9.1 compared to 3.9.* *****
FIX: #3815 Call to undefined function local_by_date()
FIX: #4424 Missing email of user popup in supplier orders area
@@ -236,6 +366,67 @@ This is list of hooks modified:
***** 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

@@ -1,2 +1 @@
README.md
README-FR.md

View File

@@ -2,4 +2,4 @@
version=3
#http://sf.net/dolibarr/dolibarr-(.+)\.tgz
http://www.dolibarr.org/files/stable/standard/dolibarr-(.+)\.tgz
http://www.dolibarr.org/files/stable/package_debian-ubuntu/dolibarr_(.+)\.orig\.tar\.gz

View File

@@ -173,6 +173,7 @@ $build =~ s/-.*$//g;
# now build is 0+nmu1 for example
$FILENAMEDEBNATIVE="${PROJECT}_${MAJOR}.${MINOR}.${build}";
$FILENAMEDEB="${PROJECT}_${MAJOR}.${MINOR}.${newbuild}";
$FILENAMEDEBSHORT="${PROJECT}_${MAJOR}.${MINOR}.${build}";
my $copyalreadydone=0;
@@ -388,10 +389,15 @@ if ($nboftargetok) {
{
print 'Run git tag -a -f -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n";
$ret=`git tag -a -f -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD"`;
print 'Run git push -f --tags'."\n";
$ret=`git push -f --tags`;
}
}
print 'Run git push --tags'."\n";
$ret=`git push --tags`;
else
{
print 'Run git push --tags'."\n";
$ret=`git push --tags`;
}
chdir("$olddir");
}
@@ -807,7 +813,7 @@ if ($nboftargetok) {
$ret=`$cmd`;
print "Remove other files\n";
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/README-FR`;
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/README-FR.md`;
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/README`;
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/README-FR`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/aps`;
@@ -1104,6 +1110,7 @@ if ($nboftargetok) {
%filestoscansf=(
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'Dolibarr installer for Fedora-Redhat-Mandriva-Opensuse (DoliRpm)',
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'Dolibarr installer for Debian-Ubuntu (DoliDeb)',
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'none',
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'Dolibarr installer for Windows (DoliWamp)',
"$DESTI/standard/$FILENAMETGZ.tgz"=>'Dolibarr ERP-CRM',
"$DESTI/standard/$FILENAMETGZ.zip"=>'Dolibarr ERP-CRM'
@@ -1111,6 +1118,7 @@ if ($nboftargetok) {
%filestoscanstableasso=(
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'package_rpm_generic',
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'package_debian-ubuntu',
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'package_debian-ubuntu',
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'package_windows',
"$DESTI/standard/$FILENAMETGZ.tgz"=>'standard',
"$DESTI/standard/$FILENAMETGZ.zip"=>'standard'
@@ -1156,7 +1164,7 @@ if ($nboftargetok) {
print "\n";
if ($target eq 'SF') {
if ($target eq 'SF' && $filestoscan{$file} ne 'none') {
$destFolder="$NEWPUBLISH/$filestoscan{$file}/".$MAJOR.'.'.$MINOR.'.'.$BUILD;
}
elsif ($target eq 'ASSO' and $NEWPUBLISH =~ /stable/) {

View File

@@ -31,8 +31,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
}
// Recupere root dolibarr
$path=preg_replace('/generate-facture.php/i','',$_SERVER["PHP_SELF"]);
require ($path."../../htdocs/master.inc.php");
//$path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]);
require (__DIR__. '/../../htdocs/master.inc.php');
require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");

View File

@@ -32,8 +32,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
}
// Recupere root dolibarr
$path=preg_replace('/generate-commande.php/i','',$_SERVER["PHP_SELF"]);
require ($path."../../htdocs/master.inc.php");
//$path=preg_replace('/generate-commande.php/i','',$_SERVER["PHP_SELF"]);
require (__DIR__. '/../../htdocs/master.inc.php');
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';

View File

@@ -32,8 +32,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
}
// Recupere root dolibarr
$path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]);
require ($path."../../htdocs/master.inc.php");
//$path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]);
require (__DIR__. '/../../htdocs/master.inc.php');
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';

View File

@@ -32,8 +32,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
}
// Recupere root dolibarr
$path=preg_replace('/generate-propale.php/i','',$_SERVER["PHP_SELF"]);
require ($path."../../htdocs/master.inc.php");
//$path=preg_replace('/generate-propale.php/i','',$_SERVER["PHP_SELF"]);
require (__DIR__. '/../../htdocs/master.inc.php');
require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
require_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php");
require_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php");

View File

@@ -32,8 +32,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
}
// Recupere root dolibarr
$path=preg_replace('/generate-societe.php/i','',$_SERVER["PHP_SELF"]);
require ($path."../../htdocs/master.inc.php");
//$path=preg_replace('/generate-societe.php/i','',$_SERVER["PHP_SELF"]);
require (__DIR__. '/../../htdocs/master.inc.php');
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';

View File

@@ -43,7 +43,9 @@ $search_pcgtype = GETPOST("search_pcgtype");
$search_pcgsubtype = GETPOST("search_pcgsubtype");
// Security check
if (! $user->admin)
if ($user->societe_id > 0)
accessforbidden();
if (! $user->rights->accounting->chartofaccount)
accessforbidden();
$sortfield = GETPOST("sortfield", 'alpha');

View File

@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
/* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -30,12 +30,15 @@ $action = GETPOST('action');
$langs->load("admin");
$langs->load("compta");
if (! $user->admin)
// Security check
if ($user->societe_id > 0)
accessforbidden();
if (! $user->rights->accounting->fiscalyear)
accessforbidden();
$error = 0;
// List of statut
// List of status
static $tmpstatut2label = array (
'0' => 'OpenFiscalYear',
'1' => 'CloseFiscalYear'

View File

@@ -95,7 +95,7 @@ if ($action == 'validatehistory') {
$sql1 .= " SET fd.fk_code_ventilation = 0";
$sql1 .= ' WHERE fd.fk_code_ventilation NOT IN ';
$sql1 .= ' (SELECT accnt.rowid ';
$sql1 .= ' FROM ' . MAIN_DB_PREFIX . 'accountingaccount as accnt';
$sql1 .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
$sql1 .= ' INNER JOIN ' . MAIN_DB_PREFIX . 'accounting_system as syst';
$sql1 .= ' ON accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=' . $conf->global->CHARTOFACCOUNTS . ')';

View File

@@ -81,7 +81,7 @@ $extrafields = new ExtraFields($db);
// List of fields to search into when doing a "search in all"
$fieldstosearchall = array(
'd.rowid'=>'Ref',
//'d.ref'=>'Ref',
'd.login'=>'Login',
'd.lastname'=>'Lastname',
'd.firstname'=>'Firstname',
'd.societe'=>"Company",

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

@@ -61,8 +61,14 @@ $originid=GETPOST('originid','int');
$confirm = GETPOST('confirm', 'alpha');
$fulldayevent=GETPOST('fullday');
$datep=dol_mktime($fulldayevent?'00':GETPOST("aphour"), $fulldayevent?'00':GETPOST("apmin"), 0, GETPOST("apmonth"), GETPOST("apday"), GETPOST("apyear"));
$datef=dol_mktime($fulldayevent?'23':GETPOST("p2hour"), $fulldayevent?'59':GETPOST("p2min"), $fulldayevent?'59':'0', GETPOST("p2month"), GETPOST("p2day"), GETPOST("p2year"));
$aphour = GETPOST('aphour');
$apmin = GETPOST('apmin');
$p2hour = GETPOST('p2hour');
$p2min = GETPOST('p2min');
$datep=dol_mktime($fulldayevent?'00':$aphour, $fulldayevent?'00':$apmin, 0, GETPOST("apmonth"), GETPOST("apday"), GETPOST("apyear"));
$datef=dol_mktime($fulldayevent?'23':$p2hour, $fulldayevent?'59':$p2min, $fulldayevent?'59':'0', GETPOST("p2month"), GETPOST("p2day"), GETPOST("p2year"));
// Security check
$socid = GETPOST('socid','int');
@@ -92,7 +98,6 @@ $extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('actioncard','globalcard'));
/*
* Actions
*/
@@ -781,7 +786,7 @@ if ($action == 'create')
print '<tr><td>'.$langs->trans("Project").'</td><td>';
$numproject=$formproject->select_projects((! empty($societe->id)?$societe->id:0),GETPOST("projectid")?GETPOST("projectid"):'','projectid');
$numproject=$formproject->select_projects((! empty($societe->id)?$societe->id:-1),GETPOST("projectid")?GETPOST("projectid"):'','projectid');
if ($numproject==0)
{
print ' &nbsp; <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$societe->id.'&action=create">'.$langs->trans("AddProject").'</a>';

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 Eric Seigne <erics@rycks.com>
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
*
* This program is free software; you can redistribute it and/or modify
@@ -210,7 +210,7 @@ if ($status == 'todo') { $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (
if ($filtert > 0 || $usergroup > 0)
{
$sql.= " AND (";
if ($filtert > 0) $sql.= "(ar.fk_element = ".$filtert." OR a.fk_user_action=".$filtert.")";
if ($filtert > 0) $sql.= "(ar.fk_element = ".$filtert." OR (ar.fk_element IS NULL AND a.fk_user_action=".$filtert."))"; // The OR is for backward compatibility
if ($usergroup > 0) $sql.= ($filtert>0?" OR ":"")." ugu.fk_usergroup = ".$usergroup;
$sql.= ")";
}
@@ -350,7 +350,7 @@ if ($resql)
$actionstatic->type_code=$obj->type_code;
$actionstatic->type_label=$obj->type_label;
$actionstatic->label=$obj->label;
print $actionstatic->getNomUrl(1,28);
print $actionstatic->getNomUrl(1,36);
print '</td>';
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))

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');
@@ -341,7 +341,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande
$companystatic->code_client = $obj->code_client;
$companystatic->code_fournisseur = $obj->code_fournisseur;
$companystatic->canvas=$obj->canvas;
print $companystatic->getNomUrl(1,'customer',16);
print $companystatic->getNomUrl(1,'supplier',16);
print '</td>';
print '<td align="right" class="nowrap">'.price($obj->total_ttc).'</td></tr>';
$i++;
@@ -647,7 +647,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
$companystatic->code_client = $obj->code_client;
$companystatic->code_fournisseur = $obj->code_fournisseur;
$companystatic->canvas=$obj->canvas;
print $companystatic->getNomUrl(1, 'company', 44);
print $companystatic->getNomUrl(1, 'customer', 44);
print '</td>';
print '<td align="right">';
print dol_print_date($db->jdate($obj->dp),'day').'</td>'."\n";
@@ -746,7 +746,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
$companystatic->code_client = $obj->code_client;
$companystatic->code_fournisseur = $obj->code_fournisseur;
$companystatic->canvas=$obj->canvas;
print $companystatic->getNomUrl(1, 'company', 44);
print $companystatic->getNomUrl(1, 'customer', 44);
print '</td>';
print '<td align="right">';
print dol_print_date($db->jdate($obj->dp),'day').'</td>'."\n";

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

@@ -429,7 +429,8 @@ class Propal extends CommonObject
$product_type=$product->type;
if (! empty($conf->global->STOCK_MUST_BE_ENOUGH_FOR_PROPOSAL) && $product_type == 0 && $product->stock_reel < $qty) {
$this->error=$langs->trans('ErrorStockIsNotEnough');
$langs->load("errors");
$this->error=$langs->trans('ErrorStockIsNotEnoughToAddProductOnProposal', $product->ref);
$this->db->rollback();
return -3;
}
@@ -2505,7 +2506,7 @@ class Propal extends CommonObject
$response = new WorkboardResponse();
$response->warning_delay = $delay_warning/60/60/24;
$response->label = $label;
$response->url = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$statut;
$response->url = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$statut.'&mainmenu=commercial&leftmenu=propals';
$response->img = img_object($langs->trans("Propals"),"propal");
// This assignment in condition is not a bug. It allows walking the results.
@@ -2733,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

@@ -130,7 +130,7 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
}
}
if ($action == 'setremise')
if ($action == 'setremise' && $user->rights->societe->creer)
{
//if ($user->rights->societe->creer)
//if ($user->rights->facture->creer)
@@ -257,37 +257,47 @@ if ($socid > 0)
print '<tr><td class="titlefield">'.$langs->trans("CustomerAbsoluteDiscountAllUsers").'</td>';
print '<td>'.$remise_all.'&nbsp;'.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").'</td></tr>';
print '<tr><td>'.$langs->trans("CustomerAbsoluteDiscountMy").'</td>';
print '<td>'.$remise_user.'&nbsp;'.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").'</td></tr>';
if (! empty($user->fk_soc)) // No need to show this for external users
{
print '<tr><td>'.$langs->trans("CustomerAbsoluteDiscountMy").'</td>';
print '<td>'.$remise_user.'&nbsp;'.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").'</td></tr>';
}
print '</table>';
print '<br>';
print load_fiche_titre($langs->trans("NewGlobalDiscount"),'','');
print '<table class="border" width="100%">';
print '<tr><td width="38%">'.$langs->trans("AmountHT").'</td>';
print '<td><input type="text" size="5" name="amount_ht" value="'.$_POST["amount_ht"].'">';
print '<span class="hideonsmartphone">&nbsp;'.$langs->trans("Currency".$conf->currency).'</span></td></tr>';
print '<tr><td width="38%">'.$langs->trans("VAT").'</td>';
print '<td>';
print $form->load_tva('tva_tx',GETPOST('tva_tx'),$mysoc,$object);
print '</td></tr>';
print '<tr><td>'.$langs->trans("NoteReason").'</td>';
print '<td><input type="text" size="60" name="desc" value="'.$_POST["desc"].'"></td></tr>';
if ($user->rights->societe->creer)
{
print '<br>';
print "</table>";
print load_fiche_titre($langs->trans("NewGlobalDiscount"),'','');
print '<table class="border" width="100%">';
print '<tr><td width="38%">'.$langs->trans("AmountHT").'</td>';
print '<td><input type="text" size="5" name="amount_ht" value="'.$_POST["amount_ht"].'">';
print '<span class="hideonsmartphone">&nbsp;'.$langs->trans("Currency".$conf->currency).'</span></td></tr>';
print '<tr><td width="38%">'.$langs->trans("VAT").'</td>';
print '<td>';
print $form->load_tva('tva_tx',GETPOST('tva_tx'),$mysoc,$object);
print '</td></tr>';
print '<tr><td>'.$langs->trans("NoteReason").'</td>';
print '<td><input type="text" size="60" name="desc" value="'.$_POST["desc"].'"></td></tr>';
print "</table>";
}
print '</div>';
dol_fiche_end();
print '<div class="center">';
print '<input type="submit" class="button" name="submit" value="'.$langs->trans("AddGlobalDiscount").'">';
if (! empty($backtopage))
{
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
}
print '</div>';
if ($user->rights->societe->creer)
{
print '<div class="center">';
print '<input type="submit" class="button" name="submit" value="'.$langs->trans("AddGlobalDiscount").'">';
if (! empty($backtopage))
{
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
}
print '</div>';
}
print '</form>';
@@ -414,7 +424,7 @@ if ($socid > 0)
print '<br>';
/*
* Liste ristournes appliquees (=liees a une ligne de facture ou facture)
* List discount consumed (=liees a une ligne de facture ou facture)
*/
// Remises liees a lignes de factures

View File

@@ -445,6 +445,14 @@ if (empty($reshook))
setEventMessages($object->error, $object->errors, 'errors');
}
}
else if ($action == 'classifyunbilled' && $user->rights->commande->creer)
{
$ret=$object->classifyUnBilled();
if ($ret < 0) {
setEventMessages($object->error, $object->errors, 'errors');
}
}
// Positionne ref commande client
else if ($action == 'set_ref_client' && $user->rights->commande->creer) {
@@ -2373,7 +2381,11 @@ if ($action == 'create' && $user->rights->commande->creer)
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;action=classifybilled">' . $langs->trans("ClassifyBilled") . '</a></div>';
}
}
if ($object->statut > Commande::STATUS_DRAFT && $object->billed) {
if ($user->rights->commande->creer && $object->statut >= Commande::STATUS_VALIDATED && empty($conf->global->WORKFLOW_DISABLE_CLASSIFY_BILLED_FROM_ORDER) && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) {
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;action=classifyunbilled">' . $langs->trans("ClassifyUnBilled") . '</a></div>';
}
}
// Clone
if ($user->rights->commande->creer) {
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&amp;socid=' . $object->socid . '&amp;action=clone&amp;object=order">' . $langs->trans("ToClone") . '</a></div>';

View File

@@ -1242,7 +1242,8 @@ class Commande extends CommonOrder
if (! empty($conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER) && $product_type == 0 && $product->stock_reel < $qty)
{
$this->error=$langs->trans('ErrorStockIsNotEnough');
$langs->load("errors");
$this->error=$langs->trans('ErrorStockIsNotEnoughToAddProductOnOrder', $product->ref);
dol_syslog(get_class($this)."::addline error=Product ".$product->ref.": ".$this->error, LOG_ERR);
$this->db->rollback();
return self::STOCK_NOT_ENOUGH_FOR_ORDER;
@@ -2420,6 +2421,56 @@ class Commande extends CommonOrder
return $this->classifyBilled();
}
/**
* Classify the order as not invoiced
*
* @return int <0 if ko, >0 if ok
*/
function classifyUnBilled()
{
global $conf, $user, $langs;
$error = 0;
$this->db->begin();
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande SET facture = 0';
$sql.= ' WHERE rowid = '.$this->id.' AND fk_statut > '.self::STATUS_DRAFT;
dol_syslog(get_class($this)."::classifyUnBilled", LOG_DEBUG);
if ($this->db->query($sql))
{
// Call trigger
$result=$this->call_trigger('ORDER_CLASSIFY_UNBILLED',$user);
if ($result < 0) $error++;
// End call triggers
if (! $error)
{
$this->facturee=0; // deprecated
$this->billed=0;
$this->db->commit();
return 1;
}
else
{
foreach($this->errors as $errmsg)
{
dol_syslog(get_class($this)."::classifyUnBilled ".$errmsg, LOG_ERR);
$this->error.=($this->error?', '.$errmsg:$errmsg);
}
$this->db->rollback();
return -1*$error;
}
}
else
{
$this->error=$this->db->error();
$this->db->rollback();
return -1;
}
}
/**
* Update a line in database
@@ -2513,7 +2564,8 @@ class Commande extends CommonOrder
if (! empty($conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER) && $product_type == 0 && $product->stock_reel < $qty)
{
$this->error=$langs->trans('ErrorStockIsNotEnough');
$langs->load("errors");
$this->error=$langs->trans('ErrorStockIsNotEnoughToAddProductOnOrder', $product->ref);
dol_syslog(get_class($this)."::addline error=Product ".$product->ref.": ".$this->error, LOG_ERR);
$this->db->rollback();
unset($_POST['productid']);
@@ -2875,7 +2927,7 @@ class Commande extends CommonOrder
$response = new WorkboardResponse();
$response->warning_delay=$conf->commande->client->warning_delay/60/60/24;
$response->label=$langs->trans("OrdersToProcess");
$response->url=DOL_URL_ROOT.'/commande/list.php?viewstatut=-3';
$response->url=DOL_URL_ROOT.'/commande/list.php?viewstatut=-3&mainmenu=commercial&leftmenu=orders';
$response->img=img_object($langs->trans("Orders"),"order");
$generic_commande = new Commande($this->db);
@@ -3019,7 +3071,7 @@ class Commande extends CommonOrder
*/
function getNomUrl($withpicto=0,$option=0,$max=0,$short=0)
{
global $conf, $langs;
global $conf, $langs, $user;
$result='';
@@ -3029,17 +3081,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

@@ -206,7 +206,7 @@ class CommandeStats extends Stats
$sql = "SELECT product.ref, COUNT(product.ref) as nb, SUM(tl.".$this->field_line.") as total, AVG(tl.".$this->field_line.") as avg";
$sql.= " FROM ".$this->from.", ".$this->from_line.", ".MAIN_DB_PREFIX."product as product";
//if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE ".$this->where;
$sql.= " AND c.rowid = tl.fk_commande AND tl.fk_product = product.rowid";
$sql.= " AND c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year,1,false))."' AND '".$this->db->idate(dol_get_last_day($year,12,false))."'";

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;
@@ -587,10 +588,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

@@ -70,6 +70,11 @@ $date_end = dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endda
$date_starty = dol_mktime(0,0,0,$_REQUEST["date_start_delymonth"],$_REQUEST["date_start_delyday"],$_REQUEST["date_start_delyyear"]); // Date for local PHP server
$date_endy = dol_mktime(23,59,59,$_REQUEST["date_end_delymonth"],$_REQUEST["date_end_delyday"],$_REQUEST["date_end_delyyear"]);
$extrafields = new ExtraFields($db);
// fetch optionals attributes and labels
$extralabels=$extrafields->fetch_name_optionals_label('facture');
if ($action == 'create')
{
if (is_array($selected) == false)
@@ -174,6 +179,9 @@ if (($action == 'create' || $action == 'add') && !$error)
$object->remise_absolue = $_POST['remise_absolue'];
$object->remise_percent = $_POST['remise_percent'];
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
if ($ret < 0) $error++;
if ($_POST['origin'] && $_POST['originid'])
{
$object->origin = $_POST['origin'];
@@ -464,6 +472,12 @@ if ($action == 'create' && !$error)
$parameters=array('objectsrc' => $objectsrc, 'idsrc' => $listoforders, 'colspan' => ' colspan="3"');
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
if (empty($reshook) && ! empty($extrafields->attribute_label))
{
$object=new Facture($db);
print $object->showOptionals($extrafields,'edit');
}
// Modele PDF
print '<tr><td>'.$langs->trans('Model').'</td>';
print '<td>';

View File

@@ -36,10 +36,10 @@ $id=GETPOST('account');
$ref=GETPOST('ref');
// Security check
$fieldid = (! empty($ref)?$ref:$id);
$fieldname = isset($ref)?'ref':'rowid';
$fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref :''));
$fieldtype = (! empty($ref) ? 'ref' :'rowid');
if ($user->societe_id) $socid=$user->societe_id;
$result=restrictedArea($user,'banque',$fieldid,'bank_account','','',$fieldname);
$result=restrictedArea($user,'banque',$fieldvalue,'bank_account&bank_account','','',$fieldtype);
$year_start=GETPOST('year_start');
$year_current = strftime("%Y",time());
@@ -146,7 +146,7 @@ $linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/index.php">'.$langs->trans("B
// Ref
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
print '<td colspan="3">';
if ($_GET["account"])
if (!empty($id))
{
if (! preg_match('/,/', $id))
{

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
@@ -392,19 +391,20 @@ if (empty($reshook))
// Check parameters
// Check for mandatory prof id
for($i = 1; $i < 6; $i ++)
// Check for mandatory prof id (but only if country is than than ours)
if ($mysoc->country_id > 0 && $object->thirdparty->country_id == $mysoc->country_id)
{
$idprof_mandatory = 'SOCIETE_IDPROF' . ($i) . '_INVOICE_MANDATORY';
$idprof = 'idprof' . $i;
if (! $object->thirdparty->$idprof && ! empty($conf->global->$idprof_mandatory))
{
if (! $error)
$langs->load("errors");
$error ++;
setEventMessages($langs->trans('ErrorProdIdIsMandatory', $langs->transcountry('ProfId' . $i, $object->thirdparty->country_code)), null, 'errors');
}
for ($i = 1; $i <= 6; $i++)
{
$idprof_mandatory = 'SOCIETE_IDPROF' . ($i) . '_INVOICE_MANDATORY';
$idprof = 'idprof' . $i;
if (! $object->thirdparty->$idprof && ! empty($conf->global->$idprof_mandatory))
{
if (! $error) $langs->load("errors");
$error++;
setEventMessages($langs->trans('ErrorProdIdIsMandatory', $langs->transcountry('ProfId' . $i, $object->thirdparty->country_code)), null, 'errors');
}
}
}
$qualified_for_stock_change = 0;
@@ -1954,7 +1954,7 @@ if ($action == 'create')
$dateinvoice = (empty($dateinvoice)?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''):$dateinvoice); // Do not set 0 here (0 for a date is 1970)
}
$absolute_discount = $soc->getAvailableDiscounts();
if(!empty($soc->id)) $absolute_discount = $soc->getAvailableDiscounts();
if (! empty($conf->use_javascript_ajax))
{
@@ -3315,7 +3315,7 @@ else if ($id > 0 || ! empty($ref))
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print $langs->trans('BankAccount');
print '<td>';
if (($action != 'editbankaccount') && $user->rights->commande->creer && ! empty($object->brouillon))
if (($action != 'editbankaccount') && $user->rights->facture->creer && ! empty($object->brouillon))
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&amp;id='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'),1).'</a></td>';
print '</tr></table>';
print '</td><td colspan="3">';

View File

@@ -387,8 +387,8 @@ class Facture extends CommonInvoice
{
$newinvoiceline=$this->lines[$i];
$newinvoiceline->fk_facture=$this->id;
$newinvoiceline->origin = $this->element;
$newinvoiceline->origin_id = $this->lines[$i]->id;
$newinvoiceline->origin = $this->element; // TODO This seems not used. Here we but origin 'facture' but after
$newinvoiceline->origin_id = $this->lines[$i]->id; // we put an id of object !
if ($result >= 0 && ($newinvoiceline->info_bits & 0x01) == 0) // We keep only lines with first bit = 0
{
// Reset fk_parent_line for no child products and special product
@@ -2138,7 +2138,8 @@ class Facture extends CommonInvoice
$product_type=$product->type;
if (! empty($conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE) && $product_type == 0 && $product->stock_reel < $qty) {
$this->error=$langs->trans('ErrorStockIsNotEnough');
$langs->load("errors");
$this->error=$langs->trans('ErrorStockIsNotEnoughToAddProductOnInvoice', $product->ref);
$this->db->rollback();
return -3;
}
@@ -2177,27 +2178,32 @@ class Facture extends CommonInvoice
$this->line->fk_facture=$this->id;
$this->line->label=$label; // deprecated
$this->line->desc=$desc;
$this->line->qty= ($this->type==self::TYPE_CREDIT_NOTE?abs($qty):$qty); // For credit note, quantity is always positive and unit price negative
$this->line->qty= ($this->type==self::TYPE_CREDIT_NOTE?abs($qty):$qty); // For credit note, quantity is always positive and unit price negative
$this->line->subprice= ($this->type==self::TYPE_CREDIT_NOTE?-abs($pu_ht):$pu_ht); // For credit note, unit price always negative, always positive otherwise
$this->line->tva_tx=$txtva;
$this->line->localtax1_tx=$txlocaltax1;
$this->line->localtax2_tx=$txlocaltax2;
$this->line->localtax1_type = $localtaxes_type[0];
$this->line->localtax2_type = $localtaxes_type[2];
$this->line->total_ht= (($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_ht):$total_ht); // For credit note and if qty is negative, total is negative
$this->line->total_ttc= (($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_ttc):$total_ttc); // For credit note and if qty is negative, total is negative
$this->line->total_tva= (($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_tva):$total_tva); // For credit note and if qty is negative, total is negative
$this->line->total_localtax1=(($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_localtax1):$total_localtax1); // For credit note and if qty is negative, total is negative
$this->line->total_localtax2=(($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_localtax2):$total_localtax2); // For credit note and if qty is negative, total is negative
$this->line->fk_product=$fk_product;
$this->line->product_type=$product_type;
$this->line->remise_percent=$remise_percent;
$this->line->subprice= ($this->type==self::TYPE_CREDIT_NOTE?-abs($pu_ht):$pu_ht); // For credit note, unit price always negative, always positive otherwise
$this->line->date_start=$date_start;
$this->line->date_end=$date_end;
$this->line->ventil=$ventil;
$this->line->rang=$rangtouse;
$this->line->info_bits=$info_bits;
$this->line->fk_remise_except=$fk_remise_except;
$this->line->total_ht= (($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_ht):$total_ht); // For credit note and if qty is negative, total is negative
$this->line->total_tva= $total_tva;
$this->line->total_localtax1=$total_localtax1;
$this->line->total_localtax2=$total_localtax2;
$this->line->localtax1_type = $localtaxes_type[0];
$this->line->localtax2_type = $localtaxes_type[2];
$this->line->total_ttc= (($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_ttc):$total_ttc);
$this->line->special_code=$special_code;
$this->line->fk_parent_line=$fk_parent_line;
$this->line->origin=$origin;
@@ -2343,7 +2349,8 @@ class Facture extends CommonInvoice
$product_type=$product->type;
if (! empty($conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE) && $product_type == 0 && $product->stock_reel < $qty) {
$this->error=$langs->trans('ErrorStockIsNotEnough');
$langs->load("errors");
$this->error=$langs->trans('ErrorStockIsNotEnoughToAddProductOnInvoice', $product->ref);
$this->db->rollback();
return -3;
}
@@ -3205,7 +3212,7 @@ class Facture extends CommonInvoice
$clause = " WHERE";
$sql = "SELECT f.rowid, f.date_lim_reglement as datefin";
$sql = "SELECT f.rowid, f.date_lim_reglement as datefin,f.fk_statut";
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
if (!$user->rights->societe->client->voir && !$user->societe_id)
{
@@ -3227,7 +3234,7 @@ class Facture extends CommonInvoice
$response = new WorkboardResponse();
$response->warning_delay=$conf->facture->client->warning_delay/60/60/24;
$response->label=$langs->trans("CustomerBillsUnpaid");
$response->url=DOL_URL_ROOT.'/compta/facture/list.php?search_status=1';
$response->url=DOL_URL_ROOT.'/compta/facture/list.php?search_status=1&mainmenu=accountancy&leftmenu=customers_bills';
$response->img=img_object($langs->trans("Bills"),"bill");
$generic_facture = new Facture($this->db);
@@ -3235,6 +3242,7 @@ class Facture extends CommonInvoice
while ($obj=$this->db->fetch_object($resql))
{
$generic_facture->date_lim_reglement = $this->db->jdate($obj->datefin);
$generic_facture->statut = $obj->fk_statut;
$response->nbtodo++;

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';
@@ -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;

View File

@@ -2,7 +2,7 @@
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2015 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015-2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
@@ -824,7 +824,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
print '</tr>';
$total_ttc += $obj->total_ttc;
$total += $obj->total;
$total += $obj->total_ht;
$totalam += $obj->am;
$var=!$var;
$i++;
@@ -877,7 +877,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
if ($socid) $sql.= " AND ff.fk_soc = ".$socid;
$sql.= " GROUP BY ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.tva, ff.total_tva, ff.total_ttc, ff.paye,";
$sql.= " s.nom, s.rowid, s.code_client, s.code_fournisseur";
$sql.= " s.nom, s.rowid, s.code_client, s.code_fournisseur, ff.date_lim_reglement";
$sql.= " ORDER BY ff.date_lim_reglement ASC";
$resql=$db->query($sql);

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

@@ -3,7 +3,7 @@
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010-2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2014-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
@@ -916,7 +916,10 @@ class BonPrelevement extends CommonObject
$row = $this->db->fetch_row($resql);
$ref = "T".$ref.str_pad(dol_substr("00".intval($row[0])+1,0,2),2,"0",STR_PAD_LEFT);
$this->filename = $conf->prelevement->dir_output.'/receipts/'.$ref.'.xml';
$dir=$conf->prelevement->dir_output.'/receipts';
if (! is_dir($dir)) dol_mkdir($dir);
$this->filename = $dir.'/'.$ref.'.xml';
// Create withdraw receipt in database
$sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_bons (";
@@ -932,10 +935,6 @@ class BonPrelevement extends CommonObject
{
$prev_id = $this->db->last_insert_id(MAIN_DB_PREFIX."prelevement_bons");
$this->id = $prev_id;
$dir=$conf->prelevement->dir_output.'/receipts';
$file=$filebonprev;
if (! is_dir($dir)) dol_mkdir($dir);
}
else
{
@@ -1031,7 +1030,7 @@ class BonPrelevement extends CommonObject
// Generation of SEPA file
$this->generate();
}
dol_syslog(__METHOD__."::End withdraw receipt, file ".$filebonprev, LOG_DEBUG);
dol_syslog(__METHOD__."::End withdraw receipt, file ".$this->filename, LOG_DEBUG);
}
/*
@@ -1559,7 +1558,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;
@@ -1674,8 +1673,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

@@ -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

@@ -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

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);
@@ -245,7 +247,7 @@ if ($resql)
print '<input type="text" class="flat" size="3" name="search_contract" value="'.dol_escape_htmltag($search_contract).'">';
print '</td>';
print '<td class="liste_titre">';
print '<input type="text" class="flat" size="6" name="search_ref_customer value="'.dol_escape_htmltag($search_ref_supplier).'">';
print '<input type="text" class="flat" size="6" name="search_ref_customer value="'.dol_escape_htmltag($search_ref_customer).'">';
print '</td>';
print '<td class="liste_titre">';
print '<input type="text" class="flat" size="6" name="search_ref_supplier value="'.dol_escape_htmltag($search_ref_supplier).'">';

View File

@@ -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

@@ -240,7 +240,10 @@ if ($section)
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
$useglobalvars=1;
$form = new Form($db);
$formquestion=array('urlfile'=>array('type'=>'hidden','value'=>$urlfile,'name'=>'urlfile'));
$formquestion=array(
'urlfile'=>array('type'=>'hidden','value'=>$urlfile,'name'=>'urlfile'),
'section'=>array('type'=>'hidden','value'=>$section,'name'=>'section')
);
print $form->formconfirm($url,$langs->trans("DeleteFile"),$langs->trans("ConfirmDeleteFile"),'confirm_deletefile',$formquestion,"no",($useajax?'deletefile':0));
}

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
@@ -389,6 +391,30 @@ 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,6 +455,7 @@ 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);
@@ -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

@@ -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
);
@@ -430,7 +432,7 @@ abstract class CommonDocGenerator
'line_fulldesc'=>doc_getlinedesc($line,$outputlangs),
'line_product_ref'=>$line->product_ref,
'line_product_label'=>$line->product_label,
'line_product_type'=>$line->product_type,
'line_product_type'=>$line->product_type,
'line_desc'=>$line->desc,
'line_vatrate'=>vatrate($line->tva_tx,true,$line->info_bits),
'line_up'=>price2num($line->subprice),
@@ -444,9 +446,9 @@ abstract class CommonDocGenerator
'line_price_ttc_locale'=>price($line->total_ttc, 0, $outputlangs),
'line_price_vat_locale'=>price($line->total_tva, 0, $outputlangs),
'line_date_start'=>$line->date_start,
'line_date_start_rfc'=>dol_print_date($line->date_start,'rfc'),
'line_date_start_rfc'=>dol_print_date($line->date_start,'dayrfc'),
'line_date_end'=>$line->date_end,
'line_date_end_rfc'=>dol_print_date($line->date_end,'rfc')
'line_date_end_rfc'=>dol_print_date($line->date_end,'dayrfc')
);
// Retrieve extrafields

View File

@@ -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);
if(! empty($id_type_contact)) {
$resql=$this->db->query($sql);
if ($resql)
{
if (! $notrigger)
{
$result=$this->call_trigger(strtoupper($this->element).'_ADD_CONTACT', $user);
if ($result < 0)
$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;
}
/**

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

@@ -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')
{
@@ -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);

View File

@@ -167,7 +167,8 @@ class HookManager
'printObjectLine',
'printObjectSubLine',
'createDictionaryFieldList',
'editDictionaryFieldlist'
'editDictionaryFieldlist',
'getFormMail'
)
)) $hooktype='addreplace';
// Deprecated hook types ('returnvalue')

View File

@@ -1896,8 +1896,8 @@ class Form
$sql.= " WHERE fk_product='".$objp->rowid."'";
$sql.= " AND entity IN (".getEntity('productprice', 1).")";
$sql.= " AND price_level=".$price_level;
$sql.= " ORDER BY date_price, rowid";
$sql.= " DESC LIMIT 1";
$sql.= " ORDER BY date_price DESC, rowid DESC";
$sql.= " LIMIT 1";
dol_syslog(get_class($this).'::constructProductListOption search price for level '.$price_level.'', LOG_DEBUG);
$result2 = $this->db->query($sql);
@@ -2278,7 +2278,7 @@ class Form
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON pfp.fk_soc = s.rowid";
$sql.= " WHERE p.entity IN (".getEntity('product', 1).")";
$sql.= " WHERE p.entity IN (".getEntity('productprice', 1).")";
$sql.= " AND p.tobuy = 1";
$sql.= " AND s.fournisseur = 1";
$sql.= " AND p.rowid = ".$productid;

View File

@@ -6,6 +6,7 @@
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015 Bahfir Abbes <bafbes@gmail.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
@@ -720,9 +721,6 @@ class FormFile
if ($modulepart == 'export') {
$relativepath = $file["name"];
}
if ($modulepart == 'facture_fournisseur' || $modulepart == 'invoice_fournisseur') {
$relativepath = get_exdir($modulesubdir, 2,0,0,null,'invoice_supplier'). $modulesubdir. "/" . $file["name"];
}
// Show file name with link to download
$out.= '<a data-ajax="false" href="'.DOL_URL_ROOT . '/document.php?modulepart='.$modulepart.'&amp;file='.urlencode($relativepath).'"';

View File

@@ -140,8 +140,8 @@ class FormProjets
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 p.title LIKE '%".$this->db->escape($filterkey)."%'";
$sql .= " OR p.ref LIKE '%".$this->db->escape($filterkey)."%'";
}
$sql.= " ORDER BY p.ref ASC";

View File

@@ -162,68 +162,52 @@ class Ldap
return -1;
}
if (! function_exists('ldap_connect'))
if (! function_exists("ldap_connect"))
{
$this->error='Your PHP need extension ldap';
$this->error='LDAPFunctionsNotAvailableOnPHP';
dol_syslog(get_class($this)."::connect_bind ".$this->error, LOG_WARNING);
return -1;
$return=-1;
}
// Loop on each ldap server
foreach ($this->server as $key => $host)
if (empty($this->error))
{
if ($connected) break;
if (empty($host)) continue;
if (preg_match('/^ldap/',$host))
// Loop on each ldap server
foreach ($this->server as $key => $host)
{
$this->connection = ldap_connect($host);
}
else
{
$this->connection = ldap_connect($host,$this->serverPort);
}
if ($connected) break;
if (empty($host)) continue;
if (is_resource($this->connection))
{
// Begin TLS if requested by the configuration
if (! empty($conf->global->LDAP_SERVER_USE_TLS))
{
if (! ldap_start_tls($this->connection))
{
dol_syslog(get_class($this)."::connect_bind failed to start tls", LOG_WARNING);
$connected = 0;
$this->close();
}
}
// Execute the ldap_set_option here (after connect and before bind)
$this->setVersion();
ldap_set_option($this->connection, LDAP_OPT_SIZELIMIT, 0); // no limit here. should return true.
if ($this->serverType == "activedirectory")
if (preg_match('/^ldap/',$host))
{
$result=$this->setReferrals();
dol_syslog(get_class($this)."::connect_bind try bindauth for activedirectory on ".$host." user=".$this->searchUser." password=".preg_replace('/./','*',$this->searchPassword),LOG_DEBUG);
$this->result=$this->bindauth($this->searchUser,$this->searchPassword);
if ($this->result)
{
$this->bind=$this->result;
$connected=2;
break;
}
else
{
$this->error=ldap_errno($this->connection).' '.ldap_error($this->connection);
}
$this->connection = ldap_connect($host);
}
else
{
// Try in auth mode
if ($this->searchUser && $this->searchPassword)
$this->connection = ldap_connect($host,$this->serverPort);
}
if (is_resource($this->connection))
{
// Begin TLS if requested by the configuration
if (! empty($conf->global->LDAP_SERVER_USE_TLS))
{
if (! ldap_start_tls($this->connection))
{
dol_syslog(get_class($this)."::connect_bind failed to start tls", LOG_WARNING);
$connected = 0;
$this->close();
}
}
// Execute the ldap_set_option here (after connect and before bind)
$this->setVersion();
ldap_set_option($this->connection, LDAP_OPT_SIZELIMIT, 0); // no limit here. should return true.
if ($this->serverType == "activedirectory")
{
dol_syslog(get_class($this)."::connect_bind try bindauth on ".$host." user=".$this->searchUser." password=".preg_replace('/./','*',$this->searchPassword),LOG_DEBUG);
$result=$this->setReferrals();
dol_syslog(get_class($this)."::connect_bind try bindauth for activedirectory on ".$host." user=".$this->searchUser." password=".preg_replace('/./','*',$this->searchPassword),LOG_DEBUG);
$this->result=$this->bindauth($this->searchUser,$this->searchPassword);
if ($this->result)
{
@@ -236,26 +220,45 @@ class Ldap
$this->error=ldap_errno($this->connection).' '.ldap_error($this->connection);
}
}
// Try in anonymous
if (! $this->bind)
else
{
dol_syslog(get_class($this)."::connect_bind try bind on ".$host,LOG_DEBUG);
$result=$this->bind();
if ($result)
// Try in auth mode
if ($this->searchUser && $this->searchPassword)
{
$this->bind=$this->result;
$connected=1;
break;
dol_syslog(get_class($this)."::connect_bind try bindauth on ".$host." user=".$this->searchUser." password=".preg_replace('/./','*',$this->searchPassword),LOG_DEBUG);
$this->result=$this->bindauth($this->searchUser,$this->searchPassword);
if ($this->result)
{
$this->bind=$this->result;
$connected=2;
break;
}
else
{
$this->error=ldap_errno($this->connection).' '.ldap_error($this->connection);
}
}
else
// Try in anonymous
if (! $this->bind)
{
$this->error=ldap_errno($this->connection).' '.ldap_error($this->connection);
dol_syslog(get_class($this)."::connect_bind try bind on ".$host,LOG_DEBUG);
$result=$this->bind();
if ($result)
{
$this->bind=$this->result;
$connected=1;
break;
}
else
{
$this->error=ldap_errno($this->connection).' '.ldap_error($this->connection);
}
}
}
}
}
if (! $connected) $this->close();
if (! $connected) $this->close();
}
}
if ($connected)

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

@@ -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

@@ -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

@@ -1012,6 +1012,9 @@ function getParameterByName(name, valueifnotfound)
}
})();
// Another solution, easier, to build a javascript rounding function
function dolroundjs(number, decimals) { return +(Math.round(number + "e+" + decimals) + "e-" + decimals); }
/**
* Function similar to PHP price2num()
@@ -1024,7 +1027,7 @@ function price2numjs(amount) {
if (amount == '') return '';
<?php
$dec = ',';
$dec = ',';
$thousand = ' ';
if ($langs->transnoentitiesnoconv("SeparatorDecimal") != "SeparatorDecimal") {
$dec = $langs->transnoentitiesnoconv("SeparatorDecimal");
@@ -1032,12 +1035,13 @@ function price2numjs(amount) {
if ($langs->transnoentitiesnoconv("SeparatorThousand") != "SeparatorThousand") {
$thousand = $langs->transnoentitiesnoconv("SeparatorThousand");
}
print "var dec='" . $dec . "'; var thousand='" . $thousand . "';\n"; // Set var in javascript
if ($thousand == 'Space') $thousand=' ';
print "var dec='" . dol_escape_js($dec) . "'; var thousand='" . dol_escape_js($thousand) . "';\n"; // Set var in javascript
?>
var main_max_dec_shown = <?php echo str_replace('.', '', $conf->global->MAIN_MAX_DECIMALS_SHOWN); ?>;
var main_rounding_unit = <?php echo $conf->global->MAIN_MAX_DECIMALS_UNIT; ?>;
var main_rounding_tot = <?php echo $conf->global->MAIN_MAX_DECIMALS_TOT; ?>;
var main_max_dec_shown = <?php echo (int) str_replace('.', '', $conf->global->MAIN_MAX_DECIMALS_SHOWN); ?>;
var main_rounding_unit = <?php echo (int) $conf->global->MAIN_MAX_DECIMALS_UNIT; ?>;
var main_rounding_tot = <?php echo (int) $conf->global->MAIN_MAX_DECIMALS_TOT; ?>;
var amount = amount.toString();
@@ -1050,11 +1054,15 @@ function price2numjs(amount) {
if (nbdec > rounding) rounding = nbdec;
// If rounding higher than max shown
if (rounding > main_max_dec_shown) rounding = main_max_dec_shown;
if (thousand != ',' && thousand != '.') amount = amount.replace(',', '.');
amount = amount.replace(' ', ''); // To avoid spaces
amount = amount.replace(thousand, ''); // Replace of thousand before replace of dec to avoid pb if thousand is .
amount = amount.replace(dec, '.');
return Math.round10(amount, rounding);
//console.log("amount before="+amount+" rouding="+rounding)
var res = Math.round10(amount, - rounding);
// Other solution is
// var res = dolroundjs(amount, rounding)
console.log("res="+res)
return res;
}

View File

@@ -732,17 +732,24 @@ function activateModule($value,$withdeps=1)
if (isset($objMod->depends) && is_array($objMod->depends) && ! empty($objMod->depends))
{
// Activation des modules dont le module depend
$TError=array();
$num = count($objMod->depends);
for ($i = 0; $i < $num; $i++)
{
$activate = false;
foreach ($modulesdir as $dir)
{
if (file_exists($dir.$objMod->depends[$i].".class.php"))
{
activateModule($objMod->depends[$i]);
$activate = true;
}
}
if (!$activate) $TError[] = $langs->trans('activateModuleDependNotSatisfied', $objMod->name, $objMod->depends[$i]);
}
setEventMessages('', $TError, 'errors');
}
if (isset($objMod->conflictwith) && is_array($objMod->conflictwith) && ! empty($objMod->conflictwith))

View File

@@ -79,7 +79,9 @@ function societe_prepare_head(Societe $object)
if (! empty($conf->global->MAIN_SUPPORT_SHARED_CONTACT_BETWEEN_THIRDPARTIES))
{
$head[$h][0] = DOL_URL_ROOT.'/societe/societecontact.php?socid='.$object->id;
$nbContact = count($object->liste_contact(-1,'internal')) + count($object->liste_contact(-1,'external'));
$head[$h][1] = $langs->trans("ContactsAddresses");
if ($nbContact > 0) $head[$h][1].= ' <span class="badge">'.$nbContact.'</span>';
$head[$h][2] = 'contact';
$h++;
}

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);
@@ -436,7 +446,7 @@ function dol_size($size,$type='')
*/
function dol_sanitizeFileName($str,$newstr='_',$unaccent=1)
{
$filesystem_forbidden_chars = array('<','>',':','/','\\','?','*','|','"');
$filesystem_forbidden_chars = array('<','>',':','/','\\','?','*','|','"','°');
return dol_string_nospecial($unaccent?dol_string_unaccent($str):$str, $newstr, $filesystem_forbidden_chars);
}
@@ -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)
{
@@ -5079,7 +5086,7 @@ function complete_head_from_modules($conf,$langs,$object,&$head,&$h,$type,$mode=
if (preg_match('/SUBSTITUTION_([^_]+)/i',$values[2],$reg))
{
$substitutionarray=array();
complete_substitutions_array($substitutionarray,$langs,$object);
complete_substitutions_array($substitutionarray,$langs,$object,array('needforkey'=>$values[2]));
$label=make_substitutions($reg[1], $substitutionarray);
}
else $label=$langs->trans($values[2]);
@@ -5099,7 +5106,7 @@ function complete_head_from_modules($conf,$langs,$object,&$head,&$h,$type,$mode=
if (preg_match('/SUBSTITUTION_([^_]+)/i',$values[2],$reg))
{
$substitutionarray=array();
complete_substitutions_array($substitutionarray,$langs,$object);
complete_substitutions_array($substitutionarray,$langs,$object,array('needforkey'=>$values[2]));
$label=make_substitutions($reg[1], $substitutionarray);
}
else $label=$langs->trans($values[2]);
@@ -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

@@ -1493,6 +1493,7 @@ 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

@@ -318,15 +318,15 @@ function pdfGetHeightForHtmlContent(&$pdf, $htmlcontent)
else
{
for ($page=$start_page; $page <= $end_page; ++$page) {
$this->setPage($page);
$pdf->setPage($page);
if ($page == $start_page) {
// first page
$height = $this->h - $start_y - $this->bMargin;
$height = $pdf->h - $start_y - $pdf->bMargin;
} elseif ($page == $end_page) {
// last page
$height = $end_y - $this->tMargin;
$height = $end_y - $pdf->tMargin;
} else {
$height = $this->h - $this->tMargin - $this->bMargin;
$height = $pdf->h - $pdf->tMargin - $pdf->bMargin;
}
}
}
@@ -1430,7 +1430,10 @@ function pdf_getlineupexcltax($object,$i,$outputlangs,$hidedetails=0)
*/
function pdf_getlineupwithtax($object,$i,$outputlangs,$hidedetails=0)
{
global $hookmanager;
global $hookmanager,$conf;
$sign=1;
if (isset($object->type) && $object->type == 2 && ! empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) $sign=-1;
$result='';
$reshook=0;
@@ -1447,7 +1450,7 @@ function pdf_getlineupwithtax($object,$i,$outputlangs,$hidedetails=0)
}
if (empty($reshook))
{
if (empty($hidedetails) || $hidedetails > 1) $result.=price(($object->lines[$i]->subprice) + ($object->lines[$i]->subprice)*($object->lines[$i]->tva_tx)/100, 0, $outputlangs);
if (empty($hidedetails) || $hidedetails > 1) $result.=price($sign * (($object->lines[$i]->subprice) + ($object->lines[$i]->subprice)*($object->lines[$i]->tva_tx)/100), 0, $outputlangs);
}
return $result;
}
@@ -1751,7 +1754,10 @@ function pdf_getlinetotalexcltax($object,$i,$outputlangs,$hidedetails=0)
*/
function pdf_getlinetotalwithtax($object,$i,$outputlangs,$hidedetails=0)
{
global $hookmanager;
global $hookmanager,$conf;
$sign=1;
if (isset($object->type) && $object->type == 2 && ! empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) $sign=-1;
$reshook=0;
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) )
@@ -1771,7 +1777,7 @@ function pdf_getlinetotalwithtax($object,$i,$outputlangs,$hidedetails=0)
{
return $outputlangs->transnoentities("Option");
}
if (empty($hidedetails) || $hidedetails > 1) $result.=price(($object->lines[$i]->total_ht) + ($object->lines[$i]->total_ht)*($object->lines[$i]->tva_tx)/100, 0, $outputlangs);
if (empty($hidedetails) || $hidedetails > 1) $result.=price($sign * ($object->lines[$i]->total_ht) + ($object->lines[$i]->total_ht)*($object->lines[$i]->tva_tx)/100, 0, $outputlangs);
}
return $result;
}

View File

@@ -970,7 +970,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=
$sql2.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = p.fk_soc";
$sql2.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t ON p.rowid = t.fk_projet";
$sql2.= " WHERE p.rowid IN (".join(',',$arrayidofprojects).")";
$sql2.= " GROUP BY p.rowid, p.ref, p.title, p.fk_soc, p.fk_user_creat, p.public, p.fk_statut, p.fk_opp_status, p.opp_amount";
$sql2.= " GROUP BY p.rowid, p.ref, p.title, p.fk_soc, s.nom, p.fk_user_creat, p.public, p.fk_statut, p.fk_opp_status, p.opp_amount";
$sql2.= " ORDER BY p.title, p.ref";
$var=true;

View File

@@ -305,6 +305,7 @@ function show_list_sending_receive($origin,$origin_id,$filter='')
$expedition->id=$objp->sendingid;
$expedition->fetchObjectLinked($expedition->id,$expedition->element);
//var_dump($expedition->linkedObjects);
$receiving='';
if (count($expedition->linkedObjects['delivery']) > 0) $receiving=reset($expedition->linkedObjects['delivery']); // Take first link

View File

@@ -773,8 +773,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
if (! empty($conf->facture->enabled))
{
$langs->load("bills");
$newmenu->add("/compta/facture/list.php",$langs->trans("BillsCustomers"),0,$user->rights->facture->lire, '', $mainmenu, 'customers_bills');
$newmenu->add("/compta/facture.php?action=create",$langs->trans("NewBill"),1,$user->rights->facture->creer);
$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills",$langs->trans("BillsCustomers"),0,$user->rights->facture->lire, '', $mainmenu, 'customers_bills');
$newmenu->add("/compta/facture.php?action=create&leftmenu=customers_bills",$langs->trans("NewBill"),1,$user->rights->facture->creer);
$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills",$langs->trans("List"),1,$user->rights->facture->lire);
if (empty($leftmenu) || ($leftmenu == 'customers_bills'))

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

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

View File

@@ -110,6 +110,7 @@ class pdf_rouget extends ModelePdfExpedition
$outputlangs->load("propal");
$outputlangs->load("deliveries");
$outputlangs->load("sendings");
$outputlangs->load("productbatch");
$nblignes = count($object->lines);

View File

@@ -299,9 +299,11 @@ class pdf_standard extends ModeleExpenseReport
$showpricebeforepagebreak=1;
$pdf->SetFont('','', $default_font_size - 1);
// Accountancy piece
$pdf->SetXY($this->posxpiece, $curY);
$pdf->MultiCell($this->posxcomment-$this->posxpiece-0.8, 4, $piece_comptable, 0, 'C');
$pdf->writeHTMLCell($this->posxcomment-$this->posxpiece-0.8, 4, $this->posxpiece-1, $curY, $piece_comptable, 0, 1);
// Comments
$pdf->SetXY($this->posxcomment, $curY);
@@ -537,7 +539,7 @@ class pdf_standard extends ModeleExpenseReport
$pdf->SetFont('','B', $default_font_size + 4);
$pdf->SetXY($posx,$posy);
$pdf->SetTextColor(0,0,60);
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$posx,6,$langs->trans("ExpenseReport"), 0, 'L');
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$posx,6,$langs->trans("ExpenseReport"), 0, 'R');
$pdf->SetFont('','', $default_font_size -1);
@@ -545,19 +547,19 @@ class pdf_standard extends ModeleExpenseReport
$posy+=8;
$pdf->SetXY($posx,$posy);
$pdf->SetTextColor(0,0,60);
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$posx, 3, $outputlangs->transnoentities("Ref")." : " . $object->ref, '', 'L');
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$posx, 3, $outputlangs->transnoentities("Ref")." : " . $object->ref, '', 'R');
// Date start period
$posy+=5;
$pdf->SetXY($posx,$posy);
$pdf->SetTextColor(0,0,60);
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$posx, 3, $outputlangs->transnoentities("DateStart")." : " . ($object->date_debut>0?dol_print_date($object->date_debut,"day",false,$outpulangs):''), '', 'L');
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$posx, 3, $outputlangs->transnoentities("DateStart")." : " . ($object->date_debut>0?dol_print_date($object->date_debut,"day",false,$outpulangs):''), '', 'R');
// Date end period
$posy+=5;
$pdf->SetXY($posx,$posy);
$pdf->SetTextColor(0,0,60);
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$posx, 3, $outputlangs->transnoentities("DateEnd")." : " . ($object->date_fin>0?dol_print_date($object->date_fin,"day",false,$outpulangs):''), '', 'L');
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$posx, 3, $outputlangs->transnoentities("DateEnd")." : " . ($object->date_fin>0?dol_print_date($object->date_fin,"day",false,$outpulangs):''), '', 'R');
// Status Expense Report
$posy+=6;

View File

@@ -337,6 +337,11 @@ class pdf_crabe extends ModelePDFFactures
$height_incoterms = 0;
if ($conf->incoterm->enabled)
{
if (is_object($object->thirdparty))
{
$object->fk_incoterms=$object->thirdparty->fk_incoterms;
$object->location_incoterms=$object->thirdparty->location_incoterms;
}
$desc_incoterms = $object->getIncotermsForPDF();
if ($desc_incoterms)
{
@@ -539,13 +544,16 @@ class pdf_crabe extends ModelePDFFactures
$pdf->SetXY($this->postotalht, $curY);
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalht, 3, $total_excl_tax, 0, 'R', 0);
$sign=1;
if (isset($object->type) && $object->type == 2 && ! empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) $sign=-1;
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
$prev_progress = $object->lines[$i]->get_prev_progress($object->id);
if ($prev_progress > 0) // Compute progress from previous situation
{
$tvaligne = $object->lines[$i]->total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent;
$tvaligne = $sign * $object->lines[$i]->total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent;
} else {
$tvaligne = $object->lines[$i]->total_tva;
$tvaligne = $sign * $object->lines[$i]->total_tva;
}
$localtax1ligne=$object->lines[$i]->total_localtax1;

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

@@ -69,7 +69,7 @@ class modProductBatch extends DolibarrModules
$this->config_page_url = array();
// Dependencies
$this->depends = array("modProduct","modStock","modExpedition","modSupplier"); // List of modules id that must be enabled if this module is enabled. modExpedition is required to manage batch exit (by manual stock decrease on shipment), modSupplier to manage batch entry (after supplier order).
$this->depends = array("modProduct","modStock","modExpedition","modFournisseur"); // List of modules id that must be enabled if this module is enabled. modExpedition is required to manage batch exit (by manual stock decrease on shipment), modSupplier to manage batch entry (after supplier order).
$this->requiredby = array(); // List of modules id to disable if this one is disabled
$this->phpmin = array(5,0); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(3,0); // Minimum version of Dolibarr required by module

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

@@ -415,6 +415,7 @@ class doc_generic_task_odt extends ModelePDFTask
}
$project= new Project($this->db);
$project->fetch($object->fk_project);
$project->fetch_thirdparty();
$dir = $conf->projet->dir_output. "/" . $project->ref. "/";
$objectref = dol_sanitizeFileName($object->ref);
@@ -449,7 +450,7 @@ class doc_generic_task_odt extends ModelePDFTask
dol_mkdir($conf->projet->dir_temp);
$socobject=$object->thirdparty;
$socobject=$project->thirdparty;
// Make substitution
$substitutionarray=array(

View File

@@ -381,6 +381,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
$tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_other,$array_thirdparty_contact);
complete_substitutions_array($tmparray, $outputlangs, $object);
$object->fetch_optionals();
// Call the ODTSubstitution hook
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray);
$reshook=$hookmanager->executeHooks('ODTSubstitution',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks

View File

@@ -647,7 +647,10 @@ class pdf_azur extends ModelePDFPropales
*/
// Customer signature area
$posy=$this->_signature_area($pdf, $object, $posy, $outputlangs);
if (empty($conf->global->PROPAL_DISABLE_SIGNATURE))
{
$posy=$this->_signature_area($pdf, $object, $posy, $outputlangs);
}
// Pied de page
$this->_pagefoot($pdf,$object,$outputlangs);
@@ -710,7 +713,7 @@ class pdf_azur extends ModelePDFPropales
if (file_exists($infile) && is_readable($infile)) {
$pagecount = $pdf->setSourceFile($infile);
for($i = 1; $i <= $pagecount; $i ++) {
$tplIdx = $pdf->importPage(1);
$tplIdx = $pdf->importPage($i);
if ($tplIdx!==false) {
$s = $pdf->getTemplatesize($tplIdx);
$pdf->AddPage($s['h'] > $s['w'] ? 'P' : 'L');

View File

@@ -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>";
}
@@ -739,9 +739,9 @@ if (! empty($id) && $action != 'edit')
// Delete
if ($user->rights->don->supprimer)
{
if ($don->statut == -1 || $don->statut == 0)
if ($object->statut == -1 || $object->statut == 0)
{
print '<div class="inline-block divButAction"><a class="butActionDelete" href="card.php?rowid='.$don->id.'&action=delete">'.$langs->trans("Delete")."</a></div>";
print '<div class="inline-block divButAction"><a class="butActionDelete" href="card.php?rowid='.$object->id.'&action=delete">'.$langs->trans("Delete")."</a></div>";
}
else
{

View File

@@ -4,6 +4,7 @@
* Copyright (C) 2009 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 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
@@ -633,7 +634,7 @@ class Don extends CommonObject
$this->town = $obj->town;
$this->zip = $obj->zip;
$this->town = $obj->town;
$this->country_id = $obj->country_id;
$this->country_id = $obj->fk_country;
$this->country_code = $obj->country_code;
$this->country = $obj->country;
$this->country_olddata= $obj->country_olddata; // deprecated

View File

@@ -175,10 +175,9 @@ if ($action == 'confirm_deletefile')
dol_print_error($db,$ecmdir->error);
exit;
}
$relativepath=$ecmdir->getRelativePath();
}
else $relativepath='';
$upload_dir = $conf->ecm->dir_output.($relativepath?'/'.$relativepath:'');
$upload_dir = $conf->ecm->dir_output;
$file = $upload_dir . "/" . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_POST are already decoded by PHP).
$ret=dol_delete_file($file);

View File

@@ -874,7 +874,8 @@ class Expedition extends CommonObject
$product_type=$product->type;
if ($product_type == 0 && $product_stock < $qty)
{
$this->error=$langs->trans('ErrorStockIsNotEnough');
$langs->load("errors");
$this->error=$langs->trans('ErrorStockIsNotEnoughToAddProductOnShipment', $product->ref);
$this->db->rollback();
return -3;
}
@@ -930,7 +931,8 @@ class Expedition extends CommonObject
if ($prod_batch->qty < $linebatch->dluo_qty)
{
$this->errors[] = $langs->trans('ErrorStockIsNotEnough');
$langs->load("errors");
$this->errors[]=$langs->trans('ErrorStockIsNotEnoughToAddProductOnShipment', $prod_batch->fk_product);
dol_syslog(get_class($this)."::addline_batch error=Product ".$prod_batch->batch.": ".$this->errorsToString(), LOG_ERR);
$this->db->rollback();
return -1;
@@ -1264,7 +1266,7 @@ class Expedition extends CommonObject
$sql = "SELECT cd.rowid, cd.fk_product, cd.label as custom_label, cd.description, cd.qty as qty_asked";
$sql.= ", cd.total_ht, cd.total_localtax1, cd.total_localtax2, cd.total_ttc, cd.total_tva";
$sql.= ", cd.tva_tx, cd.localtax1_tx, cd.localtax2_tx, cd.price, cd.subprice, cd.remise_percent";
$sql.= ", cd.tva_tx, cd.localtax1_tx, cd.localtax2_tx, cd.price, cd.subprice, cd.remise_percent,cd.buy_price_ht as pa_ht";
$sql.= ", ed.rowid as line_id, ed.qty as qty_shipped, ed.fk_origin_line, ed.fk_entrepot";
$sql.= ", p.ref as product_ref, p.label as product_label, p.fk_product_type";
$sql.= ", p.weight, p.weight_units, p.length, p.length_units, p.surface, p.surface_units, p.volume, p.volume_units, p.tobatch as product_tobatch";
@@ -1334,6 +1336,8 @@ class Expedition extends CommonObject
$line->volume = $obj->volume;
$line->volume_units = $obj->volume_units;
$line->pa_ht = $obj->pa_ht;
// For invoicing
$tabprice = calcul_price_total($obj->qty_shipped, $obj->subprice, $obj->remise_percent, $obj->tva_tx, $obj->localtax1_tx, $obj->localtax2_tx, 0, 'HT', $obj->info_bits, $obj->fk_product_type, $mysoc); // We force type to 0
$line->desc = $obj->description; // We need ->desc because some code into CommonObject use desc (property defined for other elements)

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

@@ -819,7 +819,7 @@ if ($action == 'set_paid' && $id > 0 && $user->rights->expensereport->to_paid)
}
}
if ($action == "addline")
if ($action == "addline" && $user->rights->expensereport->creer)
{
$error = 0;
@@ -911,7 +911,7 @@ if ($action == "addline")
$action='';
}
if ($action == 'confirm_delete_line' && GETPOST("confirm") == "yes")
if ($action == 'confirm_delete_line' && GETPOST("confirm") == "yes" && $user->rights->expensereport->creer)
{
$object = new ExpenseReport($db);
$object->fetch($id);
@@ -954,7 +954,7 @@ if ($action == 'confirm_delete_line' && GETPOST("confirm") == "yes")
}
}
if ($action == "updateligne" )
if ($action == "updateligne" && $user->rights->expensereport->creer)
{
$object = new ExpenseReport($db);
$object->fetch($id);
@@ -1640,8 +1640,11 @@ else
print '<td style="text-align:right;">'.$langs->trans('AmountHT').'</td>';
print '<td style="text-align:right;">'.$langs->trans('AmountTTC').'</td>';
}
print '<td style="text-align:right;"></td>';
// Ajout des boutons de modification/suppression
if (($object->fk_statut < 2 || $object->fk_statut == 99) && $user->rights->expensereport->creer)
{
print '<td style="text-align:right;"></td>';
}
print '</tr>';
$var=true;
@@ -1682,7 +1685,7 @@ else
// Ajout des boutons de modification/suppression
print '<td style="text-align:right;" class="nowrap">';
if($object->fk_statut<2 OR $object->fk_statut==99)
if (($object->fk_statut < 2 || $object->fk_statut == 99) && $user->rights->expensereport->creer)
{
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=editline&amp;rowid='.$objp->rowid.'#'.$objp->rowid.'">';
print img_edit();
@@ -1768,7 +1771,7 @@ else
//print '</div>';
// Add a line
if (($object->fk_statut==0 || $object->fk_statut==99) && $action != 'editline')
if (($object->fk_statut==0 || $object->fk_statut==99) && $action != 'editline' && $user->rights->expensereport->creer)
{
print '<tr class="liste_titre">';
print '<td colspan="2"></td>';

View File

@@ -1768,6 +1768,7 @@ class ExpenseReportLine
// Clean parameters
$this->comments=trim($this->comments);
$this->vatrate = price2num($this->vatrate);
$this->value_unit = price2num($this->value_unit);
$this->db->begin();

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

@@ -57,6 +57,9 @@ if ($action == 'add_payment')
exit;
}
$expensereport = new ExpenseReport($db);
$expensereport->fetch($chid);
$datepaid = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
if (! $_POST["fk_typepayment"] > 0)
@@ -85,8 +88,7 @@ if ($action == 'add_payment')
{
if (substr($key,0,7) == 'amount_')
{
$other_chid = substr($key,7);
$amounts[$other_chid] = price2num($_POST[$key]);
$amounts[$expensereport->fk_user_author] = price2num($_POST[$key]);
$total += price2num($_POST[$key]);
}
}

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.2');
if (! defined('DOL_VERSION')) define('DOL_VERSION','3.9.4');
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

@@ -89,9 +89,11 @@ if ($idprod > 0)
}
}
// Add price for pmp
$price=$producttmp->pmp;
$prices[] = array("id" => 'pmpprice', "price" => price2num($price), "label" => $langs->trans("PMPValueShort").': '.price($price,0,$langs,0,0,-1,$conf->currency), "title" => $langs->trans("PMPValueShort").': '.price($price,0,$langs,0,0,-1,$conf->currency)); // For price field, we must use price2num(), for label or title, price()
if(!empty($conf->stock->enabled)) {
// Add price for pmp
$price=$producttmp->pmp;
$prices[] = array("id" => 'pmpprice', "price" => price2num($price), "label" => $langs->trans("PMPValueShort").': '.price($price,0,$langs,0,0,-1,$conf->currency), "title" => $langs->trans("PMPValueShort").': '.price($price,0,$langs,0,0,-1,$conf->currency)); // For price field, we must use price2num(), for label or title, price()
}
}
echo json_encode($prices);

View File

@@ -379,6 +379,17 @@ if ($object->id > 0)
}
// TODO move to DAO class
$sql = "SELECT count(p.rowid) as total";
$sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as p ";
$sql.= " WHERE p.fk_soc =".$object->id;
$sql.= " AND p.entity =".$conf->entity;
$resql=$db->query($sql);
if ($resql)
{
$object_count = $db->fetch_object($resql);
$num = $object_count->total;
}
$sql = "SELECT p.rowid,p.ref, p.date_commande as dc, p.fk_statut, p.total_ht, p.tva as total_tva, p.total_ttc";
$sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as p ";
$sql.= " WHERE p.fk_soc =".$object->id;
@@ -389,7 +400,6 @@ if ($object->id > 0)
if ($resql)
{
$i = 0 ;
$num = $db->num_rows($resql);
if ($num > 0)
{
@@ -405,7 +415,7 @@ if ($object->id > 0)
}
$var = True;
while ($i < $num && $i <= $MAXLIST)
while ($i < $num && $i < $MAXLIST)
{
$obj = $db->fetch_object($resql);
$var=!$var;

View File

@@ -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,";
@@ -313,7 +315,7 @@ class CommandeFournisseur extends CommonOrder
$line->date_end = $this->db->jdate($objp->date_end);
$line->fk_unit = $objp->fk_unit;
$this->special_line = $objp->special_line;
$this->special_code = $objp->special_code;
$this->fk_parent_line = $objp->fk_parent_line;
$this->rang = $objp->rang;
@@ -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
{
@@ -2371,7 +2375,7 @@ class CommandeFournisseur extends CommonOrder
$response = new WorkboardResponse();
$response->warning_delay=$conf->commande->fournisseur->warning_delay/60/60/24;
$response->label=$langs->trans("SuppliersOrdersToProcess");
$response->url=DOL_URL_ROOT.'/fourn/commande/list.php?statut=1,2,3';
$response->url=DOL_URL_ROOT.'/fourn/commande/list.php?statut=1,2,3&mainmenu=commercial&leftmenu=orders_suppliers';
$response->img=img_object($langs->trans("Orders"),"order");
while ($obj=$this->db->fetch_object($resql))

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