2
0
forked from Wavyzz/dolibarr

Compare commits

...

676 Commits

Author SHA1 Message Date
Laurent Destailleur
fd0cd7257c Merge branch '3.2' of git@github.com:Dolibarr/dolibarr.git into 3.2 2012-09-11 01:17:05 +02:00
Laurent Destailleur
b36b56b7a1 Add PHPUnit test to validate calcul_price function for spain. 2012-09-11 01:00:40 +02:00
Laurent Destailleur
4a111234a0 Fix: removed warning 2012-09-10 15:43:58 +02:00
Laurent Destailleur
e2d71b3215 Doc 2012-09-10 10:24:56 +02:00
simnandez
0fbd626822 Fix: use $ldap instead $this 2012-09-10 09:52:44 +02:00
Laurent Destailleur
a79d440a9b Fix: Var not used 2012-09-10 09:52:35 +02:00
Laurent Destailleur
78deb405b2 Fix: Use bad param name 2012-09-09 15:28:43 +02:00
Laurent Destailleur
5046c20b81 Fix: Bad name of var 2012-09-09 15:11:02 +02:00
Regis Houssin
8b28893fbe Fix: GET and POST treatment in dol_loginfunction() 2012-09-08 15:17:24 +02:00
Regis Houssin
c4f3e872ca Fix: GETPOST is already in method 2012-09-08 13:26:25 +02:00
Laurent Destailleur
f0cfbb8b0d Sec: XSS hole
Conflicts:
	htdocs/core/tpl/login.tpl.php
2012-09-08 13:22:02 +02:00
Regis Houssin
0511ba87f4 Fix: [ bug #533 ] 2012-09-06 15:15:47 +02:00
Regis Houssin
04d5a41e9c Fix: [ bug #533 ] Using quotes in intervention sheet description leads
to empty description
2012-09-06 12:53:29 +02:00
Regis Houssin
62c3f04392 Fix: broken feature, enable source details by default 2012-09-06 12:39:27 +02:00
Regis Houssin
feaf5266e9 New: add possibility to force entity in login page 2012-09-05 19:23:46 +02:00
Laurent Destailleur
2b75c81af9 Merge pull request #368 from simnandez/3.2
Fix: Localtaxes unit prices precision
2012-09-05 01:36:12 -07:00
Laurent Destailleur
d3986b4936 Fix: PHP 5.2 compatibility
Conflicts:
	htdocs/filefunc.inc.php
2012-09-05 10:16:23 +02:00
simnandez
9c08abb52c Fix: Localtaxes unit prices precision 2012-09-05 09:51:44 +02:00
Laurent Destailleur
185c03eea5 Fix: We must use shipping address and not the invoice address 2012-09-04 23:10:10 +02:00
Regis Houssin
9614881bed Fix: for use with command line 2012-09-04 12:30:38 +02:00
Regis Houssin
dbb62f010d Fix: add distinct for avoid double record 2012-09-04 11:53:00 +02:00
Regis Houssin
8de657a215 Fix: comaptibility with multicompany and transverse mode 2012-09-04 11:11:48 +02:00
Regis Houssin
e20b0b2e7b Fix: missing upgrade with minor version 2012-09-03 16:27:16 +02:00
Laurent Destailleur
21ad42afab Fix: Parameters at wrong place. 2012-09-03 10:19:21 +02:00
Laurent Destailleur
99b33a70a3 For 3.2.2 2012-09-02 15:28:53 +02:00
Laurent Destailleur
dfda863b7e Update files for 3.2.2 2012-09-02 15:21:43 +02:00
Laurent Destailleur
37f866c31f Update changelog 2012-09-02 15:17:59 +02:00
Laurent Destailleur
7a3f6b9acc Fix: error report when duplicate product 2012-09-02 15:10:37 +02:00
Laurent Destailleur
de7b060e12 Works on larger screens 2012-09-02 14:44:28 +02:00
Laurent Destailleur
f25802520a Fix: Avoid repeat of img 2012-09-02 14:33:22 +02:00
Laurent Destailleur
a7d6289d4b Fix: edit of percentage
Conflicts:
	htdocs/comm/action/fiche.php
2012-09-02 14:27:00 +02:00
Regis Houssin
d12700aeab Fix: for compatibility and avoid error if external module use
$conf->module_parts
2012-09-02 12:28:36 +02:00
Regis Houssin
77688cf988 Fix: comptibility between bureau2crea theme and multicompany module 2012-09-02 11:52:10 +02:00
Regis Houssin
b66aeabb88 Fix: broken features and uniformize code 2012-09-02 09:25:40 +02:00
Regis Houssin
49ae52c708 Merge pull request #366 from simnandez/3.2
Fix: Modify spanish VAT to new rates
2012-09-01 09:31:18 -07:00
simnandez
9fbd6f0b58 Fix: Modify spanish VAT to new rates 2012-09-01 18:25:46 +02:00
simnandez
433ca88c43 Merge branch '3.2' of git://github.com/Dolibarr/dolibarr.git into 3.2 2012-09-01 18:24:11 +02:00
Regis Houssin
aa65ebe136 Fix: this field is for 3.3 2012-09-01 18:07:50 +02:00
Regis Houssin
43a8b9176f Fix: missing query 2012-09-01 17:55:50 +02:00
simnandez
6e12d84f14 Fix: Modify spanish VAT to new rates 2012-09-01 16:39:47 +02:00
Laurent Destailleur
1eac98dc43 Merge branch '3.2' of https://github.com/Dolibarr/dolibarr.git into 3.2 2012-08-31 12:47:24 +02:00
Laurent Destailleur
6691bef701 Fix: Start and end date not saved at project creation 2012-08-31 12:44:55 +02:00
Regis Houssin
24cc745ae8 Fix: update virtualmin script 2012-08-31 11:52:33 +02:00
Laurent Destailleur
7a42514833 Fix: bug for default vat definition 2012-08-30 21:14:30 +02:00
Laurent Destailleur
749f371d4e Merge pull request #360 from GPCsolutions/3.2-lang
FIXED: Spelling mistakes in the french translation of product/admin/prod...
2012-08-30 10:41:30 -07:00
Laurent Destailleur
bee6b92a7b Fix: Bad test 2012-08-30 16:55:59 +02:00
Laurent Destailleur
36ff4abe3c Fix: enhance cleaning of database 2012-08-30 16:52:20 +02:00
Cédric Salvador
6012dff11e FIXED: Spelling mistakes in the french translation of product/admin/product_extrafields.php 2012-08-29 18:58:27 +02:00
Laurent Destailleur
5f197cb1bb Fix: Packaging for 3.2.1 of zip 2012-08-29 12:39:40 +02:00
Laurent Destailleur
6c62b64b7c Fix: Test on ref and ref_ext into webservice 2012-08-29 10:21:25 +02:00
Laurent Destailleur
d4ac506d66 Missing translation key 2012-08-28 22:33:40 +02:00
Laurent Destailleur
e5c2d07c53 Merge branch '3.2' of https://github.com/Dolibarr/dolibarr.git into 3.2 2012-08-28 18:42:39 +02:00
Laurent Destailleur
05de9c19c3 Fix: permission for a user to view its own card using webservice 2012-08-28 18:39:34 +02:00
Regis Houssin
5c2ce8a301 Merge pull request #354 from marcosgdf/missing-licensing
Added me to the COPYRIGHT file
2012-08-27 22:55:51 -07:00
Marcos García
849dc8c836 Added me to the COPYRIGHT file 2012-08-28 07:08:10 +02:00
Laurent Destailleur
bdc330ad6a Merge pull request #351 from simnandez/3.2
Fix: Bad assignation of const for pdf delivery module name
2012-08-27 03:36:03 -07:00
simnandez
85eedfa6e7 Fix: Bad assignation of const for pdf delivery module name 2012-08-27 08:52:10 +02:00
Laurent Destailleur
e121ab8c86 [ bug #512 ] Filter system not working in banks > account > transactions
Conflicts:
	htdocs/compta/bank/account.php
2012-08-26 19:33:32 +02:00
Laurent Destailleur
fe76902342 Fix: Bad field 2012-08-26 13:15:51 +02:00
Laurent Destailleur
9142e3400b Fix: [ bug #254 ] Database backup not working with complex passwords 2012-08-26 00:52:10 +02:00
Regis Houssin
87cc60d647 Revert "Fix: remove obsolete code"
This reverts commit c5728843a5.
2012-08-25 10:59:58 +02:00
Regis Houssin
c5728843a5 Fix: remove obsolete code
Conflicts:
	htdocs/admin/expedition.php
2012-08-25 10:59:41 +02:00
Regis Houssin
e260997e0b Merge pull request #345 from simnandez/3.2
Fix: Bad assignation of const for pdf delivery module name
2012-08-25 01:32:39 -07:00
simnandez
fef04f6921 Fix: Bad assignation of const for pdf delivery module name 2012-08-24 18:03:03 +02:00
simnandez
bc2411098c Fix: Bad assignation of const for pdf delivery module name 2012-08-24 17:45:44 +02:00
simnandez
0dafeb8e44 Fix: Bad assignation of const for pdf delivery module name 2012-08-24 17:30:22 +02:00
simnandez
084efd03a3 Fix: Bad assignation of const for pdf delivery module name 2012-08-24 17:26:36 +02:00
Regis Houssin
61372f4650 Fix: rename for security raison 2012-08-23 18:14:02 +02:00
Regis Houssin
049e588341 Fix: move barcode type entries in module descriptor for best
compatibility with multicompany
2012-08-22 17:46:11 +02:00
Regis Houssin
2d15b64f24 Fix: wrong ereg 2012-08-21 11:46:50 +02:00
Laurent Destailleur
6bab2e0bd8 Fix: The backto use bad url. 2012-08-20 14:17:29 +02:00
Regis Houssin
f425762e9d Fix: missing show field if "in progress" is chosen first 2012-08-20 08:21:05 +02:00
Regis Houssin
81970b8dd0 Fix: avoid warning "is not a legal ECMA-262 octal constant" 2012-08-20 08:12:51 +02:00
Regis Houssin
6e3404a231 Merge pull request #333 from marcosgdf/changelog
Added missing changelog entry
2012-08-19 22:48:27 -07:00
Marcos García
2b0e420618 Added missing changelog entry 2012-08-20 02:50:34 +02:00
Laurent Destailleur
cb96735f50 Fix: [ bug #506 ] Can't set percentage of a started event 2012-08-20 02:16:53 +02:00
Laurent Destailleur
fb2fd71ff4 Merge branch '3.2' of https://github.com/Dolibarr/dolibarr.git into 3.2 2012-08-20 02:16:26 +02:00
Regis Houssin
6c2d9baeb5 Fix: remove old accountancy code, can cause blank screen 2012-08-20 00:34:06 +02:00
Laurent Destailleur
cef55097ea Fix: Default value was not defined 2012-08-20 00:29:13 +02:00
Marcos García
552c82a032 Fixed bug #504
https://doliforge.org/tracker/?func=detail&aid=504&atid=246&group_id=144
2012-08-19 07:51:51 +02:00
Regis Houssin
2355f83295 Merge pull request #326 from marcosgdf/changelog
Added missing changelog entries
2012-08-18 09:56:26 -07:00
Marcos García
b2fa4b3f49 Added missing changelog entries 2012-08-18 18:05:53 +02:00
Regis Houssin
d6f1f870a2 Fix: bad rights 2012-08-18 10:51:13 +02:00
Regis Houssin
2e38300ec4 Fix: [ bug #501 ] Error while trying to modify an user 2012-08-18 10:16:25 +02:00
Regis Houssin
5f8530d0c0 Fix: [ bug #503 ] Unable to delete linked file to a deposit
Conflicts:
	htdocs/compta/paiement/cheque/fiche.php
2012-08-18 09:01:17 +02:00
Marcos García
2bd7dc68d3 Project::setClose wasn't setting the new status 2012-08-18 07:35:55 +02:00
Marcos García
173ff4f92a Fixed a bug where files were not being uploaded to a project's task
Reported by Jose Antonio Garcia in dolibarr.es' forum
http://www.dolibarr.es/index.php/foro/7-bugs-versiones-estables/1250-error-subir-archivo-en-una-tarea-de-un-proyecto

Conflicts:
	htdocs/projet/tasks/document.php
2012-08-18 07:35:39 +02:00
Marcos García
1f9e0d3e00 Translated message was generating an incomplete string 2012-08-17 20:19:10 +02:00
Laurent Destailleur
594d5ee216 Merge pull request #311 from marcosgdf/changelog
Missing changelog entry
2012-08-15 13:00:28 -07:00
Marcos García
2130b9715c Missing changelog entry 2012-08-15 15:58:36 +02:00
Regis Houssin
b2ff7b5ea1 Fix: limit to products and services 2012-08-15 10:35:15 +02:00
Marcos García
f03e0965e2 Forgot to rename the variable 2012-08-15 07:32:10 +02:00
Marcos García
acb9380f1c Fixed a problem with supplier's orders stats
They were showing orders even if they were not approved or ordered

Conflicts:
	htdocs/commande/class/commandestats.class.php
2012-08-15 07:31:55 +02:00
Marcos García
40660482d4 Fixed more average amount graph stats. They include:
* Customer's orders
* Supplier's orders
* Customer's invoices
* Trips and expense

Conflicts:
	htdocs/commande/stats/index.php
2012-08-15 07:30:28 +02:00
Regis Houssin
f1cbb10edc Fix: wrong user count 2012-08-14 19:52:51 +02:00
Marcos García
640f001bba Propal stats weren't showing average total for more than 1 year
Conflicts:
	htdocs/comm/propal/stats/index.php
	htdocs/core/class/stats.class.php
2012-08-14 16:30:16 +02:00
Regis Houssin
7b671815e0 Merge pull request #305 from marcosgdf/missing-changelog-entry
Missing changelog entry
2012-08-14 02:22:19 -07:00
Marcos García
cb1e1be0d3 Missing changelog entry 2012-08-14 11:06:16 +02:00
Marcos García
78a26d61ad Fixed bug #485
Merged patch from J. Fernando Lagrange (lowmemory)
https://doliforge.org/tracker/?func=detail&aid=485&atid=246&group_id=144
2012-08-14 10:23:38 +02:00
Laurent Destailleur
ff2dc246eb Update pad files 2012-08-11 13:02:44 +02:00
Laurent Destailleur
7e0b500d75 Update doc 2012-08-11 03:57:55 +02:00
Laurent Destailleur
3670cfd966 Fix: Broken feautres after migration from old versions 2012-08-10 19:16:53 +02:00
Laurent Destailleur
d090788caa Fix: Do not run request if param is empty 2012-08-08 14:08:37 +02:00
Laurent Destailleur
db4240afad Fix: Do not overwrite global $user information 2012-08-08 09:23:57 +02:00
Raphaël Doursenaud
34673e220d Fix: Display correct user in project tasks' time spent list
Use a local object rather than modifying the global $user object (sic!)
2012-08-08 09:21:29 +02:00
Laurent Destailleur
7f7fa693f3 Merge branch '3.2' of git@github.com:Dolibarr/dolibarr.git into 3.2 2012-08-08 04:09:25 +02:00
Laurent Destailleur
4786ab9268 Fix: Specimen generation fails 2012-08-08 04:06:19 +02:00
Laurent Destailleur
0db0ab34b4 [ bug #480 ] Can't receive to stock with strict mode 2012-08-07 19:36:34 +02:00
Laurent Destailleur
69b65de41b Fix: Missing desc field 2012-08-07 19:11:26 +02:00
Laurent Destailleur
0f2a1a854b Fix: autoselect when it should not 2012-08-07 18:59:07 +02:00
Laurent Destailleur
32a7747440 Fix: Delete all files (PROV* when validating. 2012-08-07 16:05:00 +02:00
Regis Houssin
0a8ae2934d Fix: remove unused file and missing print 2012-08-06 20:41:17 +02:00
Regis Houssin
afeabd44f0 Fix: update jquery fileupload 2012-08-06 19:06:11 +02:00
Regis Houssin
99e234d703 Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-08-06 17:41:06 +02:00
Regis Houssin
117cd337dd Fix: missing object 2012-08-06 17:39:56 +02:00
Regis Houssin
4f5432160d Fix: remove draft status if invoice is validated 2012-08-06 09:14:44 +02:00
Laurent Destailleur
92624d650f Fix into categorie functions 2012-08-05 23:59:13 +02:00
Laurent Destailleur
8b2f1eee13 Fix: W3C 2012-08-05 22:01:26 +02:00
Regis Houssin
96726c1c9b Fix: function setEventMessage() not in 3.2 2012-08-05 21:18:36 +02:00
Regis Houssin
bbe270d4bf Fix: missing delete shipping and delivery files
(minimum for possibility to merge with 3.2)

Conflicts:
	htdocs/core/modules/livraison/modules_livraison.php
	htdocs/livraison/class/livraison.class.php
2012-08-05 20:42:06 +02:00
Regis Houssin
bb74a63d59 Fix: delete pdf if supplier invoice is deleted
Fix: compatibility with external modules
(minimum for 3.2)
2012-08-05 18:37:48 +02:00
Regis Houssin
b1f3dbd45e Fix: indentation 2012-08-05 18:37:34 +02:00
Regis Houssin
da8bc79c6d Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-08-05 18:37:17 +02:00
Regis Houssin
54134e3d19 Fix: compatibility with jquery fileupload 2012-08-05 18:36:59 +02:00
Laurent Destailleur
fa4c69c52f Merge branch '3.2' of git@github.com:Dolibarr/dolibarr.git into 3.2 2012-08-05 14:55:21 +02:00
Laurent Destailleur
e1f57b60e3 Qual: Removed bad herit 2012-08-05 14:46:24 +02:00
Regis Houssin
da29ea89a7 Fix: avoid warning with php 5.4 2012-08-05 14:34:37 +02:00
Laurent Destailleur
fe672e1e4b Merge branch '3.2' of git@github.com:Dolibarr/dolibarr.git into 3.2 2012-08-05 00:46:39 +02:00
Laurent Destailleur
be4960cfbb Fix: exit code when upgrade is ran from command line 2012-08-05 00:46:10 +02:00
Regis Houssin
e4f7df25b0 Fix: remove unused code for avoid warning with IE9 2012-08-04 13:52:02 +02:00
Laurent Destailleur
17c45208d3 Fix: Prepare 3.2.1 version 2012-08-03 23:57:17 +02:00
Laurent Destailleur
6a4f03eab3 Prepare 3.2.1 2012-08-03 19:27:50 +02:00
Laurent Destailleur
3778d206ac Fix: project validation 2012-08-03 19:05:49 +02:00
Laurent Destailleur
f4c9da5e9f Fix: Bad object 2012-08-03 18:53:31 +02:00
Laurent Destailleur
a2641b89e7 Fix: Bad fix 2012-08-03 18:43:30 +02:00
Laurent Destailleur
983c38a33d Fix: tr_TR 2012-08-03 17:10:59 +02:00
Regis Houssin
899f4df9ed Fix: [bug #478] Can access pages belonging to disabled modules 2012-08-03 11:58:33 +02:00
Regis Houssin
ae0a746510 Fix: bad document path with multicompany 2012-08-01 19:35:55 +02:00
Regis Houssin
f6afc75d96 Fix: avoid errors if install directory is deleted before module
activation
2012-08-01 14:43:28 +02:00
Regis Houssin
a2db2c5012 Fix: regression (multicompany) 2012-08-01 13:04:32 +02:00
Laurent Destailleur
ae6e3ad5c4 [ bug #464 ] Payment form should allow to add transmitter for bank transfers 2012-07-31 13:44:58 +02:00
Laurent Destailleur
e15834dae2 Fix: Removing chekstyle warning helps me to find real bugs 2012-07-29 15:27:37 +02:00
Laurent Destailleur
8a77ffe58f Fix: Removing chekstyle warning helps me to find real bugs 2012-07-29 15:08:03 +02:00
Marcos García
498ac04ad1 Typo in es_ES translation 2012-07-28 18:39:27 +02:00
Regis Houssin
c77ecc15c9 Fix: reorder include 2012-07-28 09:59:30 +02:00
Regis Houssin
2a1c6422ac Merge pull request #263 from marcosgdf/minor
Duplicated code
2012-07-28 00:32:08 -07:00
Marcos García
4ff5f1bf1c Duplicated code 2012-07-27 23:50:36 +02:00
Regis Houssin
a37035c862 Fix: uniformize code 2012-07-27 14:14:26 +02:00
Regis Houssin
cbb5ca229a Merge pull request #259 from FHenry/3.2
Correct bug 472
2012-07-27 05:12:16 -07:00
Raphaël Doursenaud
954f46ec62 Fix: Allows to use a comma decimal separator in supplier invoices
payments
2012-07-27 13:55:25 +02:00
FHenry
9798ddad80 Correct bug 472 2012-07-27 10:41:26 +02:00
Regis Houssin
c92bd58278 Fix: changelog 2012-07-26 21:07:37 +02:00
Regis Houssin
c429c421da Fix: Bug #460 - Wrong entity assignment when creating a warehouse 2012-07-26 20:50:24 +02:00
Regis Houssin
51ccb33964 Fix: carriage return 2012-07-26 18:12:02 +02:00
Regis Houssin
c55eabeaff Fix: external user confidentiality 2012-07-26 18:11:50 +02:00
Regis Houssin
a92bb8373a Fix: bad path 2012-07-26 17:04:50 +02:00
Regis Houssin
46304c8d98 Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-07-26 14:37:21 +02:00
Regis Houssin
5c93da8a72 Fix: problem with double quote 2012-07-26 14:37:10 +02:00
Laurent Destailleur
087644a861 Update translation for tr_TR
Conflicts:
	htdocs/langs/tr_TR/admin.lang
	htdocs/langs/tr_TR/agenda.lang
	htdocs/langs/tr_TR/bills.lang
	htdocs/langs/tr_TR/bookmarks.lang
	htdocs/langs/tr_TR/boxes.lang
	htdocs/langs/tr_TR/cashdesk.lang
	htdocs/langs/tr_TR/categories.lang
	htdocs/langs/tr_TR/commercial.lang
	htdocs/langs/tr_TR/companies.lang
	htdocs/langs/tr_TR/compta.lang
	htdocs/langs/tr_TR/dict.lang
	htdocs/langs/tr_TR/install.lang
	htdocs/langs/tr_TR/main.lang
	htdocs/langs/tr_TR/propal.lang
	htdocs/langs/tr_TR/sendings.lang
2012-07-25 17:59:35 +02:00
Regis Houssin
1b5f540d93 Fix: can't read permissions with an external module in root directory
instead "custom" directory
2012-07-25 13:32:25 +02:00
Regis Houssin
a0f78aad4a Fix: for compatibility 2012-07-25 12:57:59 +02:00
Laurent Destailleur
70cf8227a2 Fix: Products with no prices not visible
Conflicts:
	htdocs/core/class/html.form.class.php
2012-07-25 12:47:50 +02:00
Regis Houssin
67fd6356aa Merge pull request #257 from FHenry/3.2
Correction mail unsubcribe translation
2012-07-24 09:15:04 -07:00
FHenry
58e61781e1 Remove useless paramater 2012-07-24 17:31:30 +02:00
FHenry
8a2e5b5962 Fix style 2012-07-24 14:34:23 +02:00
FHenry
1891e7364a Fix nb mass mailling receive according other status than read 2012-07-24 14:32:03 +02:00
FHenry
ba9861f856 Add __MAILTOEMAIL__ to mailing-send.php 2012-07-24 10:15:58 +02:00
FHenry
bc9d85b03f Unsubscribe tag spelling correction 2012-07-24 09:28:16 +02:00
FHenry
3e2e3b2bcb Correction mail unsubcribe translation 2012-07-23 18:58:40 +02:00
Laurent Destailleur
ab71e4f891 Better fix 2012-07-23 11:02:53 +02:00
Regis Houssin
a4ec4224b0 Fix: bug #467 2012-07-23 10:31:58 +02:00
Laurent Destailleur
0b77cb3a5d Fix: Translation missing 2012-07-22 23:07:56 +02:00
Laurent Destailleur
b4aa076a82 Fix: escape for create command 2012-07-22 21:53:50 +02:00
Laurent Destailleur
dc532cc2d4 Fix: escape for create command 2012-07-22 21:48:43 +02:00
Laurent Destailleur
3efa77a70f Merge branch '3.2' of git@github.com:Dolibarr/dolibarr.git into 3.2 2012-07-22 17:15:39 +02:00
Laurent Destailleur
a8d32b71bf Merge pull request #254 from marcosgdf/minor-fixes
Minor fixes
2012-07-22 08:15:18 -07:00
Laurent Destailleur
8074022e8f Fix: dol_syslog at wrong place. 2012-07-22 16:58:03 +02:00
Laurent Destailleur
bcde526db1 Fix: sql injection for create database 2012-07-22 16:57:57 +02:00
Laurent Destailleur
23c4f78df0 Merge pull request #255 from marcosgdf/fix-bug-452
Fixed bug #452
2012-07-22 07:32:10 -07:00
Marcos García
148e40e07c Moved bookmark translations from other.lang to bookmarks.lang, also removed unused translations 2012-07-22 16:17:49 +02:00
Laurent Destailleur
1eae596f98 Prepare 3.2.1 2012-07-22 14:33:22 +02:00
Laurent Destailleur
2a9456cb83 Fix: Brazilian translation 2012-07-22 14:23:13 +02:00
Laurent Destailleur
f1f9c842f8 Fix: The missing feature to close proposal on order close was fixed
differently.
2012-07-22 13:13:38 +02:00
Marcos García
7f243d92e5 Removed unnecesary code 2012-07-22 03:30:21 +02:00
Marcos García
10384e3856 Another mini typo 2012-07-22 02:40:49 +02:00
Marcos García
8bc3608717 Allowed MailmanTitle to be translated, also SPIP should be upper-cased 2012-07-22 02:22:01 +02:00
Marcos García
4b62eaeed2 Typos in es_ES and added missing translations 2012-07-22 01:45:46 +02:00
Marcos García
c5e1b367de Merge branch 'fix-spanish-translation-typo' into minor-fixes 2012-07-22 00:43:45 +02:00
Marcos García
06b6c38379 There's no "Código de barra" 2012-07-22 00:39:06 +02:00
Marcos García
ee0f92f6aa Add missing es_ES translations 2012-07-22 00:08:48 +02:00
Marcos García
49d943e57f Removed duplicated code 2012-07-21 23:54:23 +02:00
Marcos García
3d10d6a559 It was showing Products Area instead of Products and Services Area 2012-07-21 01:08:02 +02:00
Marcos García
ccdaf2ffb4 When viewing a product/service, if we don't know the type of the item, then we use a generic page title. Also fixed typo in es_ES 2012-07-21 00:08:43 +02:00
Marcos García
c0c481a746 Translation Typo in es_ES 2012-07-20 22:46:39 +02:00
Marcos García
c2f465a98a Added some missing translations in es_ES and fixed a typo too 2012-07-20 21:45:13 +02:00
Marcos García
f6fc21f5fb Fixed a minor bug with the BackToList link in a budget detail view reported in Dolibarr.es
You'll see a lot of lines changed because of incorrect line endings
2012-07-20 21:25:29 +02:00
Marcos García
c3b18a1e38 Spanish translation typo 2012-07-20 21:19:08 +02:00
Marcos García
11430cd555 Php should be upper-cased. Also removed the string from the lang files as it should not be translated. I even think that in China they call it PHP 2012-07-20 20:38:57 +02:00
Marcos García
fa8fad3b04 SMS should be upper-cased 2012-07-20 20:33:12 +02:00
Marcos García
3ed1795096 Added missing translation 2012-07-20 19:53:43 +02:00
Marcos García
5f0491bc6f There's no disec input... 2012-07-20 19:46:37 +02:00
Marcos García
0ff5a7bc9c Fixed little typo 2012-07-20 18:24:23 +02:00
Regis Houssin
34f790b85e Merge pull request #250 from marcosgdf/fix-some-translations
Fix some typos on translations
2012-07-19 14:36:24 -07:00
Marcos García
af9c8abe9c Fixed Catalan typos too 2012-07-19 20:06:08 +02:00
Marcos García
50129ec945 Contracts box name wasn't being translated 2012-07-19 19:40:56 +02:00
Raphaël Doursenaud
2160e86928 French wording
Réception -> Traitement en cours
2012-07-19 19:34:15 +02:00
Raphaël Doursenaud
0b2e07964f French spelling
Chiffre d'affaire -> Chiffre d'affaires
2012-07-19 19:34:06 +02:00
Regis Houssin
5386f00b0e Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-07-19 19:33:55 +02:00
Raphaël Doursenaud
78b0f14b1a Text: Chiffrer 2012-07-19 19:33:37 +02:00
Regis Houssin
467bf090dd Merge pull request #246 from simnandez/3.2
Trad: Better translation
2012-07-19 10:25:31 -07:00
Regis Houssin
4fcbe39fd9 Merge pull request #248 from marcosgdf/fix-contract-translation
The tab Documents of the Contracts module wasn't being translated
2012-07-19 10:25:02 -07:00
Regis Houssin
7ad2de61d1 Merge pull request #249 from marcosgdf/fix-security-seconds-translation
Replaced "Seconds" for "seconds"
2012-07-19 10:24:15 -07:00
Marcos García
d5c95b76a5 Added missing translation and fixed some typos 2012-07-19 19:06:23 +02:00
Marcos García
e7d117c920 Fixed some spanish & catalan translations 2012-07-19 18:41:36 +02:00
Marcos García
9b21aa0a60 Replaced "Seconds" for "seconds" 2012-07-19 18:05:09 +02:00
Laurent Destailleur
f5a4f32b0f [ bug #445 ] Hex escaping in descriptions 2012-07-19 18:04:56 +02:00
Laurent Destailleur
674aa0cf12 Fix: Duplicate begin 2012-07-19 17:28:13 +02:00
Marcos García
d1646e245a The tab Documents of the Contracts module wasn't being translated 2012-07-19 17:18:41 +02:00
Laurent Destailleur
03f85bef83 [ bug #444 ] Regression on auto-closing for proposals and orders 2012-07-19 16:57:10 +02:00
Laurent Destailleur
d68a2cb0d8 Fix: Removed warning 2012-07-19 16:27:03 +02:00
simnandez
5a1e29cc08 Trad: Better translation 2012-07-19 12:28:47 +02:00
Regis Houssin
45b24fff0d Merge pull request #244 from simnandez/3.2
Trad: Add missing translation
2012-07-18 23:44:12 -07:00
Regis Houssin
29256aba8b Merge pull request #245 from marcosgdf/fix-bug-456
Fixed bug #465
2012-07-18 23:43:19 -07:00
Marcos García
4f2a47c4fc Fixed bug https://doliforge.org/tracker/?func=detail&aid=456&atid=246&group_id=144 2012-07-19 02:26:41 +02:00
Laurent Destailleur
f4f2db33f0 Better translation
Conflicts:
	htdocs/langs/en_US/workflow.lang
	htdocs/langs/fr_FR/workflow.lang
2012-07-17 15:30:52 +02:00
Laurent Destailleur
b73014c044 Merge branch '3.2' of https://github.com/Dolibarr/dolibarr.git into 3.2 2012-07-17 01:27:08 +02:00
Laurent Destailleur
53cc1667d5 Fix: error when validating shipment for non predefined products with a
selected warehouse.
2012-07-17 01:26:31 +02:00
simnandez
af9b03e7c7 Trad: Add missing translation 2012-07-14 22:25:14 +02:00
Regis Houssin
dd7c3ed2f8 Merge pull request #243 from simnandez/3.2
Trad: Add missing translations
2012-07-13 07:28:46 -07:00
Regis Houssin
7e25172f03 Fix: missing entity filter 2012-07-13 16:24:12 +02:00
simnandez
a83c118a8f Trad: Add missing translations 2012-07-13 15:56:55 +02:00
Regis Houssin
fd9574a2f8 Merge pull request #241 from simnandez/3.2
3.2
2012-07-13 06:07:52 -07:00
simnandez
8014713795 Fix: Bad local taxes if price base type is TTC 2012-07-13 15:02:02 +02:00
simnandez
10e632375f Fix: Bad local taxes if price base type is TTC 2012-07-13 14:40:51 +02:00
Laurent Destailleur
9327858bee Fix: Bad merge 2012-07-13 12:23:17 +02:00
Laurent Destailleur
b801a391a4 Fix: Phone not saved when using web service 2012-07-13 12:15:16 +02:00
Regis Houssin
20704d6a5c New: classify billed order if invoice billed (workflow
manager)

Conflicts:
	htdocs/core/class/commonobject.class.php
	htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php
	htdocs/langs/en_US/workflow.lang
	htdocs/langs/fr_FR/workflow.lang
2012-07-13 12:14:41 +02:00
Regis Houssin
1af4834f10 Fix: for multicompany transverse mode 2012-07-10 13:43:38 +02:00
Regis Houssin
02f30aeee2 Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2.1 2012-07-10 13:40:17 +02:00
Regis Houssin
2f9f7d401f Merge branch '3.2' of git+ssh://github.com/Dolibarr/dolibarr into 3.2.1 2012-07-08 18:37:43 +02:00
Laurent Destailleur
58b2b91928 Fix: removed warning 2012-07-08 16:55:42 +02:00
Laurent Destailleur
d11e22c970 Merge branch '3.2' of https://github.com/Dolibarr/dolibarr.git into 3.2 2012-07-07 20:22:35 +02:00
Laurent Destailleur
0428d5eee4 Prepare 3.2 release 2012-07-07 20:21:44 +02:00
Regis Houssin
3686fad393 Fix: compatibility with multicompany and transverse mode 2012-07-07 15:25:21 +02:00
Regis Houssin
8b832f475f Fix: getpost error 2012-07-07 12:53:27 +02:00
Regis Houssin
925bded6d9 Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2.1 2012-07-07 12:29:04 +02:00
Regis Houssin
dd60c384a5 Fix: missing object 2012-07-07 12:27:45 +02:00
Regis Houssin
293e0ac831 Change-Id: I5f8bcf59cf2fc0d902edb4d61f8c20a2880765a2 2012-07-07 12:21:40 +02:00
Regis Houssin
250e3555c3 Fix: more bugs with multicompany 2012-07-07 11:03:16 +02:00
Regis Houssin
8ee06f02b1 Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2.1 2012-07-07 11:02:59 +02:00
Regis Houssin
ba896c024d Fix: problem with template 2012-07-07 11:01:48 +02:00
Regis Houssin
41dcd9370a Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2.1 2012-07-07 08:01:48 +02:00
Regis Houssin
928af1a2b3 Fix: security 2012-07-07 08:00:18 +02:00
Regis Houssin
c8eb666826 Fix: compatibility with multicompany 2012-07-06 20:53:18 +02:00
Regis Houssin
6f919da5d9 Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2.1 2012-07-06 10:24:24 +02:00
Regis Houssin
7382f4e3ee Fix: bad link and uniformize code 2012-07-06 10:23:28 +02:00
Regis Houssin
ff048175f7 Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2.1 2012-07-06 09:54:54 +02:00
Regis Houssin
a3c74aa9bd Fix: price field is obsolete 2012-07-06 09:53:45 +02:00
Regis Houssin
ce7f45ab1f Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2.1 2012-07-05 15:51:42 +02:00
Regis Houssin
59c84747ac Revert "Fix: wrong link"
This reverts commit 45f09da98a.
2012-07-05 15:49:45 +02:00
Regis Houssin
8befcb9477 Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2.1 2012-07-05 15:41:22 +02:00
Regis Houssin
45f09da98a Fix: wrong link 2012-07-05 15:40:13 +02:00
Regis Houssin
bf9fd6a2da Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2.1 2012-07-03 21:15:02 +02:00
Regis Houssin
5c2d8656cc Fix: missing images files filter 2012-07-03 21:13:58 +02:00
Regis Houssin
ab6129a1cc Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2.1 2012-07-03 16:43:42 +02:00
Regis Houssin
a13bf2b93f Fix: test if ckeditor is enable 2012-07-03 16:42:34 +02:00
Regis Houssin
b0ab71db5f Fix: merge problem 2012-07-02 22:47:19 +02:00
Regis Houssin
7f021ad5d9 Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2.1 2012-07-02 22:43:00 +02:00
Regis Houssin
65304f2e77 Fix: missing shipping linked object box 2012-07-02 22:40:48 +02:00
Regis Houssin
8a6cd7f84d New: check the real version and remove specific php settings 2012-07-02 21:00:25 +02:00
Regis Houssin
3e30cde02e Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2.1 2012-07-02 20:07:44 +02:00
Regis Houssin
ea21064ca2 Fix: access problem if thirdparty module is disable 2012-07-02 20:06:08 +02:00
Regis Houssin
4e395e741c Merge pull request #237 from simnandez/3.2
Trad: Add missing translations
2012-07-02 09:01:18 -07:00
simnandez
b5a12ff088 Trad: Add missing translations 2012-07-02 17:36:41 +02:00
Regis Houssin
92858a7b47 Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2.1 2012-07-02 17:13:39 +02:00
Regis Houssin
9623d50f48 Fix: big problem with linked elements 2012-07-02 17:11:35 +02:00
Regis Houssin
deecfe5d07 Fix: wrong sql request 2012-07-02 16:14:44 +02:00
Regis Houssin
067a9b0820 Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git
into 3.2.1

Conflicts:
	htdocs/product/class/product.class.php
2012-07-02 15:49:04 +02:00
Regis Houssin
1f98a23587 Fix: compatibility with multicompany
Conflicts:
	htdocs/product/class/product.class.php
2012-07-02 15:46:31 +02:00
Regis Houssin
cd3df1d6e1 Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2.1 2012-07-02 10:39:40 +02:00
Regis Houssin
1d5db424a1 Fix: missing contract reference 2012-07-02 10:38:40 +02:00
Regis Houssin
b632c2233b Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git
into 3.2.1
2012-07-02 10:17:42 +02:00
Regis Houssin
8d0cafc687 Fix: sql request error 2012-07-02 10:15:03 +02:00
Laurent Destailleur
57958e25bf Prepare 3.2 release 2012-06-30 02:21:59 +02:00
Laurent Destailleur
9edb149d2c Prepare 3.2 final 2012-06-30 01:48:25 +02:00
Laurent Destailleur
622720132d Use stable url 2012-06-30 01:45:54 +02:00
Laurent Destailleur
bdd8b393f9 Merge branch '3.2' of ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-06-30 01:15:50 +02:00
Regis Houssin
123b45aa4b Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2.1 2012-06-29 10:10:18 +02:00
Regis Houssin
55ac02382b Fix: missing parameters ! 2012-06-29 10:09:15 +02:00
Regis Houssin
87f2ec663d Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2.1 2012-06-29 09:37:46 +02:00
Regis Houssin
70cd7b87e9 Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-06-29 09:36:33 +02:00
Regis Houssin
18ae5ff6ea New: remove linked elements invalid 2012-06-29 09:36:18 +02:00
Laurent Destailleur
52c2d39194 Fix: Can't modifiy accountancy code sell 2012-06-28 19:59:33 +02:00
Laurent Destailleur
0b56923de5 Fix: Panicum module for supplier accountancy code 2012-06-28 19:49:54 +02:00
Regis Houssin
11f78c1913 Fix: add ckeditor create div option with dolibarr_mailings toolbar 2012-06-27 16:39:39 +02:00
Regis Houssin
3164b5615c Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2.1 2012-06-27 16:37:47 +02:00
jfefe
189cba6c41 Fix : use lastname to test contact ldap synchro (not name) 2012-06-27 13:29:45 +02:00
Laurent Destailleur
de5612ae0b Fix: Missing include 2012-06-27 13:28:51 +02:00
Laurent Destailleur
f23d826e0a Fix: Bad hour 2012-06-27 01:41:44 +02:00
Laurent Destailleur
62f14e3dd5 Fix: Removed warning. Fix compatibility. 2012-06-26 23:13:03 +02:00
Laurent Destailleur
643e077c68 Fix: turkish language 2012-06-24 20:01:34 +02:00
Laurent Destailleur
5e490f8530 Fix: Remove warning 2012-06-24 19:43:26 +02:00
Laurent Destailleur
a67f6cc732 Fix: Preview of shiping receipts 2012-06-23 21:00:43 +02:00
Laurent Destailleur
06c17b806e Fix: fckeditor ko on linux package 2012-06-23 20:17:31 +02:00
Laurent Destailleur
8deeac403a Fix: Label was not translated 2012-06-23 15:03:02 +02:00
Regis Houssin
56f7d31d11 Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2.1 2012-06-21 09:03:14 +02:00
Laurent Destailleur
ed724b82d3 Fix: We must not define language var if parm not defined.
Conflicts:
	htdocs/master.inc.php
2012-06-20 23:38:31 +02:00
Regis Houssin
d941d1efee Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git
into 3.2.1

Conflicts:
	build/makepack-dolibarr.pl
	htdocs/filefunc.inc.php
	htdocs/install/inc.php
2012-06-20 22:29:28 +02:00
Regis Houssin
9fed7fba30 Fix: missing not empty test 2012-06-20 22:24:26 +02:00
Laurent Destailleur
cb04444301 Fix: If option to not manage a login is on, login is not output into
info message.
Fix: Bad error management
2012-06-19 21:55:28 +02:00
Laurent Destailleur
8c030f4f81 Fix: rebuild_merge_pdf does not regenerate files already existing by
default.
2012-06-19 21:34:55 +02:00
Regis Houssin
4ef651d50b Merge pull request #231 from simnandez/3.2
3.2
2012-06-18 01:30:10 -07:00
simnandez
6bd438fc7f Doc: Update ChangeLog 2012-06-18 10:24:52 +02:00
Laurent Destailleur
657c7eb4cf Merge branch '3.2' of ssh://git@github.com/Dolibarr/dolibarr.git into
3.2

Conflicts:
	build/exe/doliwamp/doliwamp.iss
	build/makepack-howto.txt
2012-06-17 22:35:47 +02:00
Laurent Destailleur
a00439b375 Prepare release 2012-06-17 22:30:01 +02:00
Laurent Destailleur
cb6f9f40b8 Prepare release 2012-06-17 19:22:44 +02:00
Laurent Destailleur
cfa8ca5c52 Fix: Removed warning 2012-06-17 17:45:25 +02:00
Laurent Destailleur
3354b35e75 Fix: Avoid warning if param is empty 2012-06-17 17:34:21 +02:00
Regis Houssin
9b1047eea7 Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git
into 3.2.1
2012-06-16 08:26:26 +02:00
Laurent Destailleur
3556adc11d Fix: Permissions for click2dial tab 2012-06-16 00:10:47 +02:00
Regis Houssin
0d83691c5b Merge pull request #229 from simnandez/3.2
Fix: [ bug #427 ] Bad links to wiki help in certains menus
2012-06-15 06:57:54 -07:00
simnandez
bcfd35648b Fix: [ bug #427 ] Bad links to wiki help in certains menus 2012-06-15 15:54:56 +02:00
Laurent Destailleur
554a5b4c29 Merge branch '3.2' of https://github.com/Dolibarr/dolibarr into 3.2 2012-06-15 12:44:31 +02:00
Laurent Destailleur
eb543f0606 Fix: missing a return into clean_url function 2012-06-15 12:44:11 +02:00
Regis Houssin
1f4d3207fe Merge pull request #227 from simnandez/3.2
Fix: [ bug #427 ] Bad links to wiki help in certains menus
2012-06-15 03:28:20 -07:00
simnandez
83d75aaa31 Fix: [ bug #427 ] Bad links to wiki help in certains menus 2012-06-15 12:20:45 +02:00
Laurent Destailleur
2e74a4ba85 Fix: The fix made by renaming PDF_ADDALSOTARGETDETAILS into MAIN_PDF_ADDALSOSOURCEDETAILS was fixing things in the wrong direction. The regression was the missing data on the recipient compared to 3.1.1 2012-06-15 11:26:16 +02:00
Laurent Destailleur
5d502aa7d1 Fix: function dol_nboflines_bis 2012-06-15 00:17:12 +02:00
Laurent Destailleur
c28c5c1003 Fix: Bad calculation of nb of line. Fix: Bad position of lines into pdf_soleil 2012-06-14 20:01:47 +02:00
Laurent Destailleur
383195581f Fix: Messy source address 2012-06-14 17:51:56 +02:00
Laurent Destailleur
6c27963d1d Fix: Use order date for stats, not valid date. 2012-06-14 16:34:34 +02:00
Regis Houssin
707bffd181 Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2.1 2012-06-13 21:54:27 +02:00
Laurent Destailleur
6406d4e64c Fix: typo error 2012-06-13 20:16:21 +02:00
Laurent Destailleur
142e7e55d7 Merge branch '3.2' of ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-06-13 20:14:48 +02:00
Regis Houssin
56188ca798 Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-06-12 23:15:25 +02:00
Regis Houssin
c8c31b2167 Fix: mutualize ckeditor parameters 2012-06-12 23:14:54 +02:00
Regis Houssin
c4fbdbbce4 Fix: mutualize ckeditor parameters 2012-06-12 23:13:59 +02:00
Regis Houssin
86aab20c0a Merge pull request #224 from simnandez/3.2
Fix: Missing translation key
2012-06-11 13:02:22 -07:00
Regis Houssin
548266d607 Fix: uniformize code 2012-06-11 21:46:37 +02:00
Regis Houssin
fb15ea20c6 Fix: update jquery-cookie plugin 2012-06-11 17:27:20 +02:00
Regis Houssin
c9be1cbb8b Fix: missing remove_file action
Fix: use object instead id and store odt filename in object for use in
triggers
2012-06-10 17:09:44 +02:00
Regis Houssin
eef50058b1 Fix: bad parameters, use global 2012-06-10 10:30:45 +02:00
Regis Houssin
c9c4ba2a72 Fix: problem with external modules and uniformize code
Conflicts:
	htdocs/comm/propal/document.php
	htdocs/core/class/fileupload.class.php
	htdocs/projet/fiche.php

Change-Id: Ib36cd4d6ad5eb1e9ad2a188ef276f37c098cfef4
2012-06-09 18:47:16 +02:00
Laurent Destailleur
4c52e477e4 Fix: Removed non greek sentences 2012-06-09 12:41:03 +02:00
Laurent Destailleur
b8b400a5a4 Fix: No alpha here, this breaks ability to submit html content with
images or links.
2012-06-09 12:40:51 +02:00
simnandez
92cb694f55 Fix: Missing translation key 2012-06-09 09:05:14 +02:00
Regis Houssin
db148c4233 Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2.1 2012-06-09 07:51:38 +02:00
Laurent Destailleur
2be18e834a Fix: Turkish translation 2012-06-09 00:25:31 +02:00
Laurent Destailleur
b554dfc3d2 Fix: Missing translation key 2012-06-09 00:25:22 +02:00
Laurent Destailleur
183ba3e8ca Fix: Another fix for var not initialized 2012-06-08 22:26:54 +02:00
Laurent Destailleur
f2365a4c8d Fix: A lot of pb into javascript. Javascripts code for same feature was
not inserted always at same place (sometinmes at low level, and
sometimes at high level). This was creating conflict into javascript.

Conflicts:
	htdocs/product/class/product.class.php
2012-06-08 22:25:45 +02:00
Regis Houssin
c512585670 Fix: delete or rename a document product dir 2012-06-08 21:41:37 +02:00
Regis Houssin
1b19fddbc6 Fix: missing oldcopy during update 2012-06-08 21:41:21 +02:00
Regis Houssin
1c3bf3bb22 Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2.1 2012-06-08 18:21:22 +02:00
Regis Houssin
db840bf8de Fix: remove deprecated code can cause warning 2012-06-08 18:20:06 +02:00
Regis Houssin
4713738ea3 Fix: avoid warning 2012-06-08 18:19:55 +02:00
Regis Houssin
176c6013ec Fix: bad option name 2012-06-08 11:48:07 +02:00
Regis Houssin
6f28b69804 Fix: add iframe transport for compatibility with all browser 2012-06-08 11:36:46 +02:00
Regis Houssin
92bb9c99f5 Release 3.2.1-alpha 2012-06-08 07:43:42 +02:00
Regis Houssin
aee1c3b069 Fix: more clean code for new version of jQuery fileupload 2012-06-08 07:25:55 +02:00
Regis Houssin
1f4be4cfed Fix: stock message in session and reload the page for avoid url problem
with jQuery fileupload
2012-06-08 07:25:43 +02:00
Regis Houssin
a04ca9449a New: update jQuery and jQuery UI 2012-06-08 07:25:31 +02:00
Regis Houssin
1649a9a1b1 Fix: reload page after file upload completed 2012-06-08 07:25:20 +02:00
Regis Houssin
8c4ddb99be Fix: add max file size 2012-06-08 07:25:07 +02:00
Regis Houssin
bef5b66dab Fix: replace Bootstrap version by jQueryUI version 2012-06-08 07:24:52 +02:00
Regis Houssin
c43b5f99ac Works on jQuery fileupload upgrade (Todo: css problem) 2012-06-08 07:24:22 +02:00
Laurent Destailleur
d8894b149e Merge branch '3.2' of ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-06-06 23:13:41 +02:00
Laurent Destailleur
407978991c Fix: bad error management 2012-06-06 23:05:59 +02:00
Regis Houssin
0d1159d862 Fix: problem with external module 2012-06-06 23:02:46 +02:00
Laurent Destailleur
06442f4755 Fix: Var not initialized 2012-06-06 21:39:37 +02:00
Regis Houssin
54dd02413f Fix: missing search in alternative root directory 2012-06-06 14:05:04 +02:00
Laurent Destailleur
7feff22c1a Fxi: Bad permission check 2012-06-06 00:23:13 +02:00
Laurent Destailleur
a5a4ef538d Fix: Exclude temp file 2012-06-06 00:23:00 +02:00
Laurent Destailleur
c8bd77ddd7 Fix: Missing permission check 2012-06-06 00:22:43 +02:00
Laurent Destailleur
1c32b4231d Merge branch '3.2' of ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-06-05 12:55:12 +02:00
Laurent Destailleur
31560e19df Fix with PHP 5.2 2012-06-05 12:54:34 +02:00
Regis Houssin
e9a8ec1795 Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-06-04 11:26:01 +02:00
Regis Houssin
26aa12de97 Fix: don't exclude savant and jstree for externals modules ! 2012-06-04 11:25:17 +02:00
Laurent Destailleur
00d185f648 Fix: Use wrong handler. Make install fails. 2012-06-04 02:15:10 +02:00
Regis Houssin
4e05640ecb Fix: date format error 2012-06-03 23:56:27 +02:00
Regis Houssin
ff33cb4a88 Fix: merge array of hookmanager errors 2012-06-03 23:55:05 +02:00
Laurent Destailleur
5ce0fe1405 Fix: Solve error Method Not Implemented 2012-06-01 21:24:54 +02:00
Laurent Destailleur
7c61f6fd88 Fix: Try a fix for the _FILES escape problem. 2012-06-01 21:00:03 +02:00
Laurent Destailleur
42b3e109d7 Merge branch '3.2' of ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-06-01 20:58:00 +02:00
Regis Houssin
d11971dbbd Merge pull request #217 from GPCsolutions/3.2
Fixed a bug in intervention's list navigation
2012-06-01 02:19:29 -07:00
Raphaël Doursenaud
20d90831e1 Fixed a bug in interventions' list navigation
The navigation arrows were referencing "index.php" file thus
preventing navigation between pages.
The actual name of the file is "list.php".
2012-06-01 10:52:39 +02:00
Laurent Destailleur
0160fb8c5e Fix: an url must be with url escape format. 2012-06-01 10:12:15 +02:00
Laurent Destailleur
a51114d571 Fix: regression. quote was no more supported. 2012-06-01 09:34:43 +02:00
Laurent Destailleur
52f270d623 Merge branch '3.2' of ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-06-01 09:28:49 +02:00
Regis Houssin
9c42cdc7d3 Fix: clear file name send by php 2012-06-01 07:14:29 +02:00
Raphaël Doursenaud
d79b65ce49 Fixed a bug preventing invoice sorting by authors 2012-06-01 06:52:59 +02:00
Laurent Destailleur
2b85a2fcd4 Merge pull request #216 from GPCsolutions/82af0ed28f223d1324c8843abb106c8ee6af9a4b
Fixed a bug preventing invoice sorting by authors
2012-05-31 17:57:40 -07:00
Laurent Destailleur
4fd98dfb72 Fix: Revert a lot of commits made on wrong branch. No new features, no
change on architecture on a beta, only bug fixes on visible features.
2012-06-01 02:22:39 +02:00
Laurent Destailleur
06eca56e00 Revert "Fix: replace Bootstrap version by jQueryUI version"
This reverts commit 03ec0d7cc5.
2012-06-01 02:07:35 +02:00
Laurent Destailleur
2d818fc886 Revert "Fix: add max file size"
This reverts commit 8b224e9e2d.
2012-06-01 02:07:24 +02:00
Laurent Destailleur
180908bfe1 Revert "Fix: reload page after file upload completed"
This reverts commit 368af101ef.
2012-06-01 02:07:11 +02:00
Laurent Destailleur
3dcf553a47 Revert "New: update jQuery and jQuery UI"
This reverts commit 7ed980fab5.
2012-06-01 02:07:02 +02:00
Laurent Destailleur
f9bda74e22 Revert "Fix: stock message in session and reload the page for avoid url problem with jQuery fileupload"
This reverts commit 4deeb20dd8.
2012-06-01 02:06:53 +02:00
Laurent Destailleur
73f1d8ee99 Revert "Fix: more clean code for new version of jQuery fileupload"
This reverts commit d7308525ae.
2012-06-01 02:06:43 +02:00
Laurent Destailleur
1a73347866 Merge branch '3.2' of ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-06-01 01:54:24 +02:00
Regis Houssin
d7308525ae Fix: more clean code for new version of jQuery fileupload 2012-05-31 21:12:40 +02:00
Regis Houssin
4deeb20dd8 Fix: stock message in session and reload the page for avoid url problem
with jQuery fileupload
2012-05-31 21:12:25 +02:00
Raphaël Doursenaud
0a8016e2aa Merge branch '3.2' of https://github.com/Dolibarr/dolibarr into 3.2 2012-05-31 10:09:14 +02:00
Regis Houssin
7ed980fab5 New: update jQuery and jQuery UI 2012-05-30 23:40:45 +02:00
Regis Houssin
368af101ef Fix: reload page after file upload completed 2012-05-30 23:37:02 +02:00
Regis Houssin
8b224e9e2d Fix: add max file size 2012-05-30 23:36:50 +02:00
Regis Houssin
03ec0d7cc5 Fix: replace Bootstrap version by jQueryUI version 2012-05-30 23:36:40 +02:00
Regis Houssin
a717297a8c Works on jQuery fileupload upgrade (Todo: css problem) 2012-05-30 23:36:17 +02:00
Raphaël Doursenaud
086a0ae340 Merge branch '3.2' of https://github.com/Dolibarr/dolibarr into 3.2 2012-05-30 17:36:04 +02:00
Regis Houssin
599971b27a Merge pull request #214 from simnandez/3.2
Trad: Add translation
2012-05-30 07:40:22 -07:00
Simnandez
f23462a173 Trad: Add translation 2012-05-30 16:28:13 +02:00
Laurent Destailleur
a83c7d0992 Fix: Regression with quot management. Try a better fix. 2012-05-30 12:49:22 +02:00
Laurent Destailleur
f67636d0f3 Merge branch '3.2' of ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-05-30 12:47:58 +02:00
Laurent Destailleur
92fe8ebe1d Fix: js not escaped 2012-05-30 12:33:47 +02:00
Raphaël Doursenaud
2812bfae7a Merge branch '3.2' of https://github.com/Dolibarr/dolibarr into 3.2 2012-05-30 10:29:15 +02:00
Regis Houssin
1a969e61e9 Fix: can't delete a files with quote 2012-05-30 08:31:59 +02:00
Laurent Destailleur
fd9565934c A better fix to remove files from document list 2012-05-30 04:11:37 +02:00
Laurent Destailleur
a465814fd4 More fix for canvas features
Conflicts:
	htdocs/product/canvas/product/tpl/card_create.tpl.php
	htdocs/product/fiche.php
2012-05-30 03:50:53 +02:00
Laurent Destailleur
514babeab1 Fix: delete of documents is done by page of element, not by the view
wrapper.

Conflicts:
	htdocs/langs/en_US/main.lang
	htdocs/langs/fr_FR/main.lang
	htdocs/projet/fiche.php
2012-05-30 00:18:11 +02:00
Regis Houssin
caadf396e2 Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-05-30 00:09:49 +02:00
Regis Houssin
5c2922a17b Fix: big problem with files upload and more compatible with external
modules

Conflicts:
	htdocs/compta/facture.php
2012-05-30 00:09:38 +02:00
Laurent Destailleur
1618ce29c7 Fix: Return empty image instead of error when file not found. 2012-05-30 00:06:44 +02:00
Laurent Destailleur
f11430dec8 Removed deprecated strings 2012-05-29 22:22:00 +02:00
Laurent Destailleur
ea51673ce7 Update de_de translation (manual translation) 2012-05-29 22:19:02 +02:00
Laurent Destailleur
d9d32bb9f5 Merge branch '3.2' of ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-05-29 22:18:45 +02:00
Raphaël Doursenaud
76f8d1d37c Merge branch '3.2' of https://github.com/Dolibarr/dolibarr into 3.2 2012-05-29 10:18:39 +02:00
Regis Houssin
1cbd628971 Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-05-29 09:56:20 +02:00
Regis Houssin
46ae38c86d Fix: clone object before all treatment 2012-05-29 09:56:05 +02:00
Laurent Destailleur
b6c9a37415 Fix: Avoid to have a special php module. 2012-05-28 23:06:32 +02:00
Laurent Destailleur
79cafb1c12 Fix: Subscription must use company name when type is "moral" 2012-05-28 22:14:00 +02:00
Regis Houssin
21d30c1b3e Fix: jquery fileupload broken feature 2012-05-25 20:54:45 +02:00
Raphaël Doursenaud
82af0ed28f Fixed a bug preventing invoice sorting by authors 2012-05-25 16:35:46 +02:00
Raphaël Doursenaud
ffaadcc930 Merge branch '3.2' of https://github.com/Dolibarr/dolibarr into 3.2 2012-05-24 10:46:18 +02:00
Laurent Destailleur
95b976c3d5 Fix: Bad action reset 2012-05-23 17:49:08 +02:00
Laurent Destailleur
190bcf61e4 Fix: Permissions to see project 2012-05-23 14:30:55 +02:00
Laurent Destailleur
229ae171de Fix: bug on projects visibility for external users 2012-05-23 13:10:51 +02:00
Laurent Destailleur
face8fc0be Merge branch '3.2' of ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-05-23 13:10:15 +02:00
Laurent Destailleur
72f67f640d Merge pull request #203 from GPCsolutions/3.2
3.2
2012-05-23 02:58:43 -07:00
Laurent Destailleur
0b7b27e795 Fix: extrafield repair was using bad hardcoded values. 2012-05-23 11:50:55 +02:00
Laurent Destailleur
04bb23d9bf Fix: [ bug #411 ] Can't modify most properties 2012-05-23 11:20:59 +02:00
Laurent Destailleur
ed48969630 Fix: [ bug #409 ] List of vat rates for supplier prices must use the
seller country.

Conflicts:
	htdocs/install/mysql/migration/3.1.0-3.2.0.sql
	htdocs/product/fournisseurs.php
2012-05-23 11:07:18 +02:00
Raphaël Doursenaud
96294403e2 Merge branch '3.2' of https://github.com/Dolibarr/dolibarr into 3.2 2012-05-22 15:15:07 +02:00
Laurent Destailleur
c1b1dcc5e7 Fix: Translation of payment term/cond 2012-05-21 20:24:20 +02:00
Regis Houssin
646651e731 Merge pull request #206 from FHenry/3.2
3.2
2012-05-21 07:11:38 -07:00
Regis Houssin
90c4e6598b Merge pull request #207 from simnandez/3.2
[ bug #399 ] Bad calculation of local taxes in update line products
2012-05-21 07:10:14 -07:00
juanjo
952864f532 [ bug #399 ] Bad calculation of local taxes in update line products 2012-05-21 15:39:15 +02:00
FHenry
23226ad472 correct bug #410 2012-05-21 11:00:08 +02:00
Laurent Destailleur
6cf8c5c102 Fix: Check for duplicate must ignore spaces before and after 2012-05-21 10:38:48 +02:00
Raphaël Doursenaud
1b1b58ad5a Merge branch '3.2' of https://github.com/Dolibarr/dolibarr into 3.2 2012-05-21 10:08:41 +02:00
Laurent Destailleur
1725e5b591 Fix: [ bug #405 ] Late icon always displayed on comm/propal.php 2012-05-21 00:08:36 +02:00
Laurent Destailleur
7a49d56589 Fix: Missing name 2012-05-16 17:07:01 +02:00
Raphaël Doursenaud
43f1fbed01 Trim payment amounts
This allows to ignore trailing characters that may triggers a warning because the payment looks greater than what's
required
2012-05-16 17:03:15 +02:00
Laurent Destailleur
a8913704e9 Fix: W3C 2012-05-16 12:35:21 +02:00
Raphaël Doursenaud
f7476d5727 Merge branch '3.2' of https://github.com/Dolibarr/dolibarr into 3.2 2012-05-15 12:04:26 +02:00
Cédric Salvador
68c1fa6c34 Fix: error in syslog call 2012-05-15 11:41:41 +02:00
Laurent Destailleur
94f9fb2e2f Fix: daylight depends also on year (not only month and day) 2012-05-15 00:49:57 +02:00
Regis Houssin
0ade601a11 Fix: add quote with date 2012-05-14 21:08:17 +02:00
Laurent Destailleur
dc1457b96a Fix: Bad timezone function. Daylight was not used. 2012-05-14 21:07:49 +02:00
Laurent Destailleur
ceb5f161f6 Fix: bad translation 2012-05-14 21:07:24 +02:00
Laurent Destailleur
b4440a6b2e Fix: Exclude nltechno modules from demo 2012-05-14 21:06:48 +02:00
Laurent Destailleur
fd362f1108 Fix: Clean sql 2012-05-13 18:04:00 +02:00
Laurent Destailleur
6f1fd1ae53 Fix: pgsql 2012-05-13 17:36:43 +02:00
Laurent Destailleur
5c62e8865a Fix: W3C 2012-05-13 17:11:31 +02:00
Laurent Destailleur
e13696db55 Fix: syntax error in name of pgsql util proc.
Fix: Add a proc to fix pgsql problems.
2012-05-13 16:41:45 +02:00
Laurent Destailleur
964bb0968f Fix: Missing log when error 2012-05-13 14:44:22 +02:00
Laurent Destailleur
91faac4c87 Fix: Bad phpunit test 2012-05-13 14:44:10 +02:00
Laurent Destailleur
06679ede7c Fix: style 2012-05-13 14:43:41 +02:00
Laurent Destailleur
4a4cdc0839 Fix: Style 2012-05-13 14:36:22 +02:00
Laurent Destailleur
ee31359488 Fix: pgsql compatibility not complete. 2012-05-13 14:33:46 +02:00
Laurent Destailleur
230f4f8f57 Fix: Missing lang 2012-05-12 18:31:04 +02:00
Laurent Destailleur
4278a113a0 Fix: hour reported is not user hour. To fix this, we show both hour
"server and user" but only if it differs.

Conflicts:
	htdocs/core/lib/functions2.lib.php
2012-05-12 16:31:51 +02:00
Laurent Destailleur
da0dc3472b Fix: Pb with backtopage
Conflicts:
	htdocs/adherents/fiche.php
2012-05-12 15:59:28 +02:00
Laurent Destailleur
e94b20f684 Fix: SQL error 2012-05-12 15:28:26 +02:00
Laurent Destailleur
be85c5c381 Fix: [ bug #404 ] Impossible d'ajouter un contact lorsque le module LDAP
est actif (erreur Array 1)
2012-05-12 12:34:18 +02:00
Laurent Destailleur
d4ca08db00 Fix: Bug #402 2012-05-11 21:27:29 +02:00
Raphaël Doursenaud
8416014cff Merge branch '3.2' of https://github.com/Dolibarr/dolibarr into 3.2 2012-05-11 15:46:23 +02:00
Laurent Destailleur
c0691b01eb Fix: Synchro with group not done when editing group only of a user. 2012-05-11 12:48:29 +02:00
Laurent Destailleur
795310b934 Fix: A lot of fix for LDAP synchro 2012-05-11 12:13:47 +02:00
Raphaël Doursenaud
3e72bdbc87 Merge branch '3.2' of https://github.com/Dolibarr/dolibarr into 3.2 2012-05-11 11:48:35 +02:00
Regis Houssin
791c08c006 Fix: [Bug #403] Insertion Image via l'éditeur WISIWIG plante 2012-05-11 10:15:10 +02:00
Laurent Destailleur
7c7d0bd495 Fix: vat rates 2012-05-10 23:08:19 +02:00
Laurent Destailleur
9bd8e3434e Merge branch '3.2' of ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-05-10 22:51:30 +02:00
Laurent Destailleur
a8f69ad16f Update pad files for 3.2 2012-05-10 22:43:50 +02:00
Regis Houssin
fc46a1ff97 Fix: fetch object for hookmanager 2012-05-10 19:30:54 +02:00
Raphaël Doursenaud
decdc2a9a3 Merge branch '3.2' of https://github.com/Dolibarr/dolibarr into 3.2 2012-05-10 15:05:02 +02:00
Laurent Destailleur
bd0be8f358 Fix: escape html tag value 2012-05-09 20:41:41 +02:00
Laurent Destailleur
7700293bdf Fix: Bad warning 2012-05-09 18:17:18 +02:00
Laurent Destailleur
60c77f3d50 Fix: Bad warning 2012-05-09 17:59:54 +02:00
Laurent Destailleur
9f770d862d Fix: Not escaped html value 2012-05-09 17:48:10 +02:00
Laurent Destailleur
ca67f976b6 Fix: Validate broken, missing warning on bad email. 2012-05-09 17:18:56 +02:00
Laurent Destailleur
e722138608 Fix: regression sql error
Conflicts:
	htdocs/core/modules/mailings/modules_mailings.php
2012-05-09 17:18:07 +02:00
Laurent Destailleur
32d2b0a9d6 Fix: Warning GETPOST with alpha and int must be used ONLY if content is
not a free text.
2012-05-09 16:19:54 +02:00
Laurent Destailleur
30026ecddb Merge branch '3.2' of ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-05-09 16:03:57 +02:00
Laurent Destailleur
d53a56f13f Fix: Missing extrafields 2012-05-09 16:02:26 +02:00
Laurent Destailleur
49c7a1f2b4 Fix: Fails to delete member 2012-05-09 15:21:43 +02:00
Regis Houssin
b9b2dbe9b1 Fix: more compatibility with multicompany 2012-05-09 12:44:30 +02:00
Regis Houssin
1726720d16 Merge pull request #198 from simnandez/3.2
3.2
2012-05-09 01:49:32 -07:00
simnandez
84a09808fc Fix:[ bug #399 ] Bad calculation of local taxes in update line products 2012-05-09 10:29:12 +02:00
Laurent Destailleur
f47d6c71ed Fix: Regression in packager 2012-05-08 23:56:51 +02:00
Laurent Destailleur
b623392062 Fix: Load lang 2012-05-08 23:00:13 +02:00
Laurent Destailleur
425ca83a99 Fix: [ bug #397 ] Product VAT is not coming from buying price 2012-05-08 21:55:52 +02:00
Laurent Destailleur
15efd9e8a1 Fix: update price for pgsql 2012-05-08 19:34:12 +02:00
Laurent Destailleur
50443f1977 Fix: Missing error management 2012-05-08 15:39:20 +02:00
Laurent Destailleur
2bb87aabbe Fix: bad br 2012-05-07 20:46:18 +02:00
Laurent Destailleur
2519690020 Fix: corrupted extra tables. 2012-05-07 20:44:20 +02:00
Raphaël Doursenaud
ea0e05b07c Fix: Typo 2012-05-07 19:07:59 +02:00
Laurent Destailleur
21d028c064 Fix: Width of gantt chart 2012-05-07 19:07:29 +02:00
Laurent Destailleur
c9a35c4e3a Too shadow with IE 2012-05-07 19:07:13 +02:00
Laurent Destailleur
22006aa4dc Fix: Better fix for gant view 2012-05-07 19:06:43 +02:00
Laurent Destailleur
82b31e1f5b Fix: Works with checkbox htdocs/core/class/html.form.class.php 2012-05-07 19:06:23 +02:00
Raphaël Doursenaud
7a3ef9bf8a Merge branch '3.2' of https://github.com/Dolibarr/dolibarr into 3.2 2012-05-07 15:52:48 +02:00
Regis Houssin
d0480f1d90 Fix: wrong permission 2012-05-07 11:16:09 +02:00
Raphaël Doursenaud
9b4b8db189 Merge branch '3.2' of https://github.com/Dolibarr/dolibarr into 3.2 2012-05-07 10:04:35 +02:00
Regis Houssin
562be023c6 Fix: [Bug #384] Gantt doesn't display beyond 20 tasks 2012-05-07 09:59:36 +02:00
Laurent Destailleur
4799c6692e Fix: Removed warning and fix pb with extra fields. 2012-05-06 20:54:58 +02:00
Laurent Destailleur
01d37ad159 Fix: pagecode when using postgresql 2012-05-06 15:31:43 +02:00
Laurent Destailleur
1b2a4f4742 Fix: log must be before request 2012-05-06 15:28:51 +02:00
Laurent Destailleur
bfba7bbc7f Fix: foreign key on non existing field 2012-05-06 15:27:31 +02:00
Laurent Destailleur
8d95ae1884 Fix: Typo 2012-05-06 02:36:55 +02:00
Laurent Destailleur
748ac3a5a7 Fix: setStatut works for user class 2012-05-06 00:06:07 +02:00
Laurent Destailleur
5ea6b99593 Fix: several fixes 2012-05-06 00:03:54 +02:00
Regis Houssin
33b9c5af45 Fix: [bug #385] Can't delete a task 2012-05-05 09:28:40 +02:00
Regis Houssin
85e797596f Fix: [Bug #388] Can't modify products after moving with arrows 2012-05-05 09:20:47 +02:00
Regis Houssin
34fe219dcb Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-05-05 09:03:21 +02:00
Regis Houssin
2fe16db244 Fix: bad parameters 2012-05-05 09:03:04 +02:00
Laurent Destailleur
ebf73de8cd Fix: % must be sprintf format. 2012-05-05 03:02:13 +02:00
Laurent Destailleur
b26c3266ed Fix: Manual fix of italian language 2012-05-05 02:58:59 +02:00
Regis Houssin
f4759a0e6e Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-05-04 13:21:50 +02:00
Regis Houssin
656d4942a6 Fix: MultiCompany compatibility for public page 2012-05-04 13:21:28 +02:00
Laurent Destailleur
7921965fe2 Fix: Use correct dest dir. 2012-05-03 23:13:21 +02:00
Laurent Destailleur
5953f18f54 Fix: filter on status 2012-05-03 22:58:51 +02:00
Laurent Destailleur
7a6a462ef2 Fix: Bad cr 2012-05-03 22:13:23 +02:00
Regis Houssin
21a4dd9685 Fix: missing entity field in contract
Fix: multicompany compatibility

Conflicts:
	htdocs/contrat/class/contrat.class.php
2012-05-03 18:45:26 +02:00
Regis Houssin
41e8011a80 Fix: changelog 2012-05-03 11:29:59 +02:00
Regis Houssin
46987ea4bd Merge pull request #193 from simnandez/3.2
Trad: add missing translations
2012-05-02 09:21:02 -07:00
simnandez
6c7206d210 Trad: add missing translations 2012-05-02 18:17:21 +02:00
Laurent Destailleur
39e34357a1 Merge branch '3.2' of ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-05-02 17:33:26 +02:00
Laurent Destailleur
557c96455e Fix: Use de_De language for de_de, not de_at 2012-05-02 17:30:02 +02:00
Raphaël Doursenaud
ea07afd6c2 Merge branch '3.2' of https://github.com/Dolibarr/dolibarr into 3.2 2012-05-02 17:29:16 +02:00
Laurent Destailleur
7e933ca175 Merge pull request #191 from simnandez/3.2
Trad: [ bug #378 ] status for order i, process is "waiting for reception"
2012-05-02 07:35:03 -07:00
Laurent Destailleur
47c0b8272d Fix: Middle
Conflicts:
	htdocs/core/tpl/login.tpl.php
2012-05-02 14:19:34 +02:00
Laurent Destailleur
afd9b817be Fix: Missing translation 2012-05-02 13:42:49 +02:00
Laurent Destailleur
f5cc12895a Fix: Missing picto 2012-05-02 13:42:34 +02:00
simnandez
c7daf233cd Trad: [ bug #378 ] status for order i, process is "waiting for
reception"
2012-05-02 09:21:52 +02:00
Laurent Destailleur
9edd80b850 Fix: Clean database to allow constraints 2012-05-01 15:28:11 +02:00
Laurent Destailleur
67adc11086 Fix: [ bug #378 ] status for order i, process is "waiting for reception" 2012-05-01 15:09:50 +02:00
Laurent Destailleur
129bb0cf2f Fix: awful IE 2012-04-30 19:15:16 +02:00
Laurent Destailleur
69b429914f Fix: Firstname/Lastname lost
Conflicts:
	htdocs/admin/tools/update.php
2012-04-30 19:03:14 +02:00
Laurent Destailleur
74887b5850 Fix: Removed warnings 2012-04-30 09:33:43 +02:00
Laurent Destailleur
3641a4b5bb Fix: Regression 2012-04-29 21:49:03 +02:00
Laurent Destailleur
d4d598d0aa Fix: left align 2012-04-28 20:51:51 +02:00
Laurent Destailleur
450ccf31a7 Fix: Bad declaration of error_reporting
Conflicts:
	htdocs/filefunc.inc.php
2012-04-28 18:52:05 +02:00
Laurent Destailleur
6b9717b250 Fix: Use same algo to scan modules than admin/modules page 2012-04-28 18:50:30 +02:00
Laurent Destailleur
2a19e9d2a1 Fix: Var can't be static 2012-04-28 18:24:53 +02:00
Laurent Destailleur
9200847eaa Fix: Try a better fix. Format of content of table should depend of
content and output rules and not on how data was input.
2012-04-28 15:44:04 +02:00
Laurent Destailleur
3918335bf7 No new feature into a beta. Also this feature is a security
hole for the moment, so it should not be enabled as a common default
feautre but must be kept hidden.
2012-04-28 15:32:48 +02:00
Laurent Destailleur
99006125fd Fix: export of print sheets 2012-04-28 14:57:16 +02:00
Raphaël Doursenaud
dfcfb48057 Typo: instantanée ne prend qu'un n. 2012-04-26 15:48:22 +02:00
Raphaël Doursenaud
62ecc497fa Fix: typo in unset 2012-04-26 15:43:27 +02:00
Regis Houssin
f7b0e1a976 Merge pull request #178 from simnandez/3.2
Fix: Bad include
2012-04-26 01:50:43 -07:00
Regis Houssin
0092f1bc89 Fix: problem of line break between label and description when
using fckeditor
2012-04-26 10:29:46 +02:00
simnandez
6e84b8ca63 Fix: Bad include 2012-04-26 08:50:39 +02:00
FHenry
fa0e1ca87e remove useless line 2012-04-25 18:37:16 +02:00
FHenry
58df839271 Rename global variable from MAIN_SOCIETE_UNSUBSCRIBE to
MAILING_EMAIL_UNSUBSCRIBE to be reliable on dolibarr implementation

Conflicts:
	htdocs/admin/mailing.php
2012-04-25 18:36:58 +02:00
FHenry
d5b21a05b2 Remove Eclipse variable warning 2012-04-25 18:33:30 +02:00
FHenry
455789d575 Remove Eclipse Warning (Undeclare variable) 2012-04-25 18:33:09 +02:00
Regis Houssin
965057307f Merge pull request #176 from simnandez/3.2
Update ChangeLog with fixes
2012-04-25 09:27:38 -07:00
simnandez
2515d27d19 Update ChangeLog with fixes 2012-04-22 18:17:16 +02:00
Laurent Destailleur
d390f3137f Fix: [ bug #367 ] "Multi-tiers" fonctionality inverted in project
contacts.
2012-04-21 19:44:05 +02:00
Laurent Destailleur
2b77a99fa3 Fix: [ bug #372 ] Upgrade error from 3.1.0 to 3.2.0 Beta 2012-04-21 19:12:20 +02:00
Laurent Destailleur
3a2caa3e46 Fix: Try a fix for the lost mainmenu session. 2012-04-20 20:38:49 +02:00
Laurent Destailleur
a9c03aa01e Merge branch '3.2' of ssh://git@github.com/Dolibarr/dolibarr.git into 3.2
Conflicts:
	htdocs/core/menus/standard/eldy.lib.php
2012-04-20 14:50:09 +02:00
Laurent Destailleur
32339b03fd Add log to try to find the mainmenu lost bug. 2012-04-20 14:48:40 +02:00
Laurent Destailleur
52f324002c Add log to try to find the mainmenu lost bug. 2012-04-20 14:39:20 +02:00
Laurent Destailleur
db53aa53b6 Fix: Lines useless 2012-04-20 14:24:02 +02:00
Laurent Destailleur
ab80f6aaa7 Fix: Can clone a proposal 2012-04-20 14:06:59 +02:00
Laurent Destailleur
eff43a8e0c Fix: wrong encoding of special chars 2012-04-20 13:59:35 +02:00
Laurent Destailleur
e503b2d858 Fix: Field must be reset after adding. 2012-04-20 13:50:23 +02:00
Laurent Destailleur
216df5ad07 Fix: Add hidden option to restore lost feature. 2012-04-20 13:46:40 +02:00
Laurent Destailleur
907c7f748d Fix: Bad CR for public note. Must work when text is full text with \n
and also when text is HTML with br.
2012-04-20 13:41:55 +02:00
Laurent Destailleur
91b8f33ea5 Fix: textarea field was not detected 2012-04-20 13:36:51 +02:00
Laurent Destailleur
5580a4cc30 Fix: Missing translation 2012-04-20 13:23:57 +02:00
Laurent Destailleur
cb8b5188be Change to help to fight the mainmenu lost bug. 2012-04-20 13:08:58 +02:00
Laurent Destailleur
8e9f3cabf3 Fix: left menu for home menu 2012-04-20 12:52:36 +02:00
Laurent Destailleur
c31c40a61e Fix: Force mainmenu. This does not solve completely bug of eaccelerator
but provide a way to have access to system menu to help to diagnose.
2012-04-20 12:10:55 +02:00
Raphaël Doursenaud
6958fe9693 Merge remote-tracking branch 'upstream/3.2' into 3.2 2012-04-20 11:06:09 +02:00
Laurent Destailleur
e0e3c07670 Fix: upload dir 2012-04-20 09:43:44 +02:00
Laurent Destailleur
64c4d59466 Merge pull request #173 from simnandez/3.2
Fix: [ bug #368 ] Product list
2012-04-20 00:29:54 -07:00
simnandez
312f81004f Fix: [ bug #370 ] Filter in accountancy -> suppliers_bills 2012-04-19 20:20:08 +02:00
simnandez
5f001c1079 Fix: [ bug #370 ] Filter in accountancy -> suppliers_bills 2012-04-19 20:14:37 +02:00
simnandez
12a3ce7746 Fix: [ bug #368 ] Product list 2012-04-19 19:10:21 +02:00
Regis Houssin
6b07571f09 Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-04-18 18:54:37 +02:00
Laurent Destailleur
294cc73481 Merge branch '3.2' of ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-04-18 17:17:00 +02:00
Laurent Destailleur
0f20381453 Fix: Script to build package for doliwamp is now ok. 2012-04-18 17:16:07 +02:00
Laurent Destailleur
2187f3fda7 Fix: Bad case 2012-04-18 15:38:29 +02:00
Regis Houssin
5f7d552c71 Fix: Bug #369 2012-04-18 12:43:17 +02:00
Regis Houssin
ef36cbc1be Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-04-18 12:21:44 +02:00
Laurent Destailleur
5b609c7ea1 Fix: project info are not lost when submiting actions on tasks 2012-04-18 12:21:12 +02:00
Laurent Destailleur
672dc99145 Fix: project info are not lost when submiting actions on tasks 2012-04-18 12:16:35 +02:00
Laurent Destailleur
54f588cb90 Merge branch '3.2' of ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-04-18 12:16:04 +02:00
Laurent Destailleur
7cb3e6f780 Fix: Restore broken feature 2012-04-18 11:56:52 +02:00
Laurent Destailleur
d41d516072 Merge branch '3.2' of ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-04-18 11:52:49 +02:00
FHenry
f235caf4ec Fix: Bug #362 and clean code 2012-04-18 11:17:26 +02:00
Laurent Destailleur
4ddb9023d7 Fix: restore broken features 2012-04-18 01:04:26 +02:00
Laurent Destailleur
ca7fa84d80 Fix: eldy theme still works without css3 2012-04-17 10:34:54 +02:00
Cédric Salvador
6e291ad70f Merge remote-tracking branch 'upstream/3.2' into 3.2
Conflicts:
	htdocs/core/class/conf.class.php
2012-04-16 15:32:39 +02:00
Laurent Destailleur
435ee2cc26 Fix: Must use tms date 2012-04-16 12:12:03 +02:00
Regis Houssin
6c7eb59f31 Fix: remove unnecessary function 2012-04-16 11:40:24 +02:00
Laurent Destailleur
ab94865c71 Fix: Generate donation document 2012-04-16 01:28:10 +02:00
Laurent Destailleur
8ec22d9f67 Fix: numbering when reset is on was wrong for past dates 2012-04-15 20:33:13 +02:00
Laurent Destailleur
fb59b5c69a Fix: date must be quoted 2012-04-15 19:20:39 +02:00
Laurent Destailleur
a31a74134c Fix: date must be quoted 2012-04-15 19:18:44 +02:00
Laurent Destailleur
5169437c2d Fix: commit at wrong place 2012-04-15 18:51:42 +02:00
Regis Houssin
f9b2f29547 Fix: sorry it's ok 2012-04-15 18:33:49 +02:00
Regis Houssin
64ddee017b Fix: you can not delete project document folder in delete task method 2012-04-15 18:18:16 +02:00
FHenry
1a56c5b021 correct bug 364 2012-04-15 17:52:47 +02:00
FHenry
779e33d490 Corect bug #364 2012-04-15 17:52:38 +02:00
FHenry
c628cfd99a Correct bug 363 2012-04-15 17:52:28 +02:00
FHenry
3abffac52a Correct bug #363 2012-04-15 17:52:13 +02:00
Laurent Destailleur
25640853f5 Merge branch '3.2' of ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-04-15 15:22:12 +02:00
Laurent Destailleur
b0c55c77c3 Fix: dump file to use must be last one 2012-04-15 15:21:24 +02:00
Regis Houssin
a17f7d1041 Fix: security update for multicompany
Conflicts:
	htdocs/adherents/fiche.php
2012-04-15 11:32:21 +02:00
Regis Houssin
779eacd9c1 Fix: right access error 2012-04-15 10:10:55 +02:00
Regis Houssin
a4359d6eaa Fix: disable php display errors with $dolibarr_main_prod 2012-04-15 09:33:03 +02:00
Laurent Destailleur
c3040f9609 Germany data not complete. 2012-04-14 19:30:10 +02:00
Laurent Destailleur
e446d8c7a2 Fix: Some bug into rpm and debian packaging. 2012-04-14 15:36:12 +02:00
Laurent Destailleur
6212d1a425 Fix: licence pb with fedora 2012-04-14 13:25:26 +02:00
Laurent Destailleur
42c8b25597 Fix: rpm packages 2012-04-14 13:02:21 +02:00
Laurent Destailleur
381ce5fee3 Fix: bad permissions 2012-04-14 12:41:08 +02:00
Laurent Destailleur
71c43c9069 Fix: debian epiphany and iceweasel browsers. 2012-04-14 03:18:42 +02:00
Laurent Destailleur
2ee9ca9c79 Fix: logo size was too large 2012-04-14 02:52:14 +02:00
Laurent Destailleur
16fccd7892 Fix: Work with debian 6 2012-04-14 02:43:34 +02:00
Laurent Destailleur
346fd0d09b Revert "Fix: plugin not into debian"
This reverts commit 4f5456c8d8.
2012-04-14 01:35:41 +02:00
Laurent Destailleur
4f5456c8d8 Fix: plugin not into debian 2012-04-14 01:22:54 +02:00
Laurent Destailleur
a8f66a9b09 Merge branch '3.2' of ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-04-13 20:08:37 +02:00
Laurent Destailleur
ab52d046b9 Fix: Avoid error when removing not correctly installed package 2012-04-13 19:55:14 +02:00
Laurent Destailleur
7e843d855a Fix: regression 2012-04-13 19:49:21 +02:00
FHenry
a11e4ceb44 Correction Bug #358 2012-04-13 19:14:05 +02:00
Regis Houssin
4f490f3e2d New: add possibility to define a page break, its very important for
internal and external modules (milestone)
2012-04-12 20:53:31 +02:00
FHenry
28aa89c659 correct bug #360 2012-04-12 11:18:55 +02:00
Laurent Destailleur
0e4ca576ec Merge branch '3.2' of ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-04-12 00:02:28 +02:00
Laurent Destailleur
53a78838f8 Fix: Avoid call if function not defined 2012-04-11 17:28:04 +02:00
Regis Houssin
eb6008bb4d Fix: missing langs object 2012-04-11 16:27:39 +02:00
Laurent Destailleur
a748466758 Fix: this must not be used inside static classes 2012-04-11 14:45:12 +02:00
Laurent Destailleur
c7317ed2a1 Add dump of 3.2.0 demo 2012-04-11 12:14:55 +02:00
Laurent Destailleur
1e526a2a03 Revert "uniformise code"
This reverts commit 06761d9753.
2012-04-11 10:49:46 +02:00
Laurent Destailleur
b141f3caf5 Revert "to add delivery date"
This reverts commit 8a20b670e7.
2012-04-11 10:49:18 +02:00
Laurent Destailleur
5aae71f9de Revert "to add delivery date"
This reverts commit b948ee1212.
2012-04-11 10:48:35 +02:00
Laurent Destailleur
bb917bea08 Revert "Add __MAILTOEMAIL__ and configutation gobal varialbe of Check Read and unsubscribe in Admin part"
This reverts commit 2a12b24644.
2012-04-11 10:48:02 +02:00
Laurent Destailleur
3870428f16 Merge branch '3.2' of ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-04-11 10:46:06 +02:00
Laurent Destailleur
307c010b90 Fix: Removed warning 2012-04-11 08:32:29 +02:00
Regis Houssin
d7e579e234 Fix: invert emetteur and problem with long phone number 2012-04-11 08:32:00 +02:00
Regis Houssin
45e34aba65 Fix: missing company logo and invert from to ! 2012-04-11 08:31:47 +02:00
FHenry
2a12b24644 Add __MAILTOEMAIL__ and configutation gobal varialbe of Check Read and
unsubscribe in Admin part
2012-04-11 08:24:52 +02:00
Grand Philippe
b948ee1212 to add delivery date 2012-04-11 08:20:48 +02:00
Grand Philippe
8a20b670e7 to add delivery date 2012-04-11 08:20:37 +02:00
Regis Houssin
6ef98b3d46 Fix: restore dolibarr version for this branch 2012-04-11 08:11:27 +02:00
Laurent Destailleur
d3198894b8 Merge branch '3.2' of https://github.com/Dolibarr/dolibarr into 3.2 2012-04-10 12:40:23 +02:00
Laurent Destailleur
231fd6b2ae Fix: Removed warning 2012-04-10 12:37:53 +02:00
Regis Houssin
8f32a35faa Fix: invert emetteur and problem with long phone number 2012-04-10 12:34:02 +02:00
Regis Houssin
6616254504 Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git into 3.2 2012-04-10 12:06:37 +02:00
Regis Houssin
a98e57c596 Fix: missing company logo and invert from to ! 2012-04-10 12:06:26 +02:00
Laurent Destailleur
d4cc4b4288 Fix: bad link 2012-04-10 11:16:47 +02:00
Laurent Destailleur
1104387b72 Fix: Bad link 2012-04-10 11:13:15 +02:00
Laurent Destailleur
49bb9d774d Fix: W3C 2012-04-10 11:00:56 +02:00
Laurent Destailleur
58b0751599 Fix: translation 2012-04-10 10:55:03 +02:00
Regis Houssin
dc46b82cf3 Fix: best practice 2012-04-10 08:44:43 +02:00
Laurent Destailleur
141fa014e6 Revert code because it does not fix security hole completely. Also it
does work on origin but at a transition level.
Sanitizing for command line data must not appears inside a function used
for http data. I prefer fixing this at the source and also using a rule
that clean all attacks completely instead of a rule that clean "most
problem but not all".
2012-04-10 01:24:52 +02:00
Laurent Destailleur
b6b873cfc5 Revert "Fix: security"
This reverts commit 56daf57cb1.
2012-04-10 01:11:37 +02:00
Regis Houssin
ae8b16b9fc Fix: add special test 2012-04-09 22:53:28 +02:00
Regis Houssin
64d60d1270 Fix: sql injection 2012-04-09 22:49:19 +02:00
Regis Houssin
56daf57cb1 Fix: security 2012-04-09 22:27:40 +02:00
Laurent Destailleur
9a4314947d Fix: Rounding 2012-04-09 09:00:24 +02:00
Laurent Destailleur
d892f36fe8 Fix: rounding 2012-04-09 08:59:29 +02:00
Laurent Destailleur
4804530468 Fix: Back page to list of contacts(cherry picked from commit 2d9ed89a8d) 2012-04-09 01:13:45 +02:00
Laurent Destailleur
06b0330d84 New logo 2012-04-08 23:33:07 +02:00
691 changed files with 34564 additions and 26361 deletions

View File

@@ -21,8 +21,8 @@ PHPExcel 1.7.6 LGPL 2.1 Yes Read/Write XLS files, read ODS files
TCPDF 5.9.098 LGPL 3.0 Yes PDF generation TCPDF 5.9.098 LGPL 3.0 Yes PDF generation
JS libraries: JS libraries:
jQuery 1.7.1 GPL and MIT Licence Yes JS library jQuery 1.7.2 GPL and MIT Licence Yes JS library
jQuery UI 1.8.17 GPL and MIT Licence Yes JS library plugin UI jQuery UI 1.8.20 GPL and MIT Licence Yes JS library plugin UI
jQuery Colorpicker 1.1 MIT Licence Yes JS library for color picker for a defined list of colors jQuery Colorpicker 1.1 MIT Licence Yes JS library for color picker for a defined list of colors
jQuery DataTable 1.8.1 BSD Yes JS library for tables output jQuery DataTable 1.8.1 BSD Yes JS library for tables output
jQuery Flot 0.7 MIT Licence Yes JS library to build graph jQuery Flot 0.7 MIT Licence Yes JS library to build graph
@@ -51,6 +51,7 @@ Copyright (C) 2012
- Juanjo Menent <jmenent@2byte.es> - Juanjo Menent <jmenent@2byte.es>
- Philippe Grand <philippe.grand@atoo-net.com> - Philippe Grand <philippe.grand@atoo-net.com>
- Jean Heimburger <jean@tiaris.info> - Jean Heimburger <jean@tiaris.info>
- Marcos García <marcosgdf@gmail.com>
Copyright (C) 2011 Copyright (C) 2011
- Laurent Destailleur <eldy@users.sourceforge.net> - Laurent Destailleur <eldy@users.sourceforge.net>

View File

@@ -2,11 +2,50 @@
English Dolibarr ChangeLog English Dolibarr ChangeLog
-------------------------------------------------------------- --------------------------------------------------------------
***** ChangeLog for 3.3 compared to 3.2 *****
***** ChangeLog for 3.2.2 compared to 3.2.1 *****
- Fix: Modify spanish VAT to new rates.
- Fix: Add error message when creating already existing product.
- Fix: Edition of percentage of an event.
- Fix: Minor look fix for theme bureau2crea.
- Fix: Start and end date not saved at project creation
- Fix: Default vat is zero for customer invoices if company does not use vat
- Fix: Localtaxes unit prices precision
***** ChangeLog for 3.2 compared to 3.1 ***** ***** ChangeLog for 3.2.1 compared to 3.2.0 *****
- Fix: Edit of projects.
- Fix: Activation of modules does not fails if directory install was removed.
- Fix: [ bug #444 ] Regression on auto-closing for proposals and orders.
- Fix: Update translations (catalan, french, spanish, brazilian).
- Fix: [ bug #445 ] Hex escaping in descriptions.
- Fix: error when validating shipment for non predefined products with a
selected warehouse.
- Fix: Bad local taxes if price base type is TTC for spanish local taxes.
- Fix: Phone not saved when using web service.
- Fix: [ bug #464 ] Payment form should allow to add transmitter for bank transfers.
- Fix: Allows to use a comma decimal separator in supplier invoices payments.
- Fix: Translation for tr_TR, es_ES, pt_BR.
- Fix: Products with no prices not visible.
- Fix: Access to product card created with very old version of Dolibarr.
- Fix: Delete temporary files after validating an invoice.
- Fix: preview of supplier order and invoice template.
- Fix: [ bug #485 ] Configurated amount for public auto-subscription form is not taken into account
- Fix: Average amount graphs weren't comparing the previous year stats
- Fix: Closed project didn't show the new status unless the page was refreshed
- Fix: Files were not being uploaded to a project's task
- Fix: [ bug #503 ] Unable to delete linked file to a deposit
- Fix: [ bug #501 ] Error while trying to modify an user
- Fix: [ bug #506 ] Can't set percentage of a started event
- Fix: Bad assignation of const for pdf delivery module name
***** ChangeLog for 3.2.0 compared to 3.1.3 *****
WARNING: PHP lower than 5.x are no more supported. WARNING: PHP lower than 5.x are no more supported.
WARNING: Because of a major datastructure change onto supplier prices tables, be aware WARNING: Because of a major datastructure change onto supplier prices tables, be aware
to make a backup of your database before making upgrade. to make a backup of your database before making upgrade.
@@ -70,6 +109,10 @@ For users:
- Fix: Can use POS module with several concurrent users. - Fix: Can use POS module with several concurrent users.
- Fix: Installer don't fails with Mysql version that added a ssl_cypher field. - Fix: Installer don't fails with Mysql version that added a ssl_cypher field.
- Fix: Sanitize input parameters. - Fix: Sanitize input parameters.
- Fix: [ bug #368 ] Product list
- Fix: [ bug #370 ] Filter in accountancy -> suppliers_bills
- Fix: [ bug #399 ] Bad calculation of local taxes in update line products
- Fix: [ bug #427 ] Bad links to wiki help in certains menus
For developers: For developers:
- New: Can add a left menu into an existing top menu or left menu. - New: Can add a left menu into an existing top menu or left menu.
@@ -98,6 +141,29 @@ For developers:
WARNING: To reduce technic debt, all functions dolibarr_xxx were renamed int dol_xxx. WARNING: To reduce technic debt, all functions dolibarr_xxx were renamed int dol_xxx.
***** ChangeLog for 3.1.3 compared to 3.1.2 *****
Fix: PgSQL - property must be set if success
Fix: Provide a solution for backup when mysqldump is not available
Fix: Bug #460 - Wrong entity assignment when creating a warehouse
Fix: bug #405 - Late icon always displayed on comm/propal.php
***** ChangeLog for 3.1.2 compared to 3.1.1 *****
- Fix: Can clone a proposal
- Fix: Add member ID in substitution method
- Fix: Duplicate end tag and missing form parts
- Fix: Support companies with no prof id.
- Fix: Sanitize data
- Fix: Bug #318
- Fix: Bug #369
- Fix: More bugs
***** ChangeLog for 3.1.1 compared to 3.1.0 ***** ***** ChangeLog for 3.1.1 compared to 3.1.0 *****
- New: Add option FACTURE_DEPOSITS_ARE_JUST_PAYMENTS. With this option added, - New: Add option FACTURE_DEPOSITS_ARE_JUST_PAYMENTS. With this option added,
@@ -118,6 +184,7 @@ WARNING: To reduce technic debt, all functions dolibarr_xxx were renamed int dol
***** ChangeLog for 3.1 compared to 3.0 ***** ***** ChangeLog for 3.1 compared to 3.0 *****
WARNING: IE6 browser is no more supported in this version. WARNING: IE6 browser is no more supported in this version.
For users: For users:
- New: War against number of clicks: - New: War against number of clicks:

View File

@@ -1,9 +1,9 @@
dolibarr (3.3.0+nmu1) unstable; urgency=low dolibarr (3.2.2+nmu1) unstable; urgency=low
* Non-maintainer upload. * Non-maintainer upload.
* New upstream release. * New upstream release.
closes: bug#634783 closes: bug#634783
-- Dolibarr team <contact@dolibarr.org> Mon, 10 Aug 2011 12:00:00 +0100 -- Dolibarr team <contact@dolibarr.org> Mon, 18 Jun 2012 12:00:00 +0100
# For a changelog file dedicated to end users, see /usr/share/doc/dolibarr/ChangeLog.gz # For a changelog file dedicated to end users, see /usr/share/doc/dolibarr/ChangeLog.gz

View File

@@ -9,13 +9,12 @@ Build-Depends: debhelper (>= 7), po-debconf, dpatch
Package: dolibarr Package: dolibarr
Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5, Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5,
php5-mysql | php5-mysqli, php5-mysql | php5-mysqli,
php5-cli, php5-curl, php5-gd, php5-ldap, php-pear, php-mail-mime, php5-geoip, php-fpdf, php5-cli, php5-curl, php5-gd, php5-ldap, php-pear, php-mail-mime, php5-geoip,
libphp-adodb, php-fpdf,
libfpdi-php, libphp-adodb,
libfpdf-tpl-php,
libnusoap-php, libnusoap-php,
libphp-pclzip, libphp-pclzip,
libjs-jquery, libjs-jquery-ui, libjs-flot, ckeditor, libjs-jquery, libjs-jquery-ui, ckeditor,
ttf-dejavu-core, ttf-dejavu-core,
xdg-utils, xdg-utils,
mysql-server, mysql-server,

View File

@@ -6,11 +6,10 @@ Installed-Size: 61200
Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5, Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5,
php5-mysql | php5-mysqli, php5-mysql | php5-mysqli,
php5-cli, php5-curl, php5-gd, php5-ldap, php-pear, php-mail-mime, php5-geoip, php5-cli, php5-curl, php5-gd, php5-ldap, php-pear, php-mail-mime, php5-geoip,
libphp-adodb,
libnusoap-php, libnusoap-php,
libphp-pclzip, libphp-pclzip,
libfpdi-php, libjs-jquery, libjs-jquery-ui, ckeditor,
libfpdf-tpl-php,
ckeditor,
ttf-dejavu-core, ttf-dejavu-core,
xdg-utils, xdg-utils,
mysql-server mysql-server

View File

@@ -83,8 +83,9 @@ case "$1" in
chown -R root:www-data $installconfig chown -R root:www-data $installconfig
chmod -R 660 $installconfig chmod -R 660 $installconfig
if [ ! -s $config ] # If a conf already exists and its content was already completed by installer
then if [ ! -s $config ] || ! grep -q "File generated by" $config
then
# Create an empty conf.php with permission to web server # Create an empty conf.php with permission to web server
echo Create empty file $config echo Create empty file $config
touch $config touch $config
@@ -93,17 +94,17 @@ case "$1" in
else else
# File already exist. We add params not found. # File already exist. We add params not found.
echo Add new params to overwrite path to use shared libraries/fonts echo Add new params to overwrite path to use shared libraries/fonts
grep -q -c "dolibarr_lib_ADODB_PATH" $config || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
grep -q -c "dolibarr_lib_FPDI_PATH" $config || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config #grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config #grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config #grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
grep -q -c "dolibarr_js_CKEDITOR" $config || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
grep -q -c "dolibarr_js_JQUERY" $config || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
grep -q -c "dolibarr_js_JQUERY_UI" $config || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
fi fi

View File

@@ -3,7 +3,8 @@
# #
# see: dh_installdeb(1) # see: dh_installdeb(1)
set -e #set -e
set +e
# summary of how this script can be called: # summary of how this script can be called:
# * <postrm> `remove' # * <postrm> `remove'

View File

@@ -27,7 +27,7 @@ $force_install_lockinstall='444';
// Value to overwrite path to use shared libraries/fonts instead of embedded one // Value to overwrite path to use shared libraries/fonts instead of embedded one
$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; $force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
$force_dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; //$force_dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi';
$force_dolibarr_lib_GEOIP_PATH=''; $force_dolibarr_lib_GEOIP_PATH='';
$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; $force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; $force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip';
@@ -36,7 +36,7 @@ $force_dolibarr_lib_TCPDF_PATH='';
$force_dolibarr_js_CKEDITOR='/javascript/ckeditor'; $force_dolibarr_js_CKEDITOR='/javascript/ckeditor';
$force_dolibarr_js_JQUERY='/javascript/jquery'; $force_dolibarr_js_JQUERY='/javascript/jquery';
$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; $force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui';
$force_dolibarr_js_JQUERY_FLOT='/javascript/flot'; //$force_dolibarr_js_JQUERY_FLOT='/javascript/flot';
$force_dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf'; $force_dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf';
?> ?>

View File

@@ -93,17 +93,18 @@ clean:
# clean from all embedded libraries (we use package dependencies instead) # clean from all embedded libraries (we use package dependencies instead)
rm -fr htdocs/includes/adodbtime rm -fr htdocs/includes/adodbtime
rm -fr htdocs/includes/ckeditor rm -fr htdocs/includes/ckeditor
rm -fr htdocs/includes/fpdfi # rm -fr htdocs/includes/fpdfi
rm -fr htdocs/includes/fonts rm -fr htdocs/includes/fonts
rm -fr htdocs/includes/geoip rm -fr htdocs/includes/geoip
rm -fr htdocs/includes/nusoap rm -fr htdocs/includes/nusoap
rm -fr htdocs/includes/odtphp/zip/pclzip rm -fr htdocs/includes/odtphp/zip/pclzip
rm -fr htdocs/includes/jquery/css rm -fr htdocs/includes/jquery/css
rm -fr htdocs/includes/jquery/js rm -fr htdocs/includes/jquery/js
rm -fr htdocs/includes/jquery/plugins/flot # rm -fr htdocs/includes/jquery/plugins/flot
rm -fr htdocs/includes/jquery/plugins/jstree rm -fr htdocs/includes/jquery/plugins/jstree
rm -fr htdocs/includes/jquery/plugins/lightbox rm -fr htdocs/includes/jquery/plugins/lightbox
rm -fr htdocs/includes/jquery/plugins/mobile rm -fr htdocs/includes/jquery/plugins/mobile
rm -fr htdocs/includes/jquery/plugins/multiselect
rm -fr htdocs/includes/phpexcel/PHPExcel/Shared/PDF rm -fr htdocs/includes/phpexcel/PHPExcel/Shared/PDF
rm -fr htdocs/includes/phpexcel/PHPExcel/Shared/PCLZip rm -fr htdocs/includes/phpexcel/PHPExcel/Shared/PCLZip
rm -fr htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-2.33 rm -fr htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-2.33

View File

@@ -31,7 +31,7 @@ PROJECT_NAME = dolibarr
# This could be handy for archiving the generated documentation or # This could be handy for archiving the generated documentation or
# if some version control system is used. # if some version control system is used.
PROJECT_NUMBER = 3.3.0 PROJECT_NUMBER = 3.2.0
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put. # base path where the generated documentation will be put.

View File

@@ -16,13 +16,14 @@
[Setup] [Setup]
; ----- Change this ----- ; ----- Change this -----
AppName=DoliWamp AppName=DoliWamp
; DoliWamp-x.x.x or DoliWamp-x.x.x-dev or DoliWamp-x.x.x-beta ; DoliWamp-x.x.x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
AppVerName=DoliWamp-3.3.0-alpha AppVerName=DoliWamp-3.2.2
; DoliWamp-x.x x or DoliWamp-x.x.x-dev or DoliWamp-x.x.x-beta ; DoliWamp-x.x x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
OutputBaseFilename=DoliWamp-3.3.0-alpha OutputBaseFilename=DoliWamp-3.2.2
; Define full path from wich all relative path are defined ; Define full path from wich all relative path are defined
; You must modify this to put here your dolibarr root directory ; You must modify this to put here your dolibarr root directory
SourceDir=c:\Documents and Settings\ldestail\git\dolibarr ;SourceDir=C:\Documents and Settings\ldestail\git\dolibarr_old
SourceDir=Z:\home\ldestail\git\dolibarr_old
; ----- End of change ; ----- End of change
;OutputManifestFile=build\doliwampbuild.log ;OutputManifestFile=build\doliwampbuild.log
AppId=doliwamp AppId=doliwamp
@@ -31,7 +32,7 @@ AppPublisherURL=http://www.nltechno.com
AppSupportURL=http://www.dolibarr.org AppSupportURL=http://www.dolibarr.org
AppUpdatesURL=http://www.dolibarr.org AppUpdatesURL=http://www.dolibarr.org
AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql softwares. AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql softwares.
AppCopyright=Copyright (C) 2008-2011 Laurent Destailleur, NLTechno AppCopyright=Copyright (C) 2008-2012 Laurent Destailleur, NLTechno
DefaultDirName=c:\dolibarr DefaultDirName=c:\dolibarr
DefaultGroupName=Dolibarr DefaultGroupName=Dolibarr
;LicenseFile=COPYING ;LicenseFile=COPYING

24
build/makepack-dolibarr.pl Normal file → Executable file
View File

@@ -9,8 +9,8 @@ use Cwd;
$PROJECT="dolibarr"; $PROJECT="dolibarr";
$MAJOR="3"; $MAJOR="3";
$MINOR="3"; $MINOR="2";
$BUILD="0-alpha"; # Mettre x pour release, x-dev pour dev, x-beta pour beta, x-rc pour release candidate $BUILD="2"; # Mettre x pour release, x-dev pour dev, x-beta pour beta, x-rc pour release candidate
$RPMSUBVERSION="auto"; # auto use value found into BUILD $RPMSUBVERSION="auto"; # auto use value found into BUILD
@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages @LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
@@ -24,7 +24,7 @@ $RPMSUBVERSION="auto"; # auto use value found into BUILD
"RPM_OPENSUSE"=>"rpmbuild", "RPM_OPENSUSE"=>"rpmbuild",
"DEB"=>"dpkg", "DEB"=>"dpkg",
"APS"=>"zip", "APS"=>"zip",
"EXEDOLIWAMP"=>"iscc.exe" "EXEDOLIWAMP"=>"ISCC.exe"
); );
%ALTERNATEPATH=( %ALTERNATEPATH=(
"7z"=>"7-ZIP", "7z"=>"7-ZIP",
@@ -38,7 +38,7 @@ $FILENAMEZIP="$PROJECT-$MAJOR.$MINOR.$BUILD";
$FILENAMERPM="$PROJECT-$MAJOR.$MINOR.$BUILD-$RPMSUBVERSION"; $FILENAMERPM="$PROJECT-$MAJOR.$MINOR.$BUILD-$RPMSUBVERSION";
$FILENAMEDEB="${PROJECT}_${MAJOR}.${MINOR}.${BUILD}"; $FILENAMEDEB="${PROJECT}_${MAJOR}.${MINOR}.${BUILD}";
$FILENAMEAPS="$PROJECT-$MAJOR.$MINOR.$BUILD.app"; $FILENAMEAPS="$PROJECT-$MAJOR.$MINOR.$BUILD.app";
$FILENAMEEXEDOLIWAMP="$PROJECT-$MAJOR.$MINOR.$BUILD"; $FILENAMEEXEDOLIWAMP="DoliWamp-$MAJOR.$MINOR.$BUILD";
if (-d "/usr/src/redhat") { $RPMDIR="/usr/src/redhat"; } # redhat if (-d "/usr/src/redhat") { $RPMDIR="/usr/src/redhat"; } # redhat
if (-d "/usr/src/RPM") { $RPMDIR="/usr/src/RPM"; } # mandrake if (-d "/usr/src/RPM") { $RPMDIR="/usr/src/RPM"; } # mandrake
@@ -102,7 +102,8 @@ for (0..@ARGV-1) {
$FILENAMESNAPSHOT.="-".$PREFIX; $FILENAMESNAPSHOT.="-".$PREFIX;
} }
} }
if ($ENV{"DESTI"}) { $DESTI = $ENV{"DESTI"}; } # Force output dir if env DESTI is defined if ($ENV{"DESTIBETARC"} && $BUILD =~ /[a-z]/i) { $DESTI = $ENV{"DESTIBETARC"}; } # Force output dir if env DESTI is defined
if ($ENV{"DESTISTABLE"} && $BUILD =~ /^[0-9]+$/) { $DESTI = $ENV{"DESTISTABLE"}; } # Force output dir if env DESTI is defined
print "Makepack version $VERSION\n"; print "Makepack version $VERSION\n";
@@ -165,7 +166,7 @@ $atleastonerpm=0;
foreach my $target (keys %CHOOSEDTARGET) { foreach my $target (keys %CHOOSEDTARGET) {
if ($target =~ /RPM/i) if ($target =~ /RPM/i)
{ {
if ($atleastonerpm && ! $ENV{"DESTI"}) if ($atleastonerpm && ($DESTI eq "$SOURCE/build"))
{ {
print "Error: You asked creation of several rpms. Because all rpm have same name, you must defined an environment variable DESTI to tell packager where it can create subdirs for each generated package.\n"; print "Error: You asked creation of several rpms. Because all rpm have same name, you must defined an environment variable DESTI to tell packager where it can create subdirs for each generated package.\n";
exit; exit;
@@ -323,7 +324,6 @@ if ($nboftargetok) {
$ret=`rm -f $BUILDROOT/$PROJECT/.gitignore $BUILDROOT/$PROJECT/*/.gitignore $BUILDROOT/$PROJECT/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.gitignore`; $ret=`rm -f $BUILDROOT/$PROJECT/.gitignore $BUILDROOT/$PROJECT/*/.gitignore $BUILDROOT/$PROJECT/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.gitignore`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/geoip/sample*.*`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/geoip/sample*.*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/lightbox`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/lightbox`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/jstree`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/license.txt`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/license.txt`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF`;
@@ -412,7 +412,7 @@ if ($nboftargetok) {
print "Go to directory $BUILDROOT\n"; print "Go to directory $BUILDROOT\n";
$olddir=getcwd(); $olddir=getcwd();
chdir("$BUILDROOT"); chdir("$BUILDROOT");
$cmd= "7z a -r -tzip -xr\@\"$BUILDROOT\/$FILENAMEZIP\/build\/zip\/zip_exclude.txt\" -mx $BUILDROOT/$FILENAMEZIP.zip $FILENAMEZIP\\*"; $cmd= "7z a -r -tzip -xr\@\"$BUILDROOT\/$FILENAMEZIP\/build\/zip\/zip_exclude.txt\" -mx $BUILDROOT/$FILENAMEZIP.zip $FILENAMEZIP\/*";
print $cmd."\n"; print $cmd."\n";
$ret= `$cmd`; $ret= `$cmd`;
chdir("$olddir"); chdir("$olddir");
@@ -763,8 +763,10 @@ if ($nboftargetok) {
print "Remove target $FILENAMEEXEDOLIWAMP.exe...\n"; print "Remove target $FILENAMEEXEDOLIWAMP.exe...\n";
unlink "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"; unlink "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe";
print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCE\\build\\exe\\doliwamp\\doliwamp.iss\"\n"; $SOURCEBACK=$SOURCE;
$cmd= "iscc.exe \"$SOURCE\\build\\exe\\doliwamp\\doliwamp.iss\""; $SOURCEBACK =~ s/\//\\/g;
print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"\n";
$cmd= "ISCC.exe \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"";
print "$cmd\n"; print "$cmd\n";
$ret= `$cmd`; $ret= `$cmd`;
#print "$ret\n"; #print "$ret\n";
@@ -772,6 +774,8 @@ if ($nboftargetok) {
# Move to final dir # Move to final dir
print "Move \"$SOURCE\\build\\$FILENAMEEXEDOLIWAMP.exe\" to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n"; print "Move \"$SOURCE\\build\\$FILENAMEEXEDOLIWAMP.exe\" to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
rename("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe","$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"); rename("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe","$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe");
print "Move $SOURCE/build/$FILENAMEEXEDOLIWAMP.exe to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
$ret=`mv "$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`;
next; next;
} }
} }

0
build/makepack-dolibarrmodule.pl Normal file → Executable file
View File

0
build/makepack-dolibarrtheme.pl Normal file → Executable file
View File

View File

@@ -8,7 +8,7 @@ This files describe steps made by Dolibarr packaging team to make a
beta version of Dolibarr, step by step. beta version of Dolibarr, step by step.
- Check all files are commited. - Check all files are commited.
- Update version/info in / directory (README*.txt, ChangeLog...) - Update version/info in /ChangeLog and /filefunc.inc.php
- Update version number with x.x.x in build/doxygen/dolibarr-doxygen.doxyfile - Update version number with x.x.x in build/doxygen/dolibarr-doxygen.doxyfile
- Update version number with x.x.x in build/perl/virtualmin/dolibarr.pl - Update version number with x.x.x in build/perl/virtualmin/dolibarr.pl
- Update version number with x.x.x-y in build/makepack-dolibarr.pl - Update version number with x.x.x-y in build/makepack-dolibarr.pl
@@ -34,7 +34,7 @@ This files describe steps made by Dolibarr packaging team to make a
complete release of Dolibarr, step by step. complete release of Dolibarr, step by step.
- Check all files are commited. - Check all files are commited.
- Update version/info in / directory (README*.txt, ChangeLog...) - Update version/info in /ChangeLog and /filefunc.inc.php
- Update version number with x.x.x-y in build/makepack-dolibarr.pl - Update version number with x.x.x-y in build/makepack-dolibarr.pl
- Update version number with x.x.x-y in build/exe/doliwamp/doliwamp.iss - Update version number with x.x.x-y in build/exe/doliwamp/doliwamp.iss
- Update version number with x.x.x-y in htdocs/filefunc.inc.php - Update version number with x.x.x-y in htdocs/filefunc.inc.php

View File

@@ -4,10 +4,10 @@
<CompanyName /> <CompanyName />
<Program_Info> <Program_Info>
<Program_Name>DoliWamp</Program_Name> <Program_Name>DoliWamp</Program_Name>
<Program_Version>3.1.0</Program_Version> <Program_Version>3.2.2</Program_Version>
<Program_Release_Month>07</Program_Release_Month> <Program_Release_Month>09</Program_Release_Month>
<Program_Release_Day>09</Program_Release_Day> <Program_Release_Day>10</Program_Release_Day>
<Program_Release_Year>2011</Program_Release_Year> <Program_Release_Year>2012</Program_Release_Year>
<Program_Cost_Dollars /> <Program_Cost_Dollars />
<Program_Cost_Other_Code /> <Program_Cost_Other_Code />
<Program_Cost_Other /> <Program_Cost_Other />
@@ -43,6 +43,7 @@
<Char_Desc_250>DoliWamp is the Dolibarr ERP/CRM for Windows, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs.</Char_Desc_250> <Char_Desc_250>DoliWamp is the Dolibarr ERP/CRM for Windows, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs.</Char_Desc_250>
<Char_Desc_450>DoliWamp is the Dolibarr ERP/CRM autoinstaller for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. Dolibarr ERP/CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations.</Char_Desc_450> <Char_Desc_450>DoliWamp is the Dolibarr ERP/CRM autoinstaller for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. Dolibarr ERP/CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations.</Char_Desc_450>
<Char_Desc_2000>DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP &amp; CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop. <Char_Desc_2000>DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP &amp; CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop.
DoliWamp is the auto-installer for Windows users with no technical knowledge to install Dolibarr ERP/CRM and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file.</Char_Desc_2000> DoliWamp is the auto-installer for Windows users with no technical knowledge to install Dolibarr ERP/CRM and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file.</Char_Desc_2000>
@@ -81,6 +82,11 @@ DoliWamp is the auto-installer for Windows users with no technical knowledge to
</Web_Info> </Web_Info>
<Permissions> <Permissions>
<Distribution_Permissions>GNU GPL</Distribution_Permissions> <Distribution_Permissions>GNU GPL</Distribution_Permissions>
<EULA>GNU GPL</EULA>
</Permissions>
<ASP>
<ASP_FORM>Y</ASP_FORM>
<ASP_Member>N</ASP_Member>
<ASP_Member_Number /> <ASP_Member_Number />
</ASP> </ASP>
<Affiliates> <Affiliates>
@@ -187,9 +193,4 @@ DoliWamp is the auto-installer for Windows users with no technical knowledge to
<Affiliates_Yaskifo_Order_Page /> <Affiliates_Yaskifo_Order_Page />
<Affiliates_Yaskifo_Vendor_ID /> <Affiliates_Yaskifo_Vendor_ID />
<Affiliates_Yaskifo_Product_ID /> <Affiliates_Yaskifo_Product_ID />
</Affiliates>
<ASP>
<ASP_FORM>Y</ASP_FORM>
<ASP_Member>N</ASP_Member>
<ASP_Member_Number />
<Affiliates_Yaskifo_Maximum_Commission_Rate /> <Affiliates_Yaskifo_Maximum_Commission_Rate />

View File

@@ -4,10 +4,10 @@
<CompanyName /> <CompanyName />
<Program_Info> <Program_Info>
<Program_Name>Dolibarr</Program_Name> <Program_Name>Dolibarr</Program_Name>
<Program_Version>3.1..0</Program_Version> <Program_Version>3.2.2</Program_Version>
<Program_Release_Month>07</Program_Release_Month> <Program_Release_Month>09</Program_Release_Month>
<Program_Release_Day>09</Program_Release_Day> <Program_Release_Day>10</Program_Release_Day>
<Program_Release_Year>2011</Program_Release_Year> <Program_Release_Year>2012</Program_Release_Year>
<Program_Cost_Dollars /> <Program_Cost_Dollars />
<Program_Cost_Other_Code /> <Program_Cost_Other_Code />
<Program_Cost_Other /> <Program_Cost_Other />
@@ -43,11 +43,31 @@
<Char_Desc_250>Dolibarr ERP &amp; CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to follow.</Char_Desc_250> <Char_Desc_250>Dolibarr ERP &amp; CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to follow.</Char_Desc_250>
<Char_Desc_450>Dolibarr ERP &amp; CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450> <Char_Desc_450>Dolibarr ERP &amp; CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450>
<Char_Desc_2000>Dolibarr ERP &amp; CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: <Char_Desc_2000>Dolibarr ERP &amp; CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple:
Simple to install Simple to install
Simple to use Simple to use
Simple to develop
Note that Dolibarr is also available with an auto-installer for Windows or Ubuntu users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. This version is called DoliWamp (for Windows) or DoliBuntu (for Ubuntu/Debian).</Char_Desc_2000>
</English>
<French>
<Keywords>dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp</Keywords>
<Char_Desc_45>Dolibarr ERP &amp; CRM</Char_Desc_45>
<Char_Desc_80>Dolibarr ERP &amp; CRM, le gestionnaire simple pour gérer votre activité</Char_Desc_80>
<Char_Desc_250>Dolibarr ERP &amp; CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
<Char_Desc_450>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP).</Char_Desc_450>
<Char_Desc_2000>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S):
Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle) Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle)
@@ -56,18 +76,6 @@ Note that Dolibarr is also available with an auto-installer for Windows or Ubunt
Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie) Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie)
<Char_Desc_250>Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività.</Char_Desc_250>
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
</Italian>
<French>
<Keywords>dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp</Keywords>
<Char_Desc_45>Dolibarr ERP &amp; CRM</Char_Desc_45>
<Char_Desc_80>Dolibarr ERP &amp; CRM, le gestionnaire simple pour gérer votre activité</Char_Desc_80>
<Char_Desc_250>Dolibarr ERP &amp; CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
<Char_Desc_450>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP).</Char_Desc_450>
<Char_Desc_2000>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S):
Simple pour le développement (pas de frameworks lourds). Simple pour le développement (pas de frameworks lourds).
@@ -88,6 +96,11 @@ Dolibarr intègre en effet sa propre architecture (design patterns) permettant
<Web_Info> <Web_Info>
<Application_URLs> <Application_URLs>
<Application_Info_URL>http://www.dolibarr.org</Application_Info_URL> <Application_Info_URL>http://www.dolibarr.org</Application_Info_URL>
<Application_Order_URL>http://www.dolibarr.org</Application_Order_URL>
<Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
<Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
<Application_XML_File_URL>http://www.dolibarr.org/files/pad_dolibarr.xml</Application_XML_File_URL>
</Application_URLs>
<Download_URLs> <Download_URLs>
<Primary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Primary_Download_URL> <Primary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Primary_Download_URL>
<Secondary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Secondary_Download_URL> <Secondary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Secondary_Download_URL>
@@ -194,9 +207,4 @@ Dolibarr intègre en effet sa propre architecture (design patterns) permettant
<Affiliates_Shareasale_Product_ID /> <Affiliates_Shareasale_Product_ID />
<Affiliates_Shareasale_Maximum_Commission_Rate /> <Affiliates_Shareasale_Maximum_Commission_Rate />
<Affiliates_SWReg_Order_Page /> <Affiliates_SWReg_Order_Page />
<Affiliates_VFree_Vendor_ID />
<Affiliates_VFree_Product_ID />
<Affiliates_VFree_Maximum_Commission_Rate />
<Affiliates_Yaskifo_Order_Page />
<Affiliates_Yaskifo_Vendor_ID />
<Affiliates_SWReg_Vendor_ID /> <Affiliates_SWReg_Vendor_ID />

View File

@@ -6,26 +6,26 @@
<MASTER_PAD_INFO>Portable Application Description, or PAD for short, is a data set that is used by shareware authors to disseminate information to anyone interested in their software products. To find out more go to http://pad.asp-software.org</MASTER_PAD_INFO> <MASTER_PAD_INFO>Portable Application Description, or PAD for short, is a data set that is used by shareware authors to disseminate information to anyone interested in their software products. To find out more go to http://pad.asp-software.org</MASTER_PAD_INFO>
</MASTER_PAD_VERSION_INFO> </MASTER_PAD_VERSION_INFO>
<Company_Info> <Company_Info>
<Company_Name>Dolibarr team</Company_Name> <Company_Name>NLTechno</Company_Name>
<Address_1>11 rue raymond Queneau</Address_1> <Address_1>11 Rue raymond Queneau</Address_1>
<Address_2 /> <Address_2 />
<City_Town>Rueil Malmaison</City_Town> <City_Town>Rueil Malmaison</City_Town>
<State_Province /> <State_Province />
<Zip_Postal_Code>92500</Zip_Postal_Code> <Zip_Postal_Code>92500</Zip_Postal_Code>
<Country>FRANCE</Country> <Country>FRANCE</Country>
<Company_WebSite_URL>http://www.dolibarr.org</Company_WebSite_URL> <Company_WebSite_URL>http://www.nltechno.com</Company_WebSite_URL>
<Contact_Info> <Contact_Info>
<Author_First_Name>Dolibarr team</Author_First_Name> <Author_First_Name>NLTechno</Author_First_Name>
<Author_Last_Name>Dolibarr team</Author_Last_Name> <Author_Last_Name>NLTechno</Author_Last_Name>
<Author_Email>dolibarr-dev@nongnu.org</Author_Email> <Author_Email>dolibarr@nltechno.com</Author_Email>
<Contact_First_Name>Dolibarr team</Contact_First_Name> <Contact_First_Name>NLTechno</Contact_First_Name>
<Contact_Last_Name>Dolibarr team</Contact_Last_Name> <Contact_Last_Name>NLTechno</Contact_Last_Name>
<Contact_Email>dolibarr-dev@nongnu.org</Contact_Email> <Contact_Email>dolibarr@nltechno.com</Contact_Email>
</Contact_Info> </Contact_Info>
<Support_Info> <Support_Info>
<Sales_Email>dolibarr-dev@nongnu.org</Sales_Email> <Sales_Email>dolibarr@nltechno.com</Sales_Email>
<Support_Email>dolibarr-dev@nongnu.org</Support_Email> <Support_Email>dolibarr@nltechno.com</Support_Email>
<General_Email>dolibarr-dev@nongnu.org</General_Email> <General_Email>dolibarr@nltechno.com</General_Email>
<Sales_Phone /> <Sales_Phone />
<Support_Phone /> <Support_Phone />
<General_Phone /> <General_Phone />
@@ -34,10 +34,10 @@
</Company_Info> </Company_Info>
<Program_Info> <Program_Info>
<Program_Name>Dolibarr</Program_Name> <Program_Name>Dolibarr</Program_Name>
<Program_Version>3.1.0</Program_Version> <Program_Version>3.2.2</Program_Version>
<Program_Release_Month>07</Program_Release_Month> <Program_Release_Month>09</Program_Release_Month>
<Program_Release_Day>09</Program_Release_Day> <Program_Release_Day>10</Program_Release_Day>
<Program_Release_Year>2011</Program_Release_Year> <Program_Release_Year>2012</Program_Release_Year>
<Program_Cost_Dollars /> <Program_Cost_Dollars />
<Program_Cost_Other_Code /> <Program_Cost_Other_Code />
<Program_Cost_Other /> <Program_Cost_Other />
@@ -46,14 +46,14 @@
<Program_Install_Support>No Install Support</Program_Install_Support> <Program_Install_Support>No Install Support</Program_Install_Support>
<Program_OS_Support>Linux,Mac OS X,Mac Other,Unix,Win2000,Win7 x32,Win7 x64,Win98,WinOther,WinServer,WinVista,WinVista x64,WinXP,Other</Program_OS_Support> <Program_OS_Support>Linux,Mac OS X,Mac Other,Unix,Win2000,Win7 x32,Win7 x64,Win98,WinOther,WinServer,WinVista,WinVista x64,WinXP,Other</Program_OS_Support>
<Program_Language>English,Arabic,Catalan,Chinese,Danish,Dutch,Finnish,French,German,Greek,Icelandic,Italian,Norwegian,Polish,Portuguese,Romanian,Russian,Slovenian,Spanish,Swedish,Turkish</Program_Language> <Program_Language>English,Arabic,Catalan,Chinese,Danish,Dutch,Finnish,French,German,Greek,Icelandic,Italian,Norwegian,Polish,Portuguese,Romanian,Russian,Slovenian,Spanish,Swedish,Turkish</Program_Language>
<Program_Change_Info>Increase performances, Setup process is easier, Reduce number of clicks required to use software</Program_Change_Info> <Program_Change_Info>http://www.dolibarr.org</Program_Change_Info>
<Program_Specific_Category>Business</Program_Specific_Category> <Program_Specific_Category>Business</Program_Specific_Category>
<Program_Category_Class>Business::Accounting &amp; Finance</Program_Category_Class> <Program_Category_Class>Business::Accounting &amp; Finance</Program_Category_Class>
<Program_System_Requirements>None</Program_System_Requirements> <Program_System_Requirements>None</Program_System_Requirements>
<File_Info> <File_Info>
<File_Size_Bytes>18037439</File_Size_Bytes> <File_Size_Bytes>9359175</File_Size_Bytes>
<File_Size_K>18037</File_Size_K> <File_Size_K>9139</File_Size_K>
<File_Size_MB>18.03</File_Size_MB> <File_Size_MB>8.93</File_Size_MB>
</File_Info> </File_Info>
<Expire_Info> <Expire_Info>
<Has_Expire_Info>N</Has_Expire_Info> <Has_Expire_Info>N</Has_Expire_Info>
@@ -73,9 +73,13 @@
<Char_Desc_250>Dolibarr ERP &amp; CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to follow.</Char_Desc_250> <Char_Desc_250>Dolibarr ERP &amp; CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to follow.</Char_Desc_250>
<Char_Desc_450>Dolibarr ERP &amp; CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450> <Char_Desc_450>Dolibarr ERP &amp; CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450>
<Char_Desc_2000>Dolibarr ERP &amp; CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: <Char_Desc_2000>Dolibarr ERP &amp; CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple:
Simple to install Simple to install
Simple to use Simple to use
@@ -85,9 +89,13 @@ Note that Dolibarr is also available with an auto-installer for Windows or Ubunt
Note that Dolibarr is also available with an auto-installer for Windows or Ubuntu users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. This version is called DoliWamp (for Windows) or DoliBuntu (for Ubuntu/Debian).</Char_Desc_2000> Note that Dolibarr is also available with an auto-installer for Windows or Ubuntu users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. This version is called DoliWamp (for Windows) or DoliBuntu (for Ubuntu/Debian).</Char_Desc_2000>
</English>
<French> <French>
<Keywords>dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp</Keywords>
<Char_Desc_45>Dolibarr ERP &amp; CRM</Char_Desc_45> <Char_Desc_45>Dolibarr ERP &amp; CRM</Char_Desc_45>
<Char_Desc_80>Dolibarr ERP &amp; CRM, le gestionnaire simple pour gérer votre activité</Char_Desc_80>
<Char_Desc_250>Dolibarr ERP &amp; CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250> <Char_Desc_250>Dolibarr ERP &amp; CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
<Char_Desc_450>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP).</Char_Desc_450>
<Char_Desc_2000>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S): <Char_Desc_2000>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S):
@@ -118,6 +126,11 @@ Dolibarr intègre en effet sa propre architecture (design patterns) permettant
<Web_Info> <Web_Info>
<Application_URLs> <Application_URLs>
<Application_Info_URL>http://www.dolibarr.org</Application_Info_URL> <Application_Info_URL>http://www.dolibarr.org</Application_Info_URL>
<Application_Order_URL>http://www.dolibarr.org</Application_Order_URL>
<Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
<Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
<Application_XML_File_URL>http://www.dolibarr.org/files/pad_dolibarr.xml</Application_XML_File_URL>
</Application_URLs>
<Download_URLs> <Download_URLs>
<Primary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Primary_Download_URL> <Primary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Primary_Download_URL>
<Secondary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Secondary_Download_URL> <Secondary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Secondary_Download_URL>
@@ -224,9 +237,4 @@ Dolibarr intègre en effet sa propre architecture (design patterns) permettant
<Affiliates_Shareasale_Product_ID /> <Affiliates_Shareasale_Product_ID />
<Affiliates_Shareasale_Maximum_Commission_Rate /> <Affiliates_Shareasale_Maximum_Commission_Rate />
<Affiliates_SWReg_Order_Page /> <Affiliates_SWReg_Order_Page />
<Affiliates_VFree_Vendor_ID />
<Affiliates_VFree_Product_ID />
<Affiliates_VFree_Maximum_Commission_Rate />
<Affiliates_Yaskifo_Order_Page />
<Affiliates_Yaskifo_Vendor_ID />
<Affiliates_SWReg_Vendor_ID /> <Affiliates_SWReg_Vendor_ID />

View File

@@ -34,10 +34,10 @@
</Company_Info> </Company_Info>
<Program_Info> <Program_Info>
<Program_Name>DoliWamp</Program_Name> <Program_Name>DoliWamp</Program_Name>
<Program_Version>3.1.0</Program_Version> <Program_Version>3.2.2</Program_Version>
<Program_Release_Month>07</Program_Release_Month> <Program_Release_Month>09</Program_Release_Month>
<Program_Release_Day>09</Program_Release_Day> <Program_Release_Day>10</Program_Release_Day>
<Program_Release_Year>2011</Program_Release_Year> <Program_Release_Year>2012</Program_Release_Year>
<Program_Cost_Dollars /> <Program_Cost_Dollars />
<Program_Cost_Other_Code /> <Program_Cost_Other_Code />
<Program_Cost_Other /> <Program_Cost_Other />
@@ -94,8 +94,8 @@ DoliWamp is the auto-installer for Windows users with no technical knowledge to
</Italian> </Italian>
</Program_Descriptions> </Program_Descriptions>
<Web_Info> <Web_Info>
<Application_URLs> <Application_URLs>
<Application_Info_URL>http://www.nltechno.com/pages/dolibarrwinbin.php</Application_Info_URL> <Application_Info_URL>http://www.nltechno.com/doliwamp/</Application_Info_URL>
<Application_Order_URL>http://www.nltechno.com/doliwamp/</Application_Order_URL> <Application_Order_URL>http://www.nltechno.com/doliwamp/</Application_Order_URL>
<Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL> <Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
<Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL> <Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>

View File

@@ -30,7 +30,7 @@ return "Regis Houssin";
# script_dolibarr_versions() # script_dolibarr_versions()
sub script_dolibarr_versions sub script_dolibarr_versions
{ {
return ( "3.3.0", "3.2.0", "3.1.0", "3.0.1", "2.9.0" ); return ( "3.2.1", "3.1.1", "3.0.1", "2.9.0" );
} }
sub script_dolibarr_category sub script_dolibarr_category
@@ -43,13 +43,6 @@ sub script_dolibarr_php_vers
return ( 5 ); return ( 5 );
} }
sub script_dolibarr_php_vars
{
return ( [ 'memory_limit', '64M', '+' ],
[ 'upload_max_filesize', '10M', '+' ],
[ 'max_execution_time', '60', '+' ] );
}
sub script_dolibarr_php_modules sub script_dolibarr_php_modules
{ {
local ($d, $ver, $phpver, $opts) = @_; local ($d, $ver, $phpver, $opts) = @_;
@@ -348,21 +341,34 @@ if ($opts->{'newdb'}) {
return (1, "Dolibarr directory and tables deleted."); return (1, "Dolibarr directory and tables deleted.");
} }
# script_dolibarr_latest(version) # script_dolibarr_realversion(&domain, &opts)
# Returns a URL and regular expression or callback func to get the version # Returns the real version number of some script install, or undef if unknown
sub script_dolibarr_latest sub script_dolibarr_realversion
{
local ($d, $opts, $sinfo) = @_;
local $lref = &read_file_lines("$opts->{'dir'}/filefunc.inc.php", 1);
foreach my $l (@$lref) {
if ($l =~ /'DOL_VERSION','([0-9a-z\.\-]+)'/) {
return $1;
}
}
return undef;
}
# script_dolibarr_check_latest(version)
# Checks if some version is the latest for this project, and if not returns
# a newer one. Otherwise returns undef.
sub script_dolibarr_check_latest
{ {
local ($ver) = @_; local ($ver) = @_;
if ($ver >= 3.0) { local @vers = &osdn_package_versions("dolibarr",
return ( "http://sourceforge.net/projects/dolibarr/files/". $ver >= 3.2 ? "dolibarr\\-(3\\.[0-9\\.]+)\\.tgz" :
"Dolibarr%20ERP-CRM", $ver >= 3.1 ? "dolibarr\\-(3\\.1\\.[0-9\\.]+)\\.tgz" :
"(3\\.[0-9\\.]+)" ); $ver >= 3 ? "dolibarr\\-(3\\.0\\.[0-9\\.]+)\\.tgz" :
} $ver >= 2.9 ? "dolibarr\\-(2\\.9\\.[0-9\\.]+)\\.tgz" :
elsif ($ver >= 2.9) { "dolibarr\\-(2\\.8\\.[0-9\\.]+)\\.tgz");
return ( "http://www.dolibarr.fr/files/stable/", return "Failed to find versions" if (!@vers);
"dolibarr\\-(2\\.[0-9\\.]+)" ); return $ver eq $vers[0] ? undef : $vers[0];
}
return ( );
} }
sub script_dolibarr_site sub script_dolibarr_site
@@ -376,4 +382,3 @@ return 2;
} }
1; 1;

View File

@@ -217,6 +217,26 @@ echo Create document directory $docdir
# Set correct owner on config files # Set correct owner on config files
%{__chown} -R root:$apachegroup /etc/dolibarr/* %{__chown} -R root:$apachegroup /etc/dolibarr/*
# If a conf already exists and its content was already completed by installer
export config=%{_sysconfdir}/dolibarr/conf.php
if [ -s $config ] && grep -q "File generated by" $config
then
# File already exist. We add params not found.
echo Add new params to overwrite path to use shared libraries/fonts
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
fi
# Create config for se $seconfig # Create config for se $seconfig
echo Add SE Linux permissions for dolibarr echo Add SE Linux permissions for dolibarr
# semanage add records into /etc/selinux/targeted/contexts/files/file_contexts.local # semanage add records into /etc/selinux/targeted/contexts/files/file_contexts.local
@@ -292,5 +312,5 @@ fi
%changelog %changelog
* Wed Mar 4 2012 Laurent Destailleur 3.3.0-0.1.a * Mon Jul 23 2012 Laurent Destailleur 3.2.2-0.3
- Initial version (#723326) - Initial version (#723326)

View File

@@ -254,6 +254,26 @@ fi
# Set correct owner on config files # Set correct owner on config files
%{__chown} -R root:$apachegroup /etc/dolibarr/* %{__chown} -R root:$apachegroup /etc/dolibarr/*
# If a conf already exists and its content was already completed by installer
export config=%{_sysconfdir}/dolibarr/conf.php
if [ -s $config ] && grep -q "File generated by" $config
then
# File already exist. We add params not found.
echo Add new params to overwrite path to use shared libraries/fonts
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
fi
# Create config for se $seconfig # Create config for se $seconfig
if [ "x$os" = "xfedora-redhat" -a -s /sbin/restorecon ]; then if [ "x$os" = "xfedora-redhat" -a -s /sbin/restorecon ]; then
echo Add SE Linux permissions for dolibarr echo Add SE Linux permissions for dolibarr
@@ -348,5 +368,5 @@ fi
%changelog %changelog
* Wed Mar 4 2012 Laurent Destailleur 3.3.0-0.1.a * Mon Jul 23 2012 Laurent Destailleur 3.2.2-0.3
- Initial version (#723326) - Initial version (#723326)

View File

@@ -214,6 +214,26 @@ echo Create document directory $docdir
# Set correct owner on config files # Set correct owner on config files
%{__chown} -R root:$apachegroup /etc/dolibarr/* %{__chown} -R root:$apachegroup /etc/dolibarr/*
# If a conf already exists and its content was already completed by installer
export confcomplete=`grep -c "File generated by" %{_sysconfdir}/dolibarr/conf.php 2>/dev/null`
if [ -s %{_sysconfdir}/dolibarr/conf.php -a "x$confcomplete" != "x0" ]
then
# File already exist. We add params not found.
echo Add new params to overwrite path to use shared libraries/fonts
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/TTF/dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
fi
# Create a config link dolibarr.conf # Create a config link dolibarr.conf
if [ ! -L $apachelink ]; then if [ ! -L $apachelink ]; then
echo Create dolibarr web server config link $apachelink echo Create dolibarr web server config link $apachelink
@@ -281,5 +301,5 @@ fi
%changelog %changelog
* Wed Mar 4 2012 Laurent Destailleur 3.3.0-0.1.a * Mon Jul 23 2012 Laurent Destailleur 3.2.2-0.3
- Initial version (#723326) - Initial version (#723326)

View File

@@ -219,6 +219,26 @@ echo Create document directory $docdir
# Set correct owner on config files # Set correct owner on config files
%{__chown} -R root:$apachegroup /etc/dolibarr/* %{__chown} -R root:$apachegroup /etc/dolibarr/*
# If a conf already exists and its content was already completed by installer
export config=%{_sysconfdir}/dolibarr/conf.php
if [ -s $config ] && grep -q "File generated by" $config
then
# File already exist. We add params not found.
echo Add new params to overwrite path to use shared libraries/fonts
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/DejaVuSans-Bold.ttf'; ?>" >> $config
fi
# Create a config link dolibarr.conf # Create a config link dolibarr.conf
if [ ! -L $apachelink ]; then if [ ! -L $apachelink ]; then
echo Create dolibarr web server config link $apachelink echo Create dolibarr web server config link $apachelink
@@ -286,5 +306,5 @@ fi
%changelog %changelog
* Wed Mar 4 2012 Laurent Destailleur 3.3.0-0.1.a * Mon Jul 23 2012 Laurent Destailleur 3.2.2-0.3
- Initial version (#723326) - Initial version (#723326)

View File

@@ -30,6 +30,6 @@ $force_dolibarr_lib_TCPDF_PATH='';
//$force_dolibarr_js_JQUERY='/javascript/jquery'; //$force_dolibarr_js_JQUERY='/javascript/jquery';
//$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; //$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui';
//$force_dolibarr_js_JQUERY_FLOT='/javascript/flot'; //$force_dolibarr_js_JQUERY_FLOT='/javascript/flot';
$force_dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype'; $force_dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/DejaVuSans-Bold.ttf';
?> ?>

View File

@@ -11,7 +11,7 @@
#------------------------------------------------------ #------------------------------------------------------
export dumpfile="mysqldump_dolibarr_3.1.0.sql" export dumpfile=`ls mysqldump_dolibarr_*.sql | sort | tail -n 1`
export mydir=`echo "$0" | sed -e 's/initdemo.sh//'`; export mydir=`echo "$0" | sed -e 's/initdemo.sh//'`;
if [ "x$mydir" = "x" ] if [ "x$mydir" = "x" ]
then then

File diff suppressed because one or more lines are too long

View File

@@ -50,7 +50,7 @@ $action = GETPOST('action','alpha');
if ($action == 'update' || $action == 'add') if ($action == 'update' || $action == 'add')
{ {
$constname=GETPOST('constname','alpha'); $constname=GETPOST('constname','alpha');
$constvalue=(GETPOST('constvalue_'.$constname,'alpha') ? GETPOST('constvalue_'.$constname,'alpha') : GETPOST('constvalue','alpha')); $constvalue=(GETPOST('constvalue_'.$constname) ? GETPOST('constvalue_'.$constname) : GETPOST('constvalue'));
if (($constname=='ADHERENT_CARD_TYPE' || $constname=='ADHERENT_ETIQUETTE_TYPE') && $constvalue == -1) $constvalue=''; if (($constname=='ADHERENT_CARD_TYPE' || $constname=='ADHERENT_ETIQUETTE_TYPE') && $constvalue == -1) $constvalue='';
if ($constname=='ADHERENT_LOGIN_NOT_REQUIRED') // Invert choice if ($constname=='ADHERENT_LOGIN_NOT_REQUIRED') // Invert choice
@@ -60,7 +60,7 @@ if ($action == 'update' || $action == 'add')
} }
$consttype=GETPOST('consttype','alpha'); $consttype=GETPOST('consttype','alpha');
$constnote=GETPOST('constnote','alpha'); $constnote=GETPOST('constnote');
$res=dolibarr_set_const($db,$constname,$constvalue,$type[$consttype],0,$constnote,$conf->entity); $res=dolibarr_set_const($db,$constname,$constvalue,$type[$consttype],0,$constnote,$conf->entity);
if (! $res > 0) $error++; if (! $res > 0) $error++;
@@ -78,7 +78,7 @@ if ($action == 'update' || $action == 'add')
// Action activation d'un sous module du module adherent // Action activation d'un sous module du module adherent
if ($action == 'set') if ($action == 'set')
{ {
$result=dolibarr_set_const($db, GETPOST('name','alpha'),GETPOST('value','alpha'),'',0,'',$conf->entity); $result=dolibarr_set_const($db, GETPOST('name','alpha'),GETPOST('value'),'',0,'',$conf->entity);
if ($result < 0) if ($result < 0)
{ {
print $db->error(); print $db->error();
@@ -271,4 +271,4 @@ dol_fiche_end();
llxFooter(); llxFooter();
$db->close(); $db->close();
?> ?>

View File

@@ -135,7 +135,7 @@ if ($conf->global->ADHERENT_USE_MAILMAN)
'ADHERENT_MAILMAN_LISTS' 'ADHERENT_MAILMAN_LISTS'
); );
print_fiche_titre("Mailman mailing list system",$lien,''); print_fiche_titre($langs->trans('MailmanTitle'),$lien,'');
// JQuery activity // JQuery activity
print '<script type="text/javascript"> print '<script type="text/javascript">

View File

@@ -40,7 +40,7 @@ $mesg=isset($_GET["mesg"])?'<div class="ok">'.$_GET["mesg"].'</div>':'';
$id = GETPOST('id','int'); $id = GETPOST('id','int');
// Security check // Security check
if (! $user->rights->adherent->lire) accessforbidden(); $result=restrictedArea($user,'adherent',$id);
$object = new Adherent($db); $object = new Adherent($db);
$result=$object->fetch($id); $result=$object->fetch($id);

View File

@@ -39,8 +39,12 @@ $langs->load("users");
$langs->load("mails"); $langs->load("mails");
$action=GETPOST('action','alpha');
$rowid=GETPOST('rowid','int');
$typeid=GETPOST('typeid','int');
// Security check // Security check
if (! $user->rights->adherent->cotisation->lire) accessforbidden(); $result=restrictedArea($user,'adherent',$rowid);
$object = new Adherent($db); $object = new Adherent($db);
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);
@@ -50,10 +54,6 @@ $errmsg='';
$defaultdelay=1; $defaultdelay=1;
$defaultdelayunit='y'; $defaultdelayunit='y';
$action=GETPOST('action');
$rowid=GETPOST('rowid');
$typeid=GETPOST('typeid');
if ($rowid) if ($rowid)
{ {
// Load member // Load member

View File

@@ -153,7 +153,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg
} }
// Build and output PDF // Build and output PDF
if (empty($mode) || $mode=='card' || $mode='cardlogin') if (empty($mode) || $mode=='card' || $mode=='cardlogin')
{ {
if (! count($arrayofmembers)) if (! count($arrayofmembers))
{ {

View File

@@ -184,13 +184,13 @@ class Adherent extends CommonObject
*/ */
function makeSubstitution($text) function makeSubstitution($text)
{ {
global $langs; global $conf,$langs;
$birthday = dol_print_date($this->naiss,'day'); $birthday = dol_print_date($this->naiss,'day');
$msgishtml = 0; $msgishtml = 0;
if (dol_textishtml($text,1)) $msgishtml = 1; if (dol_textishtml($text,1)) $msgishtml = 1;
$infos=''; $infos='';
if ($this->civilite_id) $infos.= $langs->transnoentities("UserTitle").": ".$this->getCivilityLabel(1)."\n"; if ($this->civilite_id) $infos.= $langs->transnoentities("UserTitle").": ".$this->getCivilityLabel(1)."\n";
$infos.= $langs->transnoentities("id").": ".$this->id."\n"; $infos.= $langs->transnoentities("id").": ".$this->id."\n";
@@ -202,12 +202,15 @@ class Adherent extends CommonObject
$infos.= $langs->transnoentities("Town").": ".$this->town."\n"; $infos.= $langs->transnoentities("Town").": ".$this->town."\n";
$infos.= $langs->transnoentities("Country").": ".$this->country."\n"; $infos.= $langs->transnoentities("Country").": ".$this->country."\n";
$infos.= $langs->transnoentities("EMail").": ".$this->email."\n"; $infos.= $langs->transnoentities("EMail").": ".$this->email."\n";
$infos.= $langs->transnoentities("Login").": ".$this->login."\n"; if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
$infos.= $langs->transnoentities("Password").": ".$this->pass."\n"; {
$infos.= $langs->transnoentities("Login").": ".$this->login."\n";
$infos.= $langs->transnoentities("Password").": ".$this->pass."\n";
}
$infos.= $langs->transnoentities("Birthday").": ".$birthday."\n"; $infos.= $langs->transnoentities("Birthday").": ".$birthday."\n";
$infos.= $langs->transnoentities("Photo").": ".$this->photo."\n"; $infos.= $langs->transnoentities("Photo").": ".$this->photo."\n";
$infos.= $langs->transnoentities("Public").": ".yn($this->public); $infos.= $langs->transnoentities("Public").": ".yn($this->public);
// Substitutions // Substitutions
$substitutionarray=array( $substitutionarray=array(
'%DOL_MAIN_URL_ROOT%'=>DOL_MAIN_URL_ROOT, '%DOL_MAIN_URL_ROOT%'=>DOL_MAIN_URL_ROOT,
@@ -227,9 +230,9 @@ class Adherent extends CommonObject
'%LOGIN%'=>$msgishtml?dol_htmlentitiesbr($this->login):$this->login, '%LOGIN%'=>$msgishtml?dol_htmlentitiesbr($this->login):$this->login,
'%PASSWORD%'=>$msgishtml?dol_htmlentitiesbr($this->pass):$this->pass '%PASSWORD%'=>$msgishtml?dol_htmlentitiesbr($this->pass):$this->pass
); );
complete_substitutions_array($substitutionarray, $langs); complete_substitutions_array($substitutionarray, $langs);
return make_substitutions($text,$substitutionarray); return make_substitutions($text,$substitutionarray);
} }
@@ -696,41 +699,52 @@ class Adherent extends CommonObject
$resql=$this->db->query($sql); $resql=$this->db->query($sql);
if ($resql) if ($resql)
{ {
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_member WHERE fk_member = ".$rowid;
dol_syslog(get_class($this)."::delete sql=".$sql);
$resql=$this->db->query($sql);
$sql = "DELETE FROM ".MAIN_DB_PREFIX."cotisation WHERE fk_adherent = ".$rowid; $sql = "DELETE FROM ".MAIN_DB_PREFIX."cotisation WHERE fk_adherent = ".$rowid;
dol_syslog(get_class($this)."::delete sql=".$sql); dol_syslog(get_class($this)."::delete sql=".$sql);
$resql=$this->db->query($sql); $resql=$this->db->query($sql);
if ($resql) if ($resql)
{ {
$sql = "DELETE FROM ".MAIN_DB_PREFIX."adherent WHERE rowid = ".$rowid; // Remove linked user
dol_syslog(get_class($this)."::delete sql=".$sql); $ret=$this->setUserId(0);
$resql=$this->db->query($sql); if ($ret > 0)
if ($resql) {
{ $sql = "DELETE FROM ".MAIN_DB_PREFIX."adherent WHERE rowid = ".$rowid;
if ($this->db->affected_rows($resql)) dol_syslog(get_class($this)."::delete sql=".$sql);
{ $resql=$this->db->query($sql);
// Appel des triggers if ($resql)
include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); {
$interface=new Interfaces($this->db); if ($this->db->affected_rows($resql))
$result=$interface->run_triggers('MEMBER_DELETE',$this,$user,$langs,$conf); {
if ($result < 0) { $error++; $this->errors=$interface->errors; } // Appel des triggers
// Fin appel triggers include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
$interface=new Interfaces($this->db);
$this->db->commit(); $result=$interface->run_triggers('MEMBER_DELETE',$this,$user,$langs,$conf);
return 1; if ($result < 0) {
} $error++; $this->errors=$interface->errors;
else }
{ // Fin appel triggers
// Rien a effacer
$this->db->rollback(); $this->db->commit();
return 0; return 1;
} }
} else
else {
{ // Rien a effacer
$this->error=$this->db->error(); $this->db->rollback();
$this->db->rollback(); return 0;
return -3; }
} }
else
{
$this->error=$this->db->error();
$this->db->rollback();
return -3;
}
}
} }
else else
{ {
@@ -968,7 +982,7 @@ class Adherent extends CommonObject
*/ */
function fetch($rowid,$ref='',$fk_soc='') function fetch($rowid,$ref='',$fk_soc='')
{ {
global $conf, $langs; global $langs;
$sql = "SELECT d.rowid, d.civilite, d.prenom as firstname, d.nom as lastname, d.societe, d.fk_soc, d.statut, d.public, d.adresse as address, d.cp as zip, d.ville as town, d.note,"; $sql = "SELECT d.rowid, d.civilite, d.prenom as firstname, d.nom as lastname, d.societe, d.fk_soc, d.statut, d.public, d.adresse as address, d.cp as zip, d.ville as town, d.note,";
$sql.= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass,"; $sql.= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass,";
@@ -989,10 +1003,12 @@ class Adherent extends CommonObject
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as dep ON d.fk_departement = dep.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as dep ON d.fk_departement = dep.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON d.rowid = u.fk_member"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON d.rowid = u.fk_member";
$sql.= " WHERE d.fk_adherent_type = t.rowid"; $sql.= " WHERE d.fk_adherent_type = t.rowid";
$sql.= " AND d.entity = ".$conf->entity; if ($rowid) $sql.= " AND d.rowid=".$rowid;
if ($ref) $sql.= " AND d.rowid='".$ref."'"; elseif ($ref || $fk_soc) {
elseif ($fk_soc) $sql.= " AND d.fk_soc='".$fk_soc."'"; $sql.= " AND d.entity IN (".getEntity().")";
else $sql.= " AND d.rowid=".$rowid; if ($ref) $sql.= " AND d.rowid='".$ref."'";
elseif ($fk_soc) $sql.= " AND d.fk_soc='".$fk_soc."'";
}
dol_syslog(get_class($this)."::fetch sql=".$sql); dol_syslog(get_class($this)."::fetch sql=".$sql);
$resql=$this->db->query($sql); $resql=$this->db->query($sql);

View File

@@ -1,7 +1,7 @@
<?php <?php
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@@ -27,22 +27,32 @@
require("../main.inc.php"); require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/member.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/member.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/images.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php"); require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php"); require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php"); require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php");
$langs->load("members");
$langs->load("companies"); $langs->load("companies");
$langs->load('other'); $langs->load('other');
$id=GETPOST('id','int');
$action=GETPOST('action','alpha');
$confirm=GETPOST('confirm','alpha');
$mesg = ""; $mesg='';
if (isset($_SESSION['DolMessage']))
{
$mesg=$_SESSION['DolMessage'];
unset($_SESSION['DolMessage']);
}
// Security check // Security check
$id = GETPOST('id','int');
if ($user->societe_id > 0) if ($user->societe_id > 0)
{ {
$id = $user->societe_id; $id = $user->societe_id;
} }
//$result = restrictedArea($user, 'societe', $id); $result=restrictedArea($user,'adherent',$id);
// Get parameters // Get parameters
$sortfield = GETPOST("sortfield",'alpha'); $sortfield = GETPOST("sortfield",'alpha');
@@ -65,16 +75,25 @@ $upload_dir = $conf->adherent->dir_output . "/" . get_exdir($id,2,0,1) . '/' . $
*/ */
// Envoie fichier // Envoie fichier
if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
{ {
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
if (dol_mkdir($upload_dir) >= 0) if (dol_mkdir($upload_dir) >= 0)
{ {
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']); $resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . dol_unescapefile($_FILES['userfile']['name']),0,0,$_FILES['userfile']['error']);
if (is_numeric($resupload) && $resupload > 0) if (is_numeric($resupload) && $resupload > 0)
{ {
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>'; if (image_format_supported($upload_dir . "/" . $_FILES['userfile']['name']) == 1)
{
// Create small thumbs for image (Ratio is near 16/9)
// Used on logon for example
$imgThumbSmall = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthsmall, $maxheightsmall, '_small', $quality, "thumbs");
// Create mini thumbs for image (Ratio is near 16/9)
// Used on menu or for setup page for example
$imgThumbMini = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthmini, $maxheightmini, '_mini', $quality, "thumbs");
}
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
} }
else else
{ {
@@ -96,11 +115,14 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
} }
// Suppression fichier // Suppression fichier
if ($_REQUEST['action'] == 'confirm_deletefile' && $_REQUEST['confirm'] == 'yes') if ($action == 'confirm_deletefile' && $confirm == 'yes')
{ {
$file = $upload_dir . "/" . $_GET['urlfile']; // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). $langs->load("other");
$file = $upload_dir . "/" . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
dol_delete_file($file); dol_delete_file($file);
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved").'</div>'; $_SESSION['DolMessage'] = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
exit;
} }
@@ -197,21 +219,21 @@ if ($id > 0)
/* /*
* Confirmation suppression fichier * Confirmation suppression fichier
*/ */
if ($_GET['action'] == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$_GET["id"].'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); $ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$member->id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
if ($ret == 'html') print '<br>'; if ($ret == 'html') print '<br>';
} }
// Affiche formulaire upload // Affiche formulaire upload
$formfile=new FormFile($db); $formfile=new FormFile($db);
$formfile->form_attach_new_file(DOL_URL_ROOT.'/adherents/document.php?id='.$id,'',0,0,$user->rights->adherent->creer); $formfile->form_attach_new_file(DOL_URL_ROOT.'/adherents/document.php?id='.$member->id,'',0,0,$user->rights->adherent->creer,50,$object);
// List of document // List of document
$param='&socid='.$societe->id; $param='&socid='.$societe->id;
$formfile->list_of_documents($filearray,$member,'member',$param, 0, get_exdir($id,2,0,1).'/'.$id.'/'); $formfile->list_of_documents($filearray,$member,'member',$param, 0, get_exdir($member->id,2,0,1).'/'.$member->id.'/');
print "<br><br>"; print "<br><br>";
} }
@@ -226,9 +248,7 @@ else
print $langs->trans("ErrorRecordNotFound"); print $langs->trans("ErrorRecordNotFound");
} }
$db->close();
llxFooter(); llxFooter();
$db->close();
?> ?>

View File

@@ -41,21 +41,22 @@ $langs->load("bills");
$langs->load("members"); $langs->load("members");
$langs->load("users"); $langs->load("users");
$action=GETPOST('action','alpha');
$confirm=GETPOST('confirm','alpha');
$rowid=GETPOST('rowid','int');
$typeid=GETPOST('typeid','int');
$userid=GETPOST('userid','int');
$socid=GETPOST('socid','int');
// Security check // Security check
if (! $user->rights->adherent->lire) accessforbidden(); $result=restrictedArea($user,'adherent',$rowid);
$object = new Adherent($db); $object = new Adherent($db);
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);
$errmsg=''; $errmsgs=array(); $errmsg=''; $errmsgs=array();
$action=GETPOST('action','alpha');
$confirm=GETPOST('confirm','alpha');
$rowid=GETPOST('rowid','int');
$typeid=GETPOST('typeid','int');
$userid=GETPOST('userid','int');
$socid=GETPOST('socid','int');
if ($rowid > 0) if ($rowid > 0)
{ {
// Load member // Load member
@@ -67,16 +68,12 @@ if ($rowid > 0)
if ($object->user_id) if ($object->user_id)
{ {
// $user est le user qui edite, $object->user_id est l'id de l'utilisateur lies au membre edite // $user est le user qui edite, $object->user_id est l'id de l'utilisateur lies au membre edite
$caneditfielduser=( (($user->id == $object->user_id) && $user->rights->user->self->creer) $caneditfielduser=((($user->id == $object->user_id) && $user->rights->user->self->creer)
|| (($user->id != $object->user_id) && $user->rights->user->user->creer) ); || (($user->id != $object->user_id) && $user->rights->user->user->creer));
$caneditpassworduser=( (($user->id == $object->user_id) && $user->rights->user->self->password) $caneditpassworduser=((($user->id == $object->user_id) && $user->rights->user->self->password)
|| (($user->id != $adh->user_id) && $user->rights->user->user->password) ); || (($user->id != $object->user_id) && $user->rights->user->user->password));
} }
} }
else
{
accessforbidden();
}
// Define variables to know what current user can do on members // Define variables to know what current user can do on members
$canaddmember=$user->rights->adherent->creer; $canaddmember=$user->rights->adherent->creer;
@@ -163,7 +160,7 @@ if ($action == 'confirm_create_user' && $confirm == 'yes' && $user->rights->user
{ {
// Creation user // Creation user
$nuser = new User($db); $nuser = new User($db);
$result=$nuser->create_from_member($object,GETPOST('login','alpha')); $result=$nuser->create_from_member($object,GETPOST('login'));
if ($result < 0) if ($result < 0)
{ {
@@ -184,7 +181,7 @@ if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights
{ {
// Creation user // Creation user
$company = new Societe($db); $company = new Societe($db);
$result=$company->create_from_member($object,GETPOST('companyname','alpha')); $result=$company->create_from_member($object,GETPOST('companyname'));
if ($result < 0) if ($result < 0)
{ {
@@ -203,8 +200,13 @@ if ($action == 'confirm_sendinfo' && $confirm == 'yes')
{ {
if ($object->email) if ($object->email)
{ {
$result=$object->send_an_email($langs->transnoentitiesnoconv("ThisIsContentOfYourCard")."\n\n%INFOS%\n\n",$langs->transnoentitiesnoconv("CardContent")); $from=$conf->email_from;
$mesg=$langs->trans("CardSent"); if ($conf->global->ADHERENT_MAIL_FROM) $from=$conf->global->ADHERENT_MAIL_FROM;
$result=$object->send_an_email($langs->transnoentitiesnoconv("ThisIsContentOfYourCard")."\n\n%INFOS%\n\n",$langs->transnoentitiesnoconv("CardContent"));
$langs->load("mails");
$mesg=$langs->trans("MailSuccessfulySent", $from, $object->email);
} }
} }
@@ -822,8 +824,8 @@ if ($action == 'edit')
$res=$object->fetch($rowid); $res=$object->fetch($rowid);
if ($res < 0) { dol_print_error($db,$object->error); exit; } if ($res < 0) { dol_print_error($db,$object->error); exit; }
//$res=$object->fetch_optionals($object->id,$extralabels); $res=$object->fetch_optionals($object->id,$extralabels);
//if ($res < 0) { dol_print_error($db); exit; } if ($res < 0) { dol_print_error($db); exit; }
$adht = new AdherentType($db); $adht = new AdherentType($db);
$adht->fetch($object->typeid); $adht->fetch($object->typeid);
@@ -1049,13 +1051,14 @@ if ($action == 'edit')
if ($rowid && $action != 'edit') if ($rowid && $action != 'edit')
{ {
/* ************************************************************************** */ dol_htmloutput_mesg($mesg);
/* ************************************************************************** */
/* */ /* */
/* Mode affichage */ /* Mode affichage */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
//$object = new Adherent($db);
$res=$object->fetch($rowid); $res=$object->fetch($rowid);
if ($res < 0) { dol_print_error($db,$object->error); exit; } if ($res < 0) { dol_print_error($db,$object->error); exit; }
$res=$object->fetch_optionals($object->id,$extralabels); $res=$object->fetch_optionals($object->id,$extralabels);
@@ -1509,7 +1512,7 @@ if ($rowid && $action != 'edit')
} }
// Action SPIP // Action SPIP
if ($conf->global->ADHERENT_USE_SPIP) if ($conf->mailmanspip->enabled && $conf->global->ADHERENT_USE_SPIP)
{ {
$isinspip=$object->is_in_spip(); $isinspip=$object->is_in_spip();
if ($isinspip == 1) if ($isinspip == 1)

View File

@@ -1,7 +1,8 @@
<?php <?php
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org> * Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -59,7 +60,10 @@ $AdherentType=array();
$sql = "SELECT t.rowid, t.libelle, t.cotisation,"; $sql = "SELECT t.rowid, t.libelle, t.cotisation,";
$sql.= " d.statut, count(d.rowid) as somme"; $sql.= " d.statut, count(d.rowid) as somme";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."adherent as d ON t.rowid = d.fk_adherent_type"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."adherent as d";
$sql.= " ON t.rowid = d.fk_adherent_type";
$sql.= " AND d.entity IN (".getEntity().")";
$sql.= " WHERE t.entity IN (".getEntity().")";
$sql.= " GROUP BY t.rowid, t.libelle, t.cotisation, d.statut"; $sql.= " GROUP BY t.rowid, t.libelle, t.cotisation, d.statut";
dol_syslog("index.php::select nb of members by type sql=".$sql, LOG_DEBUG); dol_syslog("index.php::select nb of members by type sql=".$sql, LOG_DEBUG);
@@ -94,8 +98,9 @@ $now=dol_now();
// old rule: uptodate = if type does not need payment, that end date is null, if type need payment that end date is in future) // old rule: uptodate = if type does not need payment, that end date is null, if type need payment that end date is in future)
$sql = "SELECT count(*) as somme , d.fk_adherent_type"; $sql = "SELECT count(*) as somme , d.fk_adherent_type";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t";
//$sql.= " WHERE d.statut = 1 AND ((t.cotisation = 0 AND d.datefin IS NULL) OR d.datefin >= ".$db->idate($now).')'; $sql.= " WHERE d.entity IN (".getEntity().")";
$sql.= " WHERE d.statut = 1 AND d.datefin >= ".$db->idate($now); //$sql.= " AND d.statut = 1 AND ((t.cotisation = 0 AND d.datefin IS NULL) OR d.datefin >= ".$db->idate($now).')';
$sql.= " AND d.statut = 1 AND d.datefin >= ".$db->idate($now);
$sql.= " AND t.rowid = d.fk_adherent_type"; $sql.= " AND t.rowid = d.fk_adherent_type";
$sql.= " GROUP BY d.fk_adherent_type"; $sql.= " GROUP BY d.fk_adherent_type";
@@ -212,7 +217,8 @@ $sql = "SELECT a.rowid, a.statut, a.nom as lastname, a.prenom as firstname,";
$sql.= " a.tms as datem, datefin as date_end_subscription,"; $sql.= " a.tms as datem, datefin as date_end_subscription,";
$sql.= " ta.rowid as typeid, ta.libelle, ta.cotisation"; $sql.= " ta.rowid as typeid, ta.libelle, ta.cotisation";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as ta"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as ta";
$sql.= " WHERE a.fk_adherent_type = ta.rowid"; $sql.= " WHERE a.entity IN (".getEntity().")";
$sql.= " AND a.fk_adherent_type = ta.rowid";
$sql.= $db->order("a.tms","DESC"); $sql.= $db->order("a.tms","DESC");
$sql.= $db->plimit($max, 0); $sql.= $db->plimit($max, 0);
@@ -241,7 +247,7 @@ if ($resql)
$statictype->libelle=$obj->libelle; $statictype->libelle=$obj->libelle;
print '<td>'.$staticmember->getNomUrl(1,24).'</td>'; print '<td>'.$staticmember->getNomUrl(1,24).'</td>';
print '<td>'.$statictype->getNomUrl(1,16).'</td>'; print '<td>'.$statictype->getNomUrl(1,16).'</td>';
print '<td>'.dol_print_date($db->jdate($obj->date_end),'dayhour').'</td>'; print '<td>'.dol_print_date($db->jdate($obj->datem),'dayhour').'</td>';
print '<td align="right">'.$staticmember->LibStatut($obj->statut,($obj->cotisation=='yes'?1:0),$db->jdate($obj->date_end_subscription),5).'</td>'; print '<td align="right">'.$staticmember->LibStatut($obj->statut,($obj->cotisation=='yes'?1:0),$db->jdate($obj->date_end_subscription),5).'</td>';
print '</tr>'; print '</tr>';
$i++; $i++;
@@ -260,11 +266,12 @@ else
*/ */
$max=5; $max=5;
$sql = "SELECT a.rowid, a.statut, a.nom, a.prenom,"; $sql = "SELECT a.rowid, a.statut, a.nom as lastname, a.prenom as firstname,";
$sql.= " datefin as date_end_subscription,"; $sql.= " datefin as date_end_subscription,";
$sql.= " c.rowid as cid, c.tms as datem, c.datec as datec, c.dateadh as date_start, c.datef as date_end, c.cotisation"; $sql.= " c.rowid as cid, c.tms as datem, c.datec as datec, c.dateadh as date_start, c.datef as date_end, c.cotisation";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."cotisation as c"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."cotisation as c";
$sql.= " WHERE c.fk_adherent = a.rowid"; $sql.= " WHERE a.entity IN (".getEntity().")";
$sql.= " AND c.fk_adherent = a.rowid";
$sql.= $db->order("c.tms","DESC"); $sql.= $db->order("c.tms","DESC");
$sql.= $db->plimit($max, 0); $sql.= $db->plimit($max, 0);
@@ -350,7 +357,8 @@ $numb=0;
$sql = "SELECT c.cotisation, c.dateadh"; $sql = "SELECT c.cotisation, c.dateadh";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."cotisation as c"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."cotisation as c";
$sql.= " WHERE d.rowid = c.fk_adherent"; $sql.= " WHERE d.entity IN (".getEntity().")";
$sql.= " AND d.rowid = c.fk_adherent";
if(isset($date_select) && $date_select != '') if(isset($date_select) && $date_select != '')
{ {
$sql .= " AND dateadh LIKE '$date_select%'"; $sql .= " AND dateadh LIKE '$date_select%'";
@@ -406,7 +414,6 @@ print '</td></tr>';
print '</table>'; print '</table>';
$db->close();
llxFooter(); llxFooter();
$db->close();
?> ?>

View File

@@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2006 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -32,8 +32,10 @@ $langs->load("bills");
$langs->load("members"); $langs->load("members");
$langs->load("users"); $langs->load("users");
if (!$user->rights->adherent->lire) $id=(GETPOST('id','int') ? GETPOST('id','int') : GETPOST('rowid','int'));
accessforbidden();
// Security check
$result=restrictedArea($user,'adherent',$id);
/* /*
@@ -43,9 +45,8 @@ if (!$user->rights->adherent->lire)
llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adh&eacute;rents|ES:M&oacute;dulo_Miembros'); llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adh&eacute;rents|ES:M&oacute;dulo_Miembros');
$adh = new Adherent($db); $adh = new Adherent($db);
$adh->id=$_GET["id"]; $adh->fetch($id);
$adh->fetch($_GET["id"]); $adh->info($id);
$adh->info($_GET["id"]);
$head = member_prepare_head($adh); $head = member_prepare_head($adh);
@@ -59,7 +60,6 @@ print '</td></tr></table>';
print '</div>'; print '</div>';
$db->close();
llxFooter(); llxFooter();
$db->close();
?> ?>

View File

@@ -52,7 +52,7 @@ $search_login=GETPOST("search_login");
$type=GETPOST("type"); $type=GETPOST("type");
$search_email=GETPOST("search_email"); $search_email=GETPOST("search_email");
$search_categ=GETPOST("search_categ"); $search_categ=GETPOST("search_categ");
$sall=GETPOST("sall",'int'); $sall=GETPOST("sall");
if (GETPOST("button_removefilter")) if (GETPOST("button_removefilter"))
{ {

View File

@@ -27,14 +27,15 @@ require_once(DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php');
require_once(DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'); require_once(DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php');
require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php"); require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php");
$action=GETPOST('action'); $langs->load("companies");
$id=GETPOST('id','int'); $langs->load("members");
$langs->load("companies");
$langs->load("members");
$langs->load("bills"); $langs->load("bills");
if (!$user->rights->adherent->lire) accessforbidden(); $action=GETPOST('action','alpha');
$id=GETPOST('id','int');
// Security check
$result=restrictedArea($user,'adherent',$id);
$object = new Adherent($db); $object = new Adherent($db);
$result=$object->fetch($id); $result=$object->fetch($id);
@@ -49,7 +50,7 @@ if ($result > 0)
* Actions * Actions
*/ */
if ($_POST["action"] == 'update' && $user->rights->adherent->creer && ! $_POST["cancel"]) if ($action == 'update' && $user->rights->adherent->creer && ! $_POST["cancel"])
{ {
$db->begin(); $db->begin();
@@ -174,7 +175,7 @@ if ($id)
} }
$db->close();
llxFooter(); llxFooter();
$db->close();
?> ?>

View File

@@ -73,7 +73,8 @@ if ($mode)
$data = array(); $data = array();
$sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, c.code, c.libelle as label"; $sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, c.code, c.libelle as label";
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_pays as c on d.pays = c.rowid"; $sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_pays as c on d.pays = c.rowid";
$sql.=" WHERE d.statut = 1"; $sql.=" WHERE d.entity IN (".getEntity().")";
$sql.=" AND d.statut = 1";
$sql.=" GROUP BY c.libelle, c.code"; $sql.=" GROUP BY c.libelle, c.code";
//print $sql; //print $sql;
} }
@@ -88,7 +89,8 @@ if ($mode)
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_departements as c on d.fk_departement = c.rowid"; $sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_departements as c on d.fk_departement = c.rowid";
$sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_regions as r on c.fk_region = r.code_region"; $sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_regions as r on c.fk_region = r.code_region";
$sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p on d.pays = p.rowid"; $sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p on d.pays = p.rowid";
$sql.=" WHERE d.statut = 1"; $sql.=" WHERE d.entity IN (".getEntity().")";
$sql.=" AND d.statut = 1";
$sql.=" GROUP BY p.libelle, p.code, c.nom"; $sql.=" GROUP BY p.libelle, p.code, c.nom";
//print $sql; //print $sql;
} }
@@ -102,7 +104,8 @@ if ($mode)
$sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, p.code, p.libelle as label, d.ville as label2"; $sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, p.code, p.libelle as label, d.ville as label2";
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d"; $sql.=" FROM ".MAIN_DB_PREFIX."adherent as d";
$sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p on d.pays = p.rowid"; $sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p on d.pays = p.rowid";
$sql.=" WHERE d.statut = 1"; $sql.=" WHERE d.entity IN (".getEntity().")";
$sql.=" AND d.statut = 1";
$sql.=" GROUP BY p.libelle, p.code, d.ville"; $sql.=" GROUP BY p.libelle, p.code, d.ville";
//print $sql; //print $sql;
} }

View File

@@ -1,7 +1,7 @@
<?php <?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org> * Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -49,8 +49,8 @@ $pagenext = $page + 1;
if (! $sortorder) { $sortorder="DESC"; } if (! $sortorder) { $sortorder="DESC"; }
if (! $sortfield) { $sortfield="d.nom"; } if (! $sortfield) { $sortfield="d.nom"; }
// Security check // Security check
if (! $user->rights->adherent->lire) accessforbidden(); $result=restrictedArea($user,'adherent',$rowid,'adherent_type');
if (GETPOST('button_removefilter')) if (GETPOST('button_removefilter'))
{ {
@@ -153,7 +153,8 @@ if (! $rowid && $action != 'create' && $action != 'edit')
$sql = "SELECT d.rowid, d.libelle, d.cotisation, d.vote"; $sql = "SELECT d.rowid, d.libelle, d.cotisation, d.vote";
$sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
$sql.= " WHERE d.entity IN (".getEntity().")";
$result = $db->query($sql); $result = $db->query($sql);
if ($result) if ($result)
@@ -267,10 +268,8 @@ if ($rowid > 0)
if ($action != 'edit') if ($action != 'edit')
{ {
$adht = new AdherentType($db); $adht = new AdherentType($db);
$adht->id = $rowid;
$adht->fetch($rowid); $adht->fetch($rowid);
$h=0; $h=0;
$head[$h][0] = $_SERVER["PHP_SELF"].'?rowid='.$adht->id; $head[$h][0] = $_SERVER["PHP_SELF"].'?rowid='.$adht->id;
@@ -344,7 +343,7 @@ if ($rowid > 0)
$sql.= " t.libelle as type, t.cotisation"; $sql.= " t.libelle as type, t.cotisation";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t";
$sql.= " WHERE d.fk_adherent_type = t.rowid "; $sql.= " WHERE d.fk_adherent_type = t.rowid ";
$sql.= " AND d.entity = ".$conf->entity; $sql.= " AND d.entity IN (".getEntity().")";
$sql.= " AND t.rowid = ".$adht->id; $sql.= " AND t.rowid = ".$adht->id;
if ($sall) if ($sall)
{ {

View File

@@ -1,8 +1,8 @@
<?php <?php
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -112,7 +112,7 @@ $dirbarcode=array_merge(array("/core/modules/barcode/"),$conf->barcode_modules);
foreach($dirbarcode as $reldir) foreach($dirbarcode as $reldir)
{ {
$dir=dol_buildpath($reldir,0); $dir=dol_buildpath($reldir);
$newdir=dol_osencode($dir); $newdir=dol_osencode($dir);
// Check if directory exists (we do not use dol_is_dir to avoid loading files.lib.php) // Check if directory exists (we do not use dol_is_dir to avoid loading files.lib.php)
@@ -334,4 +334,4 @@ dol_htmloutput_mesg($mesg);
$db->close(); $db->close();
llxFooter(); llxFooter();
?> ?>

View File

@@ -35,6 +35,7 @@ require_once(DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php');
$langs->load("admin"); $langs->load("admin");
$langs->load("errors"); $langs->load("errors");
$langs->load("orders");
if (! $user->admin) accessforbidden(); if (! $user->admin) accessforbidden();

View File

@@ -759,7 +759,7 @@ else
// Forme juridique // Forme juridique
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("JuridicalStatus").'</td><td>'; print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("JuridicalStatus").'</td><td>';
print getFormeJuridiqueLabel($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE,1); print getFormeJuridiqueLabel($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE);
print '</td></tr>'; print '</td></tr>';
// ProfId1 // ProfId1

View File

@@ -40,9 +40,6 @@ if (!$user->admin) accessforbidden();
$action=GETPOST('action','alpha'); $action=GETPOST('action','alpha');
$value=GETPOST('value','alpha'); $value=GETPOST('value','alpha');
$label = GETPOST('label','alpha');
$scandir = GETPOST('scandir','alpha');
$type='shipping';
if (empty($conf->global->EXPEDITION_ADDON_NUMBER)) if (empty($conf->global->EXPEDITION_ADDON_NUMBER))
{ {
@@ -53,59 +50,6 @@ if (empty($conf->global->EXPEDITION_ADDON_NUMBER))
/* /*
* Actions * Actions
*/ */
if ($action == 'updateMask')
{
$maskconst=GETPOST('maskconstexpedition','alpha');
$maskvalue=GETPOST('maskexpedition','alpha');
if ($maskconst) $res = dolibarr_set_const($db,$maskconst,$maskvalue,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
if (! $error)
{
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
}
else
{
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
}
}
if ($action == 'set_SHIPPING_FREE_TEXT')
{
$freetext=GETPOST('SHIPPING_FREE_TEXT','alpha');
$res = dolibarr_set_const($db, "SHIPPING_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
if (! $error)
{
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
}
else
{
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
}
}
if ($action == 'set_SHIPPING_DRAFT_WATERMARK')
{
$draft=GETPOST('SHIPPING_DRAFT_WATERMARK','alpha');
$res = dolibarr_set_const($db, "SHIPPING_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
if (! $error)
{
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
}
else
{
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
}
}
if ($action == 'specimen') if ($action == 'specimen')
{ {
$modele=GETPOST('module','alpha'); $modele=GETPOST('module','alpha');
@@ -118,11 +62,11 @@ if ($action == 'specimen')
$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']); $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
foreach($dirmodels as $reldir) foreach($dirmodels as $reldir)
{ {
$file=dol_buildpath($reldir."core/modules/expedition/doc/pdf_".$modele.".modules.php",0); $file=dol_buildpath($reldir."core/modules/expedition/doc/pdf_expedition_".$modele.".modules.php",0);
if (file_exists($file)) if (file_exists($file))
{ {
$filefound=1; $filefound=1;
$classname = "pdf_".$modele; $classname = "pdf_expedition_".$modele;
break; break;
} }
} }
@@ -140,8 +84,8 @@ if ($action == 'specimen')
} }
else else
{ {
$mesg='<font class="error">'.$obj->error.'</font>'; $mesg='<font class="error">'.$module->error.'</font>';
dol_syslog($obj->error, LOG_ERR); dol_syslog($module->error, LOG_ERR);
} }
} }
else else
@@ -154,13 +98,30 @@ if ($action == 'specimen')
// Activate a model // Activate a model
if ($action == 'set') if ($action == 'set')
{ {
$ret = addDocumentModel($value, $type, $label, $scandir); $label = GETPOST('label','alpha');
$scandir = GETPOST('scandir','alpha');
$type='shipping';
$sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)";
$sql.= " VALUES ('".$db->escape($value)."','".$type."',".$conf->entity.", ";
$sql.= ($label?"'".$db->escape($label)."'":'null').", ";
$sql.= (! empty($scandir)?"'".$db->escape($scandir)."'":"null");
$sql.= ")";
if ($db->query($sql))
{
}
} }
if ($action == 'del') if ($action == 'del')
{ {
$ret = delDocumentModel($value, $type); $type='shipping';
if ($ret > 0) $sql = "DELETE FROM ".MAIN_DB_PREFIX."document_model";
$sql.= " WHERE nom = '".$db->escape($value)."'";
$sql.= " AND type = '".$type."'";
$sql.= " AND entity = ".$conf->entity;
if ($db->query($sql))
{ {
if ($conf->global->EXPEDITION_ADDON_PDF == "$value") dolibarr_del_const($db, 'EXPEDITION_ADDON_PDF',$conf->entity); if ($conf->global->EXPEDITION_ADDON_PDF == "$value") dolibarr_del_const($db, 'EXPEDITION_ADDON_PDF',$conf->entity);
} }
@@ -169,18 +130,37 @@ if ($action == 'del')
// Set default model // Set default model
if ($action == 'setdoc') if ($action == 'setdoc')
{ {
$label = GETPOST('label','alpha');
$scandir = GETPOST('scandir','alpha');
$db->begin();
if (dolibarr_set_const($db, "EXPEDITION_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) if (dolibarr_set_const($db, "EXPEDITION_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
{ {
// La constante qui a ete lue en avant du nouveau set
// on passe donc par une variable pour avoir un affichage coherent
$conf->global->EXPEDITION_ADDON_PDF = $value; $conf->global->EXPEDITION_ADDON_PDF = $value;
} }
// On active le modele // On active le modele
$ret = delDocumentModel($value, $type); $type='shipping';
if ($ret > 0) $sql_del = "DELETE FROM ".MAIN_DB_PREFIX."document_model";
$sql_del.= " WHERE nom = '".$db->escape($value)."'";
$sql_del.= " AND type = '".$type."'";
$sql_del.= " AND entity = ".$conf->entity;
$result1=$db->query($sql_del);
$sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)";
$sql.= " VALUES ('".$db->escape($value)."', '".$type."', ".$conf->entity.", ";
$sql.= ($label?"'".$db->escape($label)."'":'null').", ";
$sql.= (! empty($scandir)?"'".$db->escape($scandir)."'":"null");
$sql.= ")";
$result2=$db->query($sql);
if ($result1 && $result2)
{ {
$ret = addDocumentModel($value, $type, $label, $scandir); $db->commit();
}
else
{
$db->rollback();
} }
} }
@@ -260,8 +240,28 @@ if ($action == 'setmod')
// TODO Verifier si module numerotation choisi peut etre active // TODO Verifier si module numerotation choisi peut etre active
// par appel methode canBeActivated // par appel methode canBeActivated
dolibarr_set_const($db, "EXPEDITION_ADDON",$value,'chaine',0,'',$conf->entity); $module=GETPOST('module','alpha');
dolibarr_set_const($db, "EXPEDITION_ADDON",$module,'chaine',0,'',$conf->entity);
}
if ($action == 'updateMask')
{
$maskconst=GETPOST('maskconstexpedition','alpha');
$maskvalue=GETPOST('maskexpedition','alpha');
if ($maskconst) $res = dolibarr_set_const($db,$maskconst,$maskvalue,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
if (! $error)
{
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
}
else
{
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
}
} }
if ($action == 'setmodel') if ($action == 'setmodel')
@@ -269,6 +269,39 @@ if ($action == 'setmodel')
dolibarr_set_const($db, "EXPEDITION_ADDON_NUMBER",$value,'chaine',0,'',$conf->entity); dolibarr_set_const($db, "EXPEDITION_ADDON_NUMBER",$value,'chaine',0,'',$conf->entity);
} }
if ($action == 'set_SHIPPING_DRAFT_WATERMARK')
{
$draft=GETPOST('SHIPPING_DRAFT_WATERMARK','alpha');
$res = dolibarr_set_const($db, "SHIPPING_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
if (! $error)
{
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
}
else
{
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
}
}
if ($action == 'set_SHIPPING_FREE_TEXT')
{
$free=GETPOST('SHIPPING_FREE_TEXT','alpha');
$res = dolibarr_set_const($db, "SHIPPING_FREE_TEXT",$free,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
if (! $error)
{
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
}
else
{
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
}
}
/* /*
* View * View

View File

@@ -381,7 +381,7 @@ foreach ($dirmodels as $reldir)
} }
else else
{ {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&amp;value='.preg_replace('/\.php$/','',$file).'&amp;scandir='.$module->scandir.'&amp;label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/','',$file).'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
} }
print '</td>'; print '</td>';
@@ -535,7 +535,7 @@ foreach ($dirmodels as $reldir)
if (in_array($name, $def)) if (in_array($name, $def))
{ {
print '<td align="center">'."\n"; print '<td align="center">'."\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&amp;value='.$name.'">'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
print img_picto($langs->trans("Enabled"),'switch_on'); print img_picto($langs->trans("Enabled"),'switch_on');
print '</a>'; print '</a>';
print '</td>'; print '</td>';
@@ -543,7 +543,7 @@ foreach ($dirmodels as $reldir)
else else
{ {
print "<td align=\"center\">\n"; print "<td align=\"center\">\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&amp;value='.$name.'&amp;scandir='.$module->scandir.'&amp;label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
print "</td>"; print "</td>";
} }
@@ -555,7 +555,7 @@ foreach ($dirmodels as $reldir)
} }
else else
{ {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&amp;value='.$name.'&amp;scandir='.$module->scandir.'&amp;label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
} }
print '</td>'; print '</td>';

View File

@@ -86,7 +86,9 @@ foreach($modules as $const => $desc)
if (GETPOST('save','alpha')) if (GETPOST('save','alpha'))
{ {
dolibarr_set_const($db, "FCKEDITOR_TEST", GETPOST('formtestfield','alpha'),'chaine',0,'',$conf->entity); $res=dolibarr_set_const($db, "FCKEDITOR_TEST", GETPOST('formtestfield'),'chaine',0,'',$conf->entity);
if ($res > 0) $mesg=$langs->trans("RecordModifiedSuccessfully");
} }
@@ -103,56 +105,64 @@ print '<br>';
$var=true; $var=true;
print '<table class="noborder" width="100%">'; if (empty($conf->use_javascript_ajax))
print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans("ActivateFCKeditor").'</td>';
print '<td align="center" width="100">'.$langs->trans("Action").'</td>';
print "</tr>\n";
// Modules
foreach($modules as $const => $desc)
{ {
// Si condition non remplie, on ne propose pas l'option dol_htmloutput_errors('',array($langs->trans("NotAvailable"),$langs->trans("JavascriptDisabled")),1);
if (! $conditions[$const]) continue;
$var=!$var;
print "<tr ".$bc[$var].">";
print '<td width="16">'.img_object("",$picto[$const]).'</td>';
print '<td>'.$langs->trans($desc).'</td>';
print '<td align="center" width="100">';
$constante = 'FCKEDITOR_ENABLE_'.$const;
$value = $conf->global->$constante;
if($value == 0)
{
print '<a href="fckeditor.php?action=activate_'.strtolower($const).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
}
else if($value == 1)
{
print '<a href="fckeditor.php?action=disable_'.strtolower($const).'">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
}
print "</td>";
print '</tr>';
} }
else
{
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans("ActivateFCKeditor").'</td>';
print '<td align="center" width="100">'.$langs->trans("Action").'</td>';
print "</tr>\n";
print '</table>'."\n"; // Modules
foreach($modules as $const => $desc)
{
// Si condition non remplie, on ne propose pas l'option
if (! $conditions[$const]) continue;
$var=!$var;
print "<tr ".$bc[$var].">";
print '<td width="16">'.img_object("",$picto[$const]).'</td>';
print '<td>'.$langs->trans($desc).'</td>';
print '<td align="center" width="100">';
$constante = 'FCKEDITOR_ENABLE_'.$const;
$value = $conf->global->$constante;
if($value == 0)
{
print '<a href="fckeditor.php?action=activate_'.strtolower($const).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
}
else if($value == 1)
{
print '<a href="fckeditor.php?action=disable_'.strtolower($const).'">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
}
print '<br>'."\n"; print "</td>";
print_fiche_titre($langs->trans("TestSubmitForm"),'',''); print '</tr>';
print '<form name="formtest" method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n"; }
$uselocalbrowser=true;
$editor=new DolEditor('formtestfield',isset($conf->global->FCKEDITOR_TEST)?$conf->global->FCKEDITOR_TEST:'Test','',200,'dolibarr_notes','In', true, $uselocalbrowser);
$editor->Create();
print '<center><br><input class="button" type="submit" name="save" value="'.$langs->trans("Save").'"></center>'."\n";
print '</form>'."\n";
/* print '</table>'."\n";
print '<!-- Result -->';
print $_POST["formtestfield"]; dol_htmloutput_mesg($mesg);
print '<!-- Result -->';
print $conf->global->FCKEDITOR_TEST; print '<br>'."\n";
*/ print_fiche_titre($langs->trans("TestSubmitForm"),'','');
print '<form name="formtest" method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
$uselocalbrowser=true;
$editor=new DolEditor('formtestfield',isset($conf->global->FCKEDITOR_TEST)?$conf->global->FCKEDITOR_TEST:'Test','',200,'dolibarr_notes','In', true, $uselocalbrowser);
$editor->Create();
print '<center><br><input class="button" type="submit" name="save" value="'.$langs->trans("Save").'"></center>'."\n";
print '</form>'."\n";
/*
print '<!-- Result -->';
print $_POST["formtestfield"];
print '<!-- Result -->';
print $conf->global->FCKEDITOR_TEST;
*/
}
$db->close(); $db->close();

View File

@@ -54,7 +54,7 @@ if ($action == 'updateMask')
{ {
$maskconstorder=GETPOST('maskconstorder','alpha'); $maskconstorder=GETPOST('maskconstorder','alpha');
$maskorder=GETPOST('maskorder','alpha'); $maskorder=GETPOST('maskorder','alpha');
if ($maskconstorder) $res = dolibarr_set_const($db,$maskconstorder,$maskorder,'chaine',0,'',$conf->entity); if ($maskconstorder) $res = dolibarr_set_const($db,$maskconstorder,$maskorder,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++; if (! $res > 0) $error++;
@@ -76,7 +76,7 @@ if ($action == 'specimen') // For orders
$commande = new CommandeFournisseur($db); $commande = new CommandeFournisseur($db);
$commande->initAsSpecimen(); $commande->initAsSpecimen();
$commande->thirdparty=$specimenthirdparty; $commande->thirdparty=$specimenthirdparty;
// Search template files // Search template files
$file=''; $classname=''; $filefound=0; $file=''; $classname=''; $filefound=0;
$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']); $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
@@ -90,13 +90,13 @@ if ($action == 'specimen') // For orders
break; break;
} }
} }
if ($filefound) if ($filefound)
{ {
require_once($file); require_once($file);
$module = new $classname($db); $module = new $classname($db,$commande);
if ($module->write_file($commande,$langs) > 0) if ($module->write_file($commande,$langs) > 0)
{ {
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=commande_fournisseur&file=SPECIMEN.pdf"); header("Location: ".DOL_URL_ROOT."/document.php?modulepart=commande_fournisseur&file=SPECIMEN.pdf");
@@ -122,7 +122,7 @@ if ($action == 'specimenfacture') // For invoices
$facture = new FactureFournisseur($db); $facture = new FactureFournisseur($db);
$facture->initAsSpecimen(); $facture->initAsSpecimen();
$facture->thirdparty=$specimenthirdparty; // Define who should has build the invoice (so the supplier) $facture->thirdparty=$specimenthirdparty; // Define who should has build the invoice (so the supplier)
// Search template files // Search template files
$file=''; $classname=''; $filefound=0; $file=''; $classname=''; $filefound=0;
$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']); $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
@@ -136,13 +136,13 @@ if ($action == 'specimenfacture') // For invoices
break; break;
} }
} }
if ($filefound) if ($filefound)
{ {
require_once($file); require_once($file);
$module = new $classname($db); $module = new $classname($db,$facture);
if ($module->write_file($facture,$langs) > 0) if ($module->write_file($facture,$langs) > 0)
{ {
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=facture_fournisseur&file=SPECIMEN.pdf"); header("Location: ".DOL_URL_ROOT."/document.php?modulepart=facture_fournisseur&file=SPECIMEN.pdf");
@@ -165,7 +165,7 @@ if ($action == 'set')
{ {
$label = GETPOST('label','alpha'); $label = GETPOST('label','alpha');
$scandir = GETPOST('scandir','alpha'); $scandir = GETPOST('scandir','alpha');
$sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)"; $sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)";
$sql.= " VALUES ('".$db->escape($value)."','".$type."',".$conf->entity.", "; $sql.= " VALUES ('".$db->escape($value)."','".$type."',".$conf->entity.", ";
$sql.= ($label?"'".$db->escape($label)."'":'null').", "; $sql.= ($label?"'".$db->escape($label)."'":'null').", ";
@@ -197,7 +197,7 @@ if ($action == 'setdoc')
{ {
$label = GETPOST('label','alpha'); $label = GETPOST('label','alpha');
$scandir = GETPOST('scandir','alpha'); $scandir = GETPOST('scandir','alpha');
$db->begin(); $db->begin();
if ($type == 'order_supplier' && dolibarr_set_const($db, "COMMANDE_SUPPLIER_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) if ($type == 'order_supplier' && dolibarr_set_const($db, "COMMANDE_SUPPLIER_ADDON_PDF",$value,'chaine',0,'',$conf->entity))

View File

@@ -101,6 +101,9 @@ print "<br>\n";
if ($action == 'edit') // Edit if ($action == 'edit') // Edit
{ {
//WYSIWYG Editor
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">'; print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="action" value="update">';
@@ -132,12 +135,10 @@ if ($action == 'edit') // Edit
print '</table><br>'."\n"; print '</table><br>'."\n";
// Themes // Themes
show_theme('',1); show_theme('',1);
print '<br>'; print '<br>';
// Liste des zone de recherche permanantes supportees // Liste des zone de recherche permanantes supportees
print '<table summary="search" class="noborder" width="100%">'; print '<table summary="search" class="noborder" width="100%">';
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("PermanentLeftSearchForm").'</td><td colspan="2">'.$langs->trans("Activated").'</td></tr>'; print '<tr class="liste_titre"><td width="35%">'.$langs->trans("PermanentLeftSearchForm").'</td><td colspan="2">'.$langs->trans("Activated").'</td></tr>';
@@ -218,7 +219,7 @@ if ($action == 'edit') // Edit
// Hide wiki link on login page // Hide wiki link on login page
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/common/helpdoc.png','',1)).'</td><td>'; print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/helpdoc.png','',1)).'</td><td>';
print $form->selectyesno('MAIN_HELP_DISABLELINK',isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0,1); print $form->selectyesno('MAIN_HELP_DISABLELINK',isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0,1);
print '</td>'; print '</td>';
print '<td width="20">&nbsp;</td>'; print '<td width="20">&nbsp;</td>';
@@ -227,18 +228,19 @@ if ($action == 'edit') // Edit
// Message on login page // Message on login page
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageLogin").'</td><td colspan="2">'; print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageLogin").'</td><td colspan="2">';
// Editeur wysiwyg
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); $doleditor = new DolEditor('main_home', $conf->global->MAIN_HOME, '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, 90);
$doleditor=new DolEditor('main_home',$conf->global->MAIN_HOME,'',142,'dolibarr_notes','In',false,true,true,ROWS_4,90);
$doleditor->Create(); $doleditor->Create();
print '</td></tr>'."\n"; print '</td></tr>'."\n";
// Message of the day on home page // Message of the day on home page
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageOfDay").'</td><td colspan="2">'; print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageOfDay").'</td><td colspan="2">';
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
$doleditor=new DolEditor('main_motd',$conf->global->MAIN_MOTD,'',142,'dolibarr_notes','In',false,true,true,ROWS_4,90); $doleditor = new DolEditor('main_motd', $conf->global->MAIN_MOTD, '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, 90);
$doleditor->Create(); $doleditor->Create();
print '</td></tr>'."\n"; print '</td></tr>'."\n";
/* /*
@@ -366,7 +368,7 @@ else // Show
// Link to wiki help // Link to wiki help
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/common/helpdoc.png','',1)).'</td><td colspan="2">'; print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/helpdoc.png','',1)).'</td><td colspan="2">';
print yn($conf->global->MAIN_HELP_DISABLELINK,1); print yn($conf->global->MAIN_HELP_DISABLELINK,1);
print '</td></tr>'; print '</td></tr>';

View File

@@ -48,7 +48,7 @@ if ($action == 'setvalue' && $user->admin)
$db->begin(); $db->begin();
if (! dolibarr_set_const($db, 'LDAP_SERVER_TYPE',GETPOST("type"),'chaine',0,'',$conf->entity)) $error++; if (! dolibarr_set_const($db, 'LDAP_SERVER_TYPE',GETPOST("type"),'chaine',0,'',$conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_SERVER_PROTOCOLVERSION',GETPOST("version"),'chaine',0,'',$conf->entity)) $error++; if (! dolibarr_set_const($db, 'LDAP_SERVER_PROTOCOLVERSION',GETPOST("LDAP_SERVER_PROTOCOLVERSION"),'chaine',0,'',$conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_SERVER_HOST',GETPOST("host"),'chaine',0,'',$conf->entity)) $error++; if (! dolibarr_set_const($db, 'LDAP_SERVER_HOST',GETPOST("host"),'chaine',0,'',$conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_SERVER_HOST_SLAVE',GETPOST("slave"),'chaine',0,'',$conf->entity)) $error++; if (! dolibarr_set_const($db, 'LDAP_SERVER_HOST_SLAVE',GETPOST("slave"),'chaine',0,'',$conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_SERVER_PORT',GETPOST("port"),'chaine',0,'',$conf->entity)) $error++; if (! dolibarr_set_const($db, 'LDAP_SERVER_PORT',GETPOST("port"),'chaine',0,'',$conf->entity)) $error++;
@@ -169,7 +169,7 @@ print '<tr '.$bc[$var].'><td>'.$langs->trans("Version").'</td><td>';
$arraylist=array(); $arraylist=array();
$arraylist['3']='Version 3'; $arraylist['3']='Version 3';
$arraylist['2']='Version 2'; $arraylist['2']='Version 2';
print $form->selectarray('version',$arraylist,$conf->global->LDAP_SERVER_PROTOCOLVERSION); print $form->selectarray('LDAP_SERVER_PROTOCOLVERSION',$arraylist,$conf->global->LDAP_SERVER_PROTOCOLVERSION);
print '</td><td>'.$langs->trans("LDAPServerProtocolVersion").'</td></tr>'; print '</td><td>'.$langs->trans("LDAPServerProtocolVersion").'</td></tr>';
// Serveur primaire // Serveur primaire

View File

@@ -41,15 +41,17 @@ $action = GETPOST('action','alpha');
if ($action == 'setvalue' && $user->admin) if ($action == 'setvalue' && $user->admin)
{ {
$db->begin(); $db->begin();
$mailfrom = GETPOST('MAILING_EMAIL_FROM','alpha'); $mailfrom = GETPOST('MAILING_EMAIL_FROM','alpha');
$mailerror = GETPOST('MAILING_EMAIL_ERRORSTO','alpha'); $mailerror = GETPOST('MAILING_EMAIL_ERRORSTO','alpha');
$res=dolibarr_set_const($db, "MAILING_EMAIL_FROM",$mailfrom,'chaine',0,'',$conf->entity); $res=dolibarr_set_const($db, "MAILING_EMAIL_FROM",$mailfrom,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++; if (! $res > 0) $error++;
$res=dolibarr_set_const($db, "MAILING_EMAIL_ERRORSTO",$mailerror,'chaine',0,'',$conf->entity); $res=dolibarr_set_const($db, "MAILING_EMAIL_ERRORSTO",$mailerror,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++; if (! $res > 0) $error++;
$res=dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE",$checkread,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
if (! $error) if (! $error)
{ {
$db->commit(); $db->commit();
@@ -101,11 +103,31 @@ print '<input size="32" type="text" name="MAILING_EMAIL_ERRORSTO" value="'.$conf
if (!empty($conf->global->MAILING_EMAIL_ERRORSTO) && ! isValidEmail($conf->global->MAILING_EMAIL_ERRORSTO)) print ' '.img_warning($langs->trans("BadEMail")); if (!empty($conf->global->MAILING_EMAIL_ERRORSTO) && ! isValidEmail($conf->global->MAILING_EMAIL_ERRORSTO)) print ' '.img_warning($langs->trans("BadEMail"));
print '</td></tr>'; print '</td></tr>';
/*
$var=!$var;
print '<tr '.$bc[$var].'><td>';
print $langs->trans("ActivateCheckRead").'</td><td>';
if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE==1)
{
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setvalue&value=0">';
print img_picto($langs->trans("Enabled"),'switch_on');
print '</a>';
}
else
{
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setvalue&value=1">';
print img_picto($langs->trans("Disabled"),'switch_off');
print '</a>';
}
print '</td></tr>';
*/
print '<tr><td colspan="3" align="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td></tr>'; print '<tr><td colspan="3" align="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td></tr>';
print '</table></form>'; print '</table></form>';
$db->close();
llxFooter(); llxFooter();
$db->close();
?> ?>

View File

@@ -147,7 +147,8 @@ if (! empty($_POST['removedfile']) || ! empty($_POST['removedfilehtml']))
$result = dol_delete_file($pathtodelete,1); $result = dol_delete_file($pathtodelete,1);
if ($result >= 0) if ($result >= 0)
{ {
$message = '<div class="ok">'.$langs->trans("FileWasRemoved",$filetodelete).'</div>'; $langs->load("other");
$message = '<div class="ok">'.$langs->trans("FileWasRemoved",$filetodelete).'</div>';
//print_r($_FILES); //print_r($_FILES);
include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'); include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php');
@@ -210,7 +211,7 @@ if (($action == 'send' || $action == 'sendhtml') && ! $_POST['addfile'] && ! $_P
$body=make_substitutions($body,$substitutionarrayfortest); $body=make_substitutions($body,$substitutionarrayfortest);
require_once(DOL_DOCUMENT_ROOT."/core/class/CMailFile.class.php"); require_once(DOL_DOCUMENT_ROOT."/core/class/CMailFile.class.php");
$mailfile = new CMailFile( $mailfile = new CMailFile(
$subject, $subject,
$sendto, $sendto,
$email_from, $email_from,
@@ -223,7 +224,7 @@ if (($action == 'send' || $action == 'sendhtml') && ! $_POST['addfile'] && ! $_P
$deliveryreceipt, $deliveryreceipt,
$msgishtml, $msgishtml,
$errors_to $errors_to
); );
$result=$mailfile->sendfile(); $result=$mailfile->sendfile();

View File

@@ -26,6 +26,7 @@
require("../main.inc.php"); require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/functions2.lib.php");
$langs->load("admin"); $langs->load("admin");
$langs->load("users"); $langs->load("users");
@@ -79,37 +80,13 @@ $db->begin();
// Charge les modules soumis a permissions // Charge les modules soumis a permissions
$modules = array(); $modules = array();
$modulesdir = array(); $modulesdir = dolGetModulesDirs();
foreach ($conf->file->dol_document_root as $type => $dirroot)
{
$modulesdir[] = $dirroot . "/core/modules/";
if ($type == 'alt')
{
$handle=@opendir($dirroot);
if (is_resource($handle))
{
while (($file = readdir($handle))!==false)
{
if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes')
{
if (is_dir($dirroot . '/' . $file . '/core/modules/'))
{
$modulesdir[] = $dirroot . '/' . $file . '/core/modules/';
}
}
}
closedir($handle);
}
}
}
foreach ($modulesdir as $dir) foreach ($modulesdir as $dir)
{ {
// Load modules attributes in arrays (name, numero, orders) from dir directory // Load modules attributes in arrays (name, numero, orders) from dir directory
//print $dir."\n<br>"; //print $dir."\n<br>";
$handle=@opendir($dir); $handle=@opendir(dol_osencode($dir));
if (is_resource($handle)) if (is_resource($handle))
{ {
while (($file = readdir($handle))!==false) while (($file = readdir($handle))!==false)
@@ -135,7 +112,6 @@ foreach ($modulesdir as $dir)
if ($objMod->rights_class) if ($objMod->rights_class)
{ {
$ret=$objMod->insert_permissions(0); $ret=$objMod->insert_permissions(0);
$modules[$objMod->rights_class]=$objMod; $modules[$objMod->rights_class]=$objMod;
//print "modules[".$objMod->rights_class."]=$objMod;"; //print "modules[".$objMod->rights_class."]=$objMod;";
} }
@@ -151,7 +127,7 @@ $db->commit();
$sql = "SELECT r.id, r.libelle, r.module, r.perms, r.subperms, r.bydefault"; $sql = "SELECT r.id, r.libelle, r.module, r.perms, r.subperms, r.bydefault";
$sql.= " FROM ".MAIN_DB_PREFIX."rights_def as r"; $sql.= " FROM ".MAIN_DB_PREFIX."rights_def as r";
$sql.= " WHERE r.libelle NOT LIKE 'tou%'"; // On ignore droits "tous" $sql.= " WHERE r.libelle NOT LIKE 'tou%'"; // On ignore droits "tous"
$sql.= " AND entity in (".(!empty($conf->multicompany->transverse_mode)?"1,":"").$conf->entity.")"; $sql.= " AND entity IN (".(! empty($conf->multicompany->transverse_mode)?"1,":"").$conf->entity.")";
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) $sql.= " AND r.perms NOT LIKE '%_advance'"; // Hide advanced perms if option is not enabled if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) $sql.= " AND r.perms NOT LIKE '%_advance'"; // Hide advanced perms if option is not enabled
$sql.= " ORDER BY r.module, r.id"; $sql.= " ORDER BY r.module, r.id";

View File

@@ -222,13 +222,13 @@ foreach ($dirmodels as $reldir)
print '</td>'."\n"; print '</td>'."\n";
print '<td align="center">'; print '<td align="center">';
if ($conf->global->PROJECT_ADDON == $classname) if ($conf->global->PROJECT_ADDON == 'mod_'.$classname)
{ {
print img_picto($langs->trans("Activated"),'switch_on'); print img_picto($langs->trans("Activated"),'switch_on');
} }
else else
{ {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&amp;value='.$classname.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&amp;value=mod_'.$classname.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
} }
print '</td>'; print '</td>';

View File

@@ -123,7 +123,7 @@ print '<td>'.$langs->trans("ConnectionTimeout").'</td><td align="right">';
print '</td>'; print '</td>';
print '<td nowrap="nowrap">'; print '<td nowrap="nowrap">';
print '<input class="flat" name="MAIN_USE_CONNECT_TIMEOUT" type="text" size="4" value="'.$conf->global->MAIN_USE_CONNECT_TIMEOUT.'">'; print '<input class="flat" name="MAIN_USE_CONNECT_TIMEOUT" type="text" size="4" value="'.$conf->global->MAIN_USE_CONNECT_TIMEOUT.'">';
print ' '.$langs->trans("seconds"); print ' '.strtolower($langs->trans("Seconds"));
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
@@ -134,7 +134,7 @@ print '<td>'.$langs->trans("ResponseTimeout").'</td><td align="right">';
print '</td>'; print '</td>';
print '<td nowrap="nowrap">'; print '<td nowrap="nowrap">';
print '<input class="flat" name="MAIN_USE_RESPONSE_TIMEOUT" type="text" size="4" value="'.$conf->global->MAIN_USE_RESPONSE_TIMEOUT.'">'; print '<input class="flat" name="MAIN_USE_RESPONSE_TIMEOUT" type="text" size="4" value="'.$conf->global->MAIN_USE_RESPONSE_TIMEOUT.'">';
print ' '.$langs->trans("seconds"); print ' '.strtolower($langs->trans("Seconds"));
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';

View File

@@ -46,7 +46,7 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
$result=dol_mkdir($upload_dir); // Create dir if not exists $result=dol_mkdir($upload_dir); // Create dir if not exists
if ($result >= 0) if ($result >= 0)
{ {
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],1,0,$_FILES['userfile']['error']); $resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . dol_unescapefile($_FILES['userfile']['name']),1,0,$_FILES['userfile']['error']);
if (is_numeric($resupload) && $resupload > 0) if (is_numeric($resupload) && $resupload > 0)
{ {
@@ -171,7 +171,7 @@ print '<td>'.$langs->trans("SessionTimeOut").'</td><td align="right">';
print $form->textwithpicto('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor"))); print $form->textwithpicto('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor")));
print '</td>'; print '</td>';
print '<td nowrap="nowrap">'; print '<td nowrap="nowrap">';
print '<input class="flat" name="MAIN_SESSION_TIMEOUT" type="text" size="6" value="'.htmlentities($conf->global->MAIN_SESSION_TIMEOUT).'"> '.$langs->trans("seconds"); print '<input class="flat" name="MAIN_SESSION_TIMEOUT" type="text" size="6" value="'.htmlentities($conf->global->MAIN_SESSION_TIMEOUT).'"> '.strtolower($langs->trans("Seconds"));
print '</td>'; print '</td>';
print '<td align="right">'; print '<td align="right">';
print '<input type="submit" class="button" name="button" value="'.$langs->trans("Modify").'">'; print '<input type="submit" class="button" name="button" value="'.$langs->trans("Modify").'">';

View File

@@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* *
@@ -178,14 +178,14 @@ $var=true;
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'><td width="140"><input '.$bc[$var].' type="checkbox" name="SYSLOG_FILE_ON" '.$option.' value="1" '.($syslog_file_on?' checked="checked"':'').'> '.$langs->trans("SyslogSimpleFile").'</td>'; print '<tr '.$bc[$var].'><td width="140"><input '.$bc[$var].' type="checkbox" name="SYSLOG_FILE_ON" '.$option.' value="1" '.($syslog_file_on?' checked="checked"':'').'> '.$langs->trans("SyslogSimpleFile").'</td>';
print '<td width="250" nowrap="nowrap">'.$langs->trans("SyslogFilename").': <input type="text" class="flat" name="filename" '.$option.' size="60" value="'.$defaultsyslogfile.'">'; print '<td nowrap="nowrap">'.$langs->trans("SyslogFilename").': <input type="text" class="flat" name="filename" '.$option.' size="60" value="'.$defaultsyslogfile.'">';
print '</td>'; print '</td>';
print "<td align=\"left\">".$form->textwithpicto('',$langs->trans("YouCanUseDOL_DATA_ROOT")); print "<td align=\"left\">".$form->textwithpicto('',$langs->trans("YouCanUseDOL_DATA_ROOT"));
print '</td></tr>'; print '</td></tr>';
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'><td width="140"><input '.$bc[$var].' type="checkbox" name="SYSLOG_SYSLOG_ON" '.$option.' value="1" '.($syslog_syslog_on?' checked="checked"':'').'> '.$langs->trans("SyslogSyslog").'</td>'; print '<tr '.$bc[$var].'><td width="140"><input '.$bc[$var].' type="checkbox" name="SYSLOG_SYSLOG_ON" '.$option.' value="1" '.($syslog_syslog_on?' checked="checked"':'').'> '.$langs->trans("SyslogSyslog").'</td>';
print '<td width="250" nowrap="nowrap">'.$langs->trans("SyslogFacility").': <input type="text" class="flat" name="facility" '.$option.' value="'.$defaultsyslogfacility.'">'; print '<td nowrap="nowrap">'.$langs->trans("SyslogFacility").': <input type="text" class="flat" name="facility" '.$option.' value="'.$defaultsyslogfacility.'">';
print '</td>'; print '</td>';
print "<td align=\"left\">".$form->textwithpicto('','Only LOG_USER supported on Windows'); print "<td align=\"left\">".$form->textwithpicto('','Only LOG_USER supported on Windows');
print '</td></tr>'; print '</td></tr>';
@@ -202,7 +202,7 @@ try
if (! class_exists('FirePHP')) print ' disabled="disabled"'; if (! class_exists('FirePHP')) print ' disabled="disabled"';
else print ($syslog_firephp_on?' checked="checked"':""); else print ($syslog_firephp_on?' checked="checked"':"");
print '> '.$langs->trans("FirePHP").'</td>'; print '> '.$langs->trans("FirePHP").'</td>';
print '<td width="250" nowrap="nowrap">'; print '<td nowrap="nowrap">';
print '</td>'; print '</td>';
print "<td align=\"left\">".$form->textwithpicto('','FirePHP must be installed onto PHP and FirePHP plugin for Firefox must also be installed'); print "<td align=\"left\">".$form->textwithpicto('','FirePHP must be installed onto PHP and FirePHP plugin for Firefox must also be installed');
print '</td></tr>'; print '</td></tr>';
@@ -232,7 +232,7 @@ print '<td align="right"><input type="submit" class="button" '.$option.' value="
print "</tr>\n"; print "</tr>\n";
$var=true; $var=true;
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'><td width=\"140\">'.$langs->trans("SyslogLevel").'</td>'; print '<tr '.$bc[$var].'><td width="140">'.$langs->trans("SyslogLevel").'</td>';
print '<td colspan="2"><select class="flat" name="level" '.$option.'>'; print '<td colspan="2"><select class="flat" name="level" '.$option.'>';
print '<option value="'.LOG_EMERG.'" '.($conf->global->SYSLOG_LEVEL==LOG_EMERG?'SELECTED':'').'>LOG_EMERG ('.LOG_EMERG.')</option>'; print '<option value="'.LOG_EMERG.'" '.($conf->global->SYSLOG_LEVEL==LOG_EMERG?'SELECTED':'').'>LOG_EMERG ('.LOG_EMERG.')</option>';
print '<option value="'.LOG_ALERT.'" '.($conf->global->SYSLOG_LEVEL==LOG_ALERT?'SELECTED':'').'>LOG_ALERT ('.LOG_ALERT.')</option>'; print '<option value="'.LOG_ALERT.'" '.($conf->global->SYSLOG_LEVEL==LOG_ALERT?'SELECTED':'').'>LOG_ALERT ('.LOG_ALERT.')</option>';

View File

@@ -157,10 +157,16 @@ $txt =$langs->trans("OSTZ").' (variable system TZ): '.($_ENV["TZ"]?$_ENV["TZ"]:$
$txt.=$langs->trans("PHPTZ").' (php.ini date.timezone): '.(ini_get("date.timezone")?ini_get("date.timezone"):$langs->trans("NotDefined")).''."\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php $txt.=$langs->trans("PHPTZ").' (php.ini date.timezone): '.(ini_get("date.timezone")?ini_get("date.timezone"):$langs->trans("NotDefined")).''."\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("CurrentTimeZone").'</td><td>'; // Timezone server PHP print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("CurrentTimeZone").'</td><td>'; // Timezone server PHP
$a=getServerTimeZoneString(); $a=getServerTimeZoneInt('now');
$a.=' '.(getServerTimeZoneInt()>=0?'+':'').getServerTimeZoneInt(); $b=getServerTimeZoneInt('winter');
$a.=' ('.(getServerTimeZoneInt()>=0?'+':'').(getServerTimeZoneInt()*3600).')'; $c=getServerTimeZoneInt('summer');
print $form->textwithtooltip($a,$txt,2,1,img_info('')); $daylight=(is_numeric($c) && is_numeric($b))?round($c-$b):'unknown';
//print $a." ".$b." ".$c." ".$daylight;
$val=($a>=0?'+':'').$a;
$val.=' ('.($a==='unknown'?'unknown':($a>=0?'+':'').($a*3600)).')';
$val.=' &nbsp; &nbsp; &nbsp; '.getServerTimeZoneString().' '.($b>=0?'+':'').$b.' ('.($b>=0?'+':'').($b*3600).')';
$val.=' &nbsp; &nbsp; &nbsp; '.$langs->trans("DaylingSavingTime").': '.($daylight==='unknown'?'unknown':yn($daylight));
print $form->textwithtooltip($val,$txt,2,1,img_info(''));
print '</td></tr>'."\n"; // value defined in http://fr3.php.net/manual/en/timezones.europe.php print '</td></tr>'."\n"; // value defined in http://fr3.php.net/manual/en/timezones.europe.php
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'><td width="300">&nbsp; => '.$langs->trans("CurrentHour").'</td><td>'.dol_print_date(dol_now(),'dayhour','tzserver').'</td></tr>'."\n"; print '<tr '.$bc[$var].'><td width="300">&nbsp; => '.$langs->trans("CurrentHour").'</td><td>'.dol_print_date(dol_now(),'dayhour','tzserver').'</td></tr>'."\n";

View File

@@ -75,7 +75,7 @@ print "<br>\n";
// Php // Php
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("Php")."</td></tr>\n"; print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("PHP")."</td></tr>\n";
$phpversion=version_php(); $phpversion=version_php();
print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$phpversion."</td></tr>\n"; print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$phpversion."</td></tr>\n";
print "<tr $bc[1]><td>".$langs->trans("PhpWebLink")."</td><td>".php_sapi_name()."</td></tr>\n"; print "<tr $bc[1]><td>".$langs->trans("PhpWebLink")."</td><td>".php_sapi_name()."</td></tr>\n";

View File

@@ -47,29 +47,30 @@ $modules = array();
$modules_names = array(); $modules_names = array();
$modules_files = array(); $modules_files = array();
// Search modules dirs
$modulesdir = array();
foreach ($conf->file->dol_document_root as $type => $dirroot) foreach ($conf->file->dol_document_root as $type => $dirroot)
{ {
$modulesdir[] = $dirroot . "/core/modules/"; $modulesdir[$dirroot . '/core/modules/'] = $dirroot . '/core/modules/';
if ($type == 'alt') $handle=@opendir($dirroot);
{ if (is_resource($handle))
$handle=@opendir($dirroot); {
if (is_resource($handle)) while (($file = readdir($handle))!==false)
{ {
while (($file = readdir($handle))!==false) if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes')
{ {
if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes') if (is_dir($dirroot . '/' . $file . '/core/modules/'))
{ {
if (is_dir($dirroot . '/' . $file . '/core/modules/')) $modulesdir[$dirroot . '/' . $file . '/core/modules/'] = $dirroot . '/' . $file . '/core/modules/';
{ }
$modulesdir[] = $dirroot . '/' . $file . '/core/modules/'; }
} }
} closedir($handle);
} }
closedir($handle);
}
}
} }
//var_dump($modulesdir);
// Load list of modules // Load list of modules
foreach($modulesdir as $dir) foreach($modulesdir as $dir)

View File

@@ -158,7 +158,7 @@ if ($what == 'mysql')
if (! empty($dolibarr_main_db_pass)) if (! empty($dolibarr_main_db_pass))
{ {
$paramcrypted.=' -p"'.preg_replace('/./i','*',$dolibarr_main_db_pass).'"'; $paramcrypted.=' -p"'.preg_replace('/./i','*',$dolibarr_main_db_pass).'"';
$paramclear.=' -p"'.str_replace('"','\"',$dolibarr_main_db_pass).'"'; $paramclear.=' -p"'.str_replace(array('"','`'),array('\"','\`'),$dolibarr_main_db_pass).'"';
} }
print '<b>'.$langs->trans("RunCommandSummary").':</b><br>'."\n"; print '<b>'.$langs->trans("RunCommandSummary").':</b><br>'."\n";

View File

@@ -33,9 +33,7 @@ if ($_GET["msg"]) $message='<div class="error">'.$_GET["msg"].'</div>';
$urldolibarr='http://www.dolibarr.org/downloads/'; $urldolibarr='http://www.dolibarr.org/downloads/';
//$urldolibarrmodules='http://www.dolibarr.org/downloads/cat_view/65-modulesaddon';
$urldolibarrmodules='http://www.dolistore.com/'; $urldolibarrmodules='http://www.dolistore.com/';
//$urldolibarrthemes='http://www.dolibarr.org/';
$urldolibarrthemes='http://www.dolistore.com/'; $urldolibarrthemes='http://www.dolistore.com/';
$dolibarrroot=preg_replace('/([\\/]+)$/i','',DOL_DOCUMENT_ROOT); $dolibarrroot=preg_replace('/([\\/]+)$/i','',DOL_DOCUMENT_ROOT);
$dolibarrroot=preg_replace('/([^\\/]+)$/i','',$dolibarrroot); $dolibarrroot=preg_replace('/([^\\/]+)$/i','',$dolibarrroot);
@@ -141,4 +139,4 @@ print $langs->trans("SetupIsReadyForUse").'<br>';
print '</form>'; print '</form>';
llxFooter(); llxFooter();
?> ?>

View File

@@ -80,6 +80,7 @@ $workflowcodes=array();
$workflow=array( $workflow=array(
'order' => array( 'order' => array(
'propal' => array('WORKFLOW_PROPAL_AUTOCREATE_ORDER') 'propal' => array('WORKFLOW_PROPAL_AUTOCREATE_ORDER')
//,'invoice' => array('WORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER')
), ),
'invoice' => array ( 'invoice' => array (
'order' => array('WORKFLOW_ORDER_AUTOCREATE_INVOICE') 'order' => array('WORKFLOW_ORDER_AUTOCREATE_INVOICE')
@@ -87,14 +88,14 @@ $workflow=array(
//, 'propal' => array('WORKFLOW_PROPAL_AUTOCREATE_INVOICE') //, 'propal' => array('WORKFLOW_PROPAL_AUTOCREATE_INVOICE')
) )
); );
$workflow = array_merge($workflow, $conf->modules_parts['workflow']); if (! empty($conf->modules_parts['workflow']) && is_array($conf->modules_parts['workflow'])) $workflow = array_merge($workflow, $conf->modules_parts['workflow']);
foreach($workflow as $child => $parents) foreach($workflow as $child => $parents)
{ {
if ($conf->$child->enabled) if ($conf->$child->enabled)
{ {
$langs->Load($child.'@'.$child); $langs->Load($child.'@'.$child);
foreach($parents as $parent => $actions) foreach($parents as $parent => $actions)
{ {
if ($conf->$parent->enabled) if ($conf->$parent->enabled)

View File

@@ -39,9 +39,9 @@ print '<tr><td valign="top" width="40%" class="notopnoleft">';
/* /*
/* Chiffre d'affaire /* Chiffre d'affaires
*/ */
//print_barre_liste("Chiffre d'affaire", $page, "ca.php"); //print_barre_liste("Chiffre d'affaires", $page, "ca.php");
print_titre($langs->trans('SalesTurnover')); print_titre($langs->trans('SalesTurnover'));

View File

@@ -75,7 +75,7 @@ if ($id || $ref)
$objecttype = 'adherent&categorie'; $objecttype = 'adherent&categorie';
$objectid = isset($id)?$id:(isset($ref)?$ref:''); $objectid = isset($id)?$id:(isset($ref)?$ref:'');
$dbtablename = 'adherent'; $dbtablename = 'adherent';
$fieldid = isset($ref)?'ref':'rowid'; $fieldid = ! empty($ref)?'ref':'rowid';
} }
} }

View File

@@ -889,17 +889,14 @@ class Categorie
} }
else // mother_id undefined (so it's root) else // mother_id undefined (so it's root)
{ {
/* We have to select any rowid from llx_categorie which which category's type and label /* We have to select any rowid from llx_categorie that is not at root level
* are equals to those of the calling category, AND which doesn't exist in categorie association */
* as children (rowid != fk_categorie_fille) $sql = "SELECT c.rowid";
*/ $sql.= " FROM ".MAIN_DB_PREFIX."categorie as c ";
$sql = "SELECT c.rowid"; $sql.= " WHERE c.type=".$this->type;
$sql.= " FROM ".MAIN_DB_PREFIX."categorie as c "; $sql.= " AND c.label='".$this->db->escape($this->label)."'";
$sql.= " JOIN ".MAIN_DB_PREFIX."categorie_association as ca"; $sql.= " AND c.entity IN (".getEntity('category',1).")";
$sql.= " ON c.rowid!=ca.fk_categorie_fille"; $sql.= " AND c.rowid NOT IN (SELECT ca.fk_categorie_fille FROM ".MAIN_DB_PREFIX."categorie_association as ca)";
$sql.= " WHERE c.type=".$this->type;
$sql.= " AND c.label='".$this->db->escape($this->label)."'";
$sql.= " AND c.entity IN (".getEntity('category',1).")";
} }
dol_syslog(get_class($this)."::already_exists sql=".$sql, LOG_DEBUG); dol_syslog(get_class($this)."::already_exists sql=".$sql, LOG_DEBUG);
$resql = $this->db->query($sql); $resql = $this->db->query($sql);

View File

@@ -31,6 +31,7 @@ require_once(DOL_DOCUMENT_ROOT."/contact/class/contact.class.php");
require_once(DOL_DOCUMENT_ROOT."/comm/action/class/cactioncomm.class.php"); require_once(DOL_DOCUMENT_ROOT."/comm/action/class/cactioncomm.class.php");
require_once(DOL_DOCUMENT_ROOT."/comm/action/class/actioncomm.class.php"); require_once(DOL_DOCUMENT_ROOT."/comm/action/class/actioncomm.class.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/images.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php"); require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT."/projet/class/project.class.php"); if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT."/projet/class/project.class.php");
@@ -67,17 +68,24 @@ if (! $sortfield) $sortfield="name";
*/ */
if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
{ {
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
// Creation repertoire si n'existe pas // Creation repertoire si n'existe pas
$upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($objectid); $upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($objectid);
if (dol_mkdir($upload_dir) >= 0) if (dol_mkdir($upload_dir) >= 0)
{ {
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']); $resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . dol_unescapefile($_FILES['userfile']['name']),0,0,$_FILES['userfile']['error']);
if (is_numeric($resupload) && $resupload > 0) if (is_numeric($resupload) && $resupload > 0)
{ {
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>'; if (image_format_supported($upload_dir . "/" . $_FILES['userfile']['name']) == 1)
{
// Create small thumbs for image (Ratio is near 16/9)
// Used on logon for example
$imgThumbSmall = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthsmall, $maxheightsmall, '_small', $quality, "thumbs");
// Create mini thumbs for image (Ratio is near 16/9)
// Used on menu or for setup page for example
$imgThumbMini = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthmini, $maxheightmini, '_mini', $quality, "thumbs");
}
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
} }
else else
{ {

View File

@@ -85,13 +85,14 @@ if ($action == 'add_action')
} }
$fulldayevent=$_POST["fullday"]; $fulldayevent=$_POST["fullday"];
$percentage=in_array(GETPOST('status'),array(-1,100))?GETPOST('status'):GETPOST("percentage"); // If status is -1 or 100, percentage is not defined and we must use status
// Clean parameters // Clean parameters
$datep=dol_mktime($fulldayevent?'00':$_POST["aphour"], $fulldayevent?'00':$_POST["apmin"], 0, $_POST["apmonth"], $_POST["apday"], $_POST["apyear"]); $datep=dol_mktime($fulldayevent?'00':$_POST["aphour"], $fulldayevent?'00':$_POST["apmin"], 0, $_POST["apmonth"], $_POST["apday"], $_POST["apyear"]);
$datef=dol_mktime($fulldayevent?'23':$_POST["p2hour"], $fulldayevent?'59':$_POST["p2min"], $fulldayevent?'59':'0', $_POST["p2month"], $_POST["p2day"], $_POST["p2year"]); $datef=dol_mktime($fulldayevent?'23':$_POST["p2hour"], $fulldayevent?'59':$_POST["p2min"], $fulldayevent?'59':'0', $_POST["p2month"], $_POST["p2day"], $_POST["p2year"]);
// Check parameters // Check parameters
if (! $datef && $_POST["percentage"] == 100) if (! $datef && $percentage == 100)
{ {
$error++; $error++;
$action = 'create'; $action = 'create';
@@ -135,7 +136,7 @@ if ($action == 'add_action')
$actioncomm->fk_project = isset($_POST["projectid"])?$_POST["projectid"]:0; $actioncomm->fk_project = isset($_POST["projectid"])?$_POST["projectid"]:0;
$actioncomm->datep = $datep; $actioncomm->datep = $datep;
$actioncomm->datef = $datef; $actioncomm->datef = $datef;
$actioncomm->percentage = isset($_POST["percentage"])?$_POST["percentage"]:0; $actioncomm->percentage = $percentage;
$actioncomm->duree=(($_POST["dureehour"] * 60) + $_POST["dureemin"]) * 60; $actioncomm->duree=(($_POST["dureehour"] * 60) + $_POST["dureemin"]) * 60;
$usertodo=new User($db); $usertodo=new User($db);
@@ -257,21 +258,20 @@ if ($action == 'confirm_delete' && GETPOST("confirm") == 'yes')
} }
/* /*
* Action mise a jour de l'action * Action update event
*/ */
if ($action == 'update') if ($action == 'update')
{ {
if (! $_POST["cancel"]) if (! $_POST["cancel"])
{ {
$fulldayevent=$_POST["fullday"]; $fulldayevent=$_POST["fullday"];
$percentage=in_array(GETPOST('status'),array(-1,100))?GETPOST('status'):GETPOST("percentage"); // If status is -1 or 100, percentage is not defined and we must use status
// Clean parameters // Clean parameters
if ($_POST["aphour"] == -1) $_POST["aphour"]='0'; if ($_POST["aphour"] == -1) $_POST["aphour"]='0';
if ($_POST["apmin"] == -1) $_POST["apmin"]='0'; if ($_POST["apmin"] == -1) $_POST["apmin"]='0';
if ($_POST["p2hour"] == -1) $_POST["p2hour"]='0'; if ($_POST["p2hour"] == -1) $_POST["p2hour"]='0';
if ($_POST["p2min"] == -1) $_POST["p2min"]='0'; if ($_POST["p2min"] == -1) $_POST["p2min"]='0';
//if ($_POST["adhour"] == -1) $_POST["adhour"]='0';
//if ($_POST["admin"] == -1) $_POST["admin"]='0';
$actioncomm = new Actioncomm($db); $actioncomm = new Actioncomm($db);
$actioncomm->fetch($id); $actioncomm->fetch($id);
@@ -282,9 +282,7 @@ if ($action == 'update')
$actioncomm->label = $_POST["label"]; $actioncomm->label = $_POST["label"];
$actioncomm->datep = $datep; $actioncomm->datep = $datep;
$actioncomm->datef = $datef; $actioncomm->datef = $datef;
//$actioncomm->date = $datea; $actioncomm->percentage = $percentage;
//$actioncomm->dateend = $datea2;
$actioncomm->percentage = $_POST["percentage"];
$actioncomm->priority = $_POST["priority"]; $actioncomm->priority = $_POST["priority"];
$actioncomm->fulldayevent= $_POST["fullday"]?1:0; $actioncomm->fulldayevent= $_POST["fullday"]?1:0;
$actioncomm->location = isset($_POST["location"])?$_POST["location"]:''; $actioncomm->location = isset($_POST["location"])?$_POST["location"]:'';
@@ -294,7 +292,7 @@ if ($action == 'update')
$actioncomm->note = $_POST["note"]; $actioncomm->note = $_POST["note"];
$actioncomm->pnote = $_POST["note"]; $actioncomm->pnote = $_POST["note"];
if (! $datef && $_POST["percentage"] == 100) if (! $datef && $percentage == 100)
{ {
$error=$langs->trans("ErrorFieldRequired",$langs->trans("DateEnd")); $error=$langs->trans("ErrorFieldRequired",$langs->trans("DateEnd"));
$action = 'edit'; $action = 'edit';
@@ -420,7 +418,7 @@ if ($action == 'create')
print '<form name="formaction" action="'.DOL_URL_ROOT.'/comm/action/fiche.php" method="POST">'; print '<form name="formaction" action="'.DOL_URL_ROOT.'/comm/action/fiche.php" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="add_action">'; print '<input type="hidden" name="action" value="add_action">';
print '<input type="hidden" name="backtopage" value="'.((! empty($backtopage) && $backtopage != '1') ? $backtopage : $_SERVER["HTTP_REFERER"]).'">'; if ($backtopage) print '<input type="hidden" name="backtopage" value="'.($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"]).'">';
if (GETPOST("actioncode") == 'AC_RDV') print_fiche_titre($langs->trans("AddActionRendezVous")); if (GETPOST("actioncode") == 'AC_RDV') print_fiche_titre($langs->trans("AddActionRendezVous"));
else print_fiche_titre($langs->trans("AddAnAction")); else print_fiche_titre($langs->trans("AddAnAction"));
@@ -447,7 +445,7 @@ if ($action == 'create')
print '<tr><td>'.$langs->trans("Title").'</td><td><input type="text" name="label" size="60" value="'.GETPOST('label').'"></td></tr>'; print '<tr><td>'.$langs->trans("Title").'</td><td><input type="text" name="label" size="60" value="'.GETPOST('label').'"></td></tr>';
// Full day // Full day
print '<tr><td>'.$langs->trans("EventOnFullDay").'</td><td><input type="checkbox" id="fullday" name="fullday" '.(GETPOST('fullday')?' checked="checked"':'').'></td></tr>'; print '<tr><td class="fieldrequired">'.$langs->trans("EventOnFullDay").'</td><td><input type="checkbox" id="fullday" name="fullday" '.(GETPOST('fullday')?' checked="checked"':'').'></td></tr>';
// Date start // Date start
$datep=$actioncomm->datep; $datep=$actioncomm->datep;
@@ -673,7 +671,7 @@ if ($id)
print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="id" value="'.$id.'">'; print '<input type="hidden" name="id" value="'.$id.'">';
print '<input type="hidden" name="ref_ext" value="'.$act->ref_ext.'">'; print '<input type="hidden" name="ref_ext" value="'.$act->ref_ext.'">';
print '<input type="hidden" name="backtopage" value="'.((! empty($backtopage) && $backtopage != '1')? $backtopage : $_SERVER["HTTP_REFERER"]).'">'; if ($backtopage) print '<input type="hidden" name="backtopage" value="'.($backtopage != '1'? $backtopage : $_SERVER["HTTP_REFERER"]).'">';
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
@@ -687,7 +685,7 @@ if ($id)
print '<tr><td>'.$langs->trans("Title").'</td><td colspan="3"><input type="text" name="label" size="50" value="'.$act->label.'"></td></tr>'; print '<tr><td>'.$langs->trans("Title").'</td><td colspan="3"><input type="text" name="label" size="50" value="'.$act->label.'"></td></tr>';
// Full day event // Full day event
print '<tr><td>'.$langs->trans("EventOnFullDay").'</td><td colspan="3"><input type="checkbox" id="fullday" name="fullday" '.($act->fulldayevent?' checked="checked"':'').'></td></tr>'; print '<tr><td class="fieldrequired">'.$langs->trans("EventOnFullDay").'</td><td colspan="3"><input type="checkbox" id="fullday" name="fullday" '.($act->fulldayevent?' checked="checked"':'').'></td></tr>';
// Date start // Date start
print '<tr><td nowrap="nowrap" class="fieldrequired">'.$langs->trans("DateActionStart").'</td><td colspan="3">'; print '<tr><td nowrap="nowrap" class="fieldrequired">'.$langs->trans("DateActionStart").'</td><td colspan="3">';
@@ -741,7 +739,7 @@ if ($id)
// Contact // Contact
print '<td>'.$langs->trans("Contact").'</td><td width="30%">'; print '<td>'.$langs->trans("Contact").'</td><td width="30%">';
print $form->selectarray("contactid", $act->societe->contact_array(), $act->contact->id, 1); print $form->selectarray("contactid", (empty($act->societe->id)?array():$act->societe->contact_array()), $act->contact->id, 1);
print '</td></tr>'; print '</td></tr>';
// Project // Project

View File

@@ -121,7 +121,7 @@ if ($action=='delete_action')
* View * View
*/ */
$help_url='EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda'; $help_url='EN:Module_Agenda_En|FR:Module_Agenda|ES:M&oacute;dulo_Agenda';
llxHeader('',$langs->trans("Agenda"),$help_url); llxHeader('',$langs->trans("Agenda"),$help_url);
$form=new Form($db); $form=new Form($db);
@@ -744,11 +744,13 @@ if (! is_array($theme_datacolor)) $theme_datacolor=array(array(120,130,150), arr
if (empty($action) || $action == 'show_month') // View by month if (empty($action) || $action == 'show_month') // View by month
{ {
$newparam=$param; // newparam is for birthday links $newparam=$param; // newparam is for birthday links
$newparam=preg_replace('/showbirthday=/i','showbirthday_=',$newparam); // To avoid replacement when replace day= is done
$newparam=preg_replace('/action=show_month&?/i','',$newparam); $newparam=preg_replace('/action=show_month&?/i','',$newparam);
$newparam=preg_replace('/action=show_week&?/i','',$newparam); $newparam=preg_replace('/action=show_week&?/i','',$newparam);
$newparam=preg_replace('/day=[0-9][0-9]&?/i','',$newparam); $newparam=preg_replace('/day=[0-9]+&?/i','',$newparam);
$newparam=preg_replace('/month=[0-9][0-9]&?/i','',$newparam); $newparam=preg_replace('/month=[0-9]+&?/i','',$newparam);
$newparam=preg_replace('/year=[0-9]+&?/i','',$newparam); $newparam=preg_replace('/year=[0-9]+&?/i','',$newparam);
$newparam=preg_replace('/showbirthday_=/i','showbirthday=',$newparam); // Restore correct parameter
echo '<table width="100%" class="nocellnopadd">'; echo '<table width="100%" class="nocellnopadd">';
echo ' <tr class="liste_titre">'; echo ' <tr class="liste_titre">';
$i=0; $i=0;
@@ -810,11 +812,13 @@ if (empty($action) || $action == 'show_month') // View by month
elseif ($action == 'show_week') // View by week elseif ($action == 'show_week') // View by week
{ {
$newparam=$param; // newparam is for birthday links $newparam=$param; // newparam is for birthday links
$newparam=preg_replace('/showbirthday=/i','showbirthday_=',$newparam); // To avoid replacement when replace day= is done
$newparam=preg_replace('/action=show_month&?/i','',$newparam); $newparam=preg_replace('/action=show_month&?/i','',$newparam);
$newparam=preg_replace('/action=show_week&?/i','',$newparam); $newparam=preg_replace('/action=show_week&?/i','',$newparam);
$newparam=preg_replace('/day=[0-9][0-9]&?/i','',$newparam); $newparam=preg_replace('/day=[0-9]+&?/i','',$newparam);
$newparam=preg_replace('/month=[0-9][0-9]&?/i','',$newparam); $newparam=preg_replace('/month=[0-9]+&?/i','',$newparam);
$newparam=preg_replace('/year=[0-9]+&?/i','',$newparam); $newparam=preg_replace('/year=[0-9]+&?/i','',$newparam);
$newparam=preg_replace('/showbirthday_=/i','showbirthday=',$newparam); // Restore correct parameter
echo '<table width="100%" class="nocellnopadd">'; echo '<table width="100%" class="nocellnopadd">';
echo ' <tr class="liste_titre">'; echo ' <tr class="liste_titre">';
$i=0; $i=0;
@@ -866,9 +870,6 @@ else // View by day
$newparam=$param; // newparam is for birthday links $newparam=$param; // newparam is for birthday links
$newparam=preg_replace('/action=show_month&?/i','',$newparam); $newparam=preg_replace('/action=show_month&?/i','',$newparam);
$newparam=preg_replace('/action=show_week&?/i','',$newparam); $newparam=preg_replace('/action=show_week&?/i','',$newparam);
$newparam=preg_replace('/day=[0-9][0-9]&?/i','',$newparam);
$newparam=preg_replace('/month=[0-9][0-9]&?/i','',$newparam);
$newparam=preg_replace('/year=[0-9]+&?/i','',$newparam);
// Code to show just one day // Code to show just one day
$style='cal_current_month'; $style='cal_current_month';
$today=0; $today=0;

View File

@@ -51,11 +51,11 @@ $object = new Address($db);
* Actions * Actions
*/ */
// Cancel // Cancel
if (GETPOST("cancel") && ! empty($backtopage)) if (GETPOST("cancel") && ! empty($backtopage))
{ {
header("Location: ".$backtopage); header("Location: ".$backtopage);
exit; exit;
} }
if ($action == 'add' || $action == 'update') if ($action == 'add' || $action == 'update')
@@ -80,7 +80,7 @@ if ($action == 'add' || $action == 'update')
{ {
if (! empty($backtopage)) if (! empty($backtopage))
{ {
Header("Location: ".$backtopage); Header("Location: ".$backtopage);
exit; exit;
} }
else if ($origin == 'commande') else if ($origin == 'commande')
@@ -93,10 +93,10 @@ if ($action == 'add' || $action == 'update')
Header("Location: ../comm/propal/contact.php?action=editdelivery_adress&socid=".$socid."&id=".$originid); Header("Location: ../comm/propal/contact.php?action=editdelivery_adress&socid=".$socid."&id=".$originid);
exit; exit;
} }
elseif ($origin == 'shipment') elseif ($origin == 'shipment')
{ {
Header("Location: ../expedition/fiche.php?id=".$originid); Header("Location: ../expedition/fiche.php?id=".$originid);
exit; exit;
} }
else else
{ {
@@ -118,10 +118,10 @@ if ($action == 'add' || $action == 'update')
if ($result >= 0) if ($result >= 0)
{ {
if (! empty($backtopage)) if (! empty($backtopage))
{ {
Header("Location: ".$backtopage); Header("Location: ".$backtopage);
exit; exit;
} }
else if ($origin == 'commande') else if ($origin == 'commande')
{ {
@@ -286,10 +286,10 @@ if ($action == 'create')
print '<br><center>'; print '<br><center>';
print '<input type="submit" class="button" value="'.$langs->trans('Add').'">'; print '<input type="submit" class="button" value="'.$langs->trans('Add').'">';
if (! empty($backtopage)) if (! empty($backtopage))
{ {
print ' &nbsp; &nbsp; '; print ' &nbsp; &nbsp; ';
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">'; print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
} }
print '</center>'."\n"; print '</center>'."\n";
@@ -384,10 +384,10 @@ elseif ($action == 'edit')
print '</table><br>'; print '</table><br>';
print '<center>'; print '<center>';
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">'; print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
print ' &nbsp; '; print ' &nbsp; ';
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">'; print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
print '</center>'; print '</center>';
print '</form>'; print '</form>';

View File

@@ -87,14 +87,14 @@ if ($action == 'setcustomeraccountancycode')
if ($action == 'setconditions' && $user->rights->societe->creer) if ($action == 'setconditions' && $user->rights->societe->creer)
{ {
$object->fetch($id); $object->fetch($id);
$result=$object->setPaymentTerms(GETPOST('cond_reglement_id','int')); $result=$object->setPaymentTerms(GETPOST('cond_reglement_id','int'));
if ($result < 0) dol_print_error($db,$object->error); if ($result < 0) dol_print_error($db,$object->error);
} }
// mode de reglement // mode de reglement
if ($action == 'setmode' && $user->rights->societe->creer) if ($action == 'setmode' && $user->rights->societe->creer)
{ {
$object->fetch($id); $object->fetch($id);
$result=$object->setPaymentMethods(GETPOST('mode_reglement_id','int')); $result=$object->setPaymentMethods(GETPOST('mode_reglement_id','int'));
if ($result < 0) dol_print_error($db,$object->error); if ($result < 0) dol_print_error($db,$object->error);
} }
// assujetissement a la TVA // assujetissement a la TVA
@@ -796,10 +796,10 @@ if ($id > 0)
show_contacts($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?socid='.$object->id); show_contacts($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?socid='.$object->id);
} }
// Addresses list // Addresses list
if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) && ! empty($conf->global->MAIN_REPEATADDRESSONEACHTAB)) if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) && ! empty($conf->global->MAIN_REPEATADDRESSONEACHTAB))
{ {
$result=show_addresses($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?socid='.$object->id); $result=show_addresses($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?socid='.$object->id);
} }
if (! empty($conf->global->MAIN_REPEATTASKONEACHTAB)) if (! empty($conf->global->MAIN_REPEATTASKONEACHTAB))

View File

@@ -151,13 +151,26 @@ if ($action == 'delete')
$sql="DELETE FROM ".MAIN_DB_PREFIX."mailing_cibles where rowid=".$id; $sql="DELETE FROM ".MAIN_DB_PREFIX."mailing_cibles where rowid=".$id;
$resql=$db->query($sql); $resql=$db->query($sql);
if ($resql) if ($resql)
{ { //on récurpére l'id du mailing
$file = $dirmod."/modules_mailings.php"; $id = GETPOST('id','int');
$classname = "MailingTargets";
require_once($file);
$obj = new $classname($db); if (!empty($id))
$obj->update_nb($id); {
$file = $dirmod."/modules_mailings.php";
$classname = "MailingTargets";
require_once($file);
$obj = new $classname($db);
$obj->update_nb($id);
Header("Location: cibles.php?id=".$id);
exit;
}
else
{
Header("Location: liste.php");
exit;
}
} }
else else
{ {

View File

@@ -57,14 +57,14 @@ $substitutionarray=array(
'__SIGNATURE__' => 'Signature', '__SIGNATURE__' => 'Signature',
'__PERSONALIZED__' => 'Personalized' '__PERSONALIZED__' => 'Personalized'
); );
if ($conf->global->MAIN_SOCIETE_UNSUBSCRIBE) if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE)
{ {
$substitutionarray=array_merge( $substitutionarray=array_merge(
$substitutionarray, $substitutionarray,
array( array(
'__CHECK_READ__' => 'CheckMail', '__CHECK_READ__' => 'CheckMail',
'__UNSUSCRIBE__' => 'Unsuscribe' '__UNSUBSCRIBE__' => 'Unsubscribe'
) )
); );
} }
@@ -81,15 +81,15 @@ $substitutionarrayfortest=array(
'__SIGNATURE__' => 'TESTSignature', '__SIGNATURE__' => 'TESTSignature',
'__PERSONALIZED__' => 'TESTPersonalized' '__PERSONALIZED__' => 'TESTPersonalized'
); );
if ($conf->global->MAIN_SOCIETE_UNSUBSCRIBE) if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE)
{ {
$substitutionarrayfortest=array_merge( $substitutionarrayfortest=array_merge(
$substitutionarrayfortest, $substitutionarrayfortest,
array( array(
'__CHECK_READ__' => 'TESTCheckMail', '__CHECK_READ__' => 'TESTCheckMail',
'__UNSUSCRIBE__' => 'TESTCheckMail' '__UNSUBSCRIBE__' => 'TESTUnsubscribe'
) )
); );
} }
// Action clone object // Action clone object
@@ -209,7 +209,7 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes')
'__ID__' => $obj->source_id, '__ID__' => $obj->source_id,
'__EMAIL__' => $obj->email, '__EMAIL__' => $obj->email,
'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj->tag.'" width="0" height="0" style="width:0px;height:0px" border="0"/>', '__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj->tag.'" width="0" height="0" style="width:0px;height:0px" border="0"/>',
'__UNSUSCRIBE__' => '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj->tag.'&unsuscrib=1" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>', '__UNSUBSCRIBE__' => '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj->tag.'&unsuscrib=1" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>',
'__LASTNAME__' => $obj->nom, '__LASTNAME__' => $obj->nom,
'__FIRSTNAME__' => $obj->prenom, '__FIRSTNAME__' => $obj->prenom,
'__OTHER1__' => $other1, '__OTHER1__' => $other1,
@@ -547,60 +547,60 @@ if ($action == 'update' && empty($_POST["removedfile"]) && empty($_POST["cancel"
// Action confirmation validation // Action confirmation validation
if ($action == 'confirm_valid' && $confirm == 'yes') if ($action == 'confirm_valid' && $confirm == 'yes')
{ {
if ($object->fetch($id) >= 0) if ($object->fetch($id) >= 0)
{ {
$object->valid($user); $object->valid($user);
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
exit; exit;
} }
else else
{ {
dol_print_error($db); dol_print_error($db);
} }
} }
// Resend // Resend
if ($action == 'confirm_reset' && $confirm == 'yes') if ($action == 'confirm_reset' && $confirm == 'yes')
{ {
if ($object->fetch($id) >= 0) if ($object->fetch($id) >= 0)
{ {
$db->begin(); $db->begin();
$result=$object->valid($user); $result=$object->valid($user);
if ($result > 0) if ($result > 0)
{ {
$result=$object->reset_targets_status($user); $result=$object->reset_targets_status($user);
} }
if ($result > 0) if ($result > 0)
{ {
$db->commit(); $db->commit();
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
exit; exit;
} }
else else
{ {
$mesg=$object->error; $mesg=$object->error;
$db->rollback(); $db->rollback();
} }
} }
else else
{ {
dol_print_error($db); dol_print_error($db);
} }
} }
// Action confirmation suppression // Action confirmation suppression
if ($action == 'confirm_delete' && $confirm == 'yes') if ($action == 'confirm_delete' && $confirm == 'yes')
{ {
$object->fetch($id); $object->fetch($id);
if ($object->delete($object->id)) if ($object->delete($object->id))
{ {
Header("Location: liste.php"); Header("Location: liste.php");
exit; exit;
} }
} }
@@ -681,14 +681,12 @@ else
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ValidMailing"),$langs->trans("ConfirmValidMailing"),"confirm_valid",'','',1); $ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ValidMailing"),$langs->trans("ConfirmValidMailing"),"confirm_valid",'','',1);
if ($ret == 'html') print '<br>'; if ($ret == 'html') print '<br>';
} }
// Confirm reset // Confirm reset
else if ($action == 'reset') else if ($action == 'reset')
{ {
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ResetMailing"),$langs->trans("ConfirmResetMailing",$object->ref),"confirm_reset",'','',2); $ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ResetMailing"),$langs->trans("ConfirmResetMailing",$object->ref),"confirm_reset",'','',2);
if ($ret == 'html') print '<br>'; if ($ret == 'html') print '<br>';
} }
// Confirm delete // Confirm delete
else if ($action == 'delete') else if ($action == 'delete')
{ {
@@ -696,7 +694,8 @@ else
if ($ret == 'html') print '<br>'; if ($ret == 'html') print '<br>';
} }
else if ($action != 'edit')
if ($action != 'edit')
{ {
/* /*
* Mailing en mode visu * Mailing en mode visu
@@ -747,12 +746,12 @@ else
// From // From
print '<tr><td>'.$form->editfieldkey("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string').'</td><td colspan="3">'; print '<tr><td>'.$form->editfieldkey("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string').'</td><td colspan="3">';
print $form->editfieldval("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string'); print $form->editfieldval("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'email');
print '</td></tr>'; print '</td></tr>';
// Errors to // Errors to
print '<tr><td>'.$form->editfieldkey("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string').'</td><td colspan="3">'; print '<tr><td>'.$form->editfieldkey("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string').'</td><td colspan="3">';
print $form->editfieldval("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string'); print $form->editfieldval("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'email');
print '</td></tr>'; print '</td></tr>';
// Status // Status
@@ -763,7 +762,7 @@ else
print $langs->trans("TotalNbOfDistinctRecipients"); print $langs->trans("TotalNbOfDistinctRecipients");
print '</td><td colspan="3">'; print '</td><td colspan="3">';
$nbemail = ($object->nbemail?$object->nbemail:img_warning('').' <font class="warning">'.$langs->trans("NoTargetYet").'</font>'); $nbemail = ($object->nbemail?$object->nbemail:img_warning('').' <font class="warning">'.$langs->trans("NoTargetYet").'</font>');
if (!empty($conf->global->MAILING_LIMIT_SENDBYWEB) && is_numeric($nbemail) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail) if ($object->statut != 3 && !empty($conf->global->MAILING_LIMIT_SENDBYWEB) && is_numeric($nbemail) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail)
{ {
if ($conf->global->MAILING_LIMIT_SENDBYWEB > 0) if ($conf->global->MAILING_LIMIT_SENDBYWEB > 0)
{ {
@@ -955,9 +954,13 @@ else
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
// Ref
print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">'.$object->id.'</td></tr>'; print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">'.$object->id.'</td></tr>';
// Topic
print '<tr><td width="25%">'.$langs->trans("MailTitle").'</td><td colspan="3">'.$object->titre.'</td></tr>'; print '<tr><td width="25%">'.$langs->trans("MailTitle").'</td><td colspan="3">'.$object->titre.'</td></tr>';
// From
print '<tr><td width="25%">'.$langs->trans("MailFrom").'</td><td colspan="3">'.dol_print_email($object->email_from,0,0,0,0,1).'</td></tr>'; print '<tr><td width="25%">'.$langs->trans("MailFrom").'</td><td colspan="3">'.dol_print_email($object->email_from,0,0,0,0,1).'</td></tr>';
// To
print '<tr><td width="25%">'.$langs->trans("MailErrorsTo").'</td><td colspan="3">'.dol_print_email($object->email_errorsto,0,0,0,0,1).'</td></tr>'; print '<tr><td width="25%">'.$langs->trans("MailErrorsTo").'</td><td colspan="3">'.dol_print_email($object->email_errorsto,0,0,0,0,1).'</td></tr>';
// Status // Status
@@ -1043,10 +1046,10 @@ else
print '<br><i>'.$langs->trans("CommonSubstitutions").':<br>'; print '<br><i>'.$langs->trans("CommonSubstitutions").':<br>';
print '__ID__ = '.$langs->trans("IdRecord").'<br>'; print '__ID__ = '.$langs->trans("IdRecord").'<br>';
print '__EMAIL__ = '.$langs->trans("EMail").'<br>'; print '__EMAIL__ = '.$langs->trans("EMail").'<br>';
if ($conf->global->MAIN_SOCIETE_UNSUBSCRIBE) if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE)
{ {
print '__CHECK_READ__ = '.$langs->trans("CheckRead").'<br>'; print '__CHECK_READ__ = '.$langs->trans("CheckRead").'<br>';
print '__UNSUSCRIBE__ = '.$langs->trans("MailUnsubcribe").'<br>'; print '__UNSUBSCRIBE__ = '.$langs->trans("MailUnsubcribe").'<br>';
} }
print '__LASTNAME__ = '.$langs->trans("Lastname").'<br>'; print '__LASTNAME__ = '.$langs->trans("Lastname").'<br>';
print '__FIRSTNAME__ = '.$langs->trans("Firstname").'<br>'; print '__FIRSTNAME__ = '.$langs->trans("Firstname").'<br>';

View File

@@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@@ -155,7 +155,7 @@ if ($result)
{ {
print '<td align="center">'; print '<td align="center">';
$nbemail = $obj->nbemail; $nbemail = $obj->nbemail;
if (!empty($conf->global->MAILING_LIMIT_SENDBYWEB) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail) if ($obj->statut != 3 && !empty($conf->global->MAILING_LIMIT_SENDBYWEB) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail)
{ {
$text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB); $text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
print $form->textwithpicto($nbemail,$text,1,'warning'); print $form->textwithpicto($nbemail,$text,1,'warning');
@@ -192,7 +192,7 @@ else
dol_print_error($db); dol_print_error($db);
} }
$db->close();
llxFooter(); llxFooter();
$db->close();
?> ?>

View File

@@ -87,7 +87,7 @@ $result = restrictedArea($user, $module, $objectid, $dbtable);
$object = new Propal($db); $object = new Propal($db);
// Load object // Load object
if ($id > 0 || ! empty($ref)) if ($id > 0 || ! empty($ref))
{ {
$ret=$object->fetch($id, $ref); $ret=$object->fetch($id, $ref);
} }
@@ -136,6 +136,7 @@ if ($action == 'confirm_clone' && $confirm == 'yes')
else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->propale->supprimer) else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->propale->supprimer)
{ {
$object->fetch($id); $object->fetch($id);
$object->fetch_thirdparty();
$result=$object->delete($user); $result=$object->delete($user);
if ($result > 0) if ($result > 0)
{ {
@@ -153,29 +154,29 @@ else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->prop
// Remove line // Remove line
else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->propale->creer) else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->propale->creer)
{ {
$object->fetch($id); $object->fetch($id);
$object->fetch_thirdparty(); $object->fetch_thirdparty();
$result = $object->deleteline($lineid); $result = $object->deleteline($lineid);
// reorder lines // reorder lines
if ($result) $object->line_order(true); if ($result) $object->line_order(true);
// Define output language // Define output language
$outputlangs = $langs; $outputlangs = $langs;
$newlang=''; $newlang='';
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id']; if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id'];
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang; if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
if (! empty($newlang)) if (! empty($newlang))
{ {
$outputlangs = new Translate("",$conf); $outputlangs = new Translate("",$conf);
$outputlangs->setDefaultLang($newlang); $outputlangs->setDefaultLang($newlang);
} }
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
{ {
$ret=$object->fetch($id); // Reload to get new records $ret=$object->fetch($id); // Reload to get new records
propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager); propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
} }
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
exit; exit;
} }
@@ -247,18 +248,18 @@ else if ($action == 'set_ref_client' && $user->rights->propale->creer)
$object->set_ref_client($user, $_POST['ref_client']); $object->set_ref_client($user, $_POST['ref_client']);
} }
else if ($action == 'setnote_public' && $user->rights->propale->creer) else if ($action == 'setnote_public' && $user->rights->propale->creer)
{ {
$object->fetch($id); $object->fetch($id);
$result=$object->update_note_public(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES)); $result=$object->update_note_public(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES));
if ($result < 0) dol_print_error($db,$object->error); if ($result < 0) dol_print_error($db,$object->error);
} }
else if ($action == 'setnote' && $user->rights->propale->creer) else if ($action == 'setnote' && $user->rights->propale->creer)
{ {
$object->fetch($id); $object->fetch($id);
$result=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES)); $result=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES));
if ($result < 0) dol_print_error($db,$object->error); if ($result < 0) dol_print_error($db,$object->error);
} }
// Create proposal // Create proposal
@@ -834,6 +835,7 @@ else if ($action == "addline" && $user->rights->propale->creer)
unset($_POST['np_price']); unset($_POST['np_price']);
unset($_POST['dp_desc']); unset($_POST['dp_desc']);
unset($_POST['np_tva_tx']); unset($_POST['np_tva_tx']);
unset($_POST['np_desc']);
} }
else else
{ {
@@ -950,6 +952,23 @@ else if ($action == 'builddoc' && $user->rights->propale->creer)
} }
} }
// Remove file in doc form
else if ($action == 'remove_file')
{
if ($object->fetch($id))
{
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
$object->fetch_thirdparty();
$langs->load("other");
$upload_dir = $conf->propal->dir_output;
$file = $upload_dir . '/' . GETPOST('file');
dol_delete_file($file,0,0,0,$object);
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('file')).'</div>';
}
}
// Set project // Set project
else if ($action == 'classin' && $user->rights->propale->creer) else if ($action == 'classin' && $user->rights->propale->creer)
{ {
@@ -1047,63 +1066,63 @@ else if ($action == 'down' && $user->rights->propale->creer)
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
{ {
if ($action == 'addcontact' && $user->rights->propale->creer) if ($action == 'addcontact' && $user->rights->propale->creer)
{ {
$result = $object->fetch($id); $result = $object->fetch($id);
if ($result > 0 && $id > 0) if ($result > 0 && $id > 0)
{ {
$contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid')); $contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'));
$result = $result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]); $result = $result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]);
} }
if ($result >= 0) if ($result >= 0)
{ {
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
exit; exit;
} }
else else
{ {
if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS')
{ {
$langs->load("errors"); $langs->load("errors");
$mesg = '<div class="error">'.$langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType").'</div>'; $mesg = '<div class="error">'.$langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType").'</div>';
} }
else else
{ {
$mesg = '<div class="error">'.$object->error.'</div>'; $mesg = '<div class="error">'.$object->error.'</div>';
} }
} }
} }
// Bascule du statut d'un contact // Bascule du statut d'un contact
else if ($action == 'swapstatut' && $user->rights->propale->creer) else if ($action == 'swapstatut' && $user->rights->propale->creer)
{ {
if ($object->fetch($id) > 0) if ($object->fetch($id) > 0)
{ {
$result=$object->swapContactStatus(GETPOST('ligne')); $result=$object->swapContactStatus(GETPOST('ligne'));
} }
else else
{ {
dol_print_error($db); dol_print_error($db);
} }
} }
// Efface un contact // Efface un contact
else if ($action == 'deletecontact' && $user->rights->propale->creer) else if ($action == 'deletecontact' && $user->rights->propale->creer)
{ {
$object->fetch($id); $object->fetch($id);
$result = $object->delete_contact($lineid); $result = $object->delete_contact($lineid);
if ($result >= 0) if ($result >= 0)
{ {
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
exit; exit;
} }
else else
{ {
dol_print_error($db); dol_print_error($db);
} }
} }
} }
@@ -1146,7 +1165,7 @@ if ($id > 0 || ! empty($ref))
//'text' => $langs->trans("ConfirmClone"), //'text' => $langs->trans("ConfirmClone"),
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), //array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
//array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), //array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOST('socid','int'),'socid','(s.client=1 OR s.client=3)')) array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOST('socid','int'),'socid','(s.client=1 OR s.client=2 OR s.client=3)'))
); );
// Paiement incomplet. On demande si motif = escompte ou autre // Paiement incomplet. On demande si motif = escompte ou autre
$formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('ClonePropal'),$langs->trans('ConfirmClonePropal',$object->ref),'confirm_clone',$formquestion,'yes',1); $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('ClonePropal'),$langs->trans('ConfirmClonePropal',$object->ref),'confirm_clone',$formquestion,'yes',1);
@@ -1542,19 +1561,19 @@ if ($id > 0 || ! empty($ref))
print '</table><br>'; print '</table><br>';
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
{ {
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'); require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php');
$formcompany= new FormCompany($db); $formcompany= new FormCompany($db);
$blocname = 'contacts'; $blocname = 'contacts';
$title = $langs->trans('ContactsAddresses'); $title = $langs->trans('ContactsAddresses');
include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'); include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php');
} }
if (! empty($conf->global->MAIN_DISABLE_NOTES_TAB)) if (! empty($conf->global->MAIN_DISABLE_NOTES_TAB))
{ {
$blocname = 'notes'; $blocname = 'notes';
$title = $langs->trans('Notes'); $title = $langs->trans('Notes');
include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'); include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php');
} }
@@ -1886,9 +1905,9 @@ else
{ {
$sql.= " AND p.ref LIKE '%".$db->escape(trim($search_ref))."%'"; $sql.= " AND p.ref LIKE '%".$db->escape(trim($search_ref))."%'";
} }
if ($search_refcustomer) if ($search_refcustomer)
{ {
$sql.= " AND p.ref_client LIKE '%".$db->escape(trim($search_refcustomer))."%'"; $sql.= " AND p.ref_client LIKE '%".$db->escape(trim($search_refcustomer))."%'";
} }
if ($search_societe) if ($search_societe)
{ {
@@ -1961,8 +1980,8 @@ else
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre" align="left">';
print '<input class="flat" type="text" size="16" name="search_societe" value="'.$search_societe.'">'; print '<input class="flat" type="text" size="16" name="search_societe" value="'.$search_societe.'">';
print '</td>'; print '</td>';
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat" size="10" type="text" name="search_refcustomer" value="'.$search_refcustomer.'">'; print '<input class="flat" size="10" type="text" name="search_refcustomer" value="'.$search_refcustomer.'">';
print '</td>'; print '</td>';
print '<td class="liste_titre" colspan="1" align="center">'; print '<td class="liste_titre" colspan="1" align="center">';
print $langs->trans('Month').': <input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">'; print $langs->trans('Month').': <input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
@@ -2002,7 +2021,7 @@ else
print '</td>'; print '</td>';
print '<td width="20" class="nobordernopadding" nowrap="nowrap">'; print '<td width="20" class="nobordernopadding" nowrap="nowrap">';
if ($objp->fk_statut == 1 && $objp->dfv < ($now - $conf->propal->cloture->warning_delay)) print img_warning($langs->trans("Late")); if ($objp->fk_statut == 1 && $db->jdate($objp->dfv) < ($now - $conf->propal->cloture->warning_delay)) print img_warning($langs->trans("Late"));
print '</td>'; print '</td>';
print '<td width="16" align="right" class="nobordernopadding">'; print '<td width="16" align="right" class="nobordernopadding">';
@@ -2028,10 +2047,10 @@ else
print '<td>'; print '<td>';
print $companystatic->getNomUrl(1,'customer'); print $companystatic->getNomUrl(1,'customer');
print '</td>'; print '</td>';
// Customer ref // Customer ref
print '<td nowrap="nowrap">'; print '<td nowrap="nowrap">';
print $objp->ref_client; print $objp->ref_client;
print '</td>'; print '</td>';
// Date propale // Date propale

View File

@@ -969,7 +969,7 @@ class Propal extends CommonObject
$sql.= ", p.fk_cond_reglement"; $sql.= ", p.fk_cond_reglement";
$sql.= ", p.fk_mode_reglement"; $sql.= ", p.fk_mode_reglement";
$sql.= ", c.label as statut_label"; $sql.= ", c.label as statut_label";
$sql.= ", ca.code as availability_code, ca.label as availability"; $sql.= ", ca.code as availability_code, ca.label as availability";
$sql.= ", dr.code as demand_reason_code, dr.label as demand_reason"; $sql.= ", dr.code as demand_reason_code, dr.label as demand_reason";
$sql.= ", cr.code as cond_reglement_code, cr.libelle as cond_reglement, cr.libelle_facture as cond_reglement_libelle_doc"; $sql.= ", cr.code as cond_reglement_code, cr.libelle as cond_reglement, cr.libelle_facture as cond_reglement_libelle_doc";
$sql.= ", cp.code as mode_reglement_code, cp.libelle as mode_reglement"; $sql.= ", cp.code as mode_reglement_code, cp.libelle as mode_reglement";
@@ -1588,6 +1588,7 @@ class Propal extends CommonObject
if ($this->db->query($sql)) if ($this->db->query($sql))
{ {
$this->statut = 0; $this->statut = 0;
$this->brouillon = 1;
return 1; return 1;
} }
else else
@@ -1800,16 +1801,16 @@ class Propal extends CommonObject
if (! $error) if (! $error)
{ {
// We remove directory // We remove directory
$propalref = dol_sanitizeFileName($this->ref); $ref = dol_sanitizeFileName($this->ref);
if ($conf->propal->dir_output) if ($conf->propal->dir_output)
{ {
$dir = $conf->propal->dir_output . "/" . $propalref ; $dir = $conf->propal->dir_output . "/" . $ref ;
$file = $conf->propal->dir_output . "/" . $propalref . "/" . $propalref . ".pdf"; $file = $dir . "/" . $ref . ".pdf";
if (file_exists($file)) if (file_exists($file))
{ {
dol_delete_preview($this); dol_delete_preview($this);
if (!dol_delete_file($file)) if (! dol_delete_file($file,0,0,0,$this)) // For triggers
{ {
$this->error='ErrorFailToDeleteFile'; $this->error='ErrorFailToDeleteFile';
$this->db->rollback(); $this->db->rollback();
@@ -1818,7 +1819,7 @@ class Propal extends CommonObject
} }
if (file_exists($dir)) if (file_exists($dir))
{ {
$res=@dol_delete_dir($dir); $res=@dol_delete_dir_recursive($dir);
if (! $res) if (! $res)
{ {
$this->error='ErrorFailToDeleteDir'; $this->error='ErrorFailToDeleteDir';

View File

@@ -110,11 +110,11 @@ else if ($action == 'deletecontact' && $user->rights->propale->creer)
} }
} }
else if ($action == 'setaddress' && $user->rights->propale->creer) else if ($action == 'setaddress' && $user->rights->propale->creer)
{ {
$object->fetch($id); $object->fetch($id);
$result=$object->setDeliveryAddress($_POST['fk_address']); $result=$object->setDeliveryAddress($_POST['fk_address']);
if ($result < 0) dol_print_error($db,$object->error); if ($result < 0) dol_print_error($db,$object->error);
} }
@@ -174,27 +174,27 @@ if ($id > 0 || ! empty($ref))
print "<tr><td>".$langs->trans("Company")."</td>"; print "<tr><td>".$langs->trans("Company")."</td>";
print '<td colspan="3">'.$object->client->getNomUrl(1).'</td></tr>'; print '<td colspan="3">'.$object->client->getNomUrl(1).'</td></tr>';
// Delivery address // Delivery address
if ($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) if ($conf->global->SOCIETE_ADDRESSES_MANAGEMENT)
{ {
print '<tr><td>'; print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('DeliveryAddress'); print $langs->trans('DeliveryAddress');
print '</td>'; print '</td>';
if ($action != 'editdelivery_address' && $object->brouillon) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdelivery_address&amp;socid='.$object->socid.'&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetDeliveryAddress'),1).'</a></td>'; if ($action != 'editdelivery_address' && $object->brouillon) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdelivery_address&amp;socid='.$object->socid.'&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetDeliveryAddress'),1).'</a></td>';
print '</tr></table>'; print '</tr></table>';
print '</td><td colspan="3">'; print '</td><td colspan="3">';
if ($action == 'editdelivery_address') if ($action == 'editdelivery_address')
{ {
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$object->socid,'fk_address','propal',$object->id); $formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$object->socid,'fk_address','propal',$object->id);
} }
else else
{ {
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$object->socid,'none','propal',$object->id); $formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$object->socid,'none','propal',$object->id);
} }
print '</td></tr>'; print '</td></tr>';
} }
print "</table>"; print "</table>";

View File

@@ -28,15 +28,23 @@ require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php"); require_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/propal.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/propal.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/images.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php"); require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
$langs->load('compta'); $langs->load('compta');
$langs->load('other'); $langs->load('other');
$action = GETPOST('action'); $action = GETPOST('action','alpha');
$confirm = GETPOST('confirm'); $confirm = GETPOST('confirm','alpha');
$id = GETPOST('id','int'); $id = GETPOST('id','int');
$ref = GETPOST('ref'); $ref = GETPOST('ref','alpha');
$mesg='';
if (isset($_SESSION['DolMessage']))
{
$mesg=$_SESSION['DolMessage'];
unset($_SESSION['DolMessage']);
}
// Security check // Security check
if ($user->societe_id) if ($user->societe_id)
@@ -58,6 +66,11 @@ if (! $sortorder) $sortorder="ASC";
if (! $sortfield) $sortfield="name"; if (! $sortfield) $sortfield="name";
$object = new Propal($db); $object = new Propal($db);
$object->fetch($id,$ref);
if ($object->id > 0)
{
$object->fetch_thirdparty();
}
/* /*
* Actions * Actions
@@ -66,7 +79,7 @@ $object = new Propal($db);
// Envoi fichier // Envoi fichier
if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
{ {
if ($object->fetch($id)) if ($object->id > 0)
{ {
$object->fetch_thirdparty(); $object->fetch_thirdparty();
@@ -74,10 +87,19 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
if (dol_mkdir($upload_dir) >= 0) if (dol_mkdir($upload_dir) >= 0)
{ {
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']); $resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . dol_unescapefile($_FILES['userfile']['name']),0,0,$_FILES['userfile']['error']);
if (is_numeric($resupload) && $resupload > 0) if (is_numeric($resupload) && $resupload > 0)
{ {
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>'; if (image_format_supported($upload_dir . "/" . $_FILES['userfile']['name']) == 1)
{
// Create small thumbs for image (Ratio is near 16/9)
// Used on logon for example
$imgThumbSmall = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthsmall, $maxheightsmall, '_small', $quality, "thumbs");
// Create mini thumbs for image (Ratio is near 16/9)
// Used on menu or for setup page for example
$imgThumbMini = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthmini, $maxheightmini, '_mini', $quality, "thumbs");
}
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
} }
else else
{ {
@@ -102,14 +124,16 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
// Delete // Delete
if ($action == 'confirm_deletefile' && $confirm == 'yes') if ($action == 'confirm_deletefile' && $confirm == 'yes')
{ {
if ($object->fetch($id)) if ($object->id > 0)
{ {
$object->fetch_thirdparty(); $langs->load("other");
$upload_dir = $conf->propal->dir_output . "/" . dol_sanitizeFileName($object->ref); $upload_dir = $conf->propal->dir_output . "/" . dol_sanitizeFileName($object->ref);
$file = $upload_dir . '/' . $_GET['urlfile']; // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). $file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
dol_delete_file($file,0,0,0,$object); dol_delete_file($file,0,0,0,$object);
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved").'</div>'; $_SESSION['DolMessage'] = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
exit;
} }
} }
@@ -122,83 +146,73 @@ llxHeader();
$form = new Form($db); $form = new Form($db);
if ($id > 0 || ! empty($ref)) if ($object->id > 0)
{ {
if ($object->fetch($id,$ref)) $upload_dir = $conf->propal->dir_output.'/'.dol_sanitizeFileName($object->ref);
{
$object->fetch_thirdparty(); $head = propal_prepare_head($object);
dol_fiche_head($head, 'document', $langs->trans('Proposal'), 0, 'propal');
$upload_dir = $conf->propal->dir_output.'/'.dol_sanitizeFileName($object->ref);
$head = propal_prepare_head($object); // Construit liste des fichiers
dol_fiche_head($head, 'document', $langs->trans('Proposal'), 0, 'propal'); $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
$totalsize=0;
foreach($filearray as $key => $file)
// Construit liste des fichiers
$filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
$totalsize=0;
foreach($filearray as $key => $file)
{
$totalsize+=$file['size'];
}
print '<table class="border"width="100%">';
$linkback='<a href="'.DOL_URL_ROOT.'/comm/propal.php'."?page=$page&socid=$socid&viewstatut=$viewstatut&sortfield=$sortfield&$sortorder".'">'.$langs->trans("BackToList").'</a>';
// Ref
print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">';
print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','');
print '</td></tr>';
// Ref client
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td nowrap>';
print $langs->trans('RefCustomer').'</td><td align="left">';
print '</td>';
print '</tr></table>';
print '</td><td colspan="3">';
print $object->ref_client;
print '</td>';
print '</tr>';
// Customer
print "<tr><td>".$langs->trans("Company")."</td>";
print '<td colspan="3">'.$object->thirdparty->getNomUrl(1).'</td></tr>';
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
print '</table>';
print '</div>';
dol_htmloutput_mesg($mesg,$mesgs);
/*
* Confirmation suppression fichier
*/
if ($action == 'delete')
{
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$id.'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
if ($ret == 'html') print '<br>';
}
// Affiche formulaire upload
$formfile=new FormFile($db);
$formfile->form_attach_new_file(DOL_URL_ROOT.'/comm/propal/document.php?id='.$object->id,'',0,0,$user->rights->propale->creer);
// List of document
$param='&id='.$object->id;
$formfile->list_of_documents($filearray,$object,'propal',$param);
}
else
{ {
dol_print_error($db); $totalsize+=$file['size'];
} }
print '<table class="border"width="100%">';
$linkback='<a href="'.DOL_URL_ROOT.'/comm/propal.php'."?page=$page&socid=$socid&viewstatut=$viewstatut&sortfield=$sortfield&$sortorder".'">'.$langs->trans("BackToList").'</a>';
// Ref
print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">';
print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','');
print '</td></tr>';
// Ref client
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td nowrap>';
print $langs->trans('RefCustomer').'</td><td align="left">';
print '</td>';
print '</tr></table>';
print '</td><td colspan="3">';
print $object->ref_client;
print '</td>';
print '</tr>';
// Customer
print "<tr><td>".$langs->trans("Company")."</td>";
print '<td colspan="3">'.$object->thirdparty->getNomUrl(1).'</td></tr>';
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
print '</table>';
print '</div>';
dol_htmloutput_mesg($mesg,$mesgs);
/*
* Confirmation suppression fichier
*/
if ($action == 'delete')
{
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
if ($ret == 'html') print '<br>';
}
// Affiche formulaire upload
$formfile=new FormFile($db);
$formfile->form_attach_new_file(DOL_URL_ROOT.'/comm/propal/document.php?id='.$object->id,'',0,0,$user->rights->propale->creer,50,$object);
// List of document
$param='&id='.$object->id;
$formfile->list_of_documents($filearray,$object,'propal',$param);
} }
else else
{ {

View File

@@ -1,7 +1,7 @@
<?php <?php
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -48,9 +48,10 @@ if ($user->societe_id > 0)
*/ */
$propalstatic=new Propal($db); $propalstatic=new Propal($db);
$companystatic=new Societe($db);
$form = new Form($db); $form = new Form($db);
$formfile = new FormFile($db); $formfile = new FormFile($db);
$help_url="EN:Module_Commercial_Proposals|FR:Module_Propositions_commerciales|ES:Módulo Presupuestos"; $help_url="EN:Module_Commercial_Proposals|FR:Module_Propositions_commerciales|ES:Módulo_Presupuestos";
llxHeader("",$langs->trans("ProspectionArea"),$help_url); llxHeader("",$langs->trans("ProspectionArea"),$help_url);
@@ -155,7 +156,7 @@ else
*/ */
if ($conf->propal->enabled) if ($conf->propal->enabled)
{ {
$sql = "SELECT c.rowid, c.ref, s.nom, s.rowid as socid"; $sql = "SELECT c.rowid, c.ref, s.nom as socname, s.rowid as socid, s.canvas, s.client";
$sql.= " FROM ".MAIN_DB_PREFIX."propal as c"; $sql.= " FROM ".MAIN_DB_PREFIX."propal as c";
$sql.= ", ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."societe as s";
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
@@ -182,9 +183,18 @@ if ($conf->propal->enabled)
$var=!$var; $var=!$var;
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);
print "<tr $bc[$var]>"; print "<tr $bc[$var]>";
print '<td nowrap="nowrap">';
print "<a href=".DOL_URL_ROOT."/comm/propal.php?id=".$obj->rowid.">".img_object($langs->trans("ShowPropal"),"propal").' '.$obj->ref."</a></td>"; $propalstatic->id=$obj->rowid;
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,24).'</a></td></tr>'; $propalstatic->ref=$obj->ref;
print '<td nowrap="nowrap">'.$propalstatic->getNomUrl(1).'</td>';
$companystatic->id=$obj->socid;
$companystatic->name=$obj->socname;
$companystatic->client=$obj->client;
$companystatic->canvas=$obj->canvas;
print '<td>'.$companystatic->getNomUrl(1,'customer',24).'</td>';
print '</tr>';
$i++; $i++;
} }
} }
@@ -201,7 +211,7 @@ $max=5;
* Last modified proposals * Last modified proposals
*/ */
$sql = "SELECT c.rowid, c.ref, c.fk_statut, s.nom, s.rowid as socid,"; $sql = "SELECT c.rowid, c.ref, c.fk_statut, s.nom as socname, s.rowid as socid, s.canvas, s.client,";
$sql.= " date_cloture as datec"; $sql.= " date_cloture as datec";
$sql.= " FROM ".MAIN_DB_PREFIX."propal as c"; $sql.= " FROM ".MAIN_DB_PREFIX."propal as c";
$sql.= ", ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."societe as s";
@@ -255,7 +265,12 @@ if ($resql)
print '</td>'; print '</td>';
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.'</a></td>'; $companystatic->id=$obj->socid;
$companystatic->name=$obj->socname;
$companystatic->client=$obj->client;
$companystatic->canvas=$obj->canvas;
print '<td>'.$companystatic->getNomUrl(1,'customer').'</td>';
print '<td>'.dol_print_date($db->jdate($obj->datec),'day').'</td>'; print '<td>'.dol_print_date($db->jdate($obj->datec),'day').'</td>';
print '<td align="right">'.$propalstatic->LibStatut($obj->fk_statut,5).'</td>'; print '<td align="right">'.$propalstatic->LibStatut($obj->fk_statut,5).'</td>';
print '</tr>'; print '</tr>';
@@ -274,7 +289,7 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
{ {
$langs->load("propal"); $langs->load("propal");
$sql = "SELECT s.nom, s.rowid, p.rowid as propalid, p.total as total_ttc, p.total_ht, p.ref, p.fk_statut, p.datep as dp"; $sql = "SELECT s.nom as socname, s.rowid as socid, s.canvas, s.client, p.rowid as propalid, p.total as total_ttc, p.total_ht, p.ref, p.fk_statut, p.datep as dp";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql.= ", ".MAIN_DB_PREFIX."propal as p"; $sql.= ", ".MAIN_DB_PREFIX."propal as p";
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
@@ -324,8 +339,13 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
print '</td></tr></table>'; print '</td></tr></table>';
print "</td>"; print "</td>";
$companystatic->id=$obj->socid;
$companystatic->name=$obj->socname;
$companystatic->client=$obj->client;
$companystatic->canvas=$obj->canvas;
print '<td align="left">'.$companystatic->getNomUrl(1,'customer',44).'</td>'."\n";
print '<td align="left"><a href="fiche.php?socid='.$obj->rowid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,44).'</a></td>'."\n";
print '<td align="right">'; print '<td align="right">';
print dol_print_date($db->jdate($obj->dp),'day').'</td>'."\n"; print dol_print_date($db->jdate($obj->dp),'day').'</td>'."\n";
print '<td align="right">'.price($obj->total_ttc).'</td>'; print '<td align="right">'.price($obj->total_ttc).'</td>';

View File

@@ -47,18 +47,18 @@ $object = new Propal($db);
/* Actions */ /* Actions */
/******************************************************************************/ /******************************************************************************/
if ($action == 'setnote_public' && $user->rights->propale->creer) if ($action == 'setnote_public' && $user->rights->propale->creer)
{ {
$object->fetch($id); $object->fetch($id);
$result=$object->update_note_public(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES)); $result=$object->update_note_public(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES));
if ($result < 0) dol_print_error($db,$object->error); if ($result < 0) dol_print_error($db,$object->error);
} }
else if ($action == 'setnote' && $user->rights->propale->creer) else if ($action == 'setnote' && $user->rights->propale->creer)
{ {
$object->fetch($id); $object->fetch($id);
$result=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES)); $result=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES));
if ($result < 0) dol_print_error($db,$object->error); if ($result < 0) dol_print_error($db,$object->error);
} }

View File

@@ -1,7 +1,8 @@
<?php <?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -66,7 +67,6 @@ $stats = new PropaleStats($db, $socid, $userid);
// Build graphic number of object // Build graphic number of object
$data = $stats->getNbByMonthWithPrevYear($endyear,$startyear); $data = $stats->getNbByMonthWithPrevYear($endyear,$startyear);
//var_dump($data);
// $data = array(array('Lib',val1,val2,val3),...) // $data = array(array('Lib',val1,val2,val3),...)
@@ -110,7 +110,6 @@ if (! $mesg)
// Build graphic amount of object // Build graphic amount of object
$data = $stats->getAmountByMonthWithPrevYear($endyear,$startyear); $data = $stats->getAmountByMonthWithPrevYear($endyear,$startyear);
//var_dump($data);
// $data = array(array('Lib',val1,val2,val3),...) // $data = array(array('Lib',val1,val2,val3),...)
if (!$user->rights->societe->client->voir || $user->societe_id) if (!$user->rights->societe->client->voir || $user->societe_id)
@@ -151,13 +150,7 @@ if (! $mesg)
$px2->draw($filenameamount,$fileurlamount); $px2->draw($filenameamount,$fileurlamount);
} }
$data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear);
$res = $stats->getAverageByMonth($year);
$data = array();
for ($i = 1 ; $i < 13 ; $i++)
{
$data[$i-1] = array(ucfirst(dol_substr(dol_print_date(dol_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]);
}
if (!$user->rights->societe->client->voir || $user->societe_id) if (!$user->rights->societe->client->voir || $user->societe_id)
{ {
@@ -177,8 +170,7 @@ $mesg = $px3->isGraphKo();
if (! $mesg) if (! $mesg)
{ {
$px3->SetData($data); $px3->SetData($data);
//$i=$startyear;$legend=array(); $i=$startyear;$legend=array();
$i=$endyear;$legend=array();
while ($i <= $endyear) while ($i <= $endyear)
{ {
$legend[]=$i; $legend[]=$i;
@@ -220,34 +212,36 @@ complete_head_from_modules($conf,$langs,$object,$head,$h,'propal_stats');
dol_fiche_head($head,'byyear',$langs->trans("Statistics")); dol_fiche_head($head,'byyear',$langs->trans("Statistics"));
if (empty($socid))
{
print '<table class="notopnoleftnopadd" width="100%"><tr>';
print '<td align="center" valign="top">';
print '<table class="notopnoleftnopadd" width="100%"><tr>'; // Show filter box
print '<td align="center" valign="top">'; print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="mode" value="'.$mode.'">';
// Show filter box print '<table class="border" width="100%">';
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<tr><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
print '<input type="hidden" name="mode" value="'.$mode.'">'; // Company
print '<table class="border" width="100%">'; print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
print '<tr><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>'; $filter='s.client in (1,2,3)';
// Company print $form->select_company($socid,'socid',$filter,1);
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>'; print '</td></tr>';
$filter='s.client in (1,2,3)'; // User
print $form->select_company($socid,'socid',$filter,1); print '<tr><td>'.$langs->trans("User").'/'.$langs->trans("SalesRepresentative").'</td><td>';
print '</td></tr>'; print $form->select_users($userid,'userid',1);
// User print '</td></tr>';
print '<tr><td>'.$langs->trans("User").'/'.$langs->trans("SalesRepresentative").'</td><td>'; // Year
print $form->select_users($userid,'userid',1); print '<tr><td>'.$langs->trans("Year").'</td><td>';
print '</td></tr>'; if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year;
// Year arsort($arrayyears);
print '<tr><td>'.$langs->trans("Year").'</td><td>'; print $form->selectarray('year',$arrayyears,$year,0);
if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year; print '</td></tr>';
arsort($arrayyears); print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>';
print $form->selectarray('year',$arrayyears,$year,0); print '</table>';
print '</td></tr>'; print '</form>';
print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>'; print '<br><br>';
print '</table>'; }
print '</form>';
print '<br><br>';
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
print '<tr height="24">'; print '<tr height="24">';

View File

@@ -1,6 +1,6 @@
<?PHP <?PHP
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr> * Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@@ -272,7 +272,7 @@ if ($socid > 0)
print '<td><input type="text" size="5" name="amount_ht" value="'.$_POST["amount_ht"].'">&nbsp;'.$langs->trans("Currency".$conf->currency).'</td></tr>'; print '<td><input type="text" size="5" name="amount_ht" value="'.$_POST["amount_ht"].'">&nbsp;'.$langs->trans("Currency".$conf->currency).'</td></tr>';
print '<tr><td width="38%">'.$langs->trans("VAT").'</td>'; print '<tr><td width="38%">'.$langs->trans("VAT").'</td>';
print '<td>'; print '<td>';
print $form->load_tva('tva_tx',GETPOST('tva_tx'),'',$mysoc,''); print $form->load_tva('tva_tx',GETPOST('tva_tx'),$mysoc,$objsoc);
print '</td></tr>'; print '</td></tr>';
print '<tr><td>'.$langs->trans("NoteReason").'</td>'; print '<tr><td>'.$langs->trans("NoteReason").'</td>';
print '<td><input type="text" size="60" name="desc" value="'.$_POST["desc"].'"></td></tr>'; print '<td><input type="text" size="60" name="desc" value="'.$_POST["desc"].'"></td></tr>';

View File

@@ -282,7 +282,7 @@ class Commande extends CommonObject
dol_syslog("Rename ok"); dol_syslog("Rename ok");
// Suppression ancien fichier PDF dans nouveau rep // Suppression ancien fichier PDF dans nouveau rep
dol_delete_file($conf->commande->dir_output.'/'.$snum.'/'.$comref.'.*'); dol_delete_file($conf->commande->dir_output.'/'.$snum.'/'.$comref.'*.*');
} }
} }
} }
@@ -620,7 +620,7 @@ class Commande extends CommonObject
// $date_commande is deprecated // $date_commande is deprecated
$date = ($this->date_commande ? $this->date_commande : $this->date); $date = ($this->date_commande ? $this->date_commande : $this->date);
$now=dol_now(); $now=dol_now();
$this->db->begin(); $this->db->begin();
@@ -684,7 +684,7 @@ class Commande extends CommonObject
$this->lines[$i]->remise_percent, $this->lines[$i]->remise_percent,
$this->lines[$i]->info_bits, $this->lines[$i]->info_bits,
$this->lines[$i]->fk_remise_except, $this->lines[$i]->fk_remise_except,
'HT', 'HT',
0, 0,
$this->lines[$i]->date_start, $this->lines[$i]->date_start,
$this->lines[$i]->date_end, $this->lines[$i]->date_end,
@@ -923,13 +923,13 @@ class Commande extends CommonObject
$this->note_public = $object->note_public; $this->note_public = $object->note_public;
$this->origin = $object->element; $this->origin = $object->element;
$this->origin_id = $object->id; $this->origin_id = $object->id;
// Possibility to add external linked objects with hooks // Possibility to add external linked objects with hooks
$this->linked_objects[$this->origin] = $this->origin_id; $this->linked_objects[$this->origin] = $this->origin_id;
if (is_array($object->other_linked_objects) && ! empty($object->other_linked_objects)) if (is_array($object->other_linked_objects) && ! empty($object->other_linked_objects))
{ {
$this->linked_objects = array_merge($this->linked_objects, $object->other_linked_objects); $this->linked_objects = array_merge($this->linked_objects, $object->other_linked_objects);
} }
$ret = $this->create($user); $ret = $this->create($user);
@@ -939,7 +939,7 @@ class Commande extends CommonObject
// Actions hooked (by external module) // Actions hooked (by external module)
if (! is_object($hookmanager)) if (! is_object($hookmanager))
{ {
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'); include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($this->db); $hookmanager=new HookManager($this->db);
} }
$hookmanager->initHooks(array('orderdao')); $hookmanager->initHooks(array('orderdao'));
@@ -1234,13 +1234,11 @@ class Commande extends CommonObject
$sql.= ', cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle, cr.libelle_facture as cond_reglement_libelle_doc'; $sql.= ', cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle, cr.libelle_facture as cond_reglement_libelle_doc';
$sql.= ', ca.code as availability_code'; $sql.= ', ca.code as availability_code';
$sql.= ', dr.code as demand_reason_code'; $sql.= ', dr.code as demand_reason_code';
$sql.= ', el.fk_source';
$sql.= ' FROM '.MAIN_DB_PREFIX.'commande as c'; $sql.= ' FROM '.MAIN_DB_PREFIX.'commande as c';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as cr ON (c.fk_cond_reglement = cr.rowid)'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as cr ON (c.fk_cond_reglement = cr.rowid)';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as p ON (c.fk_mode_reglement = p.id)'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as p ON (c.fk_mode_reglement = p.id)';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_availability as ca ON (c.fk_availability = ca.rowid)'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_availability as ca ON (c.fk_availability = ca.rowid)';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_input_reason as dr ON (c.fk_demand_reason = ca.rowid)'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_input_reason as dr ON (c.fk_demand_reason = ca.rowid)';
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON el.fk_target = c.rowid AND el.targettype = '".$this->element."'";
$sql.= " WHERE c.entity = ".$conf->entity; $sql.= " WHERE c.entity = ".$conf->entity;
if ($id) $sql.= " AND c.rowid=".$id; if ($id) $sql.= " AND c.rowid=".$id;
if ($ref) $sql.= " AND c.ref='".$this->db->escape($ref)."'"; if ($ref) $sql.= " AND c.ref='".$this->db->escape($ref)."'";
@@ -1292,7 +1290,6 @@ class Commande extends CommonObject
$this->demand_reason_code = $obj->demand_reason_code; $this->demand_reason_code = $obj->demand_reason_code;
$this->date_livraison = $this->db->jdate($obj->date_livraison); $this->date_livraison = $this->db->jdate($obj->date_livraison);
$this->fk_delivery_address = $obj->fk_adresse_livraison; $this->fk_delivery_address = $obj->fk_adresse_livraison;
$this->propale_id = $obj->fk_source;
$this->extraparams = (array) json_decode($obj->extraparams, true); $this->extraparams = (array) json_decode($obj->extraparams, true);
@@ -1302,22 +1299,6 @@ class Commande extends CommonObject
$this->db->free(); $this->db->free();
if ($this->propale_id)
{
$sqlp = "SELECT ref";
$sqlp.= " FROM ".MAIN_DB_PREFIX."propal";
$sqlp.= " WHERE rowid = ".$this->propale_id;
$resqlprop = $this->db->query($sqlp);
if ($resqlprop)
{
$objp = $this->db->fetch_object($resqlprop);
$this->propale_ref = $objp->ref;
$this->db->free($resqlprop);
}
}
/* /*
* Lines * Lines
*/ */
@@ -2088,11 +2069,16 @@ class Commande extends CommonObject
$sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > 0 ;'; $sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > 0 ;';
if ($this->db->query($sql) ) if ($this->db->query($sql) )
{ {
if (($conf->global->PROPALE_CLASSIFIED_INVOICED_WITH_ORDER == 1) && $this->propale_id) if (! empty($conf->propal->enabled) && ! empty($conf->global->PROPALE_CLASSIFIED_INVOICED_WITH_ORDER))
{ {
$propal = new Propal($this->db); $this->fetchObjectLinked('','propal',$this->id,$this->element);
$propal->fetch($this->propale_id); if (! empty($this->linkedObjects))
$propal->classer_facturee(); {
foreach($this->linkedObjects['propal'] as $element)
{
$ret=$element->classer_facturee();
}
}
} }
return 1; return 1;
} }
@@ -2124,7 +2110,7 @@ class Commande extends CommonObject
* @param int $skip_update_total Skip update of total * @param int $skip_update_total Skip update of total
* @return int < 0 if KO, > 0 if OK * @return int < 0 if KO, > 0 if OK
*/ */
function updateline($rowid, $desc, $pu, $qty, $remise_percent=0, $txtva, $txlocaltax1=0,$txlocaltax2=0, $price_base_type='HT', $info_bits=0, $date_start='', $date_end='', $type=0, $fk_parent_line=0, $skip_update_total=0) function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0,$txlocaltax2=0, $price_base_type='HT', $info_bits=0, $date_start='', $date_end='', $type=0, $fk_parent_line=0, $skip_update_total=0)
{ {
global $conf; global $conf;
@@ -2304,7 +2290,7 @@ class Commande extends CommonObject
{ {
dol_delete_preview($this); dol_delete_preview($this);
if (!dol_delete_file($file)) if (! dol_delete_file($file,0,0,0,$this)) // For triggers
{ {
$this->error=$langs->trans("ErrorCanNotDeleteFile",$file); $this->error=$langs->trans("ErrorCanNotDeleteFile",$file);
$this->db->rollback(); $this->db->rollback();
@@ -2313,7 +2299,7 @@ class Commande extends CommonObject
} }
if (file_exists($dir)) if (file_exists($dir))
{ {
if (!dol_delete_dir($dir)) if (! dol_delete_dir_recursive($dir))
{ {
$this->error=$langs->trans("ErrorCanNotDeleteDir",$dir); $this->error=$langs->trans("ErrorCanNotDeleteDir",$dir);
$this->db->rollback(); $this->db->rollback();
@@ -2363,7 +2349,8 @@ class Commande extends CommonObject
$clause = " AND"; $clause = " AND";
} }
$sql.= $clause." c.entity = ".$conf->entity; $sql.= $clause." c.entity = ".$conf->entity;
$sql.= " AND c.fk_statut IN (1,2,3) AND c.facture = 0"; //$sql.= " AND c.fk_statut IN (1,2,3) AND c.facture = 0";
$sql.= " AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))"; // If status is 2 and facture=1, it must be selected
if ($user->societe_id) $sql.=" AND c.fk_soc = ".$user->societe_id; if ($user->societe_id) $sql.=" AND c.fk_soc = ".$user->societe_id;
$resql=$this->db->query($sql); $resql=$this->db->query($sql);
@@ -2444,7 +2431,7 @@ class Commande extends CommonObject
if ($statut==-1) return img_picto($langs->trans('StatusOrderCanceled'),'statut5').' '.$langs->trans('StatusOrderCanceledShort'); if ($statut==-1) return img_picto($langs->trans('StatusOrderCanceled'),'statut5').' '.$langs->trans('StatusOrderCanceledShort');
if ($statut==0) return img_picto($langs->trans('StatusOrderDraft'),'statut0').' '.$langs->trans('StatusOrderDraftShort'); if ($statut==0) return img_picto($langs->trans('StatusOrderDraft'),'statut0').' '.$langs->trans('StatusOrderDraftShort');
if ($statut==1) return img_picto($langs->trans('StatusOrderValidated'),'statut1').' '.$langs->trans('StatusOrderValidatedShort'); if ($statut==1) return img_picto($langs->trans('StatusOrderValidated'),'statut1').' '.$langs->trans('StatusOrderValidatedShort');
if ($statut==2) return img_picto($langs->trans('StatusOrderOnProcess'),'statut3').' '.$langs->trans('StatusOrderSentShort'); if ($statut==2) return img_picto($langs->trans('StatusOrderSent'),'statut3').' '.$langs->trans('StatusOrderSentShort');
if ($statut==3 && ! $facturee) return img_picto($langs->trans('StatusOrderToBill'),'statut7').' '.$langs->trans('StatusOrderToBillShort'); if ($statut==3 && ! $facturee) return img_picto($langs->trans('StatusOrderToBill'),'statut7').' '.$langs->trans('StatusOrderToBillShort');
if ($statut==3 && $facturee) return img_picto($langs->trans('StatusOrderProcessed'),'statut6').' '.$langs->trans('StatusOrderProcessedShort'); if ($statut==3 && $facturee) return img_picto($langs->trans('StatusOrderProcessed'),'statut6').' '.$langs->trans('StatusOrderProcessedShort');
} }
@@ -2462,7 +2449,7 @@ class Commande extends CommonObject
if ($statut==-1) return img_picto($langs->trans('StatusOrderCanceled'),'statut5').' '.$langs->trans('StatusOrderCanceled'); if ($statut==-1) return img_picto($langs->trans('StatusOrderCanceled'),'statut5').' '.$langs->trans('StatusOrderCanceled');
if ($statut==0) return img_picto($langs->trans('StatusOrderDraft'),'statut0').' '.$langs->trans('StatusOrderDraft'); if ($statut==0) return img_picto($langs->trans('StatusOrderDraft'),'statut0').' '.$langs->trans('StatusOrderDraft');
if ($statut==1) return img_picto($langs->trans('StatusOrderValidated'),'statut1').' '.$langs->trans('StatusOrderValidated'); if ($statut==1) return img_picto($langs->trans('StatusOrderValidated'),'statut1').' '.$langs->trans('StatusOrderValidated');
if ($statut==2) return img_picto($langs->trans('StatusOrderSentShort'),'statut3').' '.$langs->trans('StatusOrderOnProcess'); if ($statut==2) return img_picto($langs->trans('StatusOrderSentShort'),'statut3').' '.$langs->trans('StatusOrderSent');
if ($statut==3 && ! $facturee) return img_picto($langs->trans('StatusOrderToBill'),'statut7').' '.$langs->trans('StatusOrderToBill'); if ($statut==3 && ! $facturee) return img_picto($langs->trans('StatusOrderToBill'),'statut7').' '.$langs->trans('StatusOrderToBill');
if ($statut==3 && $facturee) return img_picto($langs->trans('StatusOrderProcessed'),'statut6').' '.$langs->trans('StatusOrderProcessed'); if ($statut==3 && $facturee) return img_picto($langs->trans('StatusOrderProcessed'),'statut6').' '.$langs->trans('StatusOrderProcessed');
} }
@@ -2471,7 +2458,7 @@ class Commande extends CommonObject
if ($statut==-1) return $langs->trans('StatusOrderCanceledShort').' '.img_picto($langs->trans('StatusOrderCanceled'),'statut5'); if ($statut==-1) return $langs->trans('StatusOrderCanceledShort').' '.img_picto($langs->trans('StatusOrderCanceled'),'statut5');
if ($statut==0) return $langs->trans('StatusOrderDraftShort').' '.img_picto($langs->trans('StatusOrderDraft'),'statut0'); if ($statut==0) return $langs->trans('StatusOrderDraftShort').' '.img_picto($langs->trans('StatusOrderDraft'),'statut0');
if ($statut==1) return $langs->trans('StatusOrderValidatedShort').' '.img_picto($langs->trans('StatusOrderValidated'),'statut1'); if ($statut==1) return $langs->trans('StatusOrderValidatedShort').' '.img_picto($langs->trans('StatusOrderValidated'),'statut1');
if ($statut==2) return $langs->trans('StatusOrderSentShort').' '.img_picto($langs->trans('StatusOrderOnProcess'),'statut3'); if ($statut==2) return $langs->trans('StatusOrderSentShort').' '.img_picto($langs->trans('StatusOrderSent'),'statut3');
if ($statut==3 && ! $facturee) return $langs->trans('StatusOrderToBillShort').' '.img_picto($langs->trans('StatusOrderToBill'),'statut7'); if ($statut==3 && ! $facturee) return $langs->trans('StatusOrderToBillShort').' '.img_picto($langs->trans('StatusOrderToBill'),'statut7');
if ($statut==3 && $facturee) return $langs->trans('StatusOrderProcessedShort').' '.img_picto($langs->trans('StatusOrderProcessed'),'statut6'); if ($statut==3 && $facturee) return $langs->trans('StatusOrderProcessedShort').' '.img_picto($langs->trans('StatusOrderProcessed'),'statut6');
} }

View File

@@ -1,7 +1,8 @@
<?php <?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (c) 2005 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (c) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -28,8 +29,7 @@ include_once DOL_DOCUMENT_ROOT . "/fourn/class/fournisseur.commande.class.php";
/** /**
* \class CommandeStats * Class to manage order statistics
* \brief Classe permettant la gestion des stats des commandes
*/ */
class CommandeStats extends Stats class CommandeStats extends Stats
{ {
@@ -46,7 +46,7 @@ class CommandeStats extends Stats
/** /**
* Constructor * Constructor
* *
* @param DoliDB $DB Database handler * @param DoliDB $db Database handler
* @param int $socid Id third party for filter * @param int $socid Id third party for filter
* @param string $mode Option * @param string $mode Option
* @param int $userid Id user for filter * @param int $userid Id user for filter
@@ -66,7 +66,7 @@ class CommandeStats extends Stats
$this->from = MAIN_DB_PREFIX.$object->table_element." as c"; $this->from = MAIN_DB_PREFIX.$object->table_element." as c";
$this->from.= ", ".MAIN_DB_PREFIX."societe as s"; $this->from.= ", ".MAIN_DB_PREFIX."societe as s";
$this->field='total_ht'; $this->field='total_ht';
$this->where.= " c.fk_statut > 0"; $this->where.= " c.fk_statut > 0"; // Not draft and not cancelled
} }
if ($mode == 'supplier') if ($mode == 'supplier')
{ {
@@ -74,7 +74,7 @@ class CommandeStats extends Stats
$this->from = MAIN_DB_PREFIX.$object->table_element." as c"; $this->from = MAIN_DB_PREFIX.$object->table_element." as c";
$this->from.= ", ".MAIN_DB_PREFIX."societe as s"; $this->from.= ", ".MAIN_DB_PREFIX."societe as s";
$this->field='total_ht'; $this->field='total_ht';
$this->where.= " c.fk_statut > 0"; $this->where.= " c.fk_statut > 2"; // Only approved & ordered
} }
$this->where.= " AND c.fk_soc = s.rowid AND c.entity = ".$conf->entity; $this->where.= " AND c.fk_soc = s.rowid AND c.entity = ".$conf->entity;
@@ -97,10 +97,10 @@ class CommandeStats extends Stats
global $conf; global $conf;
global $user; global $user;
$sql = "SELECT date_format(c.date_valid,'%m') as dm, count(*) nb"; $sql = "SELECT date_format(c.date_commande,'%m') as dm, count(*) nb";
$sql.= " FROM ".$this->from; $sql.= " FROM ".$this->from;
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE date_format(c.date_valid,'%Y') = '".$year."'"; $sql.= " WHERE date_format(c.date_commande,'%Y') = '".$year."'";
$sql.= " AND ".$this->where; $sql.= " AND ".$this->where;
$sql.= " GROUP BY dm"; $sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC'); $sql.= $this->db->order('dm','DESC');
@@ -119,7 +119,7 @@ class CommandeStats extends Stats
global $conf; global $conf;
global $user; global $user;
$sql = "SELECT date_format(c.date_valid,'%Y') as dm, count(*), sum(c.".$this->field.")"; $sql = "SELECT date_format(c.date_commande,'%Y') as dm, count(*), sum(c.".$this->field.")";
$sql.= " FROM ".$this->from; $sql.= " FROM ".$this->from;
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE ".$this->where; $sql.= " WHERE ".$this->where;
@@ -140,10 +140,10 @@ class CommandeStats extends Stats
global $conf; global $conf;
global $user; global $user;
$sql = "SELECT date_format(c.date_valid,'%m') as dm, sum(c.".$this->field.")"; $sql = "SELECT date_format(c.date_commande,'%m') as dm, sum(c.".$this->field.")";
$sql.= " FROM ".$this->from; $sql.= " FROM ".$this->from;
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE date_format(c.date_valid,'%Y') = '".$year."'"; $sql.= " WHERE date_format(c.date_commande,'%Y') = '".$year."'";
$sql.= " AND ".$this->where; $sql.= " AND ".$this->where;
$sql.= " GROUP BY dm"; $sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC'); $sql.= $this->db->order('dm','DESC');
@@ -162,10 +162,10 @@ class CommandeStats extends Stats
global $conf; global $conf;
global $user; global $user;
$sql = "SELECT date_format(c.date_valid,'%m') as dm, avg(c.".$this->field.")"; $sql = "SELECT date_format(c.date_commande,'%m') as dm, avg(c.".$this->field.")";
$sql.= " FROM ".$this->from; $sql.= " FROM ".$this->from;
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE date_format(c.date_valid,'%Y') = '".$year."'"; $sql.= " WHERE date_format(c.date_commande,'%Y') = '".$year."'";
$sql.= " AND ".$this->where; $sql.= " AND ".$this->where;
$sql.= " GROUP BY dm"; $sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC'); $sql.= $this->db->order('dm','DESC');
@@ -182,7 +182,7 @@ class CommandeStats extends Stats
{ {
global $user; global $user;
$sql = "SELECT date_format(c.date_valid,'%Y') as year, count(*) as nb, sum(c.".$this->field.") as total, avg(".$this->field.") as avg"; $sql = "SELECT date_format(c.date_commande,'%Y') as year, count(*) as nb, sum(c.".$this->field.") as total, avg(".$this->field.") as avg";
$sql.= " FROM ".$this->from; $sql.= " FROM ".$this->from;
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE ".$this->where; $sql.= " WHERE ".$this->where;

View File

@@ -106,10 +106,10 @@ else if ($action == 'deletecontact' && $user->rights->commande->creer)
} }
} }
else if ($action == 'setaddress' && $user->rights->commande->creer) else if ($action == 'setaddress' && $user->rights->commande->creer)
{ {
$object->fetch($id); $object->fetch($id);
$object->setDeliveryAddress($_POST['fk_address']); $object->setDeliveryAddress($_POST['fk_address']);
} }
/* /*
@@ -173,27 +173,27 @@ if ($id > 0 || ! empty($ref))
print "<tr><td>".$langs->trans("Company")."</td>"; print "<tr><td>".$langs->trans("Company")."</td>";
print '<td colspan="3">'.$object->client->getNomUrl(1).'</td></tr>'; print '<td colspan="3">'.$object->client->getNomUrl(1).'</td></tr>';
// Delivery address // Delivery address
if ($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) if ($conf->global->SOCIETE_ADDRESSES_MANAGEMENT)
{ {
print '<tr><td>'; print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('DeliveryAddress'); print $langs->trans('DeliveryAddress');
print '</td>'; print '</td>';
if ($action != 'editdelivery_address' && $object->brouillon) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdelivery_address&amp;socid='.$object->socid.'&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetDeliveryAddress'),1).'</a></td>'; if ($action != 'editdelivery_address' && $object->brouillon) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdelivery_address&amp;socid='.$object->socid.'&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetDeliveryAddress'),1).'</a></td>';
print '</tr></table>'; print '</tr></table>';
print '</td><td colspan="3">'; print '</td><td colspan="3">';
if ($action == 'editdelivery_address') if ($action == 'editdelivery_address')
{ {
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid','int'),'fk_address','commande',$object->id); $formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid','int'),'fk_address','commande',$object->id);
} }
else else
{ {
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid','int'),'none','commande',$object->id); $formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid','int'),'none','commande',$object->id);
} }
print '</td></tr>'; print '</td></tr>';
} }
print "</table>"; print "</table>";

View File

@@ -27,6 +27,7 @@
require("../main.inc.php"); require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php'); require_once(DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php');
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/images.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php"); require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
require_once(DOL_DOCUMENT_ROOT ."/commande/class/commande.class.php"); require_once(DOL_DOCUMENT_ROOT ."/commande/class/commande.class.php");
@@ -39,6 +40,13 @@ $confirm = GETPOST('confirm');
$id = GETPOST('id','int'); $id = GETPOST('id','int');
$ref = GETPOST('ref'); $ref = GETPOST('ref');
$mesg='';
if (isset($_SESSION['DolMessage']))
{
$mesg=$_SESSION['DolMessage'];
unset($_SESSION['DolMessage']);
}
// Security check // Security check
if ($user->societe_id) if ($user->societe_id)
{ {
@@ -58,7 +66,6 @@ $pagenext = $page + 1;
if (! $sortorder) $sortorder="ASC"; if (! $sortorder) $sortorder="ASC";
if (! $sortfield) $sortfield="name"; if (! $sortfield) $sortfield="name";
$object = new Commande($db); $object = new Commande($db);
@@ -77,10 +84,19 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
if (dol_mkdir($upload_dir) >= 0) if (dol_mkdir($upload_dir) >= 0)
{ {
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']); $resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . dol_unescapefile($_FILES['userfile']['name']),0,0,$_FILES['userfile']['error']);
if (is_numeric($resupload) && $resupload > 0) if (is_numeric($resupload) && $resupload > 0)
{ {
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>'; if (image_format_supported($upload_dir . "/" . $_FILES['userfile']['name']) == 1)
{
// Create small thumbs for image (Ratio is near 16/9)
// Used on logon for example
$imgThumbSmall = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthsmall, $maxheightsmall, '_small', $quality, "thumbs");
// Create mini thumbs for image (Ratio is near 16/9)
// Used on menu or for setup page for example
$imgThumbMini = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthmini, $maxheightmini, '_mini', $quality, "thumbs");
}
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
} }
else else
{ {
@@ -103,16 +119,19 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
} }
// Delete // Delete
if ($action == 'confirm_deletefile' && $confirm == 'yes') else if ($action == 'confirm_deletefile' && $confirm == 'yes')
{ {
if ($object->fetch($id)) if ($object->fetch($id))
{ {
$object->fetch_thirdparty(); $langs->load("other");
$object->fetch_thirdparty();
$upload_dir = $conf->commande->dir_output . "/" . dol_sanitizeFileName($object->ref); $upload_dir = $conf->commande->dir_output . "/" . dol_sanitizeFileName($object->ref);
$file = $upload_dir . '/' . $_GET['urlfile']; // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). $file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
dol_delete_file($file,0,0,0,$object); dol_delete_file($file,0,0,0,$object);
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved").'</div>'; $_SESSION['DolMessage'] = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
exit;
} }
} }
@@ -166,13 +185,13 @@ if ($id > 0 || ! empty($ref))
*/ */
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$id.'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); $ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
if ($ret == 'html') print '<br>'; if ($ret == 'html') print '<br>';
} }
// Affiche formulaire upload // Affiche formulaire upload
$formfile=new FormFile($db); $formfile=new FormFile($db);
$formfile->form_attach_new_file(DOL_URL_ROOT.'/commande/document.php?id='.$object->id,'',0,0,$user->rights->commande->creer); $formfile->form_attach_new_file(DOL_URL_ROOT.'/commande/document.php?id='.$object->id,'',0,0,$user->rights->commande->creer,50,$object);
// List of document // List of document

View File

@@ -58,12 +58,18 @@ $confirm = GETPOST('confirm');
$lineid = GETPOST('lineid'); $lineid = GETPOST('lineid');
$mesg = GETPOST('mesg'); $mesg = GETPOST('mesg');
$object = new Commande($db);
// Security check // Security check
if ($user->societe_id) $socid=$user->societe_id; if ($user->societe_id) $socid=$user->societe_id;
$result=restrictedArea($user,'commande',$id,''); $result=restrictedArea($user,'commande',$id,'');
$object = new Commande($db);
// Load object
if ($id > 0 || ! empty($ref))
{
$ret=$object->fetch($id, $ref);
}
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'); include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($db); $hookmanager=new HookManager($db);
@@ -128,6 +134,7 @@ else if ($action == 'confirm_delete' && $confirm == 'yes')
if ($user->rights->commande->supprimer) if ($user->rights->commande->supprimer)
{ {
$object->fetch($id); $object->fetch($id);
$object->fetch_thirdparty();
$result=$object->delete($user); $result=$object->delete($user);
if ($result > 0) if ($result > 0)
{ {
@@ -464,7 +471,28 @@ else if ($action == 'setconditions' && $user->rights->commande->creer)
{ {
$object->fetch($id); $object->fetch($id);
$result=$object->setPaymentTerms(GETPOST('cond_reglement_id','int')); $result=$object->setPaymentTerms(GETPOST('cond_reglement_id','int'));
if ($result < 0) dol_print_error($db,$object->error); if ($result < 0)
{
dol_print_error($db,$object->error);
}
else
{
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
{
// Define output language
$outputlangs = $langs;
$newlang=GETPOST('lang_id','alpha');
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
if (! empty($newlang))
{
$outputlangs = new Translate("",$conf);
$outputlangs->setDefaultLang($newlang);
}
$ret=$object->fetch($id); // Reload to get new records
commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
}
}
} }
else if ($action == 'setremisepercent' && $user->rights->commande->creer) else if ($action == 'setremisepercent' && $user->rights->commande->creer)
@@ -479,18 +507,18 @@ else if ($action == 'setremiseabsolue' && $user->rights->commande->creer)
$result = $object->set_remise_absolue($user, $_POST['remise_absolue']); $result = $object->set_remise_absolue($user, $_POST['remise_absolue']);
} }
else if ($action == 'setnote_public' && $user->rights->commande->creer) else if ($action == 'setnote_public' && $user->rights->commande->creer)
{ {
$object->fetch($id); $object->fetch($id);
$result=$object->update_note_public(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES)); $result=$object->update_note_public(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES));
if ($result < 0) dol_print_error($db,$object->error); if ($result < 0) dol_print_error($db,$object->error);
} }
else if ($action == 'setnote' && $user->rights->commande->creer) else if ($action == 'setnote' && $user->rights->commande->creer)
{ {
$object->fetch($id); $object->fetch($id);
$result=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES)); $result=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES));
if ($result < 0) dol_print_error($db,$object->error); if ($result < 0) dol_print_error($db,$object->error);
} }
/* /*
@@ -996,10 +1024,13 @@ else if ($action == 'remove_file')
{ {
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
$object->fetch_thirdparty();
$langs->load("other");
$upload_dir = $conf->commande->dir_output; $upload_dir = $conf->commande->dir_output;
$file = $upload_dir . '/' . $_GET['file']; $file = $upload_dir . '/' . GETPOST('file');
dol_delete_file($file); dol_delete_file($file,0,0,0,$object);
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved").'</div>'; $mesg = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('file')).'</div>';
} }
} }
@@ -1191,64 +1222,64 @@ if ($action == 'send' && ! $_POST['addfile'] && ! $_POST['removedfile'] && ! $_P
} }
} }
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
{ {
if ($action == 'addcontact' && $user->rights->commande->creer) if ($action == 'addcontact' && $user->rights->commande->creer)
{ {
$result = $object->fetch($id); $result = $object->fetch($id);
if ($result > 0 && $id > 0) if ($result > 0 && $id > 0)
{ {
$contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid')); $contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'));
$result = $result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]); $result = $result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]);
} }
if ($result >= 0) if ($result >= 0)
{ {
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
exit; exit;
} }
else else
{ {
if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS')
{ {
$langs->load("errors"); $langs->load("errors");
$mesg = '<div class="error">'.$langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType").'</div>'; $mesg = '<div class="error">'.$langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType").'</div>';
} }
else else
{ {
$mesg = '<div class="error">'.$object->error.'</div>'; $mesg = '<div class="error">'.$object->error.'</div>';
} }
} }
} }
// bascule du statut d'un contact // bascule du statut d'un contact
else if ($action == 'swapstatut' && $user->rights->commande->creer) else if ($action == 'swapstatut' && $user->rights->commande->creer)
{ {
if ($object->fetch($id)) if ($object->fetch($id))
{ {
$result=$object->swapContactStatus(GETPOST('ligne')); $result=$object->swapContactStatus(GETPOST('ligne'));
} }
else else
{ {
dol_print_error($db); dol_print_error($db);
} }
} }
// Efface un contact // Efface un contact
else if ($action == 'deletecontact' && $user->rights->commande->creer) else if ($action == 'deletecontact' && $user->rights->commande->creer)
{ {
$object->fetch($id); $object->fetch($id);
$result = $object->delete_contact($lineid); $result = $object->delete_contact($lineid);
if ($result >= 0) if ($result >= 0)
{ {
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
exit; exit;
} }
else { else {
dol_print_error($db); dol_print_error($db);
} }
} }
} }
@@ -1271,6 +1302,9 @@ $formorder = new FormOrder($db);
*********************************************************************/ *********************************************************************/
if ($action == 'create' && $user->rights->commande->creer) if ($action == 'create' && $user->rights->commande->creer)
{ {
//WYSIWYG Editor
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
print_fiche_titre($langs->trans('CreateOrder')); print_fiche_titre($langs->trans('CreateOrder'));
dol_htmloutput_mesg($mesg,$mesgs,'error'); dol_htmloutput_mesg($mesg,$mesgs,'error');
@@ -1457,13 +1491,12 @@ if ($action == 'create' && $user->rights->commande->creer)
print $form->selectarray('model',$liste,$conf->global->COMMANDE_ADDON_PDF); print $form->selectarray('model',$liste,$conf->global->COMMANDE_ADDON_PDF);
print "</td></tr>"; print "</td></tr>";
// Note publique // Note publique
print '<tr>'; print '<tr>';
print '<td class="border" valign="top">'.$langs->trans('NotePublic').'</td>'; print '<td class="border" valign="top">'.$langs->trans('NotePublic').'</td>';
print '<td valign="top" colspan="2">'; print '<td valign="top" colspan="2">';
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
$doleditor=new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70); $doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
print $doleditor->Create(1); print $doleditor->Create(1);
//print '<textarea name="note_public" wrap="soft" cols="70" rows="'.ROWS_3.'">'.$note_public.'</textarea>'; //print '<textarea name="note_public" wrap="soft" cols="70" rows="'.ROWS_3.'">'.$note_public.'</textarea>';
print '</td></tr>'; print '</td></tr>';
@@ -1474,8 +1507,8 @@ if ($action == 'create' && $user->rights->commande->creer)
print '<tr>'; print '<tr>';
print '<td class="border" valign="top">'.$langs->trans('NotePrivate').'</td>'; print '<td class="border" valign="top">'.$langs->trans('NotePrivate').'</td>';
print '<td valign="top" colspan="2">'; print '<td valign="top" colspan="2">';
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
$doleditor=new DolEditor('note', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70); $doleditor = new DolEditor('note', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
print $doleditor->Create(1); print $doleditor->Create(1);
//print '<textarea name="note" wrap="soft" cols="70" rows="'.ROWS_3.'">'.$note_private.'</textarea>'; //print '<textarea name="note" wrap="soft" cols="70" rows="'.ROWS_3.'">'.$note_private.'</textarea>';
print '</td></tr>'; print '</td></tr>';
@@ -2016,24 +2049,24 @@ else
print '<td colspan="2">'.$object->getLibStatut(4).'</td>'; print '<td colspan="2">'.$object->getLibStatut(4).'</td>';
print '</tr>'; print '</tr>';
print '</table><br>'; print '</table><br>';
print "\n"; print "\n";
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
{ {
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'); require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php');
$formcompany= new FormCompany($db); $formcompany= new FormCompany($db);
$blocname = 'contacts'; $blocname = 'contacts';
$title = $langs->trans('ContactsAddresses'); $title = $langs->trans('ContactsAddresses');
include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'); include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php');
} }
if (! empty($conf->global->MAIN_DISABLE_NOTES_TAB)) if (! empty($conf->global->MAIN_DISABLE_NOTES_TAB))
{ {
$blocname = 'notes'; $blocname = 'notes';
$title = $langs->trans('Notes'); $title = $langs->trans('Notes');
include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'); include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php');
} }
/* /*

View File

@@ -49,7 +49,7 @@ if ($user->societe_id > 0)
$commandestatic=new Commande($db); $commandestatic=new Commande($db);
$form = new Form($db); $form = new Form($db);
$formfile = new FormFile($db); $formfile = new FormFile($db);
$help_url="EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo Pedidos de clientes"; $help_url="EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_Pedidos_de_clientes";
llxHeader("",$langs->trans("Orders"),$help_url); llxHeader("",$langs->trans("Orders"),$help_url);

View File

@@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com> * Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* *
@@ -108,12 +108,13 @@ if ($viewstatut <> '')
} }
if ($viewstatut == -2) // To process if ($viewstatut == -2) // To process
{ {
$sql .= ' AND c.fk_statut IN (1,2,3) AND c.facture = 0'; //$sql.= ' AND c.fk_statut IN (1,2,3) AND c.facture = 0';
$sql.= " AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))"; // If status is 2 and facture=1, it must be selected
} }
} }
if ($ordermonth > 0) if ($ordermonth > 0)
{ {
$sql.= " AND date_format(c.date_valid, '%Y-%m') = '".$orderyear."-".$ordermonth."'"; $sql.= " AND date_format(c.date_valid, '%Y-%m') = '".$orderyear."-".$ordermonth."'"; // TODO do not use date_format but a between
} }
if ($orderyear > 0) if ($orderyear > 0)
{ {
@@ -178,7 +179,7 @@ if ($resql)
print_liste_field_titre($langs->trans('RefCustomerOrder'),'liste.php','c.ref_client','','&amp;socid='.$socid.'&amp;viewstatut='.$viewstatut,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('RefCustomerOrder'),'liste.php','c.ref_client','','&amp;socid='.$socid.'&amp;viewstatut='.$viewstatut,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('OrderDate'),'liste.php','c.date_commande','','&amp;socid='.$socid.'&amp;viewstatut='.$viewstatut, 'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('OrderDate'),'liste.php','c.date_commande','','&amp;socid='.$socid.'&amp;viewstatut='.$viewstatut, 'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('DeliveryDate'),'liste.php','c.date_livraison','','&amp;socid='.$socid.'&amp;viewstatut='.$viewstatut, 'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('DeliveryDate'),'liste.php','c.date_livraison','','&amp;socid='.$socid.'&amp;viewstatut='.$viewstatut, 'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('Status'),'liste.php','c.fk_statut','','&amp;socid='.$socid.'&amp;viewstatut='.$viewstatut,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Status'),'liste.php','c.fk_statut','','&amp;socid='.$socid.'&amp;viewstatut='.$viewstatut,'align="right"',$sortfield,$sortorder);
print '</tr>'; print '</tr>';
// Lignes des champs de filtre // Lignes des champs de filtre
print '<form method="get" action="liste.php">'; print '<form method="get" action="liste.php">';

View File

@@ -1,6 +1,8 @@
<?php <?php
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (c) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (c) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -168,12 +170,7 @@ if (! $mesg)
} }
$res = $stats->getAverageByMonth($year); $data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear);
$data = array();
for ($i = 1 ; $i < 13 ; $i++)
{
$data[$i-1] = array(ucfirst(dol_substr(dol_print_date(dol_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]);
}
if (!$user->rights->societe->client->voir || $user->societe_id) if (!$user->rights->societe->client->voir || $user->societe_id)
{ {
@@ -193,8 +190,7 @@ $mesg = $px3->isGraphKo();
if (! $mesg) if (! $mesg)
{ {
$px3->SetData($data); $px3->SetData($data);
//$i=$startyear;$legend=array(); $i=$startyear;$legend=array();
$i=$endyear;$legend=array();
while ($i <= $endyear) while ($i <= $endyear)
{ {
$legend[]=$i; $legend[]=$i;
@@ -240,34 +236,37 @@ complete_head_from_modules($conf,$langs,$object,$head,$h,$type);
dol_fiche_head($head,'byyear',$langs->trans("Statistics")); dol_fiche_head($head,'byyear',$langs->trans("Statistics"));
print '<table class="notopnoleftnopadd" width="100%"><tr>'; if (empty($socid))
print '<td align="center" valign="top">'; {
print '<table class="notopnoleftnopadd" width="100%"><tr>';
print '<td align="center" valign="top">';
// Show filter box // Show filter box
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="mode" value="'.$mode.'">'; print '<input type="hidden" name="mode" value="'.$mode.'">';
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
print '<tr><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>'; print '<tr><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
// Company // Company
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>'; print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
if ($mode == 'customer') $filter='s.client in (1,2,3)'; if ($mode == 'customer') $filter='s.client in (1,2,3)';
if ($mode == 'supplier') $filter='s.fournisseur = 1'; if ($mode == 'supplier') $filter='s.fournisseur = 1';
print $form->select_company($socid,'socid',$filter,1); print $form->select_company($socid,'socid',$filter,1);
print '</td></tr>'; print '</td></tr>';
// User // User
print '<tr><td>'.$langs->trans("User").'/'.$langs->trans("SalesRepresentative").'</td><td>'; print '<tr><td>'.$langs->trans("User").'/'.$langs->trans("SalesRepresentative").'</td><td>';
print $form->select_users($userid,'userid',1); print $form->select_users($userid,'userid',1);
print '</td></tr>'; print '</td></tr>';
// Year // Year
print '<tr><td>'.$langs->trans("Year").'</td><td>'; print '<tr><td>'.$langs->trans("Year").'</td><td>';
if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year; if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year;
arsort($arrayyears); arsort($arrayyears);
print $form->selectarray('year',$arrayyears,$year,0); print $form->selectarray('year',$arrayyears,$year,0);
print '</td></tr>'; print '</td></tr>';
print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>'; print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>';
print '</table>'; print '</table>';
print '</form>'; print '</form>';
print '<br><br>'; print '<br><br>';
}
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
print '<tr height="24">'; print '<tr height="24">';

View File

@@ -48,6 +48,7 @@ $fieldtype = (! empty($ref) ? 'ref' :'rowid');
if ($user->societe_id) $socid=$user->societe_id; if ($user->societe_id) $socid=$user->societe_id;
$result=restrictedArea($user,'banque',$fieldvalue,'bank_account','','',$fieldtype); $result=restrictedArea($user,'banque',$fieldvalue,'bank_account','','',$fieldtype);
$paiementtype=GETPOST('paiementtype','alpha',3);
$req_nb=GETPOST("req_nb",'',3); $req_nb=GETPOST("req_nb",'',3);
$thirdparty=GETPOST("thirdparty",'',3); $thirdparty=GETPOST("thirdparty",'',3);
$vline=GETPOST("vline"); $vline=GETPOST("vline");
@@ -78,17 +79,17 @@ if ($action == 'add' && $id && ! isset($_POST["cancel"]) && $user->rights->banqu
{ {
$amount = - price2num($_POST["debit"]); $amount = - price2num($_POST["debit"]);
} }
$dateop = dol_mktime(12,0,0,$_POST["opmonth"],$_POST["opday"],$_POST["opyear"]); $dateop = dol_mktime(12,0,0,$_POST["opmonth"],$_POST["opday"],$_POST["opyear"]);
$operation=$_POST["operation"]; $operation=$_POST["operation"];
$num_chq=$_POST["num_chq"]; $num_chq=$_POST["num_chq"];
$label=$_POST["label"]; $label=$_POST["label"];
$cat1=$_POST["cat1"]; $cat1=$_POST["cat1"];
if (! $dateop) $mesg=$langs->trans("ErrorFieldRequired",$langs->trans("Date")); if (! $dateop) $mesg=$langs->trans("ErrorFieldRequired",$langs->trans("Date"));
if (! $operation) $mesg=$langs->trans("ErrorFieldRequired",$langs->trans("Type")); if (! $operation) $mesg=$langs->trans("ErrorFieldRequired",$langs->trans("Type"));
if (! $amount) $mesg=$langs->trans("ErrorFieldRequired",$langs->trans("Amount")); if (! $amount) $mesg=$langs->trans("ErrorFieldRequired",$langs->trans("Amount"));
if (! $mesg) if (! $mesg)
{ {
$object->fetch($id); $object->fetch($id);
@@ -143,15 +144,15 @@ if ($id > 0 || ! empty($ref))
} }
$result=$object->fetch($id, $ref); $result=$object->fetch($id, $ref);
// Chargement des categories bancaires dans $options // Chargement des categories bancaires dans $options
$nbcategories=0; $nbcategories=0;
$sql = "SELECT rowid, label"; $sql = "SELECT rowid, label";
$sql.= " FROM ".MAIN_DB_PREFIX."bank_categ"; $sql.= " FROM ".MAIN_DB_PREFIX."bank_categ";
$sql.= " WHERE entity = ".$conf->entity; $sql.= " WHERE entity = ".$conf->entity;
$sql.= " ORDER BY label"; $sql.= " ORDER BY label";
$result = $db->query($sql); $result = $db->query($sql);
if ($result) if ($result)
{ {
@@ -168,7 +169,7 @@ if ($id > 0 || ! empty($ref))
} }
$db->free($result); $db->free($result);
} }
// Definition de sql_rech et param // Definition de sql_rech et param
$param=''; $param='';
$sql_rech=''; $sql_rech='';
@@ -203,13 +204,13 @@ if ($id > 0 || ! empty($ref))
$param.='&amp;thirdparty='.urlencode($thirdparty); $param.='&amp;thirdparty='.urlencode($thirdparty);
$mode_search = 1; $mode_search = 1;
} }
if (GETPOST("paiementtype")) if ($paiementtype)
{ {
$sql_rech.=" AND b.fk_type = '".$db->escape(GETPOST("paiementtype"))."'"; $sql_rech.=" AND b.fk_type = '".$db->escape($paiementtype)."'";
$param.='&amp;paiementtype='.urlencode(GETPOST("paiementtype")); $param.='&amp;paiementtype='.urlencode($paiementtype);
$mode_search = 1; $mode_search = 1;
} }
$sql = "SELECT count(*) as nb"; $sql = "SELECT count(*) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account as ba"; $sql.= " FROM ".MAIN_DB_PREFIX."bank_account as ba";
$sql.= ", ".MAIN_DB_PREFIX."bank as b"; $sql.= ", ".MAIN_DB_PREFIX."bank as b";
@@ -222,7 +223,7 @@ if ($id > 0 || ! empty($ref))
$sql.= " AND b.fk_account = ba.rowid"; $sql.= " AND b.fk_account = ba.rowid";
$sql.= " AND ba.entity = ".$conf->entity; $sql.= " AND ba.entity = ".$conf->entity;
$sql.= $sql_rech; $sql.= $sql_rech;
dol_syslog("account.php count transactions - sql=".$sql, LOG_DEBUG); dol_syslog("account.php count transactions - sql=".$sql, LOG_DEBUG);
$result=$db->query($sql); $result=$db->query($sql);
if ($result) if ($result)
@@ -230,7 +231,7 @@ if ($id > 0 || ! empty($ref))
$obj = $db->fetch_object($result); $obj = $db->fetch_object($result);
$nbline = $obj->nb; $nbline = $obj->nb;
$total_lines = $nbline; $total_lines = $nbline;
if ($nbline > $viewline ) $limit = $nbline - $viewline ; if ($nbline > $viewline ) $limit = $nbline - $viewline ;
else $limit = $viewline; else $limit = $viewline;
@@ -240,7 +241,7 @@ if ($id > 0 || ! empty($ref))
{ {
dol_print_error($db); dol_print_error($db);
} }
if ($page > 0) if ($page > 0)
{ {
$limitsql = $nbline - ($page * $viewline); $limitsql = $nbline - ($page * $viewline);
@@ -253,34 +254,34 @@ if ($id > 0 || ! empty($ref))
$limitsql = $nbline; $limitsql = $nbline;
} }
//print $limitsql.'-'.$page.'-'.$viewline; //print $limitsql.'-'.$page.'-'.$viewline;
// Onglets // Onglets
$head=bank_prepare_head($object); $head=bank_prepare_head($object);
dol_fiche_head($head,'journal',$langs->trans("FinancialAccount"),0,'account'); dol_fiche_head($head,'journal',$langs->trans("FinancialAccount"),0,'account');
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
// Ref // Ref
print '<tr><td valign="top" width="25%">'.$langs->trans("Ref").'</td>'; print '<tr><td valign="top" width="25%">'.$langs->trans("Ref").'</td>';
print '<td colspan="3">'; print '<td colspan="3">';
print $form->showrefnav($object,'ref','',1,'ref'); print $form->showrefnav($object,'ref','',1,'ref');
print '</td></tr>'; print '</td></tr>';
// Label // Label
print '<tr><td valign="top">'.$langs->trans("Label").'</td>'; print '<tr><td valign="top">'.$langs->trans("Label").'</td>';
print '<td colspan="3">'.$object->label.'</td></tr>'; print '<td colspan="3">'.$object->label.'</td></tr>';
print '</table>'; print '</table>';
print '<br>'; print '<br>';
dol_htmloutput_errors($mesg); dol_htmloutput_errors($mesg);
/** /**
* Search form * Search form
*/ */
$param.='&amp;account='.$object->id; $param.='&amp;account='.$object->id;
// Define transaction list navigation string // Define transaction list navigation string
$navig=''; $navig='';
$navig.='<form action="'.$_SERVER["PHP_SELF"].'" name="newpage" method="GET">'; $navig.='<form action="'.$_SERVER["PHP_SELF"].'" name="newpage" method="GET">';
@@ -289,6 +290,7 @@ if ($id > 0 || ! empty($ref))
if ($limitsql > $viewline) $navig.='<a href="account.php?'.$param.'&amp;page='.($page+1).'">'.img_previous().'</a>'; if ($limitsql > $viewline) $navig.='<a href="account.php?'.$param.'&amp;page='.($page+1).'">'.img_previous().'</a>';
$navig.= $langs->trans("Page")." "; // ' Page '; $navig.= $langs->trans("Page")." "; // ' Page ';
$navig.='<input type="text" name="negpage" size="1" class="flat" value="'.($nbpage-$page).'">'; $navig.='<input type="text" name="negpage" size="1" class="flat" value="'.($nbpage-$page).'">';
$navig.='<input type="hidden" name="paiementtype" value="'.$paiementtype.'">';
$navig.='<input type="hidden" name="req_nb" value="'.$req_nb.'">'; $navig.='<input type="hidden" name="req_nb" value="'.$req_nb.'">';
$navig.='<input type="hidden" name="req_desc" value="'.GETPOST("req_desc").'">'; $navig.='<input type="hidden" name="req_desc" value="'.GETPOST("req_desc").'">';
$navig.='<input type="hidden" name="req_debit" value="'.GETPOST("req_debit").'">'; $navig.='<input type="hidden" name="req_debit" value="'.GETPOST("req_debit").'">';
@@ -303,7 +305,7 @@ if ($id > 0 || ! empty($ref))
} }
$navig.='</form>'; $navig.='</form>';
//var_dump($navig); //var_dump($navig);
// Confirmation delete // Confirmation delete
if ($action == 'delete') if ($action == 'delete')
{ {
@@ -311,15 +313,15 @@ if ($id > 0 || ! empty($ref))
$ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;rowid='.$_GET["rowid"],$langs->trans('DeleteTransaction'),$text,'confirm_delete'); $ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;rowid='.$_GET["rowid"],$langs->trans('DeleteTransaction'),$text,'confirm_delete');
if ($ret == 'html') print '<br>'; if ($ret == 'html') print '<br>';
} }
print '<table class="notopnoleftnoright" width="100%">'; print '<table class="notopnoleftnoright" width="100%">';
// Show title // Show title
if ($action != 'addline' && $action != 'delete') if ($action != 'addline' && $action != 'delete')
{ {
print '<tr><td colspan="9" align="right">'.$navig.'</td></tr>'; print '<tr><td colspan="9" align="right">'.$navig.'</td></tr>';
} }
// Form to add a transaction with no invoice // Form to add a transaction with no invoice
if ($user->rights->banque->modifier && $action == 'addline') if ($user->rights->banque->modifier && $action == 'addline')
{ {
@@ -328,11 +330,11 @@ if ($id > 0 || ! empty($ref))
print '<input type="hidden" name="action" value="add">'; print '<input type="hidden" name="action" value="add">';
print '<input type="hidden" name="vline" value="'.$vline.'">'; print '<input type="hidden" name="vline" value="'.$vline.'">';
print '<input type="hidden" name="id" value="'.$object->id.'">'; print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<tr>'; print '<tr>';
print '<td align="left" colspan="10"><b>'.$langs->trans("AddBankRecordLong").'</b></td>'; print '<td align="left" colspan="10"><b>'.$langs->trans("AddBankRecordLong").'</b></td>';
print '</tr>'; print '</tr>';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Date").'</td>'; print '<td>'.$langs->trans("Date").'</td>';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
@@ -343,7 +345,7 @@ if ($id > 0 || ! empty($ref))
print '<td align=right>'.$langs->trans("Credit").'</td>'; print '<td align=right>'.$langs->trans("Credit").'</td>';
print '<td colspan="2" align="center">&nbsp;</td>'; print '<td colspan="2" align="center">&nbsp;</td>';
print '</tr>'; print '</tr>';
print '<tr '.$bc[false].'>'; print '<tr '.$bc[false].'>';
print '<td nowrap="nowrap" colspan="2">'; print '<td nowrap="nowrap" colspan="2">';
$form->select_date($dateop,'op',0,0,0,'transaction'); $form->select_date($dateop,'op',0,0,0,'transaction');
@@ -366,14 +368,14 @@ if ($id > 0 || ! empty($ref))
print '<input type="submit" name="cancel" class="button" value="'.$langs->trans("Cancel").'">'; print '<input type="submit" name="cancel" class="button" value="'.$langs->trans("Cancel").'">';
print '</td></tr>'; print '</td></tr>';
print "</form>"; print "</form>";
print '<tr class="noborder"><td colspan="8">&nbsp;</td></tr>'."\n"; print '<tr class="noborder"><td colspan="8">&nbsp;</td></tr>'."\n";
} }
/* /*
* Affiche tableau des transactions bancaires * Affiche tableau des transactions bancaires
*/ */
// Ligne de titre tableau des ecritures // Ligne de titre tableau des ecritures
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Date").'</td>'; print '<td>'.$langs->trans("Date").'</td>';
@@ -389,19 +391,19 @@ if ($id > 0 || ! empty($ref))
if ($object->type != 2 && $object->rappro) print $langs->trans("AccountStatementShort"); if ($object->type != 2 && $object->rappro) print $langs->trans("AccountStatementShort");
else print '&nbsp;'; else print '&nbsp;';
print '</td></tr>'; print '</td></tr>';
print '<form action="'.$_SERVER["PHP_SELF"].'?'.$param.'" name="search" method="POST">'; print '<form action="'.$_SERVER["PHP_SELF"].'?'.$param.'" name="search" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="search">'; print '<input type="hidden" name="action" value="search">';
print '<input type="hidden" name="id" value="'.$object->id.'">'; print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print '<td>'; print '<td>';
//$filtertype=array('TIP'=>'TIP','PRE'=>'PRE',...) //$filtertype=array('TIP'=>'TIP','PRE'=>'PRE',...)
$filtertype=''; $filtertype='';
print $form->select_types_paiements($_REQUEST['paiementtype'],'paiementtype',$filtertype,2,1,1,8); print $form->select_types_paiements($paiementtype,'paiementtype',$filtertype,2,1,1,8);
print '</td>'; print '</td>';
print '<td><input type="text" class="flat" name="req_nb" value="'.$req_nb.'" size="2"></td>'; print '<td><input type="text" class="flat" name="req_nb" value="'.$req_nb.'" size="2"></td>';
print '<td><input type="text" class="flat" name="req_desc" value="'.GETPOST("req_desc").'" size="24"></td>'; print '<td><input type="text" class="flat" name="req_desc" value="'.GETPOST("req_desc").'" size="24"></td>';
@@ -412,13 +414,13 @@ if ($id > 0 || ! empty($ref))
print '<td align="center" width="40"><input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'"></td>'; print '<td align="center" width="40"><input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'"></td>';
print "</tr>\n"; print "</tr>\n";
print "</form>\n"; print "</form>\n";
/* /*
* Another solution * Another solution
* create temporary table solde type=heap select amount from llx_bank limit 100 ; * create temporary table solde type=heap select amount from llx_bank limit 100 ;
* select sum(amount) from solde ; * select sum(amount) from solde ;
*/ */
$sql = "SELECT b.rowid, b.dateo as do, b.datev as dv,"; $sql = "SELECT b.rowid, b.dateo as do, b.datev as dv,";
$sql.= " b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type"; $sql.= " b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type";
if ($mode_search) if ($mode_search)
@@ -428,11 +430,11 @@ if ($id > 0 || ! empty($ref))
/* /*
if ($mode_search && $conf->adherent->enabled) if ($mode_search && $conf->adherent->enabled)
{ {
} }
if ($mode_search && $conf->tax->enabled) if ($mode_search && $conf->tax->enabled)
{ {
} }
*/ */
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account as ba"; $sql.= " FROM ".MAIN_DB_PREFIX."bank_account as ba";
@@ -459,22 +461,22 @@ if ($id > 0 || ! empty($ref))
$sql.= $sql_rech; $sql.= $sql_rech;
$sql.= $db->order("b.datev, b.datec", "ASC"); // We add date of creation to have correct order when everything is done the same day $sql.= $db->order("b.datev, b.datec", "ASC"); // We add date of creation to have correct order when everything is done the same day
$sql.= $db->plimit($limitsql, 0); $sql.= $db->plimit($limitsql, 0);
dol_syslog("account.php get transactions - sql=".$sql, LOG_DEBUG); dol_syslog("account.php get transactions - sql=".$sql, LOG_DEBUG);
$result = $db->query($sql); $result = $db->query($sql);
if ($result) if ($result)
{ {
$now=dol_now(); $now=dol_now();
$nows=dol_print_date($now,'%Y%m%d'); $nows=dol_print_date($now,'%Y%m%d');
//$form->load_cache_types_paiements(); //$form->load_cache_types_paiements();
//$form->cache_types_paiements //$form->cache_types_paiements
$var=true; $var=true;
$num = $db->num_rows($result); $num = $db->num_rows($result);
$i = 0; $total = 0; $sep = 0; $i = 0; $total = 0; $sep = 0;
while ($i < $num) while ($i < $num)
{ {
$objp = $db->fetch_object($result); $objp = $db->fetch_object($result);
@@ -482,7 +484,7 @@ if ($id > 0 || ! empty($ref))
if ($i >= ($nbline - $viewline)) if ($i >= ($nbline - $viewline))
{ {
$var=!$var; $var=!$var;
// Is it a transaction in future ? // Is it a transaction in future ?
$dos=dol_print_date($db->jdate($objp->do),'%Y%m%d'); $dos=dol_print_date($db->jdate($objp->do),'%Y%m%d');
//print "dos=".$dos." nows=".$nows; //print "dos=".$dos." nows=".$nows;
@@ -496,26 +498,26 @@ if ($id > 0 || ! empty($ref))
print "<td>&nbsp;</td>"; print "<td>&nbsp;</td>";
print '</tr>'; print '</tr>';
} }
print '<tr '.$bc[$var].'>'; print '<tr '.$bc[$var].'>';
print '<td nowrap="nowrap">'.dol_print_date($db->jdate($objp->do),"day")."</td>\n"; print '<td nowrap="nowrap">'.dol_print_date($db->jdate($objp->do),"day")."</td>\n";
print '<td nowrap="nowrap">'.dol_print_date($db->jdate($objp->dv),"day"); print '<td nowrap="nowrap">'.dol_print_date($db->jdate($objp->dv),"day");
print "</td>\n"; print "</td>\n";
// Payment type // Payment type
print "<td nowrap>"; print "<td nowrap>";
$label=($langs->trans("PaymentTypeShort".$objp->fk_type)!="PaymentTypeShort".$objp->fk_type)?$langs->trans("PaymentTypeShort".$objp->fk_type):$objp->fk_type; $label=($langs->trans("PaymentTypeShort".$objp->fk_type)!="PaymentTypeShort".$objp->fk_type)?$langs->trans("PaymentTypeShort".$objp->fk_type):$objp->fk_type;
// $label=$langs->getTradFromKey("PaymentTypeShort".$objp->fk_type); // $label=$langs->getTradFromKey("PaymentTypeShort".$objp->fk_type);
if ($objp->fk_type == 'SOLD') $label='&nbsp;'; if ($objp->fk_type == 'SOLD') $label='&nbsp;';
print $label; print $label;
print "</td>\n"; print "</td>\n";
// Num // Num
print '<td nowrap>'.($objp->num_chq?$objp->num_chq:"")."</td>\n"; print '<td nowrap>'.($objp->num_chq?$objp->num_chq:"")."</td>\n";
// Description // Description
print '<td>'; print '<td>';
// Show generic description // Show generic description
@@ -545,7 +547,7 @@ if ($id > 0 || ! empty($ref))
} }
else if ($links[$key]['type']=='company') else if ($links[$key]['type']=='company')
{ {
} }
else if ($links[$key]['type']=='payment_sc') else if ($links[$key]['type']=='payment_sc')
{ {
@@ -567,11 +569,11 @@ if ($id > 0 || ! empty($ref))
} }
else if ($links[$key]['type']=='member') else if ($links[$key]['type']=='member')
{ {
} }
else if ($links[$key]['type']=='sc') else if ($links[$key]['type']=='sc')
{ {
} }
else else
{ {
@@ -592,7 +594,7 @@ if ($id > 0 || ! empty($ref))
} }
} }
print '</td>'; print '</td>';
// Add third party column // Add third party column
print '<td>'; print '<td>';
foreach($links as $key=>$val) foreach($links as $key=>$val)
@@ -627,7 +629,7 @@ if ($id > 0 || ! empty($ref))
} }
} }
print '</td>'; print '</td>';
// Amount // Amount
if ($objp->amount < 0) if ($objp->amount < 0)
{ {
@@ -637,7 +639,7 @@ if ($id > 0 || ! empty($ref))
{ {
print '<td>&nbsp;</td><td align="right" nowrap="nowrap">&nbsp;'.price($objp->amount).'</td>'."\n"; print '<td>&nbsp;</td><td align="right" nowrap="nowrap">&nbsp;'.price($objp->amount).'</td>'."\n";
} }
// Balance // Balance
if ($action != 'search') if ($action != 'search')
{ {
@@ -654,7 +656,7 @@ if ($id > 0 || ! empty($ref))
{ {
print '<td align="right">-</td>'; print '<td align="right">-</td>';
} }
// Transaction reconciliated or edit link // Transaction reconciliated or edit link
if ($objp->rappro && $object->canBeConciliated() > 0) // If line not conciliated and account can be conciliated if ($objp->rappro && $object->canBeConciliated() > 0) // If line not conciliated and account can be conciliated
{ {
@@ -697,13 +699,13 @@ if ($id > 0 || ! empty($ref))
} }
print '</td>'; print '</td>';
} }
print "</tr>"; print "</tr>";
} }
$i++; $i++;
} }
// Show total // Show total
if ($page == 0 && ! $mode_search) if ($page == 0 && ! $mode_search)
{ {
@@ -721,19 +723,19 @@ if ($id > 0 || ! empty($ref))
{ {
dol_print_error($db); dol_print_error($db);
} }
print "</table>"; print "</table>";
print "\n</div>\n"; print "\n</div>\n";
/* /*
* Boutons actions * Boutons actions
*/ */
if ($action != 'delete') if ($action != 'delete')
{ {
print '<div class="tabsAction">'; print '<div class="tabsAction">';
if ($object->type != 2 && $object->rappro) // If not cash account and can be reconciliate if ($object->type != 2 && $object->rappro) // If not cash account and can be reconciliate
{ {
if ($user->rights->banque->consolidate) if ($user->rights->banque->consolidate)
@@ -745,7 +747,7 @@ if ($id > 0 || ! empty($ref))
print '<a class="butActionRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("Conciliate").'</a>'; print '<a class="butActionRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("Conciliate").'</a>';
} }
} }
if ($action != 'addline') if ($action != 'addline')
{ {
if ($user->rights->banque->modifier) if ($user->rights->banque->modifier)
@@ -757,10 +759,10 @@ if ($id > 0 || ! empty($ref))
print '<a class="butActionRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("AddBankRecord").'</a>'; print '<a class="butActionRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("AddBankRecord").'</a>';
} }
} }
print '</div>'; print '</div>';
} }
print '<br>'; print '<br>';
} }
else else
@@ -771,4 +773,4 @@ else
llxFooter(); llxFooter();
$db->close(); $db->close();
?> ?>

View File

@@ -75,7 +75,7 @@ if ($action == 'confirm_delete_categ' && $confirm == "yes" && $user->rights->ban
} }
} }
if ($action == 'class') if ($user->rights->banque->modifier && $action == 'class')
{ {
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid = ".$rowid." AND fk_categ = ".$_POST["cat1"]; $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid = ".$rowid." AND fk_categ = ".$_POST["cat1"];
if (! $db->query($sql)) if (! $db->query($sql))
@@ -90,7 +90,7 @@ if ($action == 'class')
} }
} }
if ($action == "update") if ($user->rights->banque->modifier && $action == "update")
{ {
$error=0; $error=0;
@@ -584,8 +584,11 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="class">'; print '<input type="hidden" name="action" value="class">';
print '<input type="hidden" name="orig_account" value="'.$orig_account.'">'; print '<input type="hidden" name="orig_account" value="'.$orig_account.'">';
print '<tr class="liste_titre"><td>'.$langs->trans("Rubriques").'</td><td colspan="2">'; print '<tr class="liste_titre"><td>'.$langs->trans("Rubriques").'</td><td colspan="2">';
print '<select class="flat" name="cat1">'.$options.'</select>&nbsp;'; if ($user->rights->banque->modifier)
print '<input type="submit" class="button" value="'.$langs->trans("Add").'"></td>'; {
print '<select class="flat" name="cat1">'.$options.'</select>&nbsp;';
print '<input type="submit" class="button" value="'.$langs->trans("Add").'"></td>';
}
print "</tr>"; print "</tr>";
print "</form>"; print "</form>";

View File

@@ -255,6 +255,9 @@ $form = new Form($db);
*/ */
if ($action == 'create') if ($action == 'create')
{ {
//WYSIWYG Editor
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
print_fiche_titre($langs->trans("NewTrip")); print_fiche_titre($langs->trans("NewTrip"));
dol_htmloutput_errors($mesg); dol_htmloutput_errors($mesg);
@@ -295,9 +298,10 @@ if ($action == 'create')
print '<tr>'; print '<tr>';
print '<td class="border" valign="top">'.$langs->trans('NotePublic').'</td>'; print '<td class="border" valign="top">'.$langs->trans('NotePublic').'</td>';
print '<td valign="top" colspan="2">'; print '<td valign="top" colspan="2">';
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
$doleditor=new DolEditor('note_public',GETPOST('note_public','alpha'),600,200,'dolibarr_notes','In',false,true,true,ROWS_8,100); $doleditor = new DolEditor('note_public', GETPOST('note_public', 'alpha'), 600, 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, 100);
print $doleditor->Create(1); print $doleditor->Create(1);
print '</td></tr>'; print '</td></tr>';
// Private note // Private note
@@ -306,9 +310,10 @@ if ($action == 'create')
print '<tr>'; print '<tr>';
print '<td class="border" valign="top">'.$langs->trans('NotePrivate').'</td>'; print '<td class="border" valign="top">'.$langs->trans('NotePrivate').'</td>';
print '<td valign="top" colspan="2">'; print '<td valign="top" colspan="2">';
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
$doleditor=new DolEditor('note_private',GETPOST('note_private','alpha'),600,200,'dolibarr_notes','In',false,true,true,ROWS_8,100); $doleditor = new DolEditor('note_private', GETPOST('note_private', 'alpha'), 600, 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, 100);
print $doleditor->Create(1); print $doleditor->Create(1);
print '</td></tr>'; print '</td></tr>';
} }
@@ -332,6 +337,9 @@ else if ($id)
if ($action == 'edit' && $user->rights->deplacement->creer) if ($action == 'edit' && $user->rights->deplacement->creer)
{ {
//WYSIWYG Editor
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
$soc = new Societe($db); $soc = new Societe($db);
if ($object->socid) if ($object->socid)
{ {
@@ -382,9 +390,10 @@ else if ($id)
// Public note // Public note
print '<tr><td valign="top">'.$langs->trans("NotePublic").'</td>'; print '<tr><td valign="top">'.$langs->trans("NotePublic").'</td>';
print '<td valign="top" colspan="3">'; print '<td valign="top" colspan="3">';
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
$doleditor=new DolEditor('note_public',$object->note_public,600,200,'dolibarr_notes','In',false,true,true,ROWS_8,'100'); $doleditor = new DolEditor('note_public', $object->note_public, 600, 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, '100');
print $doleditor->Create(1); print $doleditor->Create(1);
print "</td></tr>"; print "</td></tr>";
// Private note // Private note
@@ -392,9 +401,10 @@ else if ($id)
{ {
print '<tr><td valign="top">'.$langs->trans("NotePrivate").'</td>'; print '<tr><td valign="top">'.$langs->trans("NotePrivate").'</td>';
print '<td valign="top" colspan="3">'; print '<td valign="top" colspan="3">';
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
$doleditor=new DolEditor('note_private',$object->note_private,600,200,'dolibarr_notes','In',false,true,true,ROWS_8,'100'); $doleditor = new DolEditor('note_private', $object->note_private, 600, 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, '100');
print $doleditor->Create(1); print $doleditor->Create(1);
print "</td></tr>"; print "</td></tr>";
} }
@@ -499,8 +509,8 @@ else if ($id)
print "</table><br>"; print "</table><br>";
// Notes // Notes
$blocname = 'notes'; $blocname = 'notes';
$title = $langs->trans('Notes'); $title = $langs->trans('Notes');
include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'); include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php');
print '</div>'; print '</div>';

View File

@@ -1,6 +1,7 @@
<?php <?php
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (c) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (c) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -137,12 +138,7 @@ if (! $mesg)
} }
$res = $stats->getAverageByMonth($year); $data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear);
$data = array();
for ($i = 1 ; $i < 13 ; $i++)
{
$data[$i-1] = array(ucfirst(dol_substr(dol_print_date(dol_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]);
}
if (!$user->rights->societe->client->voir || $user->societe_id) if (!$user->rights->societe->client->voir || $user->societe_id)
{ {
@@ -162,8 +158,7 @@ $mesg = $px3->isGraphKo();
if (! $mesg) if (! $mesg)
{ {
$px3->SetData($data); $px3->SetData($data);
//$i=$startyear;$legend=array(); $i = $startyear;$legend=array();
$i=$endyear;$legend=array();
while ($i <= $endyear) while ($i <= $endyear)
{ {
$legend[]=$i; $legend[]=$i;

View File

@@ -81,6 +81,12 @@ $usehm=$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE;
$object=new Facture($db); $object=new Facture($db);
// Load object
if ($id > 0 || ! empty($ref))
{
$ret=$object->fetch($id, $ref);
}
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'); include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($db); $hookmanager=new HookManager($db);
@@ -143,53 +149,54 @@ else if ($action == 'reopen' && $user->rights->facture->creer)
// Delete invoice // Delete invoice
else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->facture->supprimer) else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->facture->supprimer)
{ {
$result = $object->fetch($id); $result = $object->fetch($id);
$result = $object->delete(); $object->fetch_thirdparty();
if ($result > 0) $result = $object->delete();
{ if ($result > 0)
Header('Location: '.$_SERVER["PHP_SELF"]); {
exit; Header('Location: '.$_SERVER["PHP_SELF"]);
} exit;
else }
{ else
$mesg='<div class="error">'.$object->error.'</div>'; {
$mesg='<div class="error">'.$object->error.'</div>';
} }
} }
// Delete line // Delete line
else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->facture->creer) else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->facture->creer)
{ {
$object->fetch($id); $object->fetch($id);
$object->fetch_thirdparty(); $object->fetch_thirdparty();
$result = $object->deleteline($_GET['lineid'], $user); $result = $object->deleteline($_GET['lineid'], $user);
if ($result > 0) if ($result > 0)
{ {
// Define output language // Define output language
$outputlangs = $langs; $outputlangs = $langs;
$newlang=''; $newlang='';
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id']; if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id'];
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang; if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
if (! empty($newlang)) if (! empty($newlang))
{ {
$outputlangs = new Translate("",$conf); $outputlangs = new Translate("",$conf);
$outputlangs->setDefaultLang($newlang); $outputlangs->setDefaultLang($newlang);
} }
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
{ {
$ret=$object->fetch($id); // Reload to get new records $ret=$object->fetch($id); // Reload to get new records
$result=facture_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager); $result=facture_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
} }
if ($result >= 0) if ($result >= 0)
{ {
Header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id); Header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id);
exit; exit;
} }
} }
else else
{ {
$mesg='<div clas="error">'.$object->error.'</div>'; $mesg='<div clas="error">'.$object->error.'</div>';
$action=''; $action='';
} }
} }
@@ -310,18 +317,18 @@ else if ($action == 'set_ref_client' && $user->rights->facture->creer)
$object->set_ref_client($_POST['ref_client']); $object->set_ref_client($_POST['ref_client']);
} }
else if ($action == 'setnote_public' && $user->rights->facture->creer) else if ($action == 'setnote_public' && $user->rights->facture->creer)
{ {
$object->fetch($id); $object->fetch($id);
$result=$object->update_note_public(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES)); $result=$object->update_note_public(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES));
if ($result < 0) dol_print_error($db,$object->error); if ($result < 0) dol_print_error($db,$object->error);
} }
else if ($action == 'setnote' && $user->rights->facture->creer) else if ($action == 'setnote' && $user->rights->facture->creer)
{ {
$object->fetch($id); $object->fetch($id);
$result=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES)); $result=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES));
if ($result < 0) dol_print_error($db,$object->error); if ($result < 0) dol_print_error($db,$object->error);
} }
// Classify to validated // Classify to validated
@@ -1112,7 +1119,7 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights-
unset($_POST['qty']); unset($_POST['qty']);
unset($_POST['type']); unset($_POST['type']);
unset($_POST['idprod']); unset($_POST['idprod']);
unset($_POST['remmise_percent']); unset($_POST['remise_percent']);
unset($_POST['dp_desc']); unset($_POST['dp_desc']);
unset($_POST['np_desc']); unset($_POST['np_desc']);
unset($_POST['np_price']); unset($_POST['np_price']);
@@ -1506,64 +1513,81 @@ else if ($action == 'builddoc') // En get ou en post
} }
} }
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) // Remove file in doc form
else if ($action == 'remove_file')
{ {
if ($action == 'addcontact' && $user->rights->facture->creer) if ($object->fetch($id))
{ {
$result = $object->fetch($id); require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
if ($result > 0 && $id > 0) $object->fetch_thirdparty();
$langs->load("other");
$upload_dir = $conf->facture->dir_output;
$file = $upload_dir . '/' . GETPOST('file');
dol_delete_file($file,0,0,0,$object);
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('file')).'</div>';
}
}
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
{
if ($action == 'addcontact' && $user->rights->facture->creer)
{
$result = $object->fetch($id);
if ($result > 0 && $id > 0)
{ {
$contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid')); $contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'));
$result = $result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]); $result = $result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]);
} }
if ($result >= 0) if ($result >= 0)
{ {
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
exit; exit;
} }
else else
{ {
if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS')
{ {
$langs->load("errors"); $langs->load("errors");
$mesg = '<div class="error">'.$langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType").'</div>'; $mesg = '<div class="error">'.$langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType").'</div>';
} }
else else
{ {
$mesg = '<div class="error">'.$object->error.'</div>'; $mesg = '<div class="error">'.$object->error.'</div>';
} }
} }
} }
// bascule du statut d'un contact // bascule du statut d'un contact
else if ($action == 'swapstatut' && $user->rights->facture->creer) else if ($action == 'swapstatut' && $user->rights->facture->creer)
{ {
if ($object->fetch($id)) if ($object->fetch($id))
{ {
$result=$object->swapContactStatus(GETPOST('ligne')); $result=$object->swapContactStatus(GETPOST('ligne'));
} }
else else
{ {
dol_print_error($db); dol_print_error($db);
} }
} }
// Efface un contact // Efface un contact
else if ($action == 'deletecontact' && $user->rights->facture->creer) else if ($action == 'deletecontact' && $user->rights->facture->creer)
{ {
$object->fetch($id); $object->fetch($id);
$result = $object->delete_contact($lineid); $result = $object->delete_contact($lineid);
if ($result >= 0) if ($result >= 0)
{ {
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
exit; exit;
} }
else { else {
dol_print_error($db); dol_print_error($db);
} }
} }
} }
@@ -2801,22 +2825,22 @@ else
print '</table><br>'; print '</table><br>';
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
{ {
require_once(DOL_DOCUMENT_ROOT."/contact/class/contact.class.php"); require_once(DOL_DOCUMENT_ROOT."/contact/class/contact.class.php");
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'); require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php');
$formcompany= new FormCompany($db); $formcompany= new FormCompany($db);
$blocname = 'contacts'; $blocname = 'contacts';
$title = $langs->trans('ContactsAddresses'); $title = $langs->trans('ContactsAddresses');
include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'); include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php');
} }
if (! empty($conf->global->MAIN_DISABLE_NOTES_TAB)) if (! empty($conf->global->MAIN_DISABLE_NOTES_TAB))
{ {
$blocname = 'notes'; $blocname = 'notes';
$title = $langs->trans('Notes'); $title = $langs->trans('Notes');
include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'); include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php');
} }
/* /*
@@ -3256,7 +3280,7 @@ else
if ($userid) if ($userid)
{ {
if ($userid == -1) $sql.=' AND f.fk_user_author IS NULL'; if ($userid == -1) $sql.=' AND f.fk_user_author IS NULL';
else $sql.=' AND f.fk_user_author = '.$user->id; else $sql.=' AND f.fk_user_author = '.$userid;
} }
if ($_GET['filtre']) if ($_GET['filtre'])
{ {

View File

@@ -146,20 +146,20 @@ class FactureRec extends Facture
for ($i = 0; $i < $num; $i++) for ($i = 0; $i < $num; $i++)
{ {
$result_insert = $this->addline( $result_insert = $this->addline(
$this->id, $this->id,
$facsrc->lines[$i]->desc, $facsrc->lines[$i]->desc,
$facsrc->lines[$i]->subprice, $facsrc->lines[$i]->subprice,
$facsrc->lines[$i]->qty, $facsrc->lines[$i]->qty,
$facsrc->lines[$i]->tva_tx, $facsrc->lines[$i]->tva_tx,
$facsrc->lines[$i]->fk_product, $facsrc->lines[$i]->fk_product,
$facsrc->lines[$i]->remise_percent, $facsrc->lines[$i]->remise_percent,
'HT', 'HT',
0, 0,
'', '',
0, 0,
$facsrc->lines[$i]->product_type, $facsrc->lines[$i]->product_type,
$facsrc->lines[$i]->rang, $facsrc->lines[$i]->rang,
$facsrc->lines[$i]->special_code $facsrc->lines[$i]->special_code
); );
if ($result_insert < 0) if ($result_insert < 0)

View File

@@ -256,30 +256,30 @@ class Facture extends CommonObject
$error++; $error++;
} }
// TODO mutualiser // TODO mutualiser
if ($origin == 'commande') if ($origin == 'commande')
{ {
// On recupere les differents contact interne et externe // On recupere les differents contact interne et externe
$order = new Commande($this->db); $order = new Commande($this->db);
$order->id = $origin_id; $order->id = $origin_id;
// On recupere le commercial suivi propale // On recupere le commercial suivi propale
$this->userid = $order->getIdcontact('internal', 'SALESREPFOLL'); $this->userid = $order->getIdcontact('internal', 'SALESREPFOLL');
if ($this->userid) if ($this->userid)
{ {
//On passe le commercial suivi commande en commercial suivi paiement //On passe le commercial suivi commande en commercial suivi paiement
$this->add_contact($this->userid[0], 'SALESREPFOLL', 'internal'); $this->add_contact($this->userid[0], 'SALESREPFOLL', 'internal');
} }
// On recupere le contact client facturation commande // On recupere le contact client facturation commande
$this->contactid = $order->getIdcontact('external', 'BILLING'); $this->contactid = $order->getIdcontact('external', 'BILLING');
if ($this->contactid) if ($this->contactid)
{ {
//On passe le contact client facturation commande en contact client facturation //On passe le contact client facturation commande en contact client facturation
$this->add_contact($this->contactid[0], 'BILLING', 'external'); $this->add_contact($this->contactid[0], 'BILLING', 'external');
} }
} }
} }
} }
@@ -349,7 +349,7 @@ class Facture extends CommonObject
$this->lines[$i]->fk_code_ventilation, $this->lines[$i]->fk_code_ventilation,
$this->lines[$i]->info_bits, $this->lines[$i]->info_bits,
$this->lines[$i]->fk_remise_except, $this->lines[$i]->fk_remise_except,
'HT', 'HT',
0, 0,
$this->lines[$i]->product_type, $this->lines[$i]->product_type,
$this->lines[$i]->rang, $this->lines[$i]->rang,
@@ -400,7 +400,13 @@ class Facture extends CommonObject
$localtax2_tx, $localtax2_tx,
$_facrec->lines[$i]->fk_product, $_facrec->lines[$i]->fk_product,
$_facrec->lines[$i]->remise_percent, $_facrec->lines[$i]->remise_percent,
'','',0,0,'','HT',0, '',
'',
0,
0,
'',
'HT',
0,
$_facrec->lines[$i]->product_type, $_facrec->lines[$i]->product_type,
$_facrec->lines[$i]->rang, $_facrec->lines[$i]->rang,
$_facrec->lines[$i]->special_code $_facrec->lines[$i]->special_code
@@ -674,11 +680,11 @@ class Facture extends CommonObject
$this->origin = $object->element; $this->origin = $object->element;
$this->origin_id = $object->id; $this->origin_id = $object->id;
// Possibility to add external linked objects with hooks // Possibility to add external linked objects with hooks
$this->linked_objects[$this->origin] = $this->origin_id; $this->linked_objects[$this->origin] = $this->origin_id;
if (is_array($object->other_linked_objects) && ! empty($object->other_linked_objects)) if (is_array($object->other_linked_objects) && ! empty($object->other_linked_objects))
{ {
$this->linked_objects = array_merge($this->linked_objects, $object->other_linked_objects); $this->linked_objects = array_merge($this->linked_objects, $object->other_linked_objects);
} }
$ret = $this->create($user); $ret = $this->create($user);
@@ -1166,6 +1172,7 @@ class Facture extends CommonObject
function delete($rowid=0, $notrigger=0) function delete($rowid=0, $notrigger=0)
{ {
global $user,$langs,$conf; global $user,$langs,$conf;
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
if (! $rowid) $rowid=$this->id; if (! $rowid) $rowid=$this->id;
@@ -1236,6 +1243,34 @@ class Facture extends CommonObject
$resql=$this->db->query($sql); $resql=$this->db->query($sql);
if ($resql) if ($resql)
{ {
// On efface le repertoire de pdf provisoire
$ref = dol_sanitizeFileName($this->ref);
if ($conf->facture->dir_output)
{
$dir = $conf->facture->dir_output . "/" . $ref;
$file = $conf->facture->dir_output . "/" . $ref . "/" . $ref . ".pdf";
if (file_exists($file)) // We must delete all files before deleting directory
{
$ret=dol_delete_preview($this);
if (! dol_delete_file($file,0,0,0,$this)) // For triggers
{
$this->error=$langs->trans("ErrorCanNotDeleteFile",$file);
$this->db->rollback();
return 0;
}
}
if (file_exists($dir))
{
if (! dol_delete_dir_recursive($dir)) // For remove dir and meta
{
$this->error=$langs->trans("ErrorCanNotDeleteDir",$dir);
$this->db->rollback();
return 0;
}
}
}
$this->db->commit(); $this->db->commit();
return 1; return 1;
} }
@@ -1519,7 +1554,7 @@ class Facture extends CommonObject
$now=dol_now(); $now=dol_now();
$error=0; $error=0;
dol_syslog(get_class($this).'::validate force_number='.$force_number,' idwarehouse='.$idwarehouse, LOG_WARNING); dol_syslog(get_class($this).'::validate force_number='.$force_number.', idwarehouse='.$idwarehouse, LOG_WARNING);
// Check parameters // Check parameters
if (! $this->brouillon) if (! $this->brouillon)
@@ -1679,7 +1714,7 @@ class Facture extends CommonObject
dol_syslog("Rename ok"); dol_syslog("Rename ok");
// Suppression ancien fichier PDF dans nouveau rep // Suppression ancien fichier PDF dans nouveau rep
dol_delete_file($conf->facture->dir_output.'/'.$snumfa.'/'.$facref.'.*'); dol_delete_file($conf->facture->dir_output.'/'.$snumfa.'/'.$facref.'*.*');
} }
} }
} }
@@ -1691,6 +1726,7 @@ class Facture extends CommonObject
$this->ref = $num; $this->ref = $num;
$this->facnumber=$num; $this->facnumber=$num;
$this->statut=1; $this->statut=1;
$this->brouillon=0;
$this->date_validation=$now; $this->date_validation=$now;
} }

View File

@@ -35,7 +35,7 @@ $langs->load("companies");
$id=(GETPOST('id','int')?GETPOST('id','int'):GETPOST('facid','int')); // For backward compatibility $id=(GETPOST('id','int')?GETPOST('id','int'):GETPOST('facid','int')); // For backward compatibility
$ref = GETPOST('ref'); $ref = GETPOST('ref');
$socid=GETPOST('socid','int'); $socid=GETPOST('socid','int');
$action=GETPOST('action','alpha'); $action=GETPOST('action','alpha');
// Security check // Security check
@@ -166,9 +166,9 @@ if ($id > 0 || ! empty($ref))
print '</div>'; print '</div>';
print '<br>'; print '<br>';
// Contacts lines // Contacts lines
include(DOL_DOCUMENT_ROOT.'/core/tpl/contacts.tpl.php'); include(DOL_DOCUMENT_ROOT.'/core/tpl/contacts.tpl.php');
} }
else else

View File

@@ -29,6 +29,7 @@ require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
require_once(DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'); require_once(DOL_DOCUMENT_ROOT.'/core/class/discount.class.php');
require_once(DOL_DOCUMENT_ROOT."/core/lib/invoice.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/invoice.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/images.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php"); require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
$langs->load('propal'); $langs->load('propal');
@@ -42,6 +43,13 @@ $confirm = GETPOST('confirm');
$id = GETPOST('facid','int'); $id = GETPOST('facid','int');
$ref = GETPOST('ref'); $ref = GETPOST('ref');
$mesg='';
if (isset($_SESSION['DolMessage']))
{
$mesg=$_SESSION['DolMessage'];
unset($_SESSION['DolMessage']);
}
// Security check // Security check
if ($user->societe_id) if ($user->societe_id)
{ {
@@ -79,10 +87,19 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
if (dol_mkdir($upload_dir) >= 0) if (dol_mkdir($upload_dir) >= 0)
{ {
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']); $resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . dol_unescapefile($_FILES['userfile']['name']),0,0,$_FILES['userfile']['error']);
if (is_numeric($resupload) && $resupload > 0) if (is_numeric($resupload) && $resupload > 0)
{ {
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>'; if (image_format_supported($upload_dir . "/" . $_FILES['userfile']['name']) == 1)
{
// Create small thumbs for image (Ratio is near 16/9)
// Used on logon for example
$imgThumbSmall = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthsmall, $maxheightsmall, '_small', $quality, "thumbs");
// Create mini thumbs for image (Ratio is near 16/9)
// Used on menu or for setup page for example
$imgThumbMini = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthmini, $maxheightmini, '_mini', $quality, "thumbs");
}
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
} }
else else
{ {
@@ -109,12 +126,15 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
{ {
if ($object->fetch($id)) if ($object->fetch($id))
{ {
$langs->load("other");
$object->fetch_thirdparty(); $object->fetch_thirdparty();
$upload_dir = $conf->facture->dir_output . "/" . dol_sanitizeFileName($object->ref); $upload_dir = $conf->facture->dir_output . "/" . dol_sanitizeFileName($object->ref);
$file = $upload_dir . '/' . $_GET['urlfile']; // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). $file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
dol_delete_file($file,0,0,0,$object); dol_delete_file($file,0,0,0,$object);
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved").'</div>'; $_SESSION['DolMessage'] = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
exit;
} }
} }
@@ -184,14 +204,14 @@ if ($id > 0 || ! empty($ref))
*/ */
if ($action == 'delete') if ($action == 'delete')
{ {
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?facid='.$id.'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); $ret=$form->form_confirm($_SERVER["PHP_SELF"].'?facid='.$id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
if ($ret == 'html') print '<br>'; if ($ret == 'html') print '<br>';
} }
// Affiche formulaire upload // Affiche formulaire upload
$formfile=new FormFile($db); $formfile=new FormFile($db);
$formfile->form_attach_new_file(DOL_URL_ROOT.'/compta/facture/document.php?facid='.$object->id,'',0,0,$user->rights->facture->creer); $formfile->form_attach_new_file(DOL_URL_ROOT.'/compta/facture/document.php?facid='.$object->id,'',0,0,$user->rights->facture->creer,50,$object);
// List of document // List of document

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