Compare commits

...

339 Commits

Author SHA1 Message Date
Laurent Destailleur
b7abe9e08a Removed useless file 2012-02-21 02:03:13 +01:00
Laurent Destailleur
e6e9debaa0 Exclude custom 2011-10-19 23:07:34 +02:00
Laurent Destailleur
45ccb07964 Update ignore file 2011-10-19 22:32:29 +02:00
eldy
47c3b14a11 Prepare migrate to git 2011-09-17 16:11:24 +02:00
Regis Houssin
e918d9115e Fix: Removed regex error 2011-09-09 10:02:08 +02:00
Laurent Destailleur
8ee98b4846 Fix: BUG#33584 2011-06-17 18:21:02 +00:00
Laurent Destailleur
1e5a861766 Fix: Removed not translated licence file. 2011-06-15 10:05:15 +00:00
Laurent Destailleur
fa668910c2 Fix: Missing some customers 2011-06-15 08:55:19 +00:00
Laurent Destailleur
ff143e9bc3 Trans: Bad link to wiki 2011-06-07 10:45:43 +00:00
Laurent Destailleur
f3b952ef2d Doxygen 2011-06-06 13:02:19 +00:00
Laurent Destailleur
ffa593eda2 Fix: sql error 2011-05-28 03:50:07 +00:00
Laurent Destailleur
114ee9dc07 Fix: Bad coma in example 2011-05-28 03:45:02 +00:00
Laurent Destailleur
7847e544a4 Fix: Avoid duplicate lines when fetch_lines called twice 2011-05-01 21:35:55 +00:00
Laurent Destailleur
637aa69e37 Fix 2011-04-27 19:04:40 +00:00
Regis Houssin
715c88b52e Fix: A local file inclusion vulnerability can be exploited to include arbitrary files. 2011-04-26 20:22:29 +00:00
Laurent Destailleur
d4e1300620 Fix: Update request 2011-04-19 22:16:34 +00:00
Laurent Destailleur
74579860c7 Fix: Update request 2011-04-19 22:15:12 +00:00
Regis Houssin
a2cd3e5969 Fix: bad permission and unused translation 2011-04-17 18:24:24 +00:00
Regis Houssin
6222d8b2cb Fix: missing entity 2011-04-17 18:16:52 +00:00
Laurent Destailleur
a3fb6efe69 Fix: Sql error 2011-04-17 13:29:47 +00:00
Laurent Destailleur
54a57941a0 Fix: total amount 2011-04-14 23:25:41 +00:00
Laurent Destailleur
8c1c301a3d Fix: Date conversion 2011-04-10 23:00:29 +00:00
Laurent Destailleur
aaa19c23ec Fix: Bad user 2011-04-10 22:35:30 +00:00
Laurent Destailleur
4bcee36349 Fix: aa? 2011-04-08 17:01:03 +00:00
Regis Houssin
b5406c704a Fix: missing product triggers 2011-04-06 13:32:45 +00:00
Laurent Destailleur
93eaf722a1 Fix: Missing include 2011-04-03 23:07:18 +00:00
Laurent Destailleur
5b74a5aa9a Fix: bug #32920 : Commercial -> Customers area (missing customer and suppliers name 2011-04-03 18:53:31 +00:00
Regis Houssin
8cbdcb9c20 Fix: bad post 2011-04-01 15:27:34 +00:00
Regis Houssin
6c2b1f5244 Fix: add function for switch to another entity 2011-04-01 09:54:49 +00:00
Juanjo Menent
2548c1d2a4 Fix: Standing Order display mistmach 2011-04-01 08:13:47 +00:00
Regis Houssin
2297e940b3 Fix: last modification for multicompany 2011-03-31 19:41:03 +00:00
Laurent Destailleur
9635f5858a Fix: release candidate was not correctly ordered. This make upgrade process fails. 2011-03-30 19:37:34 +00:00
Laurent Destailleur
c4f40462d1 Fix: Lost field 2011-03-28 08:57:54 +00:00
Laurent Destailleur
c0b5a25430 Fix: Can not remove a file 2011-03-28 08:25:54 +00:00
Laurent Destailleur
0a0e426e40 Add option MAIN_MAIL_EMAIL_INLINE_IMAGES to activate inline attachment because inline attachment not supported by all mails readers and antispams. 2011-03-25 22:54:48 +00:00
Laurent Destailleur
4fee09738b Fix: Bad cache management 2011-03-25 20:02:02 +00:00
Regis Houssin
28116d13fb Fix: best compatibility with all mail clients 2011-03-25 19:17:29 +00:00
Regis Houssin
f298f302ff Fix: problem for delete an attach file 2011-03-25 19:15:37 +00:00
Regis Houssin
2af2280006 Fix: problem with image in emailing
Fix: use the same image path of fckeditor default path
2011-03-23 17:24:26 +00:00
Laurent Destailleur
11c2a7c076 Fix: Empty string if civility not defined 2011-03-23 16:07:39 +00:00
Regis Houssin
bf8b8f180f Fix: problem with linkedobjectblock template 2011-03-22 11:44:17 +00:00
Regis Houssin
745acdf313 Fix: missing contactid and socid
Fix: missing contact in event if no company
2011-03-22 11:29:17 +00:00
Laurent Destailleur
609d01d386 Fix: Restore previous version. Change contains new features not compatible with version. 2011-03-21 22:58:13 +00:00
Regis Houssin
e4a32f2d23 Fix: no total amount 2011-03-21 19:25:28 +00:00
Regis Houssin
db04e91f06 Fix: uniformize code 2011-03-21 17:49:25 +00:00
Laurent Destailleur
eaac97256e Prepare 3.0.0 release 2011-03-20 23:20:48 +00:00
Laurent Destailleur
f4817de2d0 Fix: PDF for check receipts 2011-03-20 17:35:06 +00:00
Laurent Destailleur
b2b5505304 New: Removed limit on cheque receipts 2011-03-20 16:55:43 +00:00
Laurent Destailleur
051d6f5ce8 Fix: Separator for chinese 2011-03-18 22:37:36 +00:00
Regis Houssin
7fdf1d8f3b Fix: best negation 2011-03-18 14:13:09 +00:00
Laurent Destailleur
b4123e4e4c Try a better fix. This also fix when year is on 4 digits. 2011-03-18 11:35:00 +00:00
Regis Houssin
99ea8e6bf0 Fix: add different order
Fix: the + sign must be outside the parentheses
2011-03-18 11:16:09 +00:00
Laurent Destailleur
9229f8799a Fix: Restore broken feature. Reset of number can not be done if year-month in correct order. 2011-03-18 11:00:51 +00:00
Laurent Destailleur
e99e7973df Fix: Parameter pb. 2011-03-18 10:05:16 +00:00
Laurent Destailleur
81f58fe8ff Fix: UTF encoding in web services 2011-03-18 09:54:01 +00:00
Regis Houssin
eaf3e2a3ec Fix: missing socid 2011-03-16 12:04:51 +00:00
Regis Houssin
8e912dde63 Fix: bad object name 2011-03-16 11:54:47 +00:00
Laurent Destailleur
1d12f8e188 Fix: clean parameter 2011-03-16 11:37:39 +00:00
Laurent Destailleur
7c54bbfd2e Fix: Menu was not complete 2011-03-16 11:21:04 +00:00
Laurent Destailleur
5e00e2dc15 Fix: Permission check on bank account 2011-03-16 10:57:12 +00:00
Regis Houssin
7586204aad Fix: missing trad 2011-03-14 12:02:08 +00:00
Regis Houssin
f32e92dbcd Fix: rights problem 2011-03-14 10:38:45 +00:00
Regis Houssin
ec33c4a999 Fix: compatibility with postgresql 2011-03-14 09:42:32 +00:00
Laurent Destailleur
4987bec341 Fix: Bad file name 2011-03-13 23:06:41 +00:00
Laurent Destailleur
981aa4e0df Fix: Bad link for .css.php and .js.php files 2011-03-13 22:57:56 +00:00
Laurent Destailleur
1b926f6a7e Fix: Bad variable 2011-03-13 16:22:28 +00:00
Laurent Destailleur
508f581bca Fix: Description was not visible 2011-03-13 00:08:14 +00:00
Laurent Destailleur
0374d9836f Fix: Description was not visible 2011-03-12 23:50:28 +00:00
Laurent Destailleur
ee15efdd7e Fix: Uniformize field type. This also fix postgreql compatibility. 2011-03-12 23:37:28 +00:00
Laurent Destailleur
98025222e0 Fix: Bad variable 2011-03-12 17:00:37 +00:00
Laurent Destailleur
575661eddc Fix: Bad url 2011-03-12 16:38:42 +00:00
Laurent Destailleur
126f170122 Fix: SQL Error 2011-03-11 18:40:27 +00:00
Laurent Destailleur
666fc9b91d Fix: missing line return 2011-03-09 19:47:50 +00:00
Laurent Destailleur
692f19db2a Fix : Missing argument 5 for pdf_propale_jaune::_tableau() 2011-03-09 19:36:35 +00:00
Laurent Destailleur
88293c9ab8 Perf: Optimize images to increase google speed score 2011-03-09 18:33:25 +00:00
Laurent Destailleur
dd80a7854b file topmenu_right.png was added on branch DOLIBARR_3_0_BRANCH on 2011-03-09 18:33:24 +0000 2011-03-09 17:04:53 +00:00
Laurent Destailleur
a34358fe00 file topmenu_bg.png was added on branch DOLIBARR_3_0_BRANCH on 2011-03-09 18:33:25 +0000 2011-03-09 17:04:53 +00:00
Laurent Destailleur
420c7309f7 Fix: Missing global var 2011-03-09 15:33:39 +00:00
Regis Houssin
123fab92d3 Fix: origin and origin_id always in the fetch 2011-03-09 13:06:45 +00:00
Laurent Destailleur
6671e8cf5b Fix: Missing title 2011-03-09 11:00:40 +00:00
Laurent Destailleur
4126b6149f Fix: Bad picto for status 2011-03-09 10:55:27 +00:00
Regis Houssin
f822a03a82 Fix: missing line return 2011-03-09 10:50:55 +00:00
Laurent Destailleur
f0a15ff975 Fix: pgsql compatibility 2011-03-09 10:47:17 +00:00
Regis Houssin
737eb57b33 Fix: uniformize code 2011-03-09 10:35:57 +00:00
Laurent Destailleur
4e1d689bf8 Fix: pgsql compatibility 2011-03-09 10:27:19 +00:00
Laurent Destailleur
0ffc86fe02 Fix: pgsql compatibility 2011-03-09 10:12:21 +00:00
Laurent Destailleur
22a26b9e2b Fix: pgsql compatibility 2011-03-09 10:07:42 +00:00
Regis Houssin
8b1b3ef1b3 Fix: problem with specific numbering module 2011-03-09 10:04:17 +00:00
Laurent Destailleur
fe212f729f Fix: Migrate pb with pgsql. We can do like this because field is not used yet. 2011-03-09 09:35:45 +00:00
Laurent Destailleur
26c3bd4993 Fix: Error in pgsql upgrade 2011-03-09 02:02:38 +00:00
Laurent Destailleur
f142d4f0f1 Fix: Avoid warning 2011-03-08 16:39:25 +00:00
Laurent Destailleur
42343a1206 Fix: Link betwen supplier order and invoice 2011-03-08 00:17:56 +00:00
Laurent Destailleur
6110ec4b2a Fix: Missing br 2011-03-08 00:04:33 +00:00
Laurent Destailleur
6a610e6518 A better way to block injections 2011-03-07 23:15:31 +00:00
Regis Houssin
8abbf6a537 Fix: add global $main_force_https 2011-03-07 17:32:11 +00:00
Laurent Destailleur
b75f610ec1 Fix: Do not show not year dir 2011-03-07 02:13:10 +00:00
Laurent Destailleur
72459ac35c Fix: Error when cloning invoice with discount 2011-03-07 02:06:57 +00:00
Laurent Destailleur
52ee7183d9 Fix: Better error management in export 2011-03-07 00:57:21 +00:00
Laurent Destailleur
5741b19203 Fix: Generated doc in wrong dir 2011-03-07 00:40:12 +00:00
Laurent Destailleur
f07557f6ec Fix: Generated doc in wrong dir 2011-03-07 00:17:20 +00:00
Laurent Destailleur
0317ae75de Fix: Generated doc in wrong dir 2011-03-06 23:45:47 +00:00
Regis Houssin
5311001ae2 Fix: clean PHP_SELF for prevent XSS attack 2011-03-06 20:44:51 +00:00
Laurent Destailleur
e76290c767 Fix: Add warning for uncomplete setup 2011-03-05 18:22:47 +00:00
Laurent Destailleur
385d75f0e2 Better test 2011-03-05 11:36:53 +00:00
Laurent Destailleur
8d8629eab9 Fix: Increase timeout 2011-03-05 01:53:42 +00:00
Laurent Destailleur
390214e265 Fix: Error message was not visible 2011-03-05 01:08:44 +00:00
Laurent Destailleur
99b300f01b Fix: Can edit product description 2011-03-05 00:51:37 +00:00
Laurent Destailleur
025e887e04 Fix: Can edit product description 2011-03-05 00:47:46 +00:00
Laurent Destailleur
e54bfd21b7 Fix: Due date was wrong when cloning 2011-03-05 00:38:31 +00:00
Regis Houssin
d9dea81e75 Fix: Enabled if the installation process is "https://"
Fix: use complete alternative url
2011-03-04 11:42:06 +00:00
Laurent Destailleur
86801c2e8a Prepare build of modules for 3.0 2011-03-03 19:35:16 +00:00
Regis Houssin
6f11d1e28e Fix: possibility to personnalized label of propal status 2011-03-03 18:41:00 +00:00
Regis Houssin
8336e81b95 Fix: possibility to personnalized label of propal status 2011-03-03 18:37:32 +00:00
Laurent Destailleur
57b12edbbb Fix: Packager errors 2011-03-02 11:56:51 +00:00
Laurent Destailleur
731cb8d806 Fix: Packager errors 2011-03-02 11:52:07 +00:00
Laurent Destailleur
1c00dead1c Fix: Packager errors 2011-03-02 11:46:38 +00:00
Laurent Destailleur
f5ad2692f5 Fix: Missing property 2011-03-02 10:29:10 +00:00
Laurent Destailleur
2a3c726f41 Fix: Use defined variable 2011-03-02 09:58:45 +00:00
Laurent Destailleur
635f9ce3aa Fix: Bad var 2011-03-01 23:25:28 +00:00
Laurent Destailleur
919ea45ccb Fix: Bad var 2011-03-01 23:22:19 +00:00
Regis Houssin
ad8bf92d98 Fix: empty user object 2011-03-01 23:07:56 +00:00
Laurent Destailleur
130c89a18c Fix: Remove warning 2011-03-01 23:01:16 +00:00
Regis Houssin
dfbe0c78dc Fix: bad field name 2011-03-01 22:45:58 +00:00
Laurent Destailleur
0d47653e14 Fix: Can not create replacement invoice if source invoice has a discount. 2011-03-01 10:40:55 +00:00
Laurent Destailleur
500d60fc7e Fix: Error management 2011-03-01 10:27:40 +00:00
Laurent Destailleur
608ad7c688 Fix: Use JUMP tag 2011-03-01 09:37:19 +00:00
Laurent Destailleur
d34a653734 Fix: Remove sql error when no link 2011-03-01 09:33:59 +00:00
Laurent Destailleur
eee0d1aa07 Fix: Restore ability to create order on proposal close 2011-03-01 09:04:30 +00:00
Laurent Destailleur
8348de5591 Fix: Package build 2011-02-27 22:40:58 +00:00
Laurent Destailleur
cb7c17e11a Fix: Package build 2011-02-27 22:27:47 +00:00
Laurent Destailleur
468d79e8c4 Fix: Bad url param 2011-02-27 16:57:21 +00:00
Laurent Destailleur
a06a1cb25c Fix: Bad link 2011-02-26 14:23:57 +00:00
Laurent Destailleur
9aebe0d1ba Fix: Hide not required fields 2011-02-26 10:22:47 +00:00
Laurent Destailleur
d452049790 Fix: Bad parameter 2011-02-26 02:55:35 +00:00
Laurent Destailleur
fc1087ac8d New: Autofill check sender if type is cheque 2011-02-26 02:18:54 +00:00
Laurent Destailleur
a069c1ce63 Fix: error 2011-02-26 01:57:00 +00:00
Laurent Destailleur
180ca71367 Fix: Bad translation key 2011-02-25 19:00:23 +00:00
Laurent Destailleur
5f42ab9d65 Fix: Bad condition to enable menu 2011-02-25 18:37:15 +00:00
Laurent Destailleur
6a590ffec8 Fix: Module not disabled 2011-02-25 18:33:44 +00:00
Laurent Destailleur
829b8e98ad Fix: Avoid tooltip errors when content too large 2011-02-25 18:21:14 +00:00
Regis Houssin
ab4a1af224 New: add function to sort the total qty of products or/and services 2011-02-24 15:22:30 +00:00
Laurent Destailleur
1970a5dda9 Fix: Missing table of ordering methods in dictionnary. 2011-02-23 15:28:42 +00:00
Laurent Destailleur
51c1cfed8a Fix: Missing JUMP_TAG 2011-02-23 14:24:59 +00:00
Laurent Destailleur
86fb0aa1b7 Fix: Postgresql compatibility 2011-02-23 12:56:10 +00:00
Laurent Destailleur
598e87ab62 Fix: By default workflow is empty 2011-02-23 12:35:36 +00:00
Laurent Destailleur
03c82f3dee Rename status 2011-02-23 08:55:35 +00:00
Regis Houssin
115d08b4d7 Fix: choice clause OR/AND 2011-02-22 17:51:07 +00:00
Regis Houssin
424eabd13c Fix: compatibility with element and subelement 2011-02-22 16:01:17 +00:00
Laurent Destailleur
41f73f57a3 Fix: Exclude deposit invoices from reports 2011-02-22 09:15:51 +00:00
Laurent Destailleur
ab7ffebf83 Fix: Removed bad style 2011-02-22 09:02:14 +00:00
Laurent Destailleur
a2a20ab527 Trans 2011-02-22 08:50:07 +00:00
Laurent Destailleur
216d786638 Add vat rate for new zealand 2011-02-22 08:40:40 +00:00
Laurent Destailleur
c26f78516c Fix: Filter on categories failed 2011-02-20 16:22:28 +00:00
Laurent Destailleur
1900a96ca6 Add new zeland language 2011-02-20 16:06:19 +00:00
Laurent Destailleur
0324b532f8 Add new zeland language 2011-02-20 16:01:09 +00:00
Laurent Destailleur
fa0d06dd8c file main.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-02-20 16:01:11 +0000 2011-02-20 16:00:30 +00:00
Laurent Destailleur
e291c209e6 file companies.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-02-20 16:01:09 +0000 2011-02-20 16:00:30 +00:00
Laurent Destailleur
d8c92fd210 file compta.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-02-20 16:01:11 +0000 2011-02-20 16:00:29 +00:00
Laurent Destailleur
738d327fcf file .cvsignore was added on branch DOLIBARR_3_0_BRANCH on 2011-02-20 16:01:11 +0000 2011-02-20 16:00:29 +00:00
Laurent Destailleur
5e1ebe9de3 Fix: Missing events 2011-02-20 15:39:03 +00:00
Laurent Destailleur
cb6f960b42 Fix: Page code into PDF 2011-02-20 15:23:22 +00:00
Laurent Destailleur
96e05a0363 Fix: Bad link 2011-02-20 15:08:11 +00:00
Laurent Destailleur
ceccedcac0 Add creation of dir for documents 2011-02-20 14:34:20 +00:00
Laurent Destailleur
5c5682998c Fix: Wrong target in menu 2011-02-19 10:45:15 +00:00
Laurent Destailleur
cd19b1f2d6 Fix: Export was missing records 2011-02-18 17:06:08 +00:00
Laurent Destailleur
035bc672a8 Fix: Look 2011-02-16 19:29:21 +00:00
Laurent Destailleur
d8004865b1 Fix: Bad links 2011-02-16 12:59:27 +00:00
Laurent Destailleur
5c9300ac39 Fix: Missing parameter of function 2011-02-13 16:00:50 +00:00
Laurent Destailleur
47e5bd9bf1 Fix: SQL syntax 2011-02-12 22:35:02 +00:00
Regis Houssin
5c0f95db44 Fix: error message not visible 2011-02-12 08:13:40 +00:00
Regis Houssin
1c06114383 Fix: PostgreSQL compatibility 2011-02-12 07:07:14 +00:00
Regis Houssin
af97652c9b Fix: PostgreSQL compatibility 2011-02-12 06:48:02 +00:00
Laurent Destailleur
cc39ca7287 Fix: sql syntax error 2011-02-11 19:50:18 +00:00
Laurent Destailleur
e1db0ef946 Fix: sql syntax error 2011-02-11 19:32:55 +00:00
Regis Houssin
6e90b6c082 New: add translation for proxmox appliance 2011-02-11 14:26:59 +00:00
Regis Houssin
9dd6c64b38 New: add translation for proxmox appliance 2011-02-11 10:56:39 +00:00
Laurent Destailleur
4b49bae945 Fix: W3C 2011-02-10 18:55:23 +00:00
Laurent Destailleur
5240a5d7cf Fix: Fails if old constants was saved 2011-02-10 08:24:31 +00:00
Laurent Destailleur
05da13c469 Fix: Fails if old constants was saved 2011-02-10 08:20:47 +00:00
Laurent Destailleur
fbdccb217a Fix: Wrong order of name/firstname 2011-02-09 18:19:55 +00:00
Laurent Destailleur
092f0dcf77 Fix: Error when amount not provided 2011-02-09 17:43:36 +00:00
Laurent Destailleur
3617a36f06 Fix: Error when duplicate ref 2011-02-09 17:28:46 +00:00
Laurent Destailleur
0a7cdf53e7 Fix: Missing trans 2011-02-09 15:07:07 +00:00
Laurent Destailleur
e113c84745 Fix: Missing style 2011-02-09 12:03:49 +00:00
Laurent Destailleur
9f8d5f75a6 Fix: Debian package 2011-02-09 11:54:01 +00:00
Laurent Destailleur
769ae718f8 Fix: Debian package 2011-02-09 11:34:35 +00:00
Laurent Destailleur
920b521a2c Rename label 2011-02-09 11:05:32 +00:00
Laurent Destailleur
0baaf26d2d Fix: Debian package 2011-02-09 10:33:56 +00:00
Laurent Destailleur
29bb629ded Prepare RC 2011-02-09 10:08:39 +00:00
Laurent Destailleur
b96bd1a929 Prepare RC1 2011-02-09 09:28:14 +00:00
Laurent Destailleur
14243f4120 Prepare RC1 2011-02-09 09:20:16 +00:00
Laurent Destailleur
3c04c18a54 Prepare RC1 2011-02-09 09:14:19 +00:00
Regis Houssin
588388f2e8 Fix: missing class 2011-02-08 11:02:26 +00:00
Laurent Destailleur
8021b51fe1 Fix: Trans 2011-02-07 19:31:11 +00:00
Laurent Destailleur
c5772a56eb Fix: Trans 2011-02-07 19:26:01 +00:00
Laurent Destailleur
b931a59da1 Fix: Missing order 2011-02-07 18:37:34 +00:00
Laurent Destailleur
4392776bfb Fix: Position in pdf 2011-02-07 18:30:25 +00:00
Regis Houssin
da921bb973 Fix: banck to bank 2011-02-07 16:12:17 +00:00
Laurent Destailleur
eb7fd25ced Fix: Edit of bank accountancy code 2011-02-07 16:04:41 +00:00
Laurent Destailleur
973c98aa31 Fix: Bad style 2011-02-07 15:10:48 +00:00
Laurent Destailleur
3f59e585d0 Fix: Missing trans 2011-02-07 14:54:41 +00:00
Regis Houssin
2b1ace1b8c Fix: automatic selection when it was found that a value becomes an option, as can cause problems when creating 2011-02-07 14:18:53 +00:00
Laurent Destailleur
ecc11e39b3 Fix: rounding price 2011-02-07 00:11:24 +00:00
Laurent Destailleur
6a275e9c64 Fix: Menu not visible 2011-02-06 23:57:44 +00:00
Laurent Destailleur
73c9295178 Fix: Missing trans 2011-02-06 23:03:42 +00:00
Laurent Destailleur
fdbf579d25 Fix: Missing back link 2011-02-06 18:15:49 +00:00
Laurent Destailleur
f0f200295a Clean phpunit tests 2011-02-06 17:56:40 +00:00
Laurent Destailleur
0b935cabdf Update demo profiles 2011-02-06 17:48:44 +00:00
Laurent Destailleur
4356eb8b16 Fix: Script to load demo works with sudo and all versions 2011-02-06 12:27:08 +00:00
Laurent Destailleur
f46c148fc6 Fix: Script to load demo works with sudo and all versions 2011-02-06 12:04:30 +00:00
Laurent Destailleur
6cf20da188 Fix: Help 2011-02-06 11:23:41 +00:00
Laurent Destailleur
c9cd90b19e Fix: Use delete function instead of remove 2011-02-06 10:58:42 +00:00
Laurent Destailleur
cd51211292 Fix: Bad value of selected year 2011-02-06 02:02:33 +00:00
Laurent Destailleur
5c25d43473 Fix: Position of bank information 2011-02-05 15:21:43 +00:00
Laurent Destailleur
eabf281c20 Fix: Remove deprecated code 2011-02-05 02:32:04 +00:00
Laurent Destailleur
3972267c3b Fix: ajax select of company works with keyboard 2011-02-05 02:30:13 +00:00
Laurent Destailleur
f4433923b7 Fix: Menu entry must not be enabled if module disabled 2011-02-05 01:05:04 +00:00
Laurent Destailleur
a4853e4d31 Fix: Pb with Chrome 2011-02-03 22:11:49 +00:00
Laurent Destailleur
296d8e490d Fix: Pb with Chrome 2011-02-03 22:06:05 +00:00
Laurent Destailleur
23da34b339 Fix: Pb with Chrome 2011-02-03 22:00:54 +00:00
Laurent Destailleur
a8409589bc Fix: Bad order 2011-02-03 00:44:39 +00:00
Laurent Destailleur
73437223d8 Fix: Init at the wrong place 2011-02-02 19:39:02 +00:00
Laurent Destailleur
fa95cb2540 Exclude dir from package 2011-02-02 18:14:21 +00:00
Laurent Destailleur
c4ae5968b2 Can build a snapshot on 3.0 version 2011-02-02 17:04:29 +00:00
Laurent Destailleur
850cf003f1 Fix: Changelog was not CVS tagged 2011-02-02 16:54:08 +00:00
Laurent Destailleur
133ef22ef8 Fix: Doxygen 2011-02-02 16:45:42 +00:00
Laurent Destailleur
416c2cb93e Fix: Use bad language file 2011-02-02 16:45:12 +00:00
Laurent Destailleur
74ba59f8d3 Fix: Use bad parameter 2011-02-02 14:04:30 +00:00
Laurent Destailleur
4a1b8d2c70 Fix: Missing a test 2011-02-02 13:30:43 +00:00
Laurent Destailleur
11bf3e9f4d Fix: Update vat check 2011-01-31 23:15:21 +00:00
Laurent Destailleur
594d8db7cf Fix: Missing trans 2011-01-31 18:54:56 +00:00
Laurent Destailleur
d91663e97b Fix: Bad label 2011-01-30 23:13:05 +00:00
Regis Houssin
aa9ccb41cc Fix: bad restricted view of company 2011-01-30 13:56:05 +00:00
Regis Houssin
8b534d1391 Fix: debug permissions 2011-01-30 13:43:59 +00:00
Regis Houssin
be18f46b4a Fix: bad restricted view of company 2011-01-30 13:00:02 +00:00
Laurent Destailleur
3ed533fc7e Fix: Bad parameter 2011-01-30 12:42:31 +00:00
Regis Houssin
8baee6658f Fix: debug multicompany 2011-01-30 11:36:42 +00:00
Laurent Destailleur
19920dd2a7 Remove stupid links 2011-01-29 18:50:13 +00:00
Regis Houssin
6ccb3dcc98 Fix: problem with price_min in mutli-price mode
Fix: mutualize code
Fix: htmlname for product search ajax is "idprod" by default
Todo: code of contract card is obsolete
2011-01-29 17:31:28 +00:00
Laurent Destailleur
bbef42e594 Fix: Function dol_buildlogin 2011-01-29 17:01:04 +00:00
Regis Houssin
1761aca350 Fix: problem with price_min in mutli-price mode 2011-01-29 16:30:41 +00:00
Laurent Destailleur
80ed70d32e Fix: Do not show supplier code if module not enabled 2011-01-29 15:57:25 +00:00
Regis Houssin
c41f26fb0a Fix: use the good price min with multiprice 2011-01-28 11:44:36 +00:00
Regis Houssin
8f32052fe1 Fix: $soc redefined to $buyer 2011-01-28 08:49:38 +00:00
Laurent Destailleur
8796cc5aad Fix: Bad trans 2011-01-27 20:43:46 +00:00
Laurent Destailleur
9f5687decb Fix: Bad request 2011-01-26 22:33:14 +00:00
Laurent Destailleur
3e27fb9d97 Fix: Hide if supplier module is disabled 2011-01-26 19:41:51 +00:00
Laurent Destailleur
e40cef2b85 Fix: Bad trans 2011-01-26 18:59:49 +00:00
Laurent Destailleur
98605f08ac Fix: PDF font for ar_AR 2011-01-26 15:49:04 +00:00
Laurent Destailleur
bf64059357 Fix: Remove warning 2011-01-26 15:35:58 +00:00
Laurent Destailleur
767da4d86a Remove warning 2011-01-26 15:30:38 +00:00
Laurent Destailleur
e4b445fcb1 Fix: Test if child exists to avoid error 2011-01-26 13:45:05 +00:00
Laurent Destailleur
20dea64979 Fix: Direction was lost when using cache 2011-01-26 12:51:52 +00:00
Laurent Destailleur
e1b50e4456 Fix: Direction was lost when using cache 2011-01-26 12:07:01 +00:00
Laurent Destailleur
014cf0b1e6 Fix: Direction was lost when using cache 2011-01-26 11:36:15 +00:00
Laurent Destailleur
c10a1d7d4e Fix: Missing image 2011-01-26 10:01:35 +00:00
Laurent Destailleur
1b644466b2 Fix: Style sheet can be into cache now. 2011-01-25 01:32:45 +00:00
Laurent Destailleur
818742f8d1 Fix: use canvas when option not enabled 2011-01-23 23:00:39 +00:00
Laurent Destailleur
66eda574ea Fix: Translation 2011-01-23 22:38:06 +00:00
Laurent Destailleur
eba944b80b Fix: use canvas when option not enabled 2011-01-23 22:31:44 +00:00
Laurent Destailleur
9c823a7310 Fix: use canvas when option not enabled 2011-01-23 22:26:10 +00:00
Regis Houssin
0525fb8f64 Fix: reversal fields
Fix: same order with state
2011-01-23 20:08:10 +00:00
Laurent Destailleur
115e5e5243 Fix: Missing translation 2011-01-23 18:45:55 +00:00
Laurent Destailleur
4f64548061 Fix: Missing test if module supplier is on 2011-01-23 16:56:26 +00:00
Laurent Destailleur
820722f113 Fix: Trad of bookmarks 2011-01-23 13:57:03 +00:00
Laurent Destailleur
49d98fcb6f file bookmarks.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-23 13:57:25 +0000 2011-01-23 13:56:57 +00:00
Laurent Destailleur
864c15afe1 file bookmarks.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-23 13:57:24 +0000 2011-01-23 13:56:55 +00:00
Laurent Destailleur
d9e7c6b71d file bookmarks.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-23 13:57:23 +0000 2011-01-23 13:56:55 +00:00
Laurent Destailleur
222d123800 Fix: Trad 2011-01-23 13:54:49 +00:00
Laurent Destailleur
8dc2a9b2c9 Fix: Wrong value for permissions id 2011-01-22 10:38:05 +00:00
Laurent Destailleur
e2fcf23985 Fix: Size of picto 2011-01-22 09:54:55 +00:00
Laurent Destailleur
65b543c1bf Fix: Size of picto 2011-01-22 09:54:01 +00:00
Laurent Destailleur
ed5f26ac02 Fix: Web service call 2011-01-22 09:42:08 +00:00
Regis Houssin
462fddd63a Fix: bad sql request 2011-01-21 18:26:23 +00:00
Regis Houssin
993c8a8bab Fix: use a negative value to not allow the sending of email marketing, only the test can 2011-01-21 11:00:04 +00:00
Laurent Destailleur
16a5028904 Fix: Removed deprecated warning 2011-01-21 08:33:24 +00:00
Laurent Destailleur
c3460f2d41 Fix: Slovenian language code is sl_SI 2011-01-20 22:12:02 +00:00
Laurent Destailleur
a9918d8818 Fix: Bad link 2011-01-20 22:07:16 +00:00
Laurent Destailleur
d2fb25ef24 file gpl.txt was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:13 +0000 2011-01-20 22:01:30 +00:00
Laurent Destailleur
f097b11967 file users.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:04 +0000 2011-01-20 22:01:29 +00:00
Laurent Destailleur
89adc77bd1 file shop.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:03 +0000 2011-01-20 22:01:29 +00:00
Laurent Destailleur
f42250d0be file propal.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:05 +0000 2011-01-20 22:01:29 +00:00
Laurent Destailleur
b02b67bce2 file projects.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:04 +0000 2011-01-20 22:01:29 +00:00
Laurent Destailleur
ff02f5ca03 file products.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:05 +0000 2011-01-20 22:01:29 +00:00
Laurent Destailleur
92897d5cca file paybox.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:03 +0000 2011-01-20 22:01:29 +00:00
Laurent Destailleur
f6870bcaa5 file other.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:06 +0000 2011-01-20 22:01:29 +00:00
Laurent Destailleur
f46a6e62fd file oscommerce.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:05 +0000 2011-01-20 22:01:29 +00:00
Laurent Destailleur
ec3e706051 file orders.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:04 +0000 2011-01-20 22:01:29 +00:00
Laurent Destailleur
f48cb64447 file main.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:04 +0000 2011-01-20 22:01:29 +00:00
Laurent Destailleur
380cfe87b8 file mails.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:05 +0000 2011-01-20 22:01:29 +00:00
Laurent Destailleur
0c51cc4d6e file ldap.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:04 +0000 2011-01-20 22:01:29 +00:00
Laurent Destailleur
306aec52c3 file languages.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:05 +0000 2011-01-20 22:01:29 +00:00
Laurent Destailleur
4bc4316d86 file interventions.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:06 +0000 2011-01-20 22:01:29 +00:00
Laurent Destailleur
b2ba52247c file install.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:04 +0000 2011-01-20 22:01:29 +00:00
Laurent Destailleur
8a1a542d95 file help.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:03 +0000 2011-01-20 22:01:29 +00:00
Laurent Destailleur
a34206e6e6 file ftp.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:05 +0000 2011-01-20 22:01:29 +00:00
Laurent Destailleur
da3e3a6616 file domains.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:03 +0000 2011-01-20 22:01:29 +00:00
Laurent Destailleur
49368b5d5b file deliveries.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:05 +0000 2011-01-20 22:01:29 +00:00
Laurent Destailleur
d690261eba file contracts.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:05 +0000 2011-01-20 22:01:29 +00:00
Laurent Destailleur
cfbe8515c1 file companies.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:05 +0000 2011-01-20 22:01:29 +00:00
Laurent Destailleur
7811037f48 file commercial.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:04 +0000 2011-01-20 22:01:29 +00:00
Laurent Destailleur
a5c350f169 file bills.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:04 +0000 2011-01-20 22:01:29 +00:00
Laurent Destailleur
0829fd31ef file agenda.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:03 +0000 2011-01-20 22:01:29 +00:00
Laurent Destailleur
93367e9d57 file withdrawals.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:03 +0000 2011-01-20 22:01:28 +00:00
Laurent Destailleur
1b31edf654 file trips.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:04 +0000 2011-01-20 22:01:28 +00:00
Laurent Destailleur
98b62da53e file suppliers.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:05 +0000 2011-01-20 22:01:28 +00:00
Laurent Destailleur
697d314970 file stocks.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:03 +0000 2011-01-20 22:01:28 +00:00
Laurent Destailleur
08b1f16306 file sendings.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:03 +0000 2011-01-20 22:01:28 +00:00
Laurent Destailleur
66f0676909 file products_livre.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:04 +0000 2011-01-20 22:01:28 +00:00
Laurent Destailleur
1cb871e295 file paypal.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:04 +0000 2011-01-20 22:01:28 +00:00
Laurent Destailleur
5320e8c2c9 file members.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:03 +0000 2011-01-20 22:01:28 +00:00
Laurent Destailleur
12812ef28b file exports.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:04 +0000 2011-01-20 22:01:28 +00:00
Laurent Destailleur
f790f36a62 file errors.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:05 +0000 2011-01-20 22:01:28 +00:00
Laurent Destailleur
86f811aeee file energy.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:03 +0000 2011-01-20 22:01:28 +00:00
Laurent Destailleur
7633e2ecf4 file ecm.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:04 +0000 2011-01-20 22:01:28 +00:00
Laurent Destailleur
2adc0e5710 file donations.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:05 +0000 2011-01-20 22:01:28 +00:00
Laurent Destailleur
ef08148a47 file dict.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:05 +0000 2011-01-20 22:01:28 +00:00
Laurent Destailleur
6ac1deb70b file compta.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:05 +0000 2011-01-20 22:01:28 +00:00
Laurent Destailleur
a84544e916 file categories.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:04 +0000 2011-01-20 22:01:28 +00:00
Laurent Destailleur
f11b9bbf6d file cashdesk.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:06 +0000 2011-01-20 22:01:28 +00:00
Laurent Destailleur
dcd2e50ac4 file boxes.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:03 +0000 2011-01-20 22:01:28 +00:00
Laurent Destailleur
5036cae36c file bookmarks.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:05 +0000 2011-01-20 22:01:28 +00:00
Laurent Destailleur
61871f6f7b file banks.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:05 +0000 2011-01-20 22:01:28 +00:00
Laurent Destailleur
9d21bdfddb file admin.lang was added on branch DOLIBARR_3_0_BRANCH on 2011-01-20 22:12:04 +0000 2011-01-20 22:01:28 +00:00
Laurent Destailleur
2d936e86c0 Fix: Bad detection of country 2011-01-19 16:50:27 +00:00
Laurent Destailleur
7360bc1b6f Fix: Removed warnings 2011-01-19 16:43:55 +00:00
Laurent Destailleur
3a1da723e2 Fix licence information 2011-01-19 15:28:59 +00:00
Laurent Destailleur
2a96589009 Fix: bug #32006 : Catégories d'adhérents 2011-01-19 15:15:10 +00:00
Laurent Destailleur
69aee95b21 Fix: bug #31902 : CLIENT CATEGORY SUPPRESS 2011-01-19 15:08:14 +00:00
Laurent Destailleur
8a58ab981e Fix: Must use same order than in menus 2011-01-19 11:26:43 +00:00
Laurent Destailleur
944277bc5e Fix: bug #31825 : Tri des taches par date du plus récent au plus ancien 2011-01-19 11:17:18 +00:00
Laurent Destailleur
9f81bd2c72 Fix: Hide things in print view 2011-01-19 10:51:54 +00:00
Laurent Destailleur
2d42ab0d35 Fix: bug #30985 : Lien du mail de regénération du mot de passe ne prends pas en compte https 2011-01-19 10:02:05 +00:00
Laurent Destailleur
333e7092ab Typo 2011-01-19 09:22:04 +00:00
Regis Houssin
5baa28b3bb Fix: rights problem in supplier module
Fix: bad closedir
2011-01-18 09:33:13 +00:00
Regis Houssin
0831bbd3bf Fix: private status is lost if change country 2011-01-18 09:08:21 +00:00
Laurent Destailleur
7d1cfe36e0 Doc 2011-01-18 08:53:29 +00:00
Regis Houssin
5ae3a2d35a Fix: use full option 2011-01-17 16:11:41 +00:00
Laurent Destailleur
916a9f7a39 Doc 2011-01-17 02:14:13 +00:00
393 changed files with 17571 additions and 11332 deletions

11
.gitignore vendored Normal file
View File

@@ -0,0 +1,11 @@
htdocs/conf/conf.php
htdocs/conf/conf.php.old
documents/
custom/
custom2/
nbproject
.settings/
.buildpath
default.properties
/.git
/.project

View File

@@ -1,4 +1,4 @@
#Sun Oct 03 22:45:56 CEST 2010
#Wed Feb 08 12:16:54 CET 2012
eclipse.preferences.version=1
encoding//build/exe/doliwamp/Languages=ISO-8859-1
encoding//htdocs/langs/fr_FR/other.lang=UTF-8

View File

@@ -1,3 +1,3 @@
#Wed Dec 01 20:46:32 CET 2010
#Sat Sep 17 16:07:47 CEST 2011
eclipse.preferences.version=1
include_path=
include_path=0;/dolibarrveryold

View File

@@ -2,7 +2,9 @@
License
-------
Dolibarr is distributed under GPL terms 2.0 (See COPYING file)
Dolibarr is released under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version
However it uses some external libraries under different licences. This is compatibility summary:

View File

@@ -1,4 +1,7 @@
--------------------------------------------------------------
English Dolibarr ChangeLog
$Id$
--------------------------------------------------------------
***** ChangeLog for 3.0 compared to 2.9 *****
@@ -6,7 +9,7 @@ For users:
- New: Can edit date of cheque receipts.
- New: Add Sales journal and Purchase journal report.
- New: Can create supplier invoice from supplier order.
New: Support login by openid
- New: Support login by openid
- New: Support "full day" event in calendar module.
- New: Add a weather on dashboard.
- New: Add a Paypal module.
@@ -69,6 +72,7 @@ For users:
readers when using "mail php function".
- Fix: When cloning commercial proposal, due date is creation date + delay
by default.
- Fix: Can edit ordering methods.
For translators:
- New: Update and complete slovenian language sl_SL.
@@ -84,6 +88,9 @@ For developers:
- New: Add first Selenium GUI tests.
- New: Enhance a lot of internal function to build external modules
more easily.
- New: Add a user field ref_ext in object tables to allow external
systems to store their id and make self-developed synchronizing
functions easier to build.
- New: Local user timezone is saved into session (not used yet).
- New: Works with Mysql 5.5.
- Qual: Menu system code is simpler.

View File

@@ -7,7 +7,9 @@ makepack-google.conf
module_google-*.tgz
module_pibarcode-1.0.tgz
*.exe
*.tgz
*.torrent
*.zip
version-phpsane.txt
makepack-phpsane.conf
html

View File

@@ -9,7 +9,7 @@ Section: web
Priority: optional
Recommends: mozilla | netscape
Homepage: http://www.dolibarr.org
Description: Dolibarr ERP/CRM
Description: Dolibarr ERP & CRM
Dolibarr ERP/CRM is an open source/free software for
small and medium companies, foundations or freelances. It includes
different features for Enterprise Resource Planning (ERP) and Customer

View File

@@ -1,6 +1,7 @@
[Desktop Entry]
# This file is used to add Ubuntu menu entry
# It must be saved into directory /usr/share/applications
Version=1.0
Encoding=UTF-8
Name=Dolibarr ERP/CRM
GenericName=Dolibarr ERP/CRM
@@ -10,7 +11,8 @@ Exec=xdg-open http://localhost/dolibarr
Icon=dolibarr
Terminal=false
Type=Application
Category=Application;Office
Category=Application;Office;
StartupNotify=true
InitialPreference=5
#NoDisplay=true
#OnlyShowIn=GNOME

View File

@@ -1,4 +1,6 @@
# This file seems to be useless for Ubuntu
# Good way to add menu on Ubuntu is adding file dolibarr.desktop
?package(dolibarr):needs="X11" section="Applications/File Management" \
title="Dolibarr" command="/usr/share/dolibarr/build/deb/rundolibarr.sh" icon="/usr/share/pixmaps/dolibarr.xpm"
?package(dolibarr):needs="X11" section="Applications/Office"\
title="Dolibarr ERP & CRM" longtitle="The manager for small and medium enterprises or foundations"\
description="Dolibarr ERP & CRM features agenda, orders, invoices and stock management, marketing campaigns, POS, etc."\
command="/usr/share/dolibarr/build/deb/rundolibarr.sh" icon="/usr/share/pixmaps/dolibarr.xpm"

View File

@@ -29,7 +29,7 @@ case "$1" in
# Copy include for apache.conf
fileorig="/usr/share/dolibarr/build/deb/apache.conf"
config="/etc/dolibarr/apache.conf"
mkdir -p /etc/dolibarr
mkdir -p /etc/dolibarr
cp -p $fileorig $config
# Create install.forced.php
@@ -49,6 +49,12 @@ case "$1" in
cat $fileorig | sed -e 's/__SUPERUSERLOGIN__/'$superuserlogin'/g' | sed -e 's/__SUPERUSERPASSWORD__/'$superuserpassword'/g' > $config
fi
# Create /var/lib/dolibarr/documents
mkdir -p /var/lib/dolibarr/documents
chown -R www-data.www-data /var/lib/dolibarr/documents;
chmod -R 775 /var/lib/dolibarr/documents;
chmod -R g+s /var/lib/dolibarr/documents;
# Create empty conf.php
if [ ! -f /usr/share/dolibarr/htdocs/conf/conf.php ]
then
@@ -120,18 +126,21 @@ case "$1" in
done
# Copy icon file
echo "Copy icon file"
fileorig="/usr/share/dolibarr/doc/images/dolibarr.xpm"
target="/usr/share/pixmaps/"
cp -p $fileorig $target
#echo "Copy icon file"
#fileorig="/usr/share/dolibarr/doc/images/dolibarr.xpm"
#target="/usr/share/pixmaps/"
#cp -f $fileorig $target
echo "Install menu entry"
#echo "Install menu entry"
# This one is for Gnome ubuntu
fileorig="/usr/share/dolibarr/build/deb/dolibarr.desktop"
target="/usr/share/applications/"
cp -p $fileorig $target
# Not sure this one is usefull
if test -x /usr/bin/update-menus; then update-menus; fi
#fileorig="/usr/share/dolibarr/build/deb/dolibarr.desktop"
#target="/usr/share/applications/"
#cp -f $fileorig $target
# Not sure this is usefull
if test -x /usr/bin/update-menus; then
echo "update-menus"
update-menus;
fi
# TODO Create the file to force parameters in Web installer
#if grep DBHOST /usr/share/dolibarr/htdocs/conf/conf.php > /dev/null

View File

@@ -221,11 +221,11 @@ case "$1" in
echo "postrm Force remove of /usr/share/dolibarr/htdocs/install"
rm -fr /usr/share/dolibarr/htdocs/install
echo "postrm Remove menu entry and image"
fileorig="/usr/share/applications/dolibarr.desktop"
rm -f $fileorig
fileorig="/usr/share/pixmaps/dolibarr.xpm"
rm -f $fileorig
#echo "postrm Remove menu entry and image"
#fileorig="/usr/share/applications/dolibarr.desktop"
#rm -f $fileorig
#fileorig="/usr/share/pixmaps/dolibarr.xpm"
#rm -f $fileorig
# Not sure this is usefull
if test -x /usr/bin/update-menus; then update-menus; fi
;;

View File

@@ -48,8 +48,8 @@
<release>
<Version>
<name>stable</name>
<created>2010-08-01</created>
<revision>2.9.0</revision>
<created>2011-02-09</created>
<revision>3.0.0</revision>
</Version>
</release>

View File

@@ -18,9 +18,9 @@
; ----- Change this -----
AppName=DoliWamp
; DoliWamp-x.x.x or DoliWamp-x.x.x-dev or DoliWamp-x.x.x-beta
AppVerName=DoliWamp-3.0.0-beta
AppVerName=DoliWamp-3.0.0
; DoliWamp-x.x x or DoliWamp-x.x.x-dev or DoliWamp-x.x.x-beta
OutputBaseFilename=DoliWamp-3.0.0-beta
OutputBaseFilename=DoliWamp-3.0.0
; Define full path from wich all relative path are defined
; You must modify this to put here your dolibarr root directory
SourceDir=C:\Work\Data\Workspace\dolibarr
@@ -35,7 +35,7 @@ AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql softwares.
AppCopyright=Copyright (C) 2008-2011 Laurent Destailleur, NLTechno
DefaultDirName=c:\dolibarr
DefaultGroupName=Dolibarr
LicenseFile=COPYING
;LicenseFile=COPYING
;Compression=none
Compression=lzma
SolidCompression=yes

View File

@@ -11,7 +11,7 @@ use Cwd;
$PROJECT="dolibarr";
$MAJOR="3";
$MINOR="0";
$BUILD="0-dev"; # Mettre x pour release, x-dev pour dev, x-beta pour beta, x-rc pour release candidate
$BUILD="0"; # Mettre x pour release, x-dev pour dev, x-beta pour beta, x-rc pour release candidate
$RPMSUBVERSION="1"; # A incrementer au moment de la release
@LISTETARGET=("TGZ","ZIP","RPM","DEB","EXE","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
@@ -104,6 +104,10 @@ my $batch=0;
for (0..@ARGV-1) {
if ($ARGV[$_] =~ /^-*target=(\w+)/i) { $target=$1; $batch=1; }
if ($ARGV[$_] =~ /^-*desti=(.+)/i) { $DESTI=$1; }
if ($ARGV[$_] =~ /^-*prefix=(.+)/i) {
$PREFIX=$1;
$FILENAMESNAPSHOT.="-".$PREFIX;
}
}
print "Makepack version $VERSION\n";
@@ -215,9 +219,11 @@ if ($nboftargetok) {
if ($nboftargetneedcvs)
{
print "Go to directory $SOURCE\n";
$olddir=getcwd();
chdir("$SOURCE");
print "Run cvs update -P -d\n";
$ret=`cvs update -P -d 2>&1`;
chdir("$olddir");
}
# Update buildroot if required
@@ -229,9 +235,9 @@ if ($nboftargetok) {
$ret=`rm -fr "$BUILDROOT"`;
mkdir "$BUILDROOT";
mkdir "$BUILDROOT/dolibarr";
print "Copy $SOURCE into $BUILDROOT/dolibarr\n";
$ret=`cp -pr "$SOURCE" "$BUILDROOT/dolibarr"`;
mkdir "$BUILDROOT/$PROJECT";
print "Copy $SOURCE into $BUILDROOT/$PROJECT\n";
$ret=`cp -pr "$SOURCE" "$BUILDROOT/$PROJECT"`;
}
print "Clean $BUILDROOT\n";
$ret=`rm -fr $BUILDROOT/$PROJECT/.cache`;
@@ -263,11 +269,11 @@ if ($nboftargetok) {
if ($target eq 'SNAPSHOT') {
print "Rename $BUILDROOT/$PROJECT to $BUILDROOT/$FILENAMESNAPSHOT\n";
rename("$BUILDROOT/$PROJECT","$BUILDROOT/$FILENAMESNAPSHOT");
unlink("$FILENAMESNAPSHOT.tgz");
unlink("$DESTI/$FILENAMESNAPSHOT.tgz");
print "Compress $BUILDROOT into $FILENAMESNAPSHOT.tgz...\n";
#$cmd="tar --exclude \"$BUILDROOT/tgz/tar_exclude.txt\" --exclude .cache --exclude .settings --exclude conf.php --directory \"$BUILDROOT\" -czvf \"$FILENAMESNAPSHOT.tgz\" $FILENAMESNAPSHOT";
$cmd="tar --exclude .cache --exclude .settings --exclude conf.php --exclude conf.php.mysql --exclude conf.php.old --exclude conf.php.postgres --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$FILENAMESNAPSHOT.tgz\" $FILENAMESNAPSHOT";
$cmd="tar --exclude doli*.tgz --exclude doli*.deb --exclude doli*.exe --exclude doli*.zip --exclude doli*.rpm --exclude .cache --exclude .settings --exclude conf.php --exclude conf.php.mysql --exclude conf.php.old --exclude conf.php.postgres --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$FILENAMESNAPSHOT.tgz\" $FILENAMESNAPSHOT";
print $cmd."\n";
$ret=`$cmd`;
if ($OS =~ /windows/i)
@@ -298,28 +304,36 @@ if ($nboftargetok) {
}
else
{
print "Move $FILENAMETGZ.tgz to $DESTI/$FILENAMETGZ.tgz\n";
$ret=`mv "$FILENAMETGZ.tgz" "$DESTI/$FILENAMETGZ.tgz"`;
}
next;
}
if ($target eq 'ZIP') {
print "Rename $BUILDROOT/$PROJECT to $BUILDROOT/$FILENAMETGZ\n";
rename("$BUILDROOT/$PROJECT","$BUILDROOT/$FILENAMETGZ");
unlink("$FILENAMEZIP.zip");
print "Compress $FILENAMETGZ into $FILENAMEZIP.zip...\n";
print "Rename $BUILDROOT/$PROJECT to $BUILDROOT/$FILENAMEZIP\n";
rename("$BUILDROOT/$PROJECT","$BUILDROOT/$FILENAMEZIP");
unlink("$DESTI/$FILENAMEZIP.zip");
print "Compress $FILENAMEZIP into $FILENAMEZIP.zip...\n";
print "Go to directory $BUILDROOT\n";
print "Go to directory $BUILDROOT\n";
$olddir=getcwd();
chdir("$BUILDROOT");
$cmd= "7z a -r -tzip -xr\@\"$BUILDROOT\/$FILENAMETGZ\/build\/zip\/zip_exclude.txt\" -mx $BUILDROOT/$FILENAMEZIP.zip $FILENAMETGZ\\*";
$cmd= "7z a -r -tzip -xr\@\"$BUILDROOT\/$FILENAMEZIP\/build\/zip\/zip_exclude.txt\" -mx $BUILDROOT/$FILENAMEZIP.zip $FILENAMEZIP\\*";
print $cmd."\n";
$ret= `$cmd`;
#print $ret;
#print "Go to directory $DESTI\n";
#chdir("$DESTI");
print "Move $FILENAMEZIP.zip to $DESTI\n";
rename("$BUILDROOT/$FILENAMEZIP.zip","$DESTI/$FILENAMEZIP.zip");
chdir("$olddir");
if ($OS =~ /windows/i)
{
print "Move $FILENAMEZIP.zip to $DESTI/$FILENAMEZIP.zip\n";
$ret=`mv "$BUILDROOT/$FILENAMEZIP.zip" "$DESTI/$FILENAMEZIP.zip"`;
}
else
{
print "Move $FILENAMEZIP.zip to $DESTI/$FILENAMEZIP.zip\n";
$ret=`mv "$BUILDROOT/$FILENAMEZIP.zip" "$DESTI/$FILENAMEZIP.zip"`;
}
next;
}
@@ -329,7 +343,7 @@ if ($nboftargetok) {
print "Rename $BUILDROOT/$PROJECT to $BUILDROOT/$FILENAMETGZ\n";
rename("$BUILDROOT/$PROJECT","$BUILDROOT/$FILENAMETGZ");
unlink("$FILENAMETGZ.tgz");
unlink("$DESTI/$FILENAMETGZ.tgz");
print "Compress $FILENAMETGZ into $FILENAMETGZ.tgz...\n";
$ret=`tar --exclude-from "$SOURCE/build/tgz/tar_exclude.txt" --directory "$BUILDROOT" -czvf "$BUILDROOT/$FILENAMETGZ.tgz" $FILENAMETGZ`;
@@ -358,6 +372,7 @@ if ($nboftargetok) {
}
if ($target eq 'DEB') {
unlink("$DESTI/$FILENAMEDEB.deb");
$ret=`rm -fr $BUILDROOT/$PROJECT/.cvsignore $BUILDROOT/$PROJECT/*/.cvsignore $BUILDROOT/$PROJECT/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.cvsignore`;
@@ -417,18 +432,26 @@ if ($nboftargetok) {
open (SPECTO,">$BUILDROOT/$PROJECT/DEBIAN/control") || die "Error";
while (<SPECFROM>) {
$newbuild = $BUILD;
$newbuild =~ s/dev/0/gi;
$newbuild =~ s/alpha/0/gi;
$newbuild =~ s/beta/1/gi;
if ($newbuild !~ /-/) { $newbuild.='-2'; }
$newbuild =~ s/(dev|alpha)/0/gi; # dev
$newbuild =~ s/beta/1/gi; # beta
$newbuild =~ s/rc./2/gi; # rc
if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale
$_ =~ s/__VERSION__/$MAJOR.$MINOR.$newbuild/;
print SPECTO $_;
}
close SPECFROM;
close SPECTO;
print "Version set to $MAJOR.$MINOR.$newbuild\n";
print "Create directory $BUILDROOT/$PROJECT/usr/share/applications\n";
$ret=`mkdir -p "$BUILDROOT/$PROJECT/usr/share/applications"`;
print "Copy desktop file into $BUILDROOT/$PROJECT/usr/share/applications/dolibarr.desktop\n";
$ret=`cp "$SOURCE/build/deb/dolibarr.desktop" "$BUILDROOT/$PROJECT/usr/share/applications/dolibarr.desktop"`;
print "Create directory $BUILDROOT/$PROJECT/usr/share/$PROJECT/documents\n";
$ret=`mkdir -p "$BUILDROOT/$PROJECT/usr/share/$PROJECT/documents"`;
print "Create directory $BUILDROOT/$PROJECT/usr/share/pixmaps\n";
$ret=`mkdir -p "$BUILDROOT/$PROJECT/usr/share/pixmaps"`;
print "Copy pixmap file into $BUILDROOT/$PROJECT/usr/share/pixmaps/dolibarr.xpm\n";
$ret=`cp "$SOURCE/doc/images/dolibarr.xpm" "$BUILDROOT/$PROJECT/usr/share/pixmaps/dolibarr.xpm"`;
#print "Create directory $BUILDROOT/$PROJECT/etc/$PROJECT\n";
#$ret=`mkdir -p "$BUILDROOT/$PROJECT/etc/$PROJECT"`;
@@ -445,6 +468,9 @@ if ($nboftargetok) {
#print "Copy apache conf file into $BUILDROOT/$PROJECT/etc/$PROJECT\n";
#$ret=`cp "$SOURCE/build/deb/apache.conf" "$BUILDROOT/$PROJECT/etc/$PROJECT"`;
print "Create directory $BUILDROOT/$PROJECT/usr/share/$PROJECT/documents\n";
$ret=`mkdir -p "$BUILDROOT/$PROJECT/usr/share/$PROJECT/documents"`;
print "Set permissions/owners on files/dir\n";
$ret=`chown -R root.root $BUILDROOT/$PROJECT`;
$ret=`chown -R www-data.www-data $BUILDROOT/$PROJECT/usr/share/$PROJECT/documents`;
@@ -454,17 +480,30 @@ if ($nboftargetok) {
$ret=`chmod -R 755 $BUILDROOT/$PROJECT/DEBIAN`;
print "Go to directory $BUILDROOT\n";
$olddir=getcwd();
chdir("$BUILDROOT");
$cmd="dpkg -b $BUILDROOT/$PROJECT $BUILDROOT/${FILENAMEDEB}.deb";
print "Launch DEB build ($cmd)\n";
$ret=`$cmd`;
print $ret."\n";
chdir("$olddir");
if ($OS =~ /windows/i)
{
print "Move ${FILENAMEDEB}.deb to $BUILDROOT/${FILENAMEDEB}.deb\n";
$ret=`mv "$BUILDROOT/${FILENAMEDEB}.deb" "$DESTI/${FILENAMEDEB}.deb"`;
}
else
{
print "Move ${FILENAMEDEB}.deb to $BUILDROOT/${FILENAMEDEB}.deb\n";
$ret=`mv "$BUILDROOT/${FILENAMEDEB}.deb" "$DESTI/${FILENAMEDEB}.deb"`;
}
next;
}
if ($target eq 'EXE') {
unlink "$FILENAMEEXE.exe";
unlink "$DESTI/$FILENAMEEXE.exe";
print "Compress into $FILENAMEEXE.exe by $FILENAMEEXE.nsi...\n";
$command="\"$REQUIREMENTTARGET{$target}\" /DMUI_VERSION_DOT=$MAJOR.$MINOR.$BUILD /X\"SetCompressor bzip2\" \"$SOURCE\\build\\exe\\$FILENAME.nsi\"";
print "$command\n";
@@ -476,7 +515,7 @@ if ($nboftargetok) {
if ($target eq 'EXEDOLIWAMP')
{
unlink "$FILENAMEEXEDOLIWAMP.exe";
unlink "$DESTI/$FILENAMEEXEDOLIWAMP.exe";
print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCE\\build\\exe\\doliwamp\\doliwamp.iss\"\n";
$cmd= "iscc.exe \"$SOURCE\\build\\exe\\doliwamp\\doliwamp.iss\"";
print "$cmd\n";

View File

@@ -13,6 +13,7 @@ $PROJECT="mymodule";
@LISTETARGET=("TGZ"); # Possible packages
%REQUIREMENTTARGET=( # Tool requirement for each package
"TGZ"=>"tar",
"ZIP"=>"7z"
);
%ALTERNATEPATH=(
);
@@ -68,190 +69,286 @@ $BUILDROOT="$TEMP/dolibarr-buildroot";
my $copyalreadydone=0;
my $batch=0;
print "Makepack module version $VERSION\n";
print "Enter name for your module (mymodule, mywonderfulmondule, ...) : ";
$PROJECT=<STDIN>;
chomp($PROJECT);
print "Move to ".$DIR." directory.\n";
chdir($DIR);
if (! -f "makepack-".$PROJECT.".conf")
{
print "Error: can't open conf file makepack-".$PROJECT.".conf\n";
print "\n";
print "For help on building a module package, see web page\n";
print "http://wiki.dolibarr.org/index.php/Module_development#Create_a_package_to_distribute_and_install_your_module\n";
print "makepack-dolibarrmodule.pl aborted.\n";
sleep 2;
exit 2;
for (0..@ARGV-1) {
if ($ARGV[$_] =~ /^-*target=(\w+)/i) { $target=$1; $batch=1; }
if ($ARGV[$_] =~ /^-*desti=(.+)/i) { $DESTI=$1; }
if ($ARGV[$_] =~ /^-*prefix=(.+)/i) {
$PREFIX=$1;
$FILENAMESNAPSHOT.="-".$PREFIX;
}
}
print "Makepack for modules version $VERSION\n";
# Ask and set version $MAJOR and $MINOR
print "Enter value for version: ";
$PROJVERSION=<STDIN>;
chomp($PROJVERSION);
($MAJOR,$MINOR)=split(/\./,$PROJVERSION,2);
($MAJOR,$MINOR,$BUILD)=split(/\./,$PROJVERSION,3);
if ($MINOR eq '')
{
print "Enter value for minor version: ";
$MINOR=<STDIN>;
chomp($MINOR);
print "Enter value for minor version: ";
$MINOR=<STDIN>;
chomp($MINOR);
}
$FILENAME="$PROJECT";
$FILENAMETGZ="module_$PROJECT-$MAJOR.$MINOR";
if (-d "/usr/src/redhat") {
# redhat
$RPMDIR="/usr/src/redhat";
}
if (-d "/usr/src/RPM") {
# mandrake
$RPMDIR="/usr/src/RPM";
}
# Ask module
print "Enter name for your module (mymodule, mywonderfulmondule, ...) : ";
$PROJECTINPUT=<STDIN>;
chomp($PROJECTINPUT);
print "Move to ".$DIR." directory.\n";
chdir($DIR);
$SOURCE="$DIR/..";
$DESTI="$SOURCE/build";
print "Source directory: $SOURCE\n";
print "Target directory: $DESTI\n";
# Choose package targets
#-----------------------
$target="TGZ"; # Dolibarr modules are tgz format
$CHOOSEDTARGET{uc($target)}=1;
# Test if requirement is ok
#--------------------------
foreach my $target (keys %CHOOSEDTARGET) {
foreach my $req (split(/[,\s]/,$REQUIREMENTTARGET{$target})) {
# Test
print "Test requirement for target $target: Search '$req'... ";
$ret=`"$req" 2>&1`;
$coderetour=$?; $coderetour2=$coderetour>>8;
if ($coderetour != 0 && (($coderetour2 == 1 && $OS =~ /windows/ && $ret !~ /Usage/i) || ($coderetour2 == 127 && $OS !~ /windows/)) && $PROGPATH) {
# Not found error, we try in PROGPATH
$ret=`"$PROGPATH/$ALTERNATEPATH{$req}/$req\" 2>&1`;
$coderetour=$?; $coderetour2=$coderetour>>8;
$REQUIREMENTTARGET{$target}="$PROGPATH/$ALTERNATEPATH{$req}/$req";
}
if ($coderetour != 0 && (($coderetour2 == 1 && $OS =~ /windows/ && $ret !~ /Usage/i) || ($coderetour2 == 127 && $OS !~ /windows/))) {
# Not found error
print "Not found\nCan't build target $target. Requirement '$req' not found in PATH\n";
$CHOOSEDTARGET{$target}=-1;
last;
} else {
# Pas erreur ou erreur autre que programme absent
print " Found ".$REQUIREMENTTARGET{$target}."\n";
}
my @PROJECTLIST=();
if ($PROJECTINPUT eq "all")
{
opendir(DIR, $DIR) || return;
local @rv = grep { /^makepack\-(.*)\.conf$/ } sort readdir(DIR);
closedir(DIR);
foreach my $xxx (0..@rv-1) {
if ($rv[$xxx] =~ /^makepack\-(.*)\.conf$/)
{
@PROJECTLIST[$xxx]=$1;
}
}
}
print "\n";
# Check if there is at least on target to build
#----------------------------------------------
$nboftargetok=0;
foreach my $target (keys %CHOOSEDTARGET) {
if ($CHOOSEDTARGET{$target} < 0) { next; }
$nboftargetok++;
else
{
@PROJECTLIST=($PROJECTINPUT);
}
if ($nboftargetok) {
# Update buildroot
#-----------------
if (! $copyalreadydone) {
print "Delete directory $BUILDROOT\n";
$ret=`rm -fr "$BUILDROOT"`;
mkdir "$BUILDROOT";
$result=open(IN,"<makepack-".$PROJECT.".conf");
if (! $result) { die "Error: Can't open conf file makepack-".$PROJECT.".conf for reading.\n"; }
while(<IN>)
{
if ($_ =~ /^#/) { next; } # Do not process comments
$_ =~ s/\n//;
$_ =~ /^(.*)\/[^\/]+/;
print "Create directory $BUILDROOT/$1\n";
$ret=`mkdir -p "$BUILDROOT/$1"`;
print "Copy $SOURCE/$_ into $BUILDROOT/$_\n";
$ret=`cp -pr "$SOURCE/$_" "$BUILDROOT/$_"`;
}
close IN;
# Loop on each projects
foreach my $PROJECT (@PROJECTLIST) {
if (! -f "makepack-".$PROJECT.".conf")
{
print "Error: can't open conf file makepack-".$PROJECT.".conf\n";
print "\n";
print "For help on building a module package, see web page\n";
print "http://wiki.dolibarr.org/index.php/Module_development#Create_a_package_to_distribute_and_install_your_module\n";
print "makepack-dolibarrmodule.pl aborted.\n";
sleep 2;
exit 2;
}
$FILENAME="$PROJECT";
$FILENAMETGZ="module_$PROJECT-$MAJOR.$MINOR";
$FILENAMEZIP="module_$PROJECT-$MAJOR.$MINOR";
if (-d "/usr/src/redhat") {
# redhat
$RPMDIR="/usr/src/redhat";
}
if (-d "/usr/src/RPM") {
# mandrake
$RPMDIR="/usr/src/RPM";
}
# Choose package targets
#-----------------------
$target="ZIP"; # Dolibarr modules are this format
$CHOOSEDTARGET{uc($target)}=1;
# Test if requirement is ok
#--------------------------
foreach my $target (keys %CHOOSEDTARGET) {
foreach my $req (split(/[,\s]/,$REQUIREMENTTARGET{$target})) {
# Test
print "Test requirement for target $target: Search '$req'... ";
$ret=`"$req" 2>&1`;
$coderetour=$?; $coderetour2=$coderetour>>8;
if ($coderetour != 0 && (($coderetour2 == 1 && $OS =~ /windows/ && $ret !~ /Usage/i) || ($coderetour2 == 127 && $OS !~ /windows/)) && $PROGPATH) {
# Not found error, we try in PROGPATH
$ret=`"$PROGPATH/$ALTERNATEPATH{$req}/$req\" 2>&1`;
$coderetour=$?; $coderetour2=$coderetour>>8;
$REQUIREMENTTARGET{$target}="$PROGPATH/$ALTERNATEPATH{$req}/$req";
}
if ($coderetour != 0 && (($coderetour2 == 1 && $OS =~ /windows/ && $ret !~ /Usage/i) || ($coderetour2 == 127 && $OS !~ /windows/))) {
# Not found error
print "Not found\nCan't build target $target. Requirement '$req' not found in PATH\n";
$CHOOSEDTARGET{$target}=-1;
last;
} else {
# Pas erreur ou erreur autre que programme absent
print " Found ".$REQUIREMENTTARGET{$target}."\n";
}
}
}
print "\n";
# Check if there is at least on target to build
#----------------------------------------------
$nboftargetok=0;
$nboftargetneedbuildroot=0;
$nboftargetneedcvs=0;
foreach my $target (keys %CHOOSEDTARGET) {
if ($CHOOSEDTARGET{$target} < 0) { next; }
if ($target ne 'EXE' && $target ne 'EXEDOLIWAMP')
{
$nboftargetneedbuildroot++;
}
if ($target eq 'SNAPSHOT')
{
$nboftargetneedcvs++;
}
$nboftargetok++;
}
if ($nboftargetok) {
# Update CVS if required
#-----------------------
if ($nboftargetneedcvs)
{
print "Go to directory $SOURCE\n";
$olddir=getcwd();
chdir("$SOURCE");
print "Run cvs update -P -d\n";
$ret=`cvs update -P -d 2>&1`;
chdir("$olddir");
}
@timearray=localtime(time());
$fulldate=($timearray[5]+1900).'-'.($timearray[4]+1).'-'.$timearray[3].' '.$timearray[2].':'.$timearray[1];
$versionfile=open(VF,">$BUILDROOT/build/version-".$PROJECT.".txt");
# Update buildroot if required
#-----------------------------
if ($nboftargetneedbuildroot)
{
if (! $copyalreadydone) {
print "Delete directory $BUILDROOT\n";
$ret=`rm -fr "$BUILDROOT"`;
mkdir "$BUILDROOT";
mkdir "$BUILDROOT/$PROJECT";
$result=open(IN,"<makepack-".$PROJECT.".conf");
if (! $result) { die "Error: Can't open conf file makepack-".$PROJECT.".conf for reading.\n"; }
while(<IN>)
{
if ($_ =~ /^#/) { next; } # Do not process comments
$_ =~ s/\n//;
$_ =~ /^(.*)\/[^\/]+/;
print "Create directory $BUILDROOT/$PROJECT/$1\n";
$ret=`mkdir -p "$BUILDROOT/$PROJECT/$1"`;
if ($_ !~ /version\-/)
{
print "Copy $SOURCE/$_ into $BUILDROOT/$PROJECT/$_\n";
$ret=`cp -pr "$SOURCE/$_" "$BUILDROOT/$PROJECT/$_"`;
}
}
close IN;
@timearray=localtime(time());
$fulldate=($timearray[5]+1900).'-'.($timearray[4]+1).'-'.$timearray[3].' '.$timearray[2].':'.$timearray[1];
open(VF,">$BUILDROOT/$PROJECT/build/version-".$PROJECT.".txt");
print "Create version file $BUILDROOT/$PROJECT/build/version-".$PROJECT.".txt with date ".$fulldate."\n";
$ret=`mkdir -p "$BUILDROOT/$PROJECT/build"`;
print VF "Version: ".$MAJOR.".".$MINOR."\n";
print VF "Build : ".$fulldate."\n";
close VF;
}
print "Clean $BUILDROOT\n";
$ret=`rm -fr $BUILDROOT/$PROJECT/.cache`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.project`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.settings`;
$ret=`rm -fr $BUILDROOT/$PROJECT/index.php`;
$ret=`rm -fr $BUILDROOT/$PROJECT/build/html`;
$ret=`rm -fr $BUILDROOT/$PROJECT/documents`;
$ret=`rm -fr $BUILDROOT/$PROJECT/document`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/conf/conf.php.mysql`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/conf/conf.php.old`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/conf/conf.php.postgres`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/conf/conf*sav*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom2`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/theme/bureau2crea`;
$ret=`rm -fr $BUILDROOT/$PROJECT/test`;
$ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`;
$ret=`rm -fr $BUILDROOT/$PROJECT/CVS* $BUILDROOT/$PROJECT/*/CVS* $BUILDROOT/$PROJECT/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/*/*/CVS*`;
}
# Build package for each target
#------------------------------
foreach my $target (keys %CHOOSEDTARGET) {
if ($CHOOSEDTARGET{$target} < 0) { next; }
print "\nBuild package for target $target\n";
if ($target eq 'TGZ') {
print "Remove target $FILENAMETGZ.tgz...\n";
unlink("$DESTI/$FILENAMETGZ.tgz");
print "Compress $BUILDROOT/* into $FILENAMETGZ.tgz...\n";
$cmd="tar --exclude-vcs --exclude *.tgz --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$FILENAMETGZ.tgz\" .";
$ret=`$cmd`;
if ($OS =~ /windows/i) {
print "Move $FILENAMETGZ.tgz to $DESTI/$FILENAMETGZ.tgz\n";
$ret=`mv "$FILENAMETGZ.tgz" "$DESTI/$FILENAMETGZ.tgz"`;
}
else
{
$ret=`mv "$FILENAMETGZ.tgz" "$DESTI/$FILENAMETGZ.tgz"`;
}
next;
}
if ($target eq 'ZIP') {
print "Remove target $FILENAMEZIP.zip...\n";
unlink "$DESTI/$FILENAMEZIP.zip";
print "Compress $FILENAMEZIP into $FILENAMEZIP.zip...\n";
print "Go to directory $BUILDROOT/$PROJECT\n";
$olddir=getcwd();
chdir("$BUILDROOT/$PROJECT");
$cmd= "7z a -r -tzip -mx $BUILDROOT/$FILENAMEZIP.zip *";
print $cmd."\n";
$ret= `$cmd`;
chdir("$olddir");
print "Move $FILENAMEZIP.zip to $DESTI/$FILENAMEZIP.zip\n";
$ret=`mv "$BUILDROOT/$FILENAMEZIP.zip" "$DESTI/$FILENAMEZIP.zip"`;
next;
}
if ($target eq 'EXE') {
print "Remove target $FILENAMEEXE.exe...\n";
unlink "$DESTI/$FILENAMEEXE.exe";
print "Compress into $FILENAMEEXE.exe by $FILENAMEEXE.nsi...\n";
$command="\"$REQUIREMENTTARGET{$target}\" /DMUI_VERSION_DOT=$MAJOR.$MINOR.$BUILD /X\"SetCompressor bzip2\" \"$SOURCE\\build\\exe\\$FILENAME.nsi\"";
print "$command\n";
$ret=`$command`;
print "Move $FILENAMEEXE.exe to $DESTI\n";
rename("$SOURCE\\build\\exe\\$FILENAMEEXE.exe","$DESTI/$FILENAMEEXE.exe");
next;
}
}
}
print "\n----- Summary -----\n";
foreach my $target (keys %CHOOSEDTARGET) {
if ($CHOOSEDTARGET{$target} < 0) {
print "Package $target not built (bad requirement).\n";
} else {
print "Package $target built successfully in $DESTI\n";
}
}
print "Create version file $BUILDROOT/build/version-".$PROJECT.".txt with date ".$fulldate."\n";
$ret=`mkdir -p "$BUILDROOT/build"`;
print VF "Version: ".$MAJOR.".".$MINOR."\n";
print VF "Build : ".$fulldate."\n";
close VF;
}
# Build package for each target
#------------------------------
foreach my $target (keys %CHOOSEDTARGET) {
if ($CHOOSEDTARGET{$target} < 0) { next; }
print "\nBuild package for target $target\n";
if ($target eq 'TGZ') {
print "Remove target $FILENAMETGZ.tgz...\n";
unlink("$DESTI/$FILENAMETGZ.tgz");
print "Compress $BUILDROOT/* into $FILENAMETGZ.tgz...\n";
$cmd="tar --exclude-vcs --exclude *.tgz --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$FILENAMETGZ.tgz\" .";
$ret=`$cmd`;
if ($OS =~ /windows/i) {
print "Move $FILENAMETGZ.tgz to $DESTI/$FILENAMETGZ.tgz\n";
$ret=`mv "$FILENAMETGZ.tgz" "$DESTI/$FILENAMETGZ.tgz"`;
}
else
{
$ret=`mv "$FILENAMETGZ.tgz" "$DESTI/$FILENAMETGZ.tgz"`;
}
next;
}
if ($target eq 'ZIP') {
unlink $FILENAMEZIP.zip;
print "Compress $FILENAMETGZ into $FILENAMEZIP.zip...\n";
chdir("$BUILDROOT");
#print "cd $BUILDROOTNT & 7z a -r -tzip -mx $BUILDROOT/$FILENAMEZIP.zip $FILENAMETGZ\\*.*\n";
#$ret=`cd $BUILDROOTNT & 7z a -r -tzip -mx $BUILDROOT/$FILENAMEZIP.zip $FILENAMETGZ\\*.*`;
$ret=`7z a -r -tzip -mx $BUILDROOT/$FILENAMEZIP.zip $FILENAMETGZ\\*.*`;
print "Move $FILENAMEZIP.zip to $DESTI\n";
rename("$BUILDROOT/$FILENAMEZIP.zip","$DESTI/$FILENAMEZIP.zip");
next;
}
if ($target eq 'EXE') {
unlink "$FILENAMEEXE.exe";
print "Compress into $FILENAMEEXE.exe by $FILENAMEEXE.nsi...\n";
$command="\"$REQUIREMENTTARGET{$target}\" /DMUI_VERSION_DOT=$MAJOR.$MINOR.$BUILD /X\"SetCompressor bzip2\" \"$SOURCE\\build\\exe\\$FILENAME.nsi\"";
print "$command\n";
$ret=`$command`;
print "Move $FILENAMEEXE.exe to $DESTI\n";
rename("$SOURCE\\build\\exe\\$FILENAMEEXE.exe","$DESTI/$FILENAMEEXE.exe");
next;
}
}
}
print "\n----- Summary -----\n";
foreach my $target (keys %CHOOSEDTARGET) {
if ($CHOOSEDTARGET{$target} < 0) {
print "Package $target not built (bad requirement).\n";
} else {
print "Package $target built successfully in $DESTI\n";
}
}
if (! $btach) {
if (! $batch) {
print "\nPress key to finish...";
my $WAITKEY=<STDIN>;
}

View File

@@ -9,10 +9,12 @@ beta version of Dolibarr, step by step.
- Check all files are commited.
- Update version/info in / directory (README*.txt, ChangeLog...)
- Update version number in build/makepack-dolibarr.pl
- Update version number in build/exe/doliwamp/doliwamp.iss
- Update version number in htdocs/filefunc.inc.php
- Update version number in htdocs/install/inc.php
- 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-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 htdocs/filefunc.inc.php
- Update version number with x.x.x-y in htdocs/install/inc.php
- Commit all changes.
- Add a CVS Tag (DOLIBARR_x_y_BETA)
- If it's a new branch (Vx.y), create a branch (DOLIBARR_x_y_BRANCH).
@@ -35,12 +37,10 @@ complete release of Dolibarr, step by step.
- Check all files are commited.
- Update version/info in / directory (README*.txt, ChangeLog...)
- Update version number in build/makepack-dolibarr.pl
- Update version number in build/doxygen/dolibarr-doxygen.doxyfile
- Update version number in build/exe/doliwamp/doliwamp.iss
- Update version number in build/perl/virtualmin/dolibarr.pl
- Update version number in htdocs/filefunc.inc.php
- Update version number in htdocs/install/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/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/install/inc.php
- Update PAD and DOAP files.
- Commit all changes.
- Add a CVS Tag (DOLIBARR_x_y)

View File

@@ -78,6 +78,7 @@ CVS
.#*
.cache
.cvsignore
.externalToolBuilders
.htaccess
.settings
.project

View File

@@ -1,18 +1,25 @@
#!/bin/sh
#!/bin/bash
#------------------------------------------------------
# Script to purge and init a database with demo values.
# Note: "dialog" tool need to be available.
#
# Regis Houssin - regis@dolibarr.fr
# Regis Houssin - regis@dolibarr.fr
# Laurent Destailleur - eldy@users.sourceforge.net
#------------------------------------------------------
# WARNING: This script erase all data of database
# with data into initdemo.sql
# with data into dump file
#------------------------------------------------------
export mydir=`echo "$_" | sed -e 's/initdemo.sh//'`;
export dumpfile="mysqldump_dolibarr_3.0.0.sql"
export mydir=`echo "$0" | sed -e 's/initdemo.sh//'`;
if [ "x$mydir" = "x" ]
then
export mydir="."
fi
export id=`id -u`;
# ----------------------------- check if root
if [ "x$id" != "x0" -a "x$id" != "x1001" ]
then
@@ -20,13 +27,30 @@ then
exit
fi
# ----------------------------- input file
DIALOG=${DIALOG=dialog}
DIALOG="$DIALOG --ascii-lines"
fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
trap "rm -f $fichtemp" 0 1 2 5 15
$DIALOG --title "Init Dolibarr with demo values" --clear \
--inputbox "Input dump file :" 16 55 $dumpfile 2> $fichtemp
valret=$?
case $valret in
0)
dumpfile=`cat $fichtemp`;;
1)
exit;;
255)
exit;;
esac
# ----------------------------- database name
DIALOG=${DIALOG=dialog}
DIALOG="$DIALOG --ascii-lines"
fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
trap "rm -f $fichtemp" 0 1 2 5 15
$DIALOG --title "Init Dolibarr with demo values" --clear \
--inputbox "Mysql database name :" 16 51 dolibarrdemo 2> $fichtemp
--inputbox "Mysql database name :" 16 55 dolibarrdemo 2> $fichtemp
valret=$?
case $valret in
0)
@@ -42,7 +66,7 @@ DIALOG=${DIALOG=dialog}
fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
trap "rm -f $fichtemp" 0 1 2 5 15
$DIALOG --title "Init Dolibarr with demo values" --clear \
--inputbox "Mysql port (ex: 3306):" 16 51 3306 2> $fichtemp
--inputbox "Mysql port (ex: 3306):" 16 55 3306 2> $fichtemp
valret=$?
@@ -60,7 +84,7 @@ DIALOG=${DIALOG=dialog}
fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
trap "rm -f $fichtemp" 0 1 2 5 15
$DIALOG --title "Init Dolibarr with demo values" --clear \
--inputbox "Mysql root login (ex: root):" 16 51 root 2> $fichtemp
--inputbox "Mysql root login (ex: root):" 16 55 root 2> $fichtemp
valret=$?
@@ -78,7 +102,7 @@ DIALOG=${DIALOG=dialog}
fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
trap "rm -f $fichtemp" 0 1 2 5 15
$DIALOG --title "Init Dolibarr with demo values" --clear \
--inputbox "Password for Mysql root login :" 16 51 2> $fichtemp
--inputbox "Password for Mysql root login :" 16 55 2> $fichtemp
valret=$?
@@ -96,7 +120,7 @@ esac
#fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
#trap "rm -f $fichtemp" 0 1 2 5 15
#$DIALOG --title "Init Dolibarr with demo values" --clear \
# --inputbox "Full path to documents directory (ex: /var/www/dolibarr/documents)- no / at end :" 16 51 2> $fichtemp
# --inputbox "Full path to documents directory (ex: /var/www/dolibarr/documents)- no / at end :" 16 55 2> $fichtemp
#valret=$?
@@ -112,7 +136,7 @@ esac
# ---------------------------- confirmation
DIALOG=${DIALOG=dialog}
$DIALOG --title "Init Dolibarr with demo values" --clear \
--yesno "Do you confirm ? \n Mysql database : '$base' \n Mysql port : '$port' \n Mysql login: '$admin' \n Mysql password : '$passwd'" 15 40
--yesno "Do you confirm ? \n Dump file : '$dumpfile' \n Dump dir : '$mydir' \n Mysql database : '$base' \n Mysql port : '$port' \n Mysql login: '$admin' \n Mysql password : '$passwd'" 15 55
case $? in
0) echo "Ok, start process...";;
@@ -125,10 +149,10 @@ if [ "x$passwd" != "x" ]
then
export passwd="-p$passwd"
fi
#echo "mysql -P$port -u$admin $passwd $base < $mydir/initdemo.sql"
#mysql -P$port -u$admin $passwd $base < $mydir/initdemo.sql
echo "mysql -P$port $base < $mydir/initdemo.sql"
mysql -P$port -u$admin $passwd $base < $mydir/initdemo.sql
#echo "mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile"
#mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile
echo "mysql -P$port $base < $mydir/$dumpfile"
mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile
echo "Dolibarr data demo has been loaded."
echo

File diff suppressed because one or more lines are too long

1
htdocs/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/custom

View File

@@ -4,6 +4,8 @@
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@@ -699,7 +699,7 @@ if ($rowid)
});
jQuery("#invoiceonly").click(function() {
jQuery(".bankswitchclass").hide();
jQuery(".bankswitchclass2").show();
jQuery(".bankswitchclass2").hide();
});
';
if (GETPOST('paymentsave')) print 'jQuery("#'.GETPOST('paymentsave').'").attr(\'checked\',true);';

View File

@@ -2,6 +2,7 @@
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -49,9 +50,9 @@ $adh = new Adherent($db);
$adho = new AdherentOptions($db);
$errmsg='';
$action=isset($_GET["action"])?$_GET["action"]:$_POST["action"];
$rowid=isset($_GET["rowid"])?$_GET["rowid"]:$_POST["rowid"];
$typeid=isset($_GET["typeid"])?$_GET["typeid"]:$_POST["typeid"];
$action=GETPOST("action");
$rowid=GETPOST("rowid");
$typeid=GETPOST("typeid");
if ($rowid)
{
@@ -122,6 +123,7 @@ if ($_POST['action'] == 'setsocid')
{
$sql ="SELECT rowid FROM ".MAIN_DB_PREFIX."adherent";
$sql.=" WHERE fk_soc = '".$_POST["socid"]."'";
$sql.=" AND entity = ".$conf->entity;
$resql = $db->query($sql);
if ($resql)
{
@@ -133,7 +135,7 @@ if ($_POST['action'] == 'setsocid')
$thirdparty=new Societe($db);
$thirdparty->fetch($_POST["socid"]);
$error++;
$mesg='<div class="error">'.$langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->getFullName($langs),$othermember->login,$thirdparty->nom).'</div>';
$errmsg='<div class="error">'.$langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->getFullName($langs),$othermember->login,$thirdparty->nom).'</div>';
}
}
@@ -176,7 +178,7 @@ if ($_POST["action"] == 'confirm_create_thirdparty' && $_POST["confirm"] == 'yes
{
// Creation user
$company = new Societe($db);
$result=$company->create_from_member($adh,$_POST["name"]);
$result=$company->create_from_member($adh,$_POST["companyname"]);
if ($result < 0)
{
@@ -616,13 +618,9 @@ if ($action == 'create')
print_fiche_titre($langs->trans("NewMember"));
if ($errmsg)
{
print '<div class="error">'.$errmsg.'</div>';
}
if ($errmsg) print '<div class="error">'.$errmsg.'</div>';
if ($mesg) print '<div class="ok">'.$mesg.'</div>';
if ($conf->use_javascript_ajax)
{
print "\n".'<script type="text/javascript" language="javascript">';
@@ -635,7 +633,6 @@ if ($action == 'create')
print '</script>'."\n";
}
print '<form name="formsoc" action="'.$_SERVER["PHP_SELF"].'" method="post" enctype="multipart/form-data">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="add">';
@@ -818,7 +815,6 @@ if ($action == 'edit')
if ($mesg) print '<div class="ok">'.$mesg.'</div>';
if ($conf->use_javascript_ajax)
{
print "\n".'<script type="text/javascript" language="javascript">';
@@ -1014,13 +1010,13 @@ if ($rowid && $action != 'edit')
dol_fiche_head($head, 'general', $langs->trans("Member"), 0, 'user');
if ($msg) print '<div class="error">'.$msg.'</div>';
dol_htmloutput_errors($errmsg,$errmsgs);
// Confirm create user
if ($_GET["action"] == 'create_user')
{
$login=$adh->login;
if (empty($login))
if (empty($login))
{
// Full firstname and name separated with a dot : firstname.name
include_once(DOL_DOCUMENT_ROOT.'/lib/functions2.lib.php');
@@ -1039,9 +1035,7 @@ if ($rowid && $action != 'edit')
// Confirm create third party
if ($_GET["action"] == 'create_thirdparty')
{
$name =$adh->nom;
if ($adh->nom && $adh->prenom) $name.=' ';
$name.=$adh->prenom;
$name = $adh->getFullName($langs);
if (! empty($name))
{
if ($adh->societe) $name.=' ('.$adh->societe.')';

View File

@@ -129,7 +129,7 @@ if ($user->rights->adherent->cotisation->creer && $_REQUEST["action"] == 'update
if ($_REQUEST["action"] == 'confirm_delete' && $_REQUEST["confirm"] == 'yes' && $user->rights->adherent->cotisation->creer)
{
$result=$subscription->fetch($rowid);
$result=$subscription->delete();
$result=$subscription->delete($user);
if ($result > 0)
{
Header("Location: card_subscriptions.php?rowid=".$subscription->fk_adherent);

View File

@@ -2,6 +2,7 @@
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -33,6 +34,9 @@ $langs->load("members");
$rowid=isset($_GET["rowid"])?$_GET["rowid"]:$_POST["rowid"];
// Security check
if (! $user->rights->adherent->lire) accessforbidden();
if ($_REQUEST["button_removefilter"])
{
$_GET["search_nom"]="";

View File

@@ -285,7 +285,7 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("CompanyInfo").'</td><td>'.$langs->trans("Value").'</td></tr>'."\n";
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyName").'</td><td>';
print '<tr '.$bc[$var].'><td class="fieldrequired">'.$langs->trans("CompanyName").'</td><td>';
print '<input name="nom" size="30" value="'. ($conf->global->MAIN_INFO_SOCIETE_NOM?$conf->global->MAIN_INFO_SOCIETE_NOM:$_POST["nom"]) . '"></td></tr>'."\n";
$var=!$var;
@@ -302,7 +302,7 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
// Country
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("Country").'</td><td>';
print '<tr '.$bc[$var].'><td class="fieldrequired">'.$langs->trans("Country").'</td><td>';
$pays_selected=$pays_id;
//if (empty($pays_selected)) $pays_selected=substr($langs->defaultlang,-2); // Par defaut, pays de la localisation
$form->select_pays($pays_selected,'pays_id');

View File

@@ -30,6 +30,7 @@
require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formadmin.class.php");
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formcompany.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
$langs->load("other");
$langs->load("admin");
@@ -51,7 +52,7 @@ $active = 1;
// Mettre ici tous les caracteristiques des dictionnaires
// Ordres d'affichage des dictionnaires (0 pour espace)
$taborder=array(9,0,4,3,2,0,1,8,19,16,0,5,11,0,6,0,10,12,13,0,14,0,7,17,0,18,0,15);
$taborder=array(9,0,4,3,2,0,1,8,19,16,0,5,11,0,6,0,10,12,13,0,14,0,7,17,0,20,18,0,15);
// Nom des tables des dictionnaires
$tabname[1] = MAIN_DB_PREFIX."c_forme_juridique";
@@ -73,6 +74,7 @@ $tabname[16]= MAIN_DB_PREFIX."c_prospectlevel";
$tabname[17]= MAIN_DB_PREFIX."c_type_fees";
$tabname[18]= MAIN_DB_PREFIX."c_shipment_mode";
$tabname[19]= MAIN_DB_PREFIX."c_effectif";
$tabname[20]= MAIN_DB_PREFIX."c_methode_commande_fournisseur";
// Dictionary labels
$tablib[1] = $langs->trans("DictionnaryCompanyJuridicalType");
@@ -94,6 +96,7 @@ $tablib[16]= $langs->trans("DictionnaryProspectLevel");
$tablib[17]= $langs->trans("DictionnaryFees");
$tablib[18]= $langs->trans("DictionnarySendingMethods");
$tablib[19]= $langs->trans("DictionnaryStaff");
$tablib[20]= $langs->trans("DictionnaryOrderMethods");
// Requete pour extraction des donnees des dictionnaires
$tabsql[1] = "SELECT f.rowid as rowid, f.code, f.libelle, p.code as pays_code, p.libelle as pays, f.active FROM ".MAIN_DB_PREFIX."c_forme_juridique as f, ".MAIN_DB_PREFIX."c_pays as p WHERE f.fk_pays=p.rowid";
@@ -115,6 +118,7 @@ $tabsql[16]= "SELECT code, label as libelle, active FROM ".MAIN_DB_PREFIX."c_pro
$tabsql[17]= "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_type_fees";
$tabsql[18]= "SELECT rowid as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_shipment_mode";
$tabsql[19]= "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_effectif";
$tabsql[20]= "SELECT rowid as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_methode_commande_fournisseur";
// Critere de tri du dictionnaire
$tabsqlsort[1] ="pays ASC, code ASC";
@@ -136,6 +140,7 @@ $tabsqlsort[16]="sortorder ASC";
$tabsqlsort[17]="code ASC";
$tabsqlsort[18]="code ASC, libelle ASC";
$tabsqlsort[19]="id ASC";
$tabsqlsort[20]="code ASC, libelle ASC";
// Nom des champs en resultat de select pour affichage du dictionnaire
$tabfield[1] = "code,libelle,pays";
@@ -157,6 +162,7 @@ $tabfield[16]= "code,libelle";
$tabfield[17]= "code,libelle";
$tabfield[18]= "code,libelle";
$tabfield[19]= "code,libelle";
$tabfield[20]= "code,libelle";
// Nom des champs d'edition pour modification d'un enregistrement
$tabfieldvalue[1] = "code,libelle,pays";
@@ -178,6 +184,7 @@ $tabfieldvalue[16]= "code,libelle";
$tabfieldvalue[17]= "code,libelle";
$tabfieldvalue[18]= "code,libelle";
$tabfieldvalue[19]= "code,libelle";
$tabfieldvalue[20]= "code,libelle";
// Nom des champs dans la table pour insertion d'un enregistrement
$tabfieldinsert[1] = "code,libelle,fk_pays";
@@ -199,8 +206,11 @@ $tabfieldinsert[16]= "code,label";
$tabfieldinsert[17]= "code,libelle";
$tabfieldinsert[18]= "code,libelle";
$tabfieldinsert[19]= "code,libelle";
$tabfieldinsert[20]= "code,libelle";
// Nom du rowid si le champ n'est pas de type autoincrement
// Example: "" if id field is "rowid" and has autoincrement on
// "nameoffield" if id field is not "rowid" or has not autoincrement on
$tabrowid[1] = "";
$tabrowid[2] = "";
$tabrowid[3] = "";
@@ -220,6 +230,7 @@ $tabrowid[16]= "code";
$tabrowid[17]= "id";
$tabrowid[18]= "rowid";
$tabrowid[19]= "id";
$tabrowid[20]= "";
// Condition to show dictionnary in setup page
$tabcond[1] = true;
@@ -241,6 +252,7 @@ $tabcond[16]= $conf->societe->enabled;
$tabcond[17]= $conf->deplacement->enabled;
$tabcond[18]= $conf->expedition->enabled;
$tabcond[19]= $conf->societe->enabled;
$tabcond[20]= $conf->fournisseur->enabled;
$msg='';

View File

@@ -579,7 +579,5 @@ print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'
print "</td></tr>\n";
print '</form>';
closedir($handle);
llxFooter('$Date$ - $Revision$');
?>

View File

@@ -74,6 +74,7 @@ if ($_GET["action"] == 'setvalue' && $user->admin)
llxHeader('',$langs->trans("LDAPSetup"),'EN:Module_LDAP_En|FR:Module_LDAP|ES:M&oacute;dulo_LDAP');
print_fiche_titre($langs->trans("LDAPSetup"),'','setup');
$head = ldap_prepare_head();

View File

@@ -80,6 +80,8 @@ if ($_GET["action"] == 'setvalue' && $user->admin)
llxHeader('',$langs->trans("LDAPSetup"),'EN:Module_LDAP_En|FR:Module_LDAP|ES:M&oacute;dulo_LDAP');
print_fiche_titre($langs->trans("LDAPSetup"),'','setup');
$head = ldap_prepare_head();
// Test si fonction LDAP actives

View File

@@ -72,6 +72,8 @@ if ($_GET["action"] == 'setvalue' && $user->admin)
llxHeader('',$langs->trans("LDAPSetup"),'EN:Module_LDAP_En|FR:Module_LDAP|ES:M&oacute;dulo_LDAP');
print_fiche_titre($langs->trans("LDAPSetup"),'','setup');
$head = ldap_prepare_head();
// Test si fonction LDAP actives

View File

@@ -94,6 +94,8 @@ if ($_GET["action"] == 'setvalue' && $user->admin)
llxHeader('',$langs->trans("LDAPSetup"),'EN:Module_LDAP_En|FR:Module_LDAP|ES:M&oacute;dulo_LDAP');
print_fiche_titre($langs->trans("LDAPSetup"),'','setup');
$head = ldap_prepare_head();
// Test si fonction LDAP actives

View File

@@ -82,6 +82,8 @@ if ($_GET["action"] == 'setvalue' && $user->admin)
llxHeader('',$langs->trans("LDAPSetup"),'EN:Module_LDAP_En|FR:Module_LDAP|ES:M&oacute;dulo_LDAP');
print_fiche_titre($langs->trans("LDAPSetup"),'','setup');
$head = ldap_prepare_head();
// Test si fonction LDAP actives

View File

@@ -51,12 +51,14 @@ $substitutionarrayfortest=array(
if (isset($_POST["action"]) && $_POST["action"] == 'update' && empty($_POST["cancel"]))
{
dolibarr_set_const($db, "MAIN_DISABLE_ALL_MAILS", $_POST["MAIN_DISABLE_ALL_MAILS"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_SENDMODE", $_POST["MAIN_MAIL_SENDMODE"],'chaine',0,'',0);
dolibarr_set_const($db, "MAIN_MAIL_SMTP_PORT", $_POST["MAIN_MAIL_SMTP_PORT"],'chaine',0,'',0);
dolibarr_set_const($db, "MAIN_MAIL_SMTP_SERVER", $_POST["MAIN_MAIL_SMTP_SERVER"],'chaine',0,'',0);
if (isset($_POST["MAIN_MAIL_SMTPS_ID"])) dolibarr_set_const($db, "MAIN_MAIL_SMTPS_ID", $_POST["MAIN_MAIL_SMTPS_ID"],'chaine',0,'',0);
if (isset($_POST["MAIN_MAIL_SMTPS_PW"])) dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW", $_POST["MAIN_MAIL_SMTPS_PW"],'chaine',0,'',0);
if (isset($_POST["MAIN_MAIL_EMAIL_TLS"])) dolibarr_set_const($db, "MAIN_MAIL_EMAIL_TLS", $_POST["MAIN_MAIL_EMAIL_TLS"],'chaine',0,'',0);
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_FROM", $_POST["MAIN_MAIL_EMAIL_FROM"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_AUTOCOPY_TO", $_POST["MAIN_MAIL_AUTOCOPY_TO"],'chaine',0,'',$conf->entity);
@@ -600,9 +602,9 @@ else
$formmail->withsubstit=0;
$formmail->withfrom=1;
$formmail->witherrorsto=1;
$formmail->withto=(isset($_POST['sendto'])?$_POST['sendto']:$user->email?$user->email:1);
$formmail->withtocc=(isset($_POST['sendtocc'])?$_POST['sendtocc']:1);
$formmail->withtoccc=(isset($_POST['sendtoccc'])?$_POST['sendtoccc']:1);
$formmail->withto=(! empty($_POST['sendto'])?$_POST['sendto']:($user->email?$user->email:1));
$formmail->withtocc=(! empty($_POST['sendtocc'])?$_POST['sendtocc']:1); // ! empty to keep field if empty
$formmail->withtoccc=(! empty($_POST['sendtoccc'])?$_POST['sendtoccc']:1); // ! empty to keep field if empty
$formmail->withtopic=(isset($_POST['subject'])?$_POST['subject']:$langs->trans("Test"));
$formmail->withtopicreadonly=0;
$formmail->withfile=2;
@@ -645,9 +647,9 @@ else
$formmail->withsubstit=0;
$formmail->withfrom=1;
$formmail->witherrorsto=1;
$formmail->withto=(isset($_POST['sendto'])?$_POST['sendto']:$user->email?$user->email:1);
$formmail->withtocc=(isset($_POST['sendtocc'])?$_POST['sendtocc']:1);
$formmail->withtoccc=(isset($_POST['sendtoccc'])?$_POST['sendtoccc']:1);
$formmail->withto=(! empty($_POST['sendto'])?$_POST['sendto']:($user->email?$user->email:1));
$formmail->withtocc=(! empty($_POST['sendtocc'])?$_POST['sendtocc']:1); // ! empty to keep field if empty
$formmail->withtoccc=(! empty($_POST['sendtoccc'])?$_POST['sendtoccc']:1); // ! empty to keep field if empty
$formmail->withtopic=(isset($_POST['subject'])?$_POST['subject']:$langs->trans("Test"));
$formmail->withtopicreadonly=0;
$formmail->withfile=2;

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009-2010 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2009-2011 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -35,9 +35,9 @@ $langs->load("admin");
if (! $user->admin)
accessforbidden();
$dirtop = "../../includes/menus/standard";
$dirleft = "../../includes/menus/standard";
$dirsmartphone = "../../includes/menus/smartphone";
$dirtop = "/includes/menus/standard";
$dirleft = "/includes/menus/standard";
$dirsmartphone = "/includes/menus/smartphone";
$dirmenu = array($dirleft,$dirsmartphone);
@@ -333,7 +333,6 @@ if (isset($_GET["action"]) && $_GET["action"] == 'create')
print '</form>';
}
elseif (isset($_GET["action"]) && $_GET["action"] == 'edit')
{
print_fiche_titre($langs->trans("ModifMenu"),'','setup');
@@ -349,7 +348,7 @@ elseif (isset($_GET["action"]) && $_GET["action"] == 'edit')
$menu = new Menubase($db);
$result=$menu->fetch($_GET['menuId']);
//var_dump($menu);
// MenuId Parent
print '<tr><td>'.$langs->trans('MenuIdParent').'</td>';
//$menu_handler

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009-2010 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2007-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009-2011 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -35,9 +35,9 @@ $langs->load("admin");
if (! $user->admin)
accessforbidden();
$dirtop = "../../includes/menus/standard";
$dirleft = "../../includes/menus/standard";
$dirsmartphone = "../../includes/menus/smartphone";
$dirtop = "/includes/menus/standard";
$dirleft = "/includes/menus/standard";
$dirsmartphone = "/includes/menus/smartphone";
$dirmenu = array($dirleft,$dirsmartphone);

View File

@@ -19,8 +19,8 @@
*/
/**
* \file htdocs/admin/system/dolibarr.php
* \brief Fichier page info systemes Dolibarr
* \file htdocs/admin/system/modules.php
* \brief Page to list all modules
* \version $Id$
*/
@@ -97,12 +97,12 @@ foreach($sortorder as $numero=>$name)
$alt=$name.' - '.$modules_files[$numero];
if (! empty($picto[$numero]))
{
if (preg_match('/^\//',$picto[$numero])) print img_picto($alt,$picto[$numero],'',1);
else print img_object($alt,$picto[$numero]);
if (preg_match('/^\//',$picto[$numero])) print img_picto($alt,$picto[$numero],'width="14px"',1);
else print img_object($alt,$picto[$numero],'width="14px"');
}
else
{
print img_object($alt,$picto[$numero]);
print img_object($alt,$picto[$numero],'width="14px"');
}
print ' '.$modules[$numero]->getName();
print "</td>";

View File

@@ -61,12 +61,18 @@ $formfile = new FormFile($db);
print_fiche_titre($langs->trans("Backup"),'','setup');
// TODO Define ExecTimeLimit and MemoryLimit
$ExecTimeLimit=600;
if (!empty($ExecTimeLimit)) {
@set_time_limit($ExecTimeLimit);
// Cette page peut etre longue. On augmente le delai autorise.
// Ne fonctionne que si on est pas en safe_mode.
$err=error_reporting();
error_reporting(0); // Disable all errors
//error_reporting(E_ALL);
@set_time_limit($ExecTimeLimit); // Need more than 240 on Windows 7/64
error_reporting($err);
}
if (!empty($MemoryLimit)) {
@ini_set('memory_limit', $MemoryLimit);
@ini_set('memory_limit', $MemoryLimit);
}
// Start with empty buffer
@@ -158,12 +164,14 @@ if ($what == 'mysql')
if ($handle)
{
$ok=0;
dol_syslog("Run command ".$fullcommandcrypted);
$handlein = popen($fullcommandclear, 'r');
while (!feof($handlein))
{
$read = fgets($handlein);
fwrite($handle,$read);
if (preg_match('/-- Dump completed/i',$read)) $ok=1;
}
pclose($handlein);
@@ -192,7 +200,7 @@ if ($what == 'mysql')
if ($compression == 'none') fclose($handle);
if ($compression == 'gz') gzclose($handle);
if ($compression == 'bz') bzclose($handle);
if (preg_match('/^-- MySql/i',$errormsg)) $errormsg=''; // Pas erreur
if ($ok && preg_match('/^-- MySql/i',$errormsg)) $errormsg=''; // Pas erreur
else
{
// Renommer fichier sortie en fichier erreur

View File

@@ -27,6 +27,8 @@
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT.'/lib/admin.lib.php');
$langs->load("install");
if (! $user->admin)
accessforbidden();

View File

@@ -42,7 +42,7 @@ function printBookmarksList ($aDb, $aLangs)
$bookm = new Bookmark($db);
$langs->load("@bookmarks");
$langs->load("bookmarks");
$url= $_SERVER["PHP_SELF"].(! empty($_SERVER["QUERY_STRING"])?'?'.$_SERVER["QUERY_STRING"]:'');

View File

@@ -1,13 +0,0 @@
/*
* Language code: it_IT
* Automatic generated via autotranslator.php tool
* Generation date 2009-08-13 20:49:18
*/
// START - Lines generated via autotranslator.php tool (2009-08-13 20:49:18).
// Reference language: en_US
CHARSET=UTF-8
Bookm=Segnalibri
NewBookmark=Nuovo segnalibro
AddThisPageToBookmarks=Aggiungi questa pagina ai preferiti
// STOP - Lines generated via autotranslator.php tool (2009-08-13 20:49:18).

View File

@@ -27,6 +27,5 @@ CREATE TABLE llx_pos_tmp (
remise real NOT NULL,
total_ht double(24,8) NOT NULL,
total_tva double(24,8) NOT NULL,
total_ttc double(24,8) NOT NULL,
PRIMARY KEY (id)
total_ttc double(24,8) NOT NULL
) ENGINE=innodb;

View File

@@ -32,6 +32,7 @@ require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/categories/class/categorie.class.php");
$langs->load("categories");
$langs->load("products");
$mesg=isset($_GET["mesg"])?'<div class="ok">'.$_GET["mesg"].'</div>':'';
@@ -424,7 +425,7 @@ function formCategory($db,$object,$typeid)
print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td width="40%">';
print $langs->trans("ClassifyInCategory");
print $langs->trans("ClassifyInCategory");
print $html->select_all_categories($typeid);
print '</td><td>';
print '<input type="submit" class="button" value="'.$langs->trans("Classify").'"></td>';

View File

@@ -265,54 +265,112 @@ class Categorie
}
/**
* Delete category
* Les produits et sous-categories deviennent orphelins
* si $all = false, et sont (seront :) supprimes sinon
* Delete a category from database
* @param user Object user that ask to delete
*/
function remove ($all = false)
function delete($user)
{
global $conf,$langs;
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_product";
$sql .= " WHERE fk_categorie = ".$this->id;
$error=0;
dol_syslog("Categorie::remove");
$this->db->begin();
if (!$this->db->query($sql))
if (! $error)
{
dol_print_error($this->db);
return -1;
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_societe";
$sql .= " WHERE fk_categorie = ".$this->id;
if (!$this->db->query($sql))
{
$this->error=$this->db->lasterror();
dol_syslog("Error sql=".$sql." ".$this->error, LOG_ERR);
$error++;
}
}
if (! $error)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_fournisseur";
$sql .= " WHERE fk_categorie = ".$this->id;
if (!$this->db->query($sql))
{
$this->error=$this->db->lasterror();
dol_syslog("Error sql=".$sql." ".$this->error, LOG_ERR);
$error++;
}
}
if (! $error)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_product";
$sql .= " WHERE fk_categorie = ".$this->id;
if (!$this->db->query($sql))
{
$this->error=$this->db->lasterror();
dol_syslog("Error sql=".$sql." ".$this->error, LOG_ERR);
$error++;
}
}
if (! $error)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_member";
$sql .= " WHERE fk_categorie = ".$this->id;
if (!$this->db->query($sql))
{
$this->error=$this->db->lasterror();
dol_syslog("Error sql=".$sql." ".$this->error, LOG_ERR);
$error++;
}
}
// Link childs to parent
if (! $error)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_association";
$sql .= " WHERE fk_categorie_mere = ".$this->id;
$sql .= " OR fk_categorie_fille = ".$this->id;
if (!$this->db->query($sql))
{
$this->error=$this->db->lasterror();
dol_syslog("Error sql=".$sql." ".$this->error, LOG_ERR);
$error++;
}
}
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_association";
$sql .= " WHERE fk_categorie_mere = ".$this->id;
$sql .= " OR fk_categorie_fille = ".$this->id;
if (!$this->db->query($sql))
// Delete category
if (! $error)
{
dol_print_error($this->db);
return -1;
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie";
$sql .= " WHERE rowid = ".$this->id;
if (!$this->db->query($sql))
{
$this->error=$this->db->lasterror();
dol_syslog("Error sql=".$sql." ".$this->error, LOG_ERR);
$error++;
}
else
{
// Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
$interface=new Interfaces($this->db);
$result=$interface->run_triggers('CATEGORY_DELETE',$this,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; $this->error=join(',',$this->errors); }
// Fin appel triggers
}
}
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie";
$sql .= " WHERE rowid = ".$this->id;
if (!$this->db->query($sql))
if (! $error)
{
dol_print_error($this->db);
return -1;
$this->db->commit();
return 1;
}
else
{
// Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
$interface=new Interfaces($this->db);
$result=$interface->run_triggers('CATEGORY_DELETE',$this,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
// Fin appel triggers
return 1;
$this->db->rollback();
return -1;
}
}
/**
* Ajout d'une sous-categorie

View File

@@ -60,7 +60,7 @@ $type=$c->type;
if ($user->rights->categorie->supprimer && $_POST["action"] == 'confirm_delete' && $_POST['confirm'] == 'yes')
{
if ($c->remove() >= 0)
if ($c->delete($user) >= 0)
{
header("Location: ".DOL_URL_ROOT.'/categories/index.php?type='.$type);
exit;
@@ -331,7 +331,7 @@ if($c->type == 2)
// List of members
if ($c->type == 3)
{
require_once(DOL_DOCUMENT_ROOT."/adherents/class/Adherent.class.php");
require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php");
$prods = $c->get_type("member","Adherent");
if ($prods < 0)

View File

@@ -422,18 +422,18 @@ class ActionComm extends CommonObject
{
global $conf, $user;
$now=gmmktime(); // gmmktime(0,0,0,1,1,1970) -> 0, mktime(0,0,0,1,1,1970) -> -3600;
$now=dol_now();
$this->nbtodo=$this->nbtodolate=0;
$sql = "SELECT a.id, a.datep as dp";
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a";
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
$sql.= " FROM (".MAIN_DB_PREFIX."actioncomm as a";
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= ")";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid AND s.entity in (0, ".$conf->entity.")";
$sql.= " WHERE a.percent < 100";
$sql.= " AND a.fk_soc = s.rowid";
$sql.= " AND s.entity = ".$conf->entity;
if ($user->societe_id) $sql.=" AND a.fk_soc = ".$user->societe_id;
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND a.fk_soc = sc.fk_soc AND sc.fk_user = " .$user->id;
if ($user->societe_id) $sql.=" AND a.fk_soc = ".$user->societe_id;
//print $sql;
$resql=$this->db->query($sql);
if ($resql)

View File

@@ -132,6 +132,8 @@ class CActionComm {
if ($obj->module == 'invoice' && ! $conf->facture->enabled) $qualified=0;
if ($obj->module == 'order' && ! $conf->commande->enabled) $qualified=0;
if ($obj->module == 'propal' && ! $conf->propal->enabled) $qualified=0;
if ($obj->module == 'invoice_supplier' && ! $conf->fournisseur->enabled) $qualified=0;
if ($obj->module == 'order_supplier' && ! $conf->fournisseur->enabled) $qualified=0;
}
if ($qualified)
{

View File

@@ -573,7 +573,7 @@ if (GETPOST('action') == 'create')
print '</td></tr>';
// If company is forced, we propose contacts (may be contact is also forced)
if (GETPOST("socid") > 0)
if (GETPOST("contactid") > 0 || GETPOST("socid") > 0)
{
print '<tr><td nowrap>'.$langs->trans("ActionOnContact").'</td><td>';
$html->select_contacts(GETPOST("socid"),GETPOST('contactid'),'contactid',1,1);

View File

@@ -392,7 +392,7 @@ if ($showbirthday)
$maxlength=16;
$cachethirdparties=array();
$cachecontact=array();
$cachecontacts=array();
// Define theme_datacolor array
$color_file = DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/graph-color.php";
@@ -484,7 +484,7 @@ else // View by day
echo " </tr>\n";
echo " <tr>\n";
echo ' <td class="'.$style.'" width="14%" valign="top" nowrap="nowrap">';
show_day_events ($db, $day, $month, $year, $month, $style, $actionarray, 0, 0, $maxlength);
show_day_events ($db, $day, $month, $year, $month, $style, $actionarray, 0, 80, $newparam);
echo "</td>\n";
echo " </tr>\n";
echo '</table>';
@@ -510,15 +510,13 @@ llxFooter('$Date$ - $Revision$');
* @param $maxPrint Nb of actions to show each day on month view (0 means non limit)
* @param $maxnbofchar Nb of characters to show for event line
* @param $newparam Parameters on current URL
* @param $companystatic Object thirdparty
* @param $contactstatic Object contact
*/
function show_day_events($db, $day, $month, $year, $monthshown, $style, &$actionarray, $maxPrint=0, $maxnbofchar=14, $newparam='')
{
global $user, $conf, $langs;
global $filter, $filtera, $filtert, $filterd, $status;
global $theme_datacolor;
global $cachethirdparty, $cachecontact;
global $cachethirdparties, $cachecontacts;
if ($_GET["action"] == 'maxPrint')
{
@@ -613,16 +611,18 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$action
$thirdparty->fetch($action->societe->id);
$cachethirdparties[$action->societe->id]=$thirdparty;
}
else $thirdparty=$cachethirdparties[$event->societe->id];
$linerelatedto.=$thirdparty->getNomUrl(1,'',$length);
}
if (! empty($action->contact->id))
{
if (empty($cachetcontact[$action->societe->id]))
if (empty($cachecontacts[$action->contact->id]))
{
$contact=new Contact($db);
$contact->fetch($action->contact->id);
$cachethirdparties[$action->contact->id]=$thirdparty;
$cachecontacts[$action->contact->id]=$contact;
}
else $contact=$cachecontacts[$event->contact->id];
if ($linerelatedto) $linerelatedto.=' / ';
$linerelatedto.=$contact->getNomUrl(1,'',$length);
}

View File

@@ -22,7 +22,7 @@
/**
* \file htdocs/comm/action/listactions.php
* \ingroup agenda
* \brief Page liste des actions commerciales
* \brief Page to list actions
* \version $Id$
*/
@@ -56,7 +56,7 @@ $offset = $limit * $page ;
if (! $sortorder)
{
$sortorder="ASC";
if ($status == 'todo') $sortorder="DESC";
if ($status == 'todo') $sortorder="ASC";
if ($status == 'done') $sortorder="DESC";
}
if (! $sortfield)

View File

@@ -198,7 +198,9 @@ if ($socid > 0)
if ($objsoc->client)
{
print '<tr><td nowrap>';
$langs->load("compta");
print '<tr><td nowrap>';
print $langs->trans('CustomerCode').'</td><td colspan="3">';
print $objsoc->code_client;
if ($objsoc->check_codeclient() <> 0) print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>';

View File

@@ -140,7 +140,7 @@ if ($conf->contrat->enabled && $user->rights->contrat->lire)
*/
if ($conf->propal->enabled && $user->rights->propale->lire)
{
$sql = "SELECT p.rowid, p.ref, p.total_ht, s.rowid as socid, s.nom, s.client";
$sql = "SELECT p.rowid, p.ref, p.total_ht, s.rowid as socid, s.nom as name, s.client, s.canvas";
$sql.= " FROM ".MAIN_DB_PREFIX."propal as p";
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
@@ -158,8 +158,8 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
if ($num > 0)
{
print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\">";
print "<td colspan=\"3\">".$langs->trans("ProposalsDraft")."</td></tr>";
print '<tr class="liste_titre">';
print '<td colspan="3">'.$langs->trans("ProposalsDraft").'</td></tr>';
$i = 0;
$var=true;
@@ -174,8 +174,9 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
print '</td>';
print '<td nowrap="nowrap">';
$companystatic->id=$obj->socid;
$companystatic->nom=$obj->nom;
$companystatic->name=$obj->name;
$companystatic->client=$obj->client;
$companystatic->canvas=$obj->canvas;
print $companystatic->getNomUrl(1,'customer',16);
print '</td>';
print '<td align="right" nowrap="nowrap">'.price($obj->total_ht).'</td></tr>';
@@ -205,7 +206,7 @@ if ($conf->commande->enabled && $user->rights->commande->lire)
{
$langs->load("orders");
$sql = "SELECT c.rowid, c.ref, c.total_ttc, s.rowid as socid, s.nom, s.client";
$sql = "SELECT c.rowid, c.ref, c.total_ttc, s.rowid as socid, s.nom as name, s.client, s.canvas";
$sql.= " FROM ".MAIN_DB_PREFIX."commande as c";
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
@@ -235,8 +236,9 @@ if ($conf->commande->enabled && $user->rights->commande->lire)
print '<tr '.$bc[$var].'><td nowrap="nowrap"><a href="../commande/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref.'</a></td>';
print '<td nowrap="nowrap">';
$companystatic->id=$obj->socid;
$companystatic->nom=$obj->nom;
$companystatic->name=$obj->name;
$companystatic->client=$obj->client;
$companystatic->canvas=$obj->canvas;
print $companystatic->getNomUrl(1,'customer',16);
print '</td>';
print '<td align="right" nowrap="nowrap">'.price($obj->total_ttc).'</td></tr>';
@@ -277,7 +279,7 @@ $max=3;
if ($conf->propal->enabled && $user->rights->propale->lire)
{
$sql = "SELECT s.nom, s.rowid, p.rowid as propalid, p.total_ht, p.ref, p.fk_statut, p.datep as dp";
$sql = "SELECT s.nom as name, s.rowid as socid, s.client, s.canvas, p.rowid as propalid, p.total_ht, p.ref, p.fk_statut, p.datep as dp";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql.= ", ".MAIN_DB_PREFIX."propal as p";
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
@@ -326,12 +328,18 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
print '</td>';
print '<td align="left"><a href="fiche.php?socid='.$objp->rowid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).'</a></td>';
print "<td align=\"right\">";
print dol_print_date($db->jdate($objp->dp),'day')."</td>\n";
print "<td align=\"right\">".price($objp->total_ht)."</td>\n";
print "<td align=\"center\" width=\"14\">".$propalstatic->LibStatut($objp->fk_statut,3)."</td>\n";
print "</tr>\n";
print '<td align="left">';
$companystatic->id=$objp->socid;
$companystatic->name=$objp->name;
$companystatic->client=$objp->client;
$companystatic->canvas=$objp->canvas;
print $companystatic->getNomUrl(1,'customer',44);
print '</td>';
print '<td align="right">';
print dol_print_date($db->jdate($objp->dp),'day').'</td>'."\n";
print '<td align="right">'.price($objp->total_ht).'</td>'."\n";
print '<td align="center" width="14">'.$propalstatic->LibStatut($objp->fk_statut,3).'</td>'."\n";
print '</tr>'."\n";
$i++;
$var=!$var;
}
@@ -352,7 +360,7 @@ if ($conf->societe->enabled && $user->rights->societe->lire)
{
$langs->load("boxes");
$sql = "SELECT s.rowid,s.nom,s.client,s.datec,s.tms";
$sql = "SELECT s.rowid, s.nom as name, s.client, s.datec,s.tms";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE s.client IN (1, 2, 3)";
@@ -376,15 +384,15 @@ if ($conf->societe->enabled && $user->rights->societe->lire)
print '</tr>';
if ($num)
{
$company=new Societe($db);
while ($i < $num)
{
$objp = $db->fetch_object($resql);
$company->id=$objp->rowid;
$company->nom=$objp->nom;
$company->client=$objp->client;
$companystatic->id=$objp->rowid;
$companystatic->name=$objp->name;
$companystatic->client=$objp->client;
$companystatic->canvas=$objp->canvas;
print '<tr '.$bc[$var].'>';
print '<td nowrap="nowrap">'.$company->getNomUrl(1,'customer',48).'</td>';
print '<td nowrap="nowrap">'.$companystatic->getNomUrl(1,'customer',48).'</td>';
print '<td align="right" nowrap>';
if ($objp->client == 2 || $objp->client == 3) print $langs->trans("Prospect");
if ($objp->client == 3) print ' / ';
@@ -412,7 +420,7 @@ if ($conf->fournisseur->enabled && $user->rights->societe->lire)
{
$langs->load("boxes");
$sql = "SELECT s.nom, s.rowid, s.datec as dc, s.tms as dm";
$sql = "SELECT s.nom as name, s.rowid, s.datec as dc, s.canvas, s.tms as dm";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE s.fournisseur = 1";
@@ -435,14 +443,14 @@ if ($conf->fournisseur->enabled && $user->rights->societe->lire)
print '</tr>';
if ($num)
{
$company=new Societe($db);
while ($i < $num && $i < $max)
{
$objp = $db->fetch_object($result);
$company->id=$objp->rowid;
$company->nom=$objp->nom;
print '<tr '.$bc[$var].'>';
print '<td nowrap="nowrap">'.$company->getNomUrl(1,'supplier',48).'</td>';
$companystatic->id=$objp->rowid;
$companystatic->name=$objp->name;
$companystatic->canvas=$objp->canvas;
print '<tr '.$bc[$var].'>';
print '<td nowrap="nowrap">'.$companystatic->getNomUrl(1,'supplier',44).'</td>';
print '<td align="right">'.dol_print_date($db->jdate($objp->dm),'day').'</td>';
print '</tr>';
$var=!$var;
@@ -485,7 +493,8 @@ if ($conf->contrat->enabled && $user->rights->contrat->lire && 0) // TODO A REFA
{
$langs->load("contracts");
$sql = "SELECT s.nom, s.rowid, c.statut, c.rowid as contratid, p.ref, c.mise_en_service as datemes, c.fin_validite as datefin, c.date_cloture as dateclo";
$sql = "SELECT s.nom as name, s.rowid, s.canvas, ";
$sql.= " c.statut, c.rowid as contratid, p.ref, c.mise_en_service as datemes, c.fin_validite as datefin, c.date_cloture as dateclo";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql.= ", ".MAIN_DB_PREFIX."contrat as c";
$sql.= ", ".MAIN_DB_PREFIX."product as p";
@@ -517,7 +526,12 @@ if ($conf->contrat->enabled && $user->rights->contrat->lire && 0) // TODO A REFA
{
$obj = $db->fetch_object($resql);
print "<tr ".$bc[$var]."><td><a href=\"../contrat/fiche.php?id=".$obj->contratid."\">".img_object($langs->trans("ShowContract","contract"))." ".$obj->ref."</a></td>";
print "<td><a href=\"fiche.php?socid=".$obj->rowid."\">".img_object($langs->trans("ShowCompany","company"))." ".$obj->nom."</a></td>\n";
print '<td>';
$companystatic->id=$objp->rowid;
$companystatic->name=$objp->name;
$companystatic->canvas=$objp->canvas;
print $companystatic->getNomUrl(1,'customer',44);
print '</td>'."\n";
print "<td align=\"right\">".$staticcontrat->LibStatut($obj->statut,3)."</td></tr>\n";
$var=!$var;
$i++;
@@ -590,12 +604,12 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
print "</td>";
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 dol_print_date($db->jdate($obj->dp),'day')."</td>\n";
print "<td align=\"right\">".price($obj->total_ttc)."</td>";
print "<td align=\"center\" width=\"14\">".$propalstatic->LibStatut($obj->fk_statut,3)."</td>\n";
print "</tr>\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 dol_print_date($db->jdate($obj->dp),'day').'</td>'."\n";
print '<td align="right">'.price($obj->total_ttc).'</td>';
print '<td align="center" width="14">'.$propalstatic->LibStatut($obj->fk_statut,3).'</td>'."\n";
print '</tr>'."\n";
$i++;
$total += $obj->total_ttc;
}

View File

@@ -101,6 +101,11 @@ if ($_REQUEST["action"] == 'sendallconfirmed' && $_REQUEST['confirm'] == 'yes')
$message.='<br><br><div class="warning">'.$langs->trans("MailingNeedCommand2").'</div>';
$_GET["action"]='';
}
else if ($conf->global->MAILING_LIMIT_SENDBYWEB < 0)
{
$message='<div class="warning">'.$langs->trans("NotEnoughPermissions").'</div>';
$_GET["action"]='';
}
else
{
$mil=new Mailing($db);
@@ -297,14 +302,18 @@ if ($_POST["action"] == 'send' && empty($_POST["cancel"]))
$mil = new Mailing($db);
$result=$mil->fetch($_POST["mailid"]);
$error=0;
$upload_dir = $conf->mailing->dir_output . "/" . get_exdir($mil->id,2,0,1);
$mil->sendto = $_POST["sendto"];
$mil->sendto = $_POST["sendto"];
if (! $mil->sendto)
{
$message='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->trans("MailTo")).'</div>';
$error++;
}
if ($mil->sendto)
if (! $error)
{
// Ajout CSS
if (!empty($mil->bgcolor)) $arr_css['bgcolor'] = $mil->bgcolor;
@@ -419,7 +428,7 @@ if ($_REQUEST["action"] == 'setdesc' || $_REQUEST["action"] == 'setfrom' || $_RE
}
// Action update emailing
if (! empty($_POST["removedfile"]))
if (! empty($_POST["removedfileid"]))
{
$mil = new Mailing($db);
$mil->fetch($_POST["id"]);
@@ -429,7 +438,7 @@ if (! empty($_POST["removedfile"]))
$listofpaths=dol_dir_list($upload_dir,'all',0,'','','name',SORT_ASC,0);
// Remove file
$filenb=($_POST["removedfile"]-1);
$filenb=($_POST["removedfileid"]-1);
if (isset($listofpaths[$filenb]))
{
$result=dol_delete_file($listofpaths[$filenb]['fullname'],1);
@@ -602,7 +611,7 @@ if ($_GET["action"] == 'create')
print_fiche_titre($langs->trans("NewMailing"));
if ($message) print "$message<br>";
if ($message) print $message."<br>";
print '<table class="border" width="100%">';
print '<tr><td width="25%" class="fieldrequired">'.$langs->trans("MailTitle").'</td><td><input class="flat" name="titre" size="40" value="'.$_POST['titre'].'"></td></tr>';
@@ -645,6 +654,8 @@ else
dol_fiche_head($head, 'card', $langs->trans("Mailing"), 0, 'email');
if ($message) print $message."<br>";
// Confirmation de la validation du mailing
if ($_GET["action"] == 'valid')
{
@@ -691,7 +702,7 @@ else
else
{
$text='';
if (empty($conf->file->mailing_limit_sendbyweb))
if ($conf->file->mailing_limit_sendbyweb == 0)
{
$text.=$langs->trans("MailingNeedCommand");
$text.='<br><textarea cols="60" rows="'.ROWS_2.'" wrap="soft">php ./scripts/emailings/mailing-send.php '.$_GET["id"].'</textarea>';
@@ -736,8 +747,17 @@ else
$nbemail = ($mil->nbemail?$mil->nbemail:'<font class="error">'.$langs->trans("NoTargetYet").'</font>');
if (!empty($conf->global->MAILING_LIMIT_SENDBYWEB) && is_numeric($nbemail) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail)
{
$text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
print $html->textwithpicto($nbemail,$text,1,'warning');
if ($conf->global->MAILING_LIMIT_SENDBYWEB > 0)
{
$text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
print $html->textwithpicto($nbemail,$text,1,'warning');
}
else
{
$text=$langs->trans('NotEnoughPermissions');
print $html->textwithpicto($nbemail,$text,1,'warning');
}
}
else
{
@@ -804,7 +824,14 @@ else
if (($mil->statut == 1 || $mil->statut == 2) && $mil->nbemail > 0 && $user->rights->mailing->valider)
{
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=sendall&amp;id='.$mil->id.'">'.$langs->trans("SendMailing").'</a>';
if ($conf->global->MAILING_LIMIT_SENDBYWEB < 0)
{
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("SendMailing").'</a>';
}
else
{
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=sendall&amp;id='.$mil->id.'">'.$langs->trans("SendMailing").'</a>';
}
}
if ($user->rights->mailing->creer)
@@ -888,7 +915,6 @@ else
foreach($listofpaths as $key => $val)
{
print img_mime($listofpaths[$key]['name']).' '.$listofpaths[$key]['name'];
//print ' <input type="image" style="border: 0px;" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/delete.png" value="'.($key+1).'" name="removedfile">';
print '<br>';
}
}
@@ -975,7 +1001,8 @@ else
foreach($listofpaths as $key => $val)
{
print img_mime($listofpaths[$key]['name']).' '.$listofpaths[$key]['name'];
print ' <input type="image" style="border: 0px;" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/delete.png" value="'.($key+1).'" name="removedfile">';
print ' <input type="image" style="border: 0px;" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/delete.png" value="removedfile" name="removedfile" />';
print '<input type="hidden" name="removedfileid" value="'.($key+1).'" />';
print '<br>';
}
}

View File

@@ -45,12 +45,11 @@ $langs->load('bills');
$langs->load('orders');
$langs->load('products');
$sall=isset($_GET["sall"])?$_GET["sall"]:$_POST["sall"];
if (isset($_GET["msg"])) { $mesg=$_GET["mesg"]; }
$year=isset($_GET["year"])?$_GET["year"]:"";
$month=isset($_GET["month"])?$_GET["month"]:"";
$socid=isset($_GET['socid'])?$_GET['socid']:$_POST['socid'];
$mesg=isset($_GET['mesg'])?$_GET['mesg']:'';
$sall=GETPOST("sall");
$mesg=(GETPOST("msg") ? GETPOST("msg") : GETPOST("mesg"));
$year=GETPOST("year");
$month=GETPOST("month");
$socid=GETPOST('socid');
// Security check
$module='propale';
@@ -370,11 +369,11 @@ if ($_GET["action"] == 'classifybilled')
/*
* Cloture de la propale
*/
if ($_REQUEST['action'] == 'setstatut' && $user->rights->propale->cloturer)
if (GETPOST('action') == 'setstatut' && $user->rights->propale->cloturer)
{
if (! $_POST['cancel'])
{
if (empty($_REQUEST['statut']))
if (! GETPOST('statut'))
{
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("CloseAs")).'</div>';
$_REQUEST['action']='statut';
@@ -672,12 +671,14 @@ if ($_POST['action'] == "addline" && $user->rights->propale->creer)
{
$pu_ht = $prod->multiprices[$object->client->price_level];
$pu_ttc = $prod->multiprices_ttc[$object->client->price_level];
$price_min = $prod->multiprices_min[$object->client->price_level];
$price_base_type = $prod->multiprices_base_type[$object->client->price_level];
}
else
{
$pu_ht = $prod->price;
$pu_ttc = $prod->price_ttc;
$price_min = $prod->price_min;
$price_base_type = $prod->price_base_type;
}
@@ -714,9 +715,9 @@ if ($_POST['action'] == "addline" && $user->rights->propale->creer)
$info_bits=0;
if ($tva_npr) $info_bits |= 0x01;
if ($prod->price_min && (price2num($pu_ht)*(1-price2num($_POST['remise_percent'])/100) < price2num($prod->price_min)))
if ($price_min && (price2num($pu_ht)*(1-price2num($_POST['remise_percent'])/100) < price2num($price_min)))
{
$mesg = '<div class="error">'.$langs->trans("CantBeLessThanMinPrice",price2num($prod->price_min,'MU').' '.$langs->trans("Currency".$conf->monnaie)).'</div>' ;
$mesg = '<div class="error">'.$langs->trans("CantBeLessThanMinPrice",price2num($price_min,'MU').' '.$langs->trans("Currency".$conf->monnaie)).'</div>' ;
}
else
{
@@ -794,10 +795,12 @@ if ($_POST['action'] == 'updateligne' && $user->rights->propale->creer && $_POST
{
$product = new Product($db) ;
$res=$product->fetch($productid) ;
$price_min = $product->price_min;
if ($conf->global->PRODUIT_MULTIPRICES && $object->client->price_level) $price_min = $product->multiprices_min[$object->client->price_level];
}
if ($productid && $product->price_min && (price2num($up_ht)*(1-price2num($_POST['remise_percent'])/100) < price2num($product->price_min)))
if ($productid && $price_min && (price2num($up_ht)*(1-price2num($_POST['remise_percent'])/100) < price2num($price_min)))
{
$mesg = '<div class="error">'.$langs->trans("CantBeLessThanMinPrice",price2num($product->price_min,'MU').' '.$langs->trans("Currency".$conf->monnaie)).'</div>' ;
$mesg = '<div class="error">'.$langs->trans("CantBeLessThanMinPrice",price2num($price_min,'MU').' '.$langs->trans("Currency".$conf->monnaie)).'</div>' ;
}
else
{
@@ -960,8 +963,8 @@ $companystatic=new Societe($db);
$now=dol_now();
$id = $_REQUEST['id']?$_REQUEST['id']:$_REQUEST['id'];
$ref= $_REQUEST['ref'];
$id = GETPOST('id');
$ref= GETPOST('ref');
if ($id > 0 || ! empty($ref))
{
@@ -969,7 +972,7 @@ if ($id > 0 || ! empty($ref))
* Show object in view mode
*/
if ($mesg)
if ($mesg)
{
if (! preg_match('/div class=/',$mesg)) print '<div class="ok">'.$mesg.'</div><br>';
else print $mesg."<br>";
@@ -1504,7 +1507,7 @@ if ($id > 0 || ! empty($ref))
// Close
if ($object->statut == 1 && $user->rights->propale->cloturer)
{
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=statut#close"';
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=statut'.(empty($conf->global->MAIN_JUMP_TAG)?'':'#close').'"';
print '>'.$langs->trans('Close').'</a>';
}
@@ -1555,7 +1558,13 @@ if ($id > 0 || ! empty($ref))
foreach($object->linked_object as $linked_object => $linked_objectid)
{
if($conf->$linked_object->enabled && $linked_object != $object->element)
$element = $subelement = $linked_object;
if (preg_match('/^([^_]+)_([^_]+)/i',$linked_object,$regs))
{
$element = $regs[1];
$subelement = $regs[2];
}
if($conf->$element->enabled && $element != $object->element)
{
$somethingshown=$object->showLinkedObjectBlock($linked_object,$linked_objectid,$somethingshown);
}

View File

@@ -137,8 +137,8 @@ class Propal extends CommonObject
$langs->load("propal");
$this->labelstatut[0]=$langs->trans("PropalStatusDraft");
$this->labelstatut[1]=$langs->trans("PropalStatusValidated");
$this->labelstatut[2]=$langs->trans("PropalStatusSigned");
$this->labelstatut[3]=$langs->trans("PropalStatusNotSigned");
$this->labelstatut[2]=($conf->global->PROPAL_STATUS_SIGNED_LABEL ? $conf->global->PROPAL_STATUS_SIGNED_LABEL : $langs->trans("PropalStatusSigned"));
$this->labelstatut[3]=($conf->global->PROPAL_STATUS_NOTSIGNED_LABEL ? $conf->global->PROPAL_STATUS_NOTSIGNED_LABEL : $langs->trans("PropalStatusNotSigned"));
$this->labelstatut[4]=$langs->trans("PropalStatusBilled");
$this->labelstatut_short[0]=$langs->trans("PropalStatusDraftShort");
$this->labelstatut_short[1]=$langs->trans("Opened");
@@ -484,7 +484,7 @@ class Propal extends CommonObject
$sql.= " , tva_tx=".price2num($txtva);
$sql.= " , localtax1_tx=".price2num($txlocaltax1);
$sql.= " , localtax2_tx=".price2num($txlocaltax2);
$sql.= " , description='".addslashes($desc)."'";
$sql.= " , description='".$this->db->escape($desc)."'";
$sql.= " , total_ht=".price2num($total_ht);
$sql.= " , total_tva=".price2num($total_tva);
$sql.= " , total_localtax1=".price2num($total_localtax1);
@@ -631,13 +631,13 @@ class Propal extends CommonObject
$sql.= ", '".$this->db->idate($now)."'";
$sql.= ", '(PROV)'";
$sql.= ", ".($user->id > 0 ? "'".$user->id."'":"null");
$sql.= ", '".addslashes($this->note)."'";
$sql.= ", '".addslashes($this->note_public)."'";
$sql.= ", '".$this->db->escape($this->note)."'";
$sql.= ", '".$this->db->escape($this->note_public)."'";
$sql.= ", '".$this->modelpdf."'";
$sql.= ", '".$this->db->idate($this->fin_validite)."'";
$sql.= ", ".$this->cond_reglement_id;
$sql.= ", ".$this->mode_reglement_id;
$sql.= ", '".addslashes($this->ref_client)."'";
$sql.= ", '".$this->db->escape($this->ref_client)."'";
$sql.= ", ".($this->date_livraison!=''?"'".$this->db->idate($this->date_livraison)."'":'null');
$sql.= ", ".$conf->entity;
$sql.= ")";
@@ -773,9 +773,10 @@ class Propal extends CommonObject
/**
* \brief Insert en base un objet propal completement definie par ses donnees membres (resultant d'une copie par exemple).
* \return int l'id du nouvel objet propal en base si ok, <0 si ko
* \see create
* Insert en base un objet propal completement definie par ses donnees membres (resultant d'une copie par exemple).
* @param user Object user making creation
* @return int Id of new created object if OK, <0 if KO
* @see create
*/
function create_from($user)
{
@@ -785,10 +786,10 @@ class Propal extends CommonObject
}
/**
* \brief Load an object from its id and create a new one in database
* \param fromid Id of object to clone
* \param invertdetail Reverse sign of amounts for lines
* \return int New id of clone
* Load an object from its id and create a new one in database
* @param fromid Id of object to clone
* @param invertdetail Reverse sign of amounts for lines
* @return int New id of clone
*/
function createFromClone($fromid,$invertdetail=0)
{
@@ -800,14 +801,14 @@ class Propal extends CommonObject
$object=new Propal($this->db);
$this->db->begin();
// Instantiate hooks of thirdparty module
if (is_array($conf->hooks_modules) && !empty($conf->hooks_modules))
{
$object->callHooks('objectcard');
}
$this->db->begin();
// Load source object
$object->fetch($fromid);
$objFrom = $object;
@@ -885,10 +886,10 @@ class Propal extends CommonObject
}
/**
* \brief Load a proposal from database and its ligne array
* \param rowid id of object to load
* \param ref Ref of proposal
* \return int >0 if OK, <0 if KO
* Load a proposal from database and its ligne array
* @param rowid id of object to load
* @param ref Ref of proposal
* @return int >0 if OK, <0 if KO
*/
function fetch($rowid,$ref='')
{
@@ -983,7 +984,7 @@ class Propal extends CommonObject
*/
$sql = "SELECT d.rowid, d.fk_propal, d.description, d.price, d.tva_tx, d.localtax1_tx, d.localtax2_tx, d.qty, d.fk_remise_except, d.remise_percent, d.subprice, d.fk_product,";
$sql.= " d.info_bits, d.total_ht, d.total_tva, d.total_localtax1, d.total_localtax2, d.total_ttc, d.marge_tx, d.marque_tx, d.special_code, d.rang, d.product_type,";
$sql.= " p.ref, p.label, p.description as product_desc";
$sql.= ' p.ref as product_ref, p.description as product_desc, p.fk_product_type, p.label';
$sql.= " FROM ".MAIN_DB_PREFIX."propaldet as d";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON d.fk_product = p.rowid";
$sql.= " WHERE d.fk_propal = ".$this->id;
@@ -1027,10 +1028,11 @@ class Propal extends CommonObject
$line->fk_product = $objp->fk_product;
$line->ref = $objp->product_ref;
$line->libelle = $objp->label; // TODO deprecated
$line->label = $objp->label; // Label produit
$line->product_desc = $objp->product_desc; // Description produit
$line->ref = $objp->ref;
$line->fk_product_type = $objp->fk_product_type;
$this->lines[$i] = $line;
//dol_syslog("1 ".$line->fk_product);
@@ -1061,9 +1063,9 @@ class Propal extends CommonObject
}
/**
* \brief Passe au statut valider une propale
* \param user Objet utilisateur qui valide
* \return int <0 si ko, >=0 si ok
* Passe au statut valider une propale
* @param user Objet utilisateur qui valide
* @return int <0 si ko, >=0 si ok
*/
function valid($user, $notrigger=0)
{
@@ -1118,10 +1120,10 @@ class Propal extends CommonObject
/**
* \brief Define proposal date
* \param user Object user that modify
* \param date Date
* \return int <0 if KO, >0 if OK
* Define proposal date
* @param user Object user that modify
* @param date Date
* @return int <0 if KO, >0 if OK
*/
function set_date($user, $date)
{
@@ -1237,7 +1239,7 @@ class Propal extends CommonObject
{
dol_syslog('Propale::set_ref_client this->id='.$this->id.', ref_client='.$ref_client);
$sql = 'UPDATE '.MAIN_DB_PREFIX.'propal SET ref_client = '.(empty($ref_client) ? 'NULL' : '\''.addslashes($ref_client).'\'');
$sql = 'UPDATE '.MAIN_DB_PREFIX.'propal SET ref_client = '.(empty($ref_client) ? 'NULL' : '\''.$this->db->escape($ref_client).'\'');
$sql.= ' WHERE rowid = '.$this->id;
if ($this->db->query($sql) )
{
@@ -1340,7 +1342,7 @@ class Propal extends CommonObject
$this->db->begin();
$sql = "UPDATE ".MAIN_DB_PREFIX."propal";
$sql.= " SET fk_statut = ".$statut.", note = '".addslashes($note)."', date_cloture=".$this->db->idate(mktime()).", fk_user_cloture=".$user->id;
$sql.= " SET fk_statut = ".$statut.", note = '".$this->db->escape($note)."', date_cloture=".$this->db->idate(mktime()).", fk_user_cloture=".$user->id;
$sql.= " WHERE rowid = ".$this->id;
$resql=$this->db->query($sql);
@@ -1540,45 +1542,49 @@ class Propal extends CommonObject
}
}
$sql= "SELECT rowid as facid, facnumber, total, datef as df, fk_user_author, fk_statut, paye";
$sql.= " FROM ".MAIN_DB_PREFIX."facture";
$sql.= " WHERE rowid IN (".implode(',',$linkedInvoices).")";
if (sizeof($linkedInvoices) > 0)
{
$sql= "SELECT rowid as facid, facnumber, total, datef as df, fk_user_author, fk_statut, paye";
$sql.= " FROM ".MAIN_DB_PREFIX."facture";
$sql.= " WHERE rowid IN (".implode(',',$linkedInvoices).")";
dol_syslog("Propal::InvoiceArrayList sql=".$sql);
$resql=$this->db->query($sql);
dol_syslog("Propal::InvoiceArrayList sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)
{
$tab_sqlobj=array();
$nump = $this->db->num_rows($resql);
for ($i = 0;$i < $nump;$i++)
{
$sqlobj = $this->db->fetch_object($resql);
$tab_sqlobj[] = $sqlobj;
}
$this->db->free($resql);
if ($resql)
{
$tab_sqlobj=array();
$nump = $this->db->num_rows($resql);
for ($i = 0;$i < $nump;$i++)
{
$sqlobj = $this->db->fetch_object($resql);
$tab_sqlobj[] = $sqlobj;
}
$this->db->free($resql);
$nump = sizeOf($tab_sqlobj);
$nump = sizeOf($tab_sqlobj);
if ($nump)
{
$i = 0;
while ($i < $nump)
{
$obj = array_shift($tab_sqlobj);
if ($nump)
{
$i = 0;
while ($i < $nump)
{
$obj = array_shift($tab_sqlobj);
$ga[$i] = $obj;
$ga[$i] = $obj;
$i++;
}
}
return $ga;
}
else
{
return -1;
}
}
$i++;
}
}
return $ga;
}
else
{
return -1;
}
}
else return $ga;
}
/**
* \brief Efface propal
@@ -2315,7 +2321,7 @@ class PropaleLigne
$sql.= ' info_bits, ';
$sql.= ' total_ht, total_tva, total_localtax1, total_localtax2, total_ttc, special_code, rang, marge_tx, marque_tx)';
$sql.= " VALUES (".$this->fk_propal.",";
$sql.= " '".addslashes($this->desc)."',";
$sql.= " '".$this->db->escape($this->desc)."',";
$sql.= " ".($this->fk_product?"'".$this->fk_product."'":"null").",";
$sql.= " '".$this->product_type."',";
$sql.= " ".($this->fk_remise_except?"'".$this->fk_remise_except."'":"null").",";
@@ -2379,7 +2385,7 @@ class PropaleLigne
// Mise a jour ligne en base
$sql = "UPDATE ".MAIN_DB_PREFIX."propaldet SET";
$sql.= " description='".addslashes($this->desc)."'";
$sql.= " description='".$this->db->escape($this->desc)."'";
if ($fk_remise_except) $sql.= ",fk_remise_except=".$this->fk_remise_except;
else $sql.= ",fk_remise_except=null";
$sql.= ",tva_tx='".price2num($this->tva_tx)."'";

View File

@@ -88,13 +88,14 @@ class PropaleStats extends Stats
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE date_format(p.datep,'%Y') = ".$year;
$sql.= " AND ".$this->where;
$sql.= " GROUP BY dm DESC";
$sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC');
return $this->_getNbByMonth($year, $sql);
}
/**
* Renvoie le nombre de propale par ann<EFBFBD>e
* Renvoie le nombre de propale par annee
*
*/
function getNbByYear()
@@ -105,12 +106,13 @@ class PropaleStats extends Stats
$sql.= " FROM ".$this->from;
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE ".$this->where;
$sql.= " GROUP BY dm DESC";
$sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC');
return $this->_getNbByYear($sql);
}
/**
* Renvoie le nombre de propale par mois pour une ann<EFBFBD>e donn<EFBFBD>e
* Renvoie le nombre de propale par mois pour une annee donnee
*
*/
function getAmountByMonth($year)
@@ -122,7 +124,8 @@ class PropaleStats extends Stats
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE date_format(p.datep,'%Y') = ".$year;
$sql.= " AND ".$this->where;
$sql.= " GROUP BY dm DESC";
$sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC');
return $this->_getAmountByMonth($year, $sql);
}
@@ -139,7 +142,8 @@ class PropaleStats extends Stats
if (!$user->rights->societe->client->voir && !$this->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE date_format(p.datep,'%Y') = ".$year;
$sql.= " AND ".$this->where;
$sql.= " GROUP BY dm DESC";
$sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC');
return $this->_getAverageByMonth($year, $sql);
}
@@ -157,7 +161,8 @@ class PropaleStats extends Stats
$sql.= " FROM ".$this->from;
if (!$user->rights->societe->client->voir && !$this->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE ".$this->where;
$sql.= " GROUP BY year DESC";
$sql.= " GROUP BY year";
$sql.= $this->db->order('year','DESC');
return $this->_getAllByYear($sql);
}

View File

@@ -809,6 +809,9 @@ class Commande extends CommonObject
if (empty($qty)) $qty=0;
if (empty($info_bits)) $info_bits=0;
if (empty($rang)) $rang=0;
if (empty($txtva)) $txtva=0;
if (empty($txlocaltax1)) $txlocaltax1=0;
if (empty($txlocaltax2)) $txlocaltax2=0;
$remise_percent=price2num($remise_percent);
$qty=price2num($qty);
@@ -1342,15 +1345,20 @@ class Commande extends CommonObject
*/
function nb_expedition()
{
$sql = 'SELECT count(*) FROM '.MAIN_DB_PREFIX.'expedition as e';
$sql .=" WHERE e.fk_commande = ".$this->id;
$sql = 'SELECT count(*)';
$sql.= ' FROM '.MAIN_DB_PREFIX.'expedition as e';
$sql.= ', '.MAIN_DB_PREFIX.'element_element as el';
$sql.= ' WHERE el.fk_source = '.$this->id;
$sql.= " AND el.fk_target = e.rowid";
$sql.= " AND el.targettype = 'shipping'";
$resql = $this->db->query($sql);
if ($resql)
{
$row = $this->db->fetch_row($resql);
return $row[0];
}
$resql = $this->db->query($sql);
if ($resql)
{
$row = $this->db->fetch_row($resql);
return $row[0];
}
else dol_print_error($this->db);
}
/**
@@ -1852,6 +1860,8 @@ class Commande extends CommonObject
if (empty($txtva)) $txtva=0;
if (empty($txlocaltax1)) $txlocaltax1=0;
if (empty($txlocaltax2)) $txlocaltax2=0;
if (empty($remise)) $remise=0;
if (empty($remise_percent)) $remise_percent=0;
$remise_percent=price2num($remise_percent);
$qty=price2num($qty);
$pu = price2num($pu);

View File

@@ -100,13 +100,14 @@ class CommandeStats extends Stats
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE date_format(c.date_commande,'%Y') = ".$year;
$sql.= " AND ".$this->where;
$sql.= " GROUP BY dm DESC";
$sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC');
return $this->_getNbByMonth($year, $sql);
}
/**
* Renvoie le nombre de commande par ann<EFBFBD>e
* Renvoie le nombre de commande par annee
*
*/
function getNbByYear()
@@ -118,13 +119,14 @@ class CommandeStats extends Stats
$sql.= " FROM ".$this->from;
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE ".$this->where;
$sql.= " GROUP BY dm DESC";
$sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC');
return $this->_getNbByYear($sql);
}
/**
* Renvoie le nombre de commande par mois pour une ann<EFBFBD>e donn<EFBFBD>e
* Renvoie le nombre de commande par mois pour une annee donnee
*
*/
function getAmountByMonth($year)
@@ -137,13 +139,14 @@ class CommandeStats extends Stats
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE date_format(c.date_commande,'%Y') = ".$year;
$sql.= " AND ".$this->where;
$sql.= " GROUP BY dm DESC";
$sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC');
return $this->_getAmountByMonth($year, $sql);
}
/**
* Renvoie le nombre de commande par mois pour une ann<EFBFBD>e donn<EFBFBD>e
* Renvoie le nombre de commande par mois pour une annee donnee
*
*/
function getAverageByMonth($year)
@@ -156,7 +159,8 @@ class CommandeStats extends Stats
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE date_format(c.date_commande,'%Y') = ".$year;
$sql.= " AND ".$this->where;
$sql.= " GROUP BY dm DESC";
$sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC');
return $this->_getAverageByMonth($year, $sql);
}
@@ -174,7 +178,8 @@ class CommandeStats extends Stats
$sql.= " FROM ".$this->from;
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE ".$this->where;
$sql.= " GROUP BY year DESC";
$sql.= " GROUP BY year";
$sql.= $this->db->order('year','DESC');
return $this->_getAllByYear($sql);
}

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2005 Patrick Rouillon <patrick@rouillon.net>
* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,11 +19,11 @@
*/
/**
\file htdocs/commande/contact.php
\ingroup commande
\brief Onglet de gestion des contacts de commande
\version $Id$
*/
* \file htdocs/commande/contact.php
* \ingroup commande
* \brief Onglet de gestion des contacts de commande
* \version $Id$
*/
require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php");
@@ -31,7 +31,6 @@ require_once(DOL_DOCUMENT_ROOT."/contact/class/contact.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/order.lib.php");
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php');
$langs->load("facture");
$langs->load("orders");
$langs->load("sendings");
$langs->load("companies");
@@ -217,9 +216,9 @@ if ($id > 0 || ! empty($ref))
/*
* Ajouter une ligne de contact
* Non affich<EFBFBD> en mode modification de ligne
* Non affiche en mode modification de ligne
*/
if ($_GET["action"] != 'editline' && $user->rights->facture->creer)
if ($_GET["action"] != 'editline' && $user->rights->commande->creer)
{
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Source").'</td>';

View File

@@ -54,7 +54,7 @@ $comid = GETPOST("id");
if (empty($comid)) $comid=GETPOST("orderid");
// Security check
$socid=0;
$socid=GETPOST('socid');
if ($user->societe_id) $socid=$user->societe_id;
$result=restrictedArea($user,'commande',$comid,'');
@@ -402,12 +402,14 @@ if ($_POST['action'] == 'addline' && $user->rights->commande->creer)
{
$pu_ht = $prod->multiprices[$object->client->price_level];
$pu_ttc = $prod->multiprices_ttc[$object->client->price_level];
$price_min = $prod->multiprices_min[$object->client->price_level];
$price_base_type = $prod->multiprices_base_type[$object->client->price_level];
}
else
{
$pu_ht = $prod->price;
$pu_ttc = $prod->price_ttc;
$price_min = $prod->price_min;
$price_base_type = $prod->price_base_type;
}
@@ -450,10 +452,10 @@ if ($_POST['action'] == 'addline' && $user->rights->commande->creer)
if ($result >= 0)
{
if($prod->price_min && (price2num($pu_ht)*(1-price2num($_POST['remise_percent'])/100) < price2num($prod->price_min)))
if($price_min && (price2num($pu_ht)*(1-price2num($_POST['remise_percent'])/100) < price2num($price_min)))
{
//print "CantBeLessThanMinPrice ".$up_ht." - ".GETPOST('remise_percent')." - ".$product->price_min;
$mesg = '<div class="error">'.$langs->trans("CantBeLessThanMinPrice",price2num($prod->price_min,'MU').' '.$langs->trans("Currency".$conf->monnaie)).'</div>' ;
$mesg = '<div class="error">'.$langs->trans("CantBeLessThanMinPrice",price2num($price_min,'MU').' '.$langs->trans("Currency".$conf->monnaie)).'</div>' ;
}
else
{
@@ -548,10 +550,12 @@ if ($_POST['action'] == 'updateligne' && $user->rights->commande->creer && $_POS
$product = new Product($db);
$product->fetch($productid);
$type=$product->type;
$price_min = $product->price_min;
if ($conf->global->PRODUIT_MULTIPRICES && $object->client->price_level) $price_min = $product->multiprices_min[$object->client->price_level];
}
if ($product->price_min && GETPOST('productid') && (price2num($up_ht)*(1-price2num($_POST['elremise_percent'])/100) < price2num($product->price_min)))
if ($price_min && GETPOST('productid') && (price2num($up_ht)*(1-price2num($_POST['elremise_percent'])/100) < price2num($price_min)))
{
$mesg = '<div class="error">'.$langs->trans("CantBeLessThanMinPrice",price2num($product->price_min,'MU').' '.$langs->trans("Currency".$conf->monnaie)).'</div>' ;
$mesg = '<div class="error">'.$langs->trans("CantBeLessThanMinPrice",price2num($price_min,'MU').' '.$langs->trans("Currency".$conf->monnaie)).'</div>' ;
$result=-1;
}
@@ -1856,7 +1860,13 @@ else
foreach($object->linked_object as $linked_object => $linked_objectid)
{
if($conf->$linked_object->enabled && $linked_object != $object->element)
$element = $subelement = $linked_object;
if (preg_match('/^([^_]+)_([^_]+)/i',$linked_object,$regs))
{
$element = $regs[1];
$subelement = $regs[2];
}
if($conf->$element->enabled && $element != $object->element)
{
$somethingshown=$object->showLinkedObjectBlock($linked_object,$linked_objectid,$somethingshown);
}

View File

@@ -48,7 +48,7 @@ for ($i = 0 ; $i < $num ; $i++)
$linkedObjectBlock->fetch($objectid[$i]);
$var=!$var;
?>
<tr <?php echo $bc[$var]; ?> ><td>
<tr <?php echo $GLOBALS['bc'][$var]; ?> ><td>
<a href="<?php echo DOL_URL_ROOT.'/commande/fiche.php?id='.$linkedObjectBlock->id ?>"><?php echo img_object($langs->trans("ShowOrder"),"order").' '.$linkedObjectBlock->ref; ?></a></td>
<td align="center"><?php echo dol_print_date($linkedObjectBlock->date,'day'); ?></td>
<td align="right"><?php echo price($linkedObjectBlock->total_ht); ?></td>

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copytight (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
@@ -34,6 +34,8 @@ require_once(DOL_DOCUMENT_ROOT."/core/class/html.formcompany.class.php");
$langs->load("banks");
$langs->load("companies");
$action=GETPOST("action");
// Security check
if (isset($_GET["id"]) || isset($_GET["ref"]))
{
@@ -49,7 +51,9 @@ $result=restrictedArea($user,'banque',$id,'bank_account','','',$fieldid);
*/
if ($_POST["action"] == 'add')
{
// Creation compte
$error=0;
// Create account
$account = new Account($db,0);
$account->ref = dol_sanitizeFileName(trim($_POST["ref"]));
@@ -73,7 +77,21 @@ if ($_POST["action"] == 'add')
$account->min_desired = $_POST["account_min_desired"];
$account->comment = trim($_POST["account_comment"]);
if ($account->label)
if ($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED && empty($account->account_number))
{
$message='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("AccountancyCode")).'</div>';
$action='create'; // Force chargement page en mode creation
$error++;
}
if (empty($account->label))
{
$message='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("LabelBankCashAccount")).'</div>';
$action='create'; // Force chargement page en mode creation
$error++;
}
if (! $error)
{
$id = $account->create($user->id);
if ($id > 0)
@@ -82,17 +100,16 @@ if ($_POST["action"] == 'add')
}
else {
$message='<div class="error">'.$account->error().'</div>';
$_REQUEST["action"]='create'; // Force chargement page en mode creation
$action='create'; // Force chargement page en mode creation
}
} else {
$message='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("LabelBankCashAccount")).'</div>';
$_REQUEST["action"]='create'; // Force chargement page en mode creation
}
}
if ($_POST["action"] == 'update' && ! $_POST["cancel"])
{
// Modification
$error=0;
// Update account
$account = new Account($db, $_POST["id"]);
$account->fetch($_POST["id"]);
@@ -127,7 +144,21 @@ if ($_POST["action"] == 'update' && ! $_POST["cancel"])
$account->min_desired = $_POST["account_min_desired"];
$account->comment = trim($_POST["account_comment"]);
if ($account->label)
if ($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED && empty($account->account_number))
{
$message='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("AccountancyCode")).'</div>';
$action='edit'; // Force chargement page en mode creation
$error++;
}
if (empty($account->label))
{
$message='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("LabelBankCashAccount")).'</div>';
$action='edit'; // Force chargement page en mode creation
$error++;
}
if (! $error)
{
$result = $account->update($user);
if ($result >= 0)
@@ -137,11 +168,8 @@ if ($_POST["action"] == 'update' && ! $_POST["cancel"])
else
{
$message='<div class="error">'.$account->error().'</div>';
$_REQUEST["action"]='edit'; // Force chargement page edition
$action='edit'; // Force chargement page edition
}
} else {
$message='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("LabelBankCashAccount")).'</div>';
$_REQUEST["action"]='create'; // Force chargement page en mode creation
}
}
@@ -173,7 +201,7 @@ $htmlcompany = new FormCompany($db);
/* */
/* ************************************************************************** */
if ($_REQUEST["action"] == 'create')
if ($action == 'create')
{
$account=new Account($db);
@@ -214,17 +242,6 @@ if ($_REQUEST["action"] == 'create')
print $form->select_type_comptes_financiers(isset($_POST["type"])?$_POST["type"]:1,"type");
print '</td></tr>';
// Code compta
if ($conf->global->MAIN_BANCK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED)
{
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("AccountancyCode").'</td>';
print '<td colspan="3"><input type="text" name="account_number" value="'.$account->account_number.'"></td></tr>';
}
else
{
print '<input type="hidden" name="account_number" value="'.$account->account_number.'">';
}
// Currency
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("Currency").'</td>';
print '<td colspan="3">';
@@ -266,6 +283,26 @@ if ($_REQUEST["action"] == 'create')
}
print '</td></tr>';
// Conciliable
/*print '<tr><td valign="top">'.$langs->trans("Conciliable").'</td>';
print '<td colspan="3">';
if ($account->type == 0 || $account->type == 1) print '<input type="checkbox" class="flat" name="norappro" '.($account->rappro?'':'checked="true"').'"> '.$langs->trans("DisableConciliation");
if ($account->type == 2) print $langs->trans("No").' ('.$langs->trans("CashAccount").')';
print '</td></tr>';
*/
// Accountancy code
if ($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED)
{
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("AccountancyCode").'</td>';
print '<td colspan="3"><input type="text" name="account_number" value="'.$account->account_number.'"></td></tr>';
}
else
{
print '<tr><td valign="top">'.$langs->trans("AccountancyCode").'</td>';
print '<td colspan="3"><input type="text" name="account_number" value="'.$account->account_number.'"></td></tr>';
}
// Web
print '<tr><td valign="top">'.$langs->trans("Web").'</td>';
print '<td colspan="3"><input size="50" type="text" class="flat" name="url" value="'.$_POST["url"].'"></td></tr>';
@@ -307,7 +344,7 @@ if ($_REQUEST["action"] == 'create')
/* ************************************************************************** */
else
{
if (($_GET["id"] || $_GET["ref"]) && $_REQUEST["action"] != 'edit')
if (($_GET["id"] || $_GET["ref"]) && $action != 'edit')
{
$account = new Account($db);
if ($_GET["id"])
@@ -331,7 +368,7 @@ else
/*
* Confirmation to delete
*/
if ($_REQUEST["action"] == 'delete')
if ($action == 'delete')
{
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$account->id,$langs->trans("DeleteAccount"),$langs->trans("ConfirmDeleteAccount"),"confirm_delete");
if ($ret == 'html') print '<br>';
@@ -387,12 +424,9 @@ else
if ($account->type == 2) print $langs->trans("No").' ('.$langs->trans("CashAccount").')';
print '</td></tr>';
// Code compta
if ($conf->accounting->enabled)
{
// Accountancy code
print '<tr><td valign="top">'.$langs->trans("AccountancyCode").'</td>';
print '<td colspan="3">'.$account->account_number.'</td></tr>';
}
print '<tr><td valign="top">'.$langs->trans("BalanceMinimalAllowed").'</td>';
print '<td colspan="3">'.$account->min_allowed.'</td></tr>';
@@ -416,7 +450,6 @@ else
/*
* Barre d'actions
*
*/
print '<div class="tabsAction">';
@@ -441,10 +474,10 @@ else
/* */
/* ************************************************************************** */
if ($_REQUEST["id"] && $_REQUEST["action"] == 'edit' && $user->rights->banque->configurer)
if (GETPOST("id") && $action == 'edit' && $user->rights->banque->configurer)
{
$account = new Account($db, $_REQUEST["id"]);
$account->fetch($_REQUEST["id"]);
$account = new Account($db);
$account->fetch(GETPOST("id"));
print_fiche_titre($langs->trans("EditFinancialAccount"));
print "<br>";
@@ -525,21 +558,23 @@ else
}
print '</td></tr>';
// Conciliable
print '<tr><td valign="top">'.$langs->trans("Conciliable").'</td>';
print '<td colspan="3">';
if ($account->type == 0 || $account->type == 1) print '<input type="checkbox" class="flat" name="norappro" '.($account->rappro?'':'checked="true"').'"> '.$langs->trans("DisableConciliation");
if ($account->type == 2) print $langs->trans("No").' ('.$langs->trans("CashAccount").')';
print '</td></tr>';
// Code compta
if ($conf->accounting->enabled)
// Accountancy code
if ($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED)
{
print '<tr><td valign="top">'.$langs->trans("AccountancyCode").'</td>';
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("AccountancyCode").'</td>';
print '<td colspan="3"><input type="text" name="account_number" value="'.(isset($_POST["account_number"])?$_POST["account_number"]:$account->account_number).'"></td></tr>';
}
else
{
print '<input type="hidden" name="account_number" value="'.(isset($_POST["account_number"])?$_POST["account_number"]:$account->account_number).'">';
print '<tr><td valign="top">'.$langs->trans("AccountancyCode").'</td>';
print '<td colspan="3"><input type="text" name="account_number" value="'.(isset($_POST["account_number"])?$_POST["account_number"]:$account->account_number).'"></td></tr>';
}
// Balance

View File

@@ -846,7 +846,7 @@ if ($mode == 'showalltime')
{
print '<tr><td align="center">';
$file = "balance".$account.".png";
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=bank_temp&file='.$file.'" alt="" title="">';
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=banque_temp&file='.$file.'" alt="" title="">';
print '</td></tr>';
}

View File

@@ -292,7 +292,7 @@ if ($result)
print '</a>';
}
else if ($links[$key]['type']=='company') {
print '<a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$links[$key]['url_id'].'">';
print '<a href="'.DOL_URL_ROOT.'/societe/soc.php?socid='.$links[$key]['url_id'].'">';
print img_object($langs->trans('ShowCustomer'),'company').' ';
print $links[$key]['label'];
print '</a>';

View File

@@ -60,6 +60,7 @@ function llxHeader($head = '', $title='', $help_url='', $target='', $disablejs=0
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account";
$sql.= " WHERE entity = ".$conf->entity;
$sql.= " AND clos = 0";
$sql.= " ORDER BY label";
$resql = $db->query($sql);
if ($resql)

View File

@@ -102,7 +102,7 @@ $sql.= ", st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta ";
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", sc.fk_soc, sc.fk_user ";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."c_stcomm as st";
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE s.fk_stcomm = st.id AND s.client=1";
$sql.= " WHERE s.fk_stcomm = st.id AND s.client in (1,3)";
$sql.= " AND s.entity = ".$conf->entity;
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;

View File

@@ -271,26 +271,26 @@ class Deplacement extends CommonObject
{
return $langs->trans($this->statuts_short[$statut]);
}
if ($mode == 2)
{
if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0').' '.$langs->trans($this->statuts_short[$statut]);
if ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut6').' '.$langs->trans($this->statuts_short[$statut]);
}
if ($mode == 3)
{
if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0');
if ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut6');
}
if ($mode == 4)
{
if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0').' '.$langs->trans($this->statuts[$statut]);
if ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut6').' '.$langs->trans($this->statuts[$statut]);
}
if ($mode == 5)
{
if ($statut==0) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut0');
if ($statut==1) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut6');
}
if ($mode == 2)
{
//if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0').' '.$langs->trans($this->statuts_short[$statut]);
if ($statut==0 || $statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4').' '.$langs->trans($this->statuts_short[$statut]);
}
if ($mode == 3)
{
//if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0');
if ($statut==0 || $statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4');
}
if ($mode == 4)
{
//if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0').' '.$langs->trans($this->statuts[$statut]);
if ($statut==0 || $statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4').' '.$langs->trans($this->statuts[$statut]);
}
if ($mode == 5)
{
//if ($statut==0) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut0');
if ($statut==0 || $statut==1) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut4');
}
}
/**

View File

@@ -94,7 +94,8 @@ class DeplacementStats extends Stats
$sql.= " FROM ".$this->from;
$sql.= " WHERE YEAR(dated) = ".$year;
$sql.= " AND ".$this->where;
$sql.= " GROUP BY dm DESC";
$sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC');
$res=$this->_getNbByMonth($year, $sql);
//var_dump($res);print '<br>';
@@ -113,7 +114,8 @@ class DeplacementStats extends Stats
$sql.= " FROM ".$this->from;
$sql.= " WHERE date_format(dated,'%Y') = ".$year;
$sql.= " AND ".$this->where;
$sql.= " GROUP BY dm DESC";
$sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC');
$res=$this->_getAmountByMonth($year, $sql);
//var_dump($res);print '<br>';
@@ -131,7 +133,8 @@ class DeplacementStats extends Stats
$sql.= " FROM ".$this->from;
$sql.= " WHERE date_format(dated,'%Y') = ".$year;
$sql.= " AND ".$this->where;
$sql.= " GROUP BY dm DESC";
$sql.= " GROUP BY dm";
$sql.= $this->db->order('dm','DESC');
return $this->_getAverageByMonth($year, $sql);
}
@@ -145,7 +148,8 @@ class DeplacementStats extends Stats
$sql = "SELECT date_format(dated,'%Y') as year, count(*) as nb, sum(".$this->field.") as total, avg(".$this->field.") as avg";
$sql.= " FROM ".$this->from;
$sql.= " WHERE ".$this->where;
$sql.= " GROUP BY year DESC";
$sql.= " GROUP BY year";
$sql.= $this->db->order('year','DESC');
return $this->_getAllByYear($sql);
}

View File

@@ -2,7 +2,7 @@
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -20,10 +20,10 @@
*/
/**
\file htdocs/compta/deplacement/index.php
\brief Page liste des deplacements
\version $Id$
*/
* \file htdocs/compta/deplacement/index.php
* \brief Page liste des deplacements
* \version $Id$
*/
require("../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/compta/tva/class/tva.class.php");
@@ -58,7 +58,7 @@ $sql.= " u.name, u.firstname"; // Qui
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
$sql.= ", ".MAIN_DB_PREFIX."deplacement as d";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on d.fk_soc = s.rowid";
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc";
if (!$user->rights->societe->client->voir && !$socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc";
$sql.= " WHERE d.fk_user = u.rowid";
$sql.= " AND d.entity = ".$conf->entity;
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND sc.fk_user = " .$user->id;

View File

@@ -87,7 +87,7 @@ for ($i = 0 ; $i < 3 ; $i++)
print '<td><a href="liste.php?statut='.$i.'">'.$donstatic->LibStatut($i,4).'</a></td>';
print '<td align="right">'.$nb[$i].'</td>';
print '<td align="right">'.($nb[$i]?price($somme[$i],'MT'):'&nbsp;').'</td>';
print '<td align="right">'.($nb[$i]?price($somme[$i]/$nb[$i],'MT'):'&nbsp;').'</td>';
print '<td align="right">'.($nb[$i]?price(price2num($somme[$i]/$nb[$i],'MT')):'&nbsp;').'</td>';
$totalnb += $nb[$i];
$total += $somme[$i];
print "</tr>";
@@ -97,7 +97,7 @@ print '<tr class="liste_total">';
print '<td>'.$langs->trans("Total").'</td>';
print '<td align="right">'.$totalnb.'</td>';
print '<td align="right">'.price($total,'MT').'</td>';
print '<td align="right">'.($totalnb?price($total/$totalnb,'MT'):'&nbsp;').'</td>';
print '<td align="right">'.($totalnb?price(price2num($total/$totalnb,'MT')):'&nbsp;').'</td>';
print '</tr>';
print "</table>";

View File

@@ -76,7 +76,9 @@ if ($result)
if ($statut >= 0)
{
print_barre_liste($libelle[$statut], $page, "liste.php", "&statut=$statut&sortorder=$sortorder&sortfield=$sortfield");
$donationstatic->statut=$statut;
$label=$donationstatic->getLibStatut(0);
print_barre_liste($label, $page, "liste.php", "&statut=$statut&sortorder=$sortorder&sortfield=$sortfield");
}
else
{

View File

@@ -54,7 +54,7 @@ $sall=isset($_GET['sall'])?trim($_GET['sall']):trim($_POST['sall']);
$projectid=isset($_GET['projectid'])?$_GET['projectid']:0;
// Security check
$socid=isset($_GET['socid'])?$_GET['socid']:$_POST['socid'];
$socid=GETPOST("socid");
$facid=GETPOST("id");
if (empty($facid)) $facid=GETPOST("facid"); // For backward compatibility
$ref=GETPOST("ref");
@@ -851,12 +851,14 @@ if (($_POST['action'] == 'addline' || $_POST['action'] == 'addline_predef') && $
{
$pu_ht = $prod->multiprices[$object->client->price_level];
$pu_ttc = $prod->multiprices_ttc[$object->client->price_level];
$price_min = $prod->multiprices_min[$object->client->price_level];
$price_base_type = $prod->multiprices_base_type[$object->client->price_level];
}
else
{
$pu_ht = $prod->price;
$pu_ttc = $prod->price_ttc;
$price_min = $prod->price_min;
$price_base_type = $prod->price_base_type;
}
@@ -905,9 +907,9 @@ if (($_POST['action'] == 'addline' || $_POST['action'] == 'addline_predef') && $
if ($result >= 0)
{
if($prod->price_min && (price2num($pu_ht)*(1-price2num($_POST['remise_percent'])/100) < price2num($prod->price_min)))
if($price_min && (price2num($pu_ht)*(1-price2num($_POST['remise_percent'])/100) < price2num($price_min)))
{
$object->error = $langs->trans("CantBeLessThanMinPrice",price2num($prod->price_min,'MU').' '.$langs->trans("Currency".$conf->monnaie)) ;
$object->error = $langs->trans("CantBeLessThanMinPrice",price2num($price_min,'MU').' '.$langs->trans("Currency".$conf->monnaie)) ;
$result = -1 ;
}
else
@@ -1003,11 +1005,13 @@ if ($_POST['action'] == 'updateligne' && $user->rights->facture->creer && $_POST
$product = new Product($db);
$product->fetch($productid);
$type=$product->type;
$price_min = $product->price_min;
if ($conf->global->PRODUIT_MULTIPRICES && $object->client->price_level) $price_min = $product->multiprices_min[$object->client->price_level];
}
if ($object->type!=2 && $product->price_min && GETPOST('productid') && (price2num($up_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($product->price_min)))
if ($object->type!=2 && $price_min && GETPOST('productid') && (price2num($up_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($price_min)))
{
//print "CantBeLessThanMinPrice ".$up_ht." - ".GETPOST('remise_percent')." - ".$product->price_min;
$mesg = '<div class="error">'.$langs->trans("CantBeLessThanMinPrice",price2num($product->price_min,'MU').' '.$langs->trans("Currency".$conf->monnaie)).'</div>';
$mesg = '<div class="error">'.$langs->trans("CantBeLessThanMinPrice",price2num($price_min,'MU').' '.$langs->trans("Currency".$conf->monnaie)).'</div>';
$result=-1;
}
@@ -1310,20 +1314,20 @@ if (($_POST['action'] == 'send' || $_POST['action'] == 'relance') && ! $_POST['a
/*
* Generate document
*/
if ($_REQUEST['action'] == 'builddoc') // En get ou en post
if (GETPOST('action') == 'builddoc') // En get ou en post
{
$object->fetch($facid);
$object->fetch_thirdparty();
if ($_REQUEST['model'])
if (GETPOST('model'))
{
$object->setDocModel($user, $_REQUEST['model']);
$object->setDocModel($user, GETPOST('model'));
}
// Define output language
$outputlangs = $langs;
$newlang='';
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id'];
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id')) $newlang=GETPOST('lang_id');
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
if (! empty($newlang))
{
@@ -2776,7 +2780,13 @@ else
foreach($object->linked_object as $linked_object => $linked_objectid)
{
if($conf->$linked_object->enabled && $linked_object != $object->element)
$element = $subelement = $linked_object;
if (preg_match('/^([^_]+)_([^_]+)/i',$linked_object,$regs))
{
$element = $regs[1];
$subelement = $regs[2];
}
if($conf->$element->enabled && $element != $object->element)
{
$somethingshown=$object->showLinkedObjectBlock($linked_object,$linked_objectid,$somethingshown);
}

File diff suppressed because it is too large Load Diff

View File

@@ -44,6 +44,7 @@ class Facture extends CommonObject
{
var $db;
var $error;
var $errors=array();
var $element='facture';
var $table_element='facture';
var $table_element_line = 'facturedet';
@@ -293,7 +294,7 @@ class Facture extends CommonObject
else
{
dol_syslog("There is ".sizeof($this->lines)." lines that are array lines");
for ($i = 0 ; $i < sizeof($this->lines) ; $i++)
foreach ($this->lines as $i => $val)
{
if (($this->lines[$i]->info_bits & 0x01) == 0) // We keep only lines with first bit = 0
{
@@ -464,6 +465,11 @@ class Facture extends CommonObject
dol_syslog("Facture::createFromCurrent invertdetail=".$invertdetail." socid=".$this->socid." nboflines=".sizeof($facture->lines));
$facid = $facture->create($user);
if ($facid <= 0)
{
$this->error=$facture->error;
$this->errors=$facture->errors;
}
return $facid;
}
@@ -1676,7 +1682,10 @@ class Facture extends CommonObject
if (empty($info_bits)) $info_bits=0;
if (empty($rang)) $rang=0;
if (empty($ventil)) $ventil=0;
if (empty($txtva)) $txtva=0;
if (empty($txlocaltax1)) $txlocaltax1=0;
if (empty($txlocaltax2)) $txlocaltax2=0;
$remise_percent=price2num($remise_percent);
$qty=price2num($qty);
$pu_ht=price2num($pu_ht);

View File

@@ -91,7 +91,7 @@ class FactureStats extends Stats
$sql.= " FROM ".$this->from;
$sql.= " WHERE ".$this->where;
$sql.= " GROUP BY dm";
$sql.= " ORDER BY dm DESC";
$sql.= $this->db->order('dm','DESC');
return $this->_getNbByYear($sql);
}
@@ -109,7 +109,7 @@ class FactureStats extends Stats
$sql.= " WHERE datef BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'";
$sql.= " AND ".$this->where;
$sql.= " GROUP BY dm";
$sql.= " ORDER BY dm DESC";
$sql.= $this->db->order('dm','DESC');
$res=$this->_getNbByMonth($year, $sql);
//var_dump($res);print '<br>';
@@ -129,7 +129,7 @@ class FactureStats extends Stats
$sql.= " WHERE date_format(datef,'%Y') = ".$year;
$sql.= " AND ".$this->where;
$sql.= " GROUP BY dm";
$sql.= " ORDER BY dm DESC";
$sql.= $this->db->order('dm','DESC');
$res=$this->_getAmountByMonth($year, $sql);
//var_dump($res);print '<br>';
@@ -148,7 +148,7 @@ class FactureStats extends Stats
$sql.= " WHERE datef BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'";
$sql.= " AND ".$this->where;
$sql.= " GROUP BY dm";
$sql.= " ORDER BY dm DESC";
$sql.= $this->db->order('dm','DESC');
return $this->_getAverageByMonth($year, $sql);
}
@@ -163,7 +163,7 @@ class FactureStats extends Stats
$sql.= " FROM ".$this->from;
$sql.= " WHERE ".$this->where;
$sql.= " GROUP BY year";
$sql.= " ORDER BY year DESC";
$sql.= $this->db->order('year','DESC');
return $this->_getAllByYear($sql);
}

View File

@@ -55,9 +55,11 @@ if ($_POST["action"] == "builddoc" && $user->rights->facture->lire)
{
require_once(DOL_DOCUMENT_ROOT."/includes/fpdf/fpdfi/fpdi.php");
require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php');
$factures = dol_dir_list($conf->facture->dir_output,'all',1,implode('\.pdf|',$_POST['toGenerate']).'\.pdf','\.meta$|\.png','date',SORT_DESC) ;
$arrayofexclusion=array();
foreach($_POST['toGenerate'] as $tmppdf) $arrayofexclusion[]=preg_quote($tmppdf.'.pdf','/');
$factures = dol_dir_list($conf->facture->dir_output,'all',1,implode('|',$arrayofexclusion),'\.meta$|\.png','date',SORT_DESC) ;
// liste les fichiers
$files = array() ;
$factures_bak = $factures ;

View File

@@ -48,7 +48,7 @@ for ($i = 0 ; $i < $num ; $i++)
$linkedObjectBlock->fetch($objectid[$i]);
$var=!$var;
?>
<tr <?php echo $bc[$var]; ?> ><td>
<tr <?php echo $GLOBALS['bc'][$var]; ?> ><td>
<a href="<?php echo DOL_URL_ROOT.'/compta/facture.php?facid='.$linkedObjectBlock->id ?>"><?php echo img_object($langs->trans("ShowBill"),"bill").' '.$linkedObjectBlock->ref; ?></a></td>
<td align="center"><?php echo dol_print_date($linkedObjectBlock->date,'day'); ?></td>
<td align="right"><?php echo price($linkedObjectBlock->total_ht); ?></td>

View File

@@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copytight (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
@@ -24,14 +25,24 @@
* \version $Id$
*/
require("../../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php');
require_once("../../../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/compta/bank/class/account.class.php");
$langs->load("bills");
$langs->load("compta");
$langs->load("banks");
$langs->load("categories");
/**
* Replace the default llxHeader function
* @param $head
* @param $title
* @param $help_url
* @param $target
* @param $disablejs
* @param $disablehead
* @param $arrayofjs
* @param $arrayofcss
*/
function llxHeader($head = '', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='')
{
global $db, $user, $conf, $langs;
@@ -44,10 +55,11 @@ function llxHeader($head = '', $title='', $help_url='', $target='', $disablejs=0
// Entry for each bank account
if ($user->rights->banque->lire)
{
$sql = "SELECT rowid, label, courant";
$sql = "SELECT rowid, label, courant, rappro, courant";
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account";
$sql.= " WHERE entity = ".$conf->entity;
$sql.= " AND clos = 0";
$sql.= " ORDER BY label";
$resql = $db->query($sql);
if ($resql)
@@ -55,12 +67,16 @@ function llxHeader($head = '', $title='', $help_url='', $target='', $disablejs=0
$numr = $db->num_rows($resql);
$i = 0;
if ($numr > 0) $menu->add("/compta/bank/index.php",$langs->trans("BankAccounts"),0,$user->rights->banque->lire);
if ($numr > 0) $menu->add('/compta/bank/index.php',$langs->trans("BankAccounts"),0,$user->rights->banque->lire);
while ($i < $numr)
{
$objp = $db->fetch_object($resql);
$menu->add_submenu("/compta/bank/fiche.php?id=".$objp->rowid,$objp->label,1,$user->rights->banque->lire);
$menu->add_submenu('/compta/bank/fiche.php?id='.$objp->rowid,$objp->label,1,$user->rights->banque->lire);
if ($objp->rappro && $objp->courant != 2) // If not cash account and can be reconciliate
{
$menu->add_submenu('/compta/bank/rappro.php?account='.$objp->rowid,$langs->trans("Conciliate"),2,$user->rights->banque->consolidate);
}
/*
$menu->add_submenu("/compta/bank/annuel.php?account=".$objp->rowid ,$langs->trans("IOMonthlyReporting"));
$menu->add_submenu("/compta/bank/graph.php?account=".$objp->rowid ,$langs->trans("Graph"));
@@ -69,11 +85,12 @@ function llxHeader($head = '', $title='', $help_url='', $target='', $disablejs=0
$i++;
}
}
else dol_print_error($db);
$db->free($resql);
}
left_menu('', $help_url, '', $menu->liste, 1);
main_area();
main_area();
}
?>

View File

@@ -386,7 +386,7 @@ class Paiement
if (! in_array($fac->thirdparty->id,$linkaddedforthirdparty)) // Not yet done for this thirdparty
{
$result=$acc->add_url_line($bank_line_id, $fac->thirdparty->id,
DOL_URL_ROOT.'/compta/fiche.php?socid=', $fac->thirdparty->nom, 'company');
DOL_URL_ROOT.'/comm/fiche.php?socid=', $fac->thirdparty->nom, 'company');
if ($result <= 0) dol_print_error($this->db);
$linkaddedforthirdparty[$fac->thirdparty->id]=$fac->thirdparty->id; // Mark as done for this thirdparty
}

View File

@@ -128,7 +128,7 @@ print '<br>';
clearstatcache();
// Affiche lien sur autres annees
// Show link on other years
$linkforyear=array();
$found=0;
if (is_dir($dir))
@@ -138,7 +138,7 @@ if (is_dir($dir))
{
while (($file = readdir($handle))!==false)
{
if (is_dir($dir.'/'.$file) && ! preg_match('/^\./',$file))
if (is_dir($dir.'/'.$file) && ! preg_match('/^\./',$file) && is_numeric($file))
{
$found=1;
$linkforyear[]=$file;

View File

@@ -46,7 +46,7 @@ if ($_GET["id"])
if ($bon->fetch($_GET["id"]) == 0)
{
$head = prelevement_prepare_head($bon);
$head = prelevement_prepare_head($bon);
dol_fiche_head($head, 'invoices', $langs->trans("WithdrawalReceipt"), '', 'payment');
print '<table class="border" width="100%">';
@@ -65,7 +65,7 @@ if ($_GET["id"])
print '<tr><td width="20%">'.$langs->trans('Status').'</td>';
print '<td>'.$bon->getLibStatut(1).'</td>';
print '</tr>';
if($bon->date_trans <> 0)
{
$muser = new User($db);
@@ -84,7 +84,7 @@ if ($_GET["id"])
print dol_print_date($bon->date_credit,'day');
print '</td></tr>';
}
print '</table>';
print '</div>';
@@ -157,7 +157,7 @@ if ($result)
print '<a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$obj->facid.'">'.$obj->ref."</a></td>\n";
print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$obj->socid.'">';
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">';
print img_object($langs->trans("ShowCompany"),"company"). ' '.stripslashes($obj->nom)."</a></td>\n";
print '<td align="center">'.price($obj->total_ttc)."</td>\n";

View File

@@ -131,7 +131,7 @@ if ($result)
print '<a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$obj->facid.'">'.$obj->facnumber."</a></td>\n";
print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$obj->socid.'">'.stripslashes($obj->nom)."</a></td>\n";
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">'.stripslashes($obj->nom)."</a></td>\n";
print '<td align="center">'.price($obj->total_ttc)."</td>\n";

View File

@@ -68,7 +68,7 @@ if ($_GET["id"])
print '<tr><td width="20%">'.$langs->trans('Status').'</td>';
print '<td>'.$bon->getLibStatut(1).'</td>';
print '</tr>';
if($bon->date_trans <> 0)
{
$muser = new User($db);
@@ -87,7 +87,7 @@ if ($_GET["id"])
print dol_print_date($bon->date_credit,'day');
print '</td></tr>';
}
print '</table>';
print '</div>';
@@ -136,7 +136,7 @@ if ($resql)
$var=True;
$total = 0;
while ($i < $num)
{
$obj = $db->fetch_object($resql);
@@ -147,7 +147,7 @@ if ($resql)
print substr('000000'.$obj->rowid, -6);
print '</a></td>';
print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$obj->socid.'">'.stripslashes($obj->nom)."</a></td>\n";
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">'.stripslashes($obj->nom)."</a></td>\n";
print '<td align="right">'.price($obj->amount)."</td>\n";
print '<td>'.$rej->motifs[$obj->motif].'</td>';

View File

@@ -187,7 +187,7 @@ if ($_GET["id"])
print '</td></tr>';
print '<tr><td width="20%">'.$langs->trans("File").'</td><td>';
print '<input type="hidden" name="max_file_size" value="'.$conf->maxfilesize.'">';
print '<input class="flat" type="file" name="userfile" size="80"><br>';
print '<input class="flat" type="file" name="userfile"><br>';
print '</td></tr>';
print '</table><br>';
print '<center><input type="submit" class="button" value="'.$langs->trans("Send").'">';

View File

@@ -72,7 +72,7 @@ if ($_GET["id"])
print '<tr><td width="20%">'.$langs->trans('Status').'</td>';
print '<td>'.$bon->getLibStatut(1).'</td>';
print '</tr>';
if($bon->date_trans <> 0)
{
$muser = new User($db);
@@ -91,7 +91,7 @@ if ($_GET["id"])
print dol_print_date($bon->date_credit,'day');
print '</td></tr>';
}
print '</table>';
print '</div>';
@@ -164,15 +164,15 @@ if ($result)
$obj = $db->fetch_object($result);
print "<tr $bc[$var]><td>";
print $ligne->LibStatut($obj->statut,2);
print "&nbsp;";
print '<a href="'.DOL_URL_ROOT.'/compta/prelevement/ligne.php?id='.$obj->rowid.'">';
print substr('000000'.$obj->rowid, -6);
print '</a></td>';
print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$obj->socid.'">'.stripslashes($obj->nom)."</a></td>\n";
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">'.stripslashes($obj->nom)."</a></td>\n";
print '<td align="center">'.price($obj->amount)."</td>\n";

View File

@@ -101,7 +101,7 @@ if ($result)
print substr('000000'.$obj->rowid, -6)."</a></td>";
print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$obj->socid.'">'.stripslashes($obj->nom)."</a></td>\n";
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">'.stripslashes($obj->nom)."</a></td>\n";
print '<td>'.$rej->motifs[$obj->motif].'</td>';
print "</tr>\n";

View File

@@ -482,7 +482,7 @@ if ($mysoc->tva_assuj == 'franchise') // Non assujeti
print '<tr class="liste_total"><td align="left" colspan="2">'.$langs->trans("Profit").'</td>';
if ($modecompta == 'CREANCES-DETTES') print '<td class="border" align="right">'.price($total_ht).'</td>';
print '<td class="border" align="right">'.price($total_ttc).'</td>';
print '<td align="right">'.price($total_ttc).'</td>';
print '</tr>';
print '<tr>';

View File

@@ -20,10 +20,10 @@
*/
/**
* \file htdocs/compta/tva/clients.php
* \file htdocs/compta/tva/clients.php
* \ingroup tax
* \brief Page des societes
* \version $Id$
* \brief Page des societes
* \version $Id$
*/
require('../../main.inc.php');
@@ -41,31 +41,31 @@ $langs->load("products");
$year=$_REQUEST["year"];
if (empty($year))
{
$year_current = strftime("%Y",dol_now());
$year_start = $year_current;
$year_current = strftime("%Y",dol_now());
$year_start = $year_current;
} else {
$year_current = $year;
$year_start = $year;
$year_current = $year;
$year_start = $year;
}
$date_start=dol_mktime(0,0,0,$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"]);
$date_end=dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"]);
// Quarter
if (empty($date_start) || empty($date_end)) // We define date_start and date_end
{
$q=(! empty($_REQUEST["q"]))?$_REQUEST["q"]:0;
if ($q==0)
{
if (isset($_REQUEST["month"])) { $date_start=dol_get_first_day($year_start,$_REQUEST["month"],false); $date_end=dol_get_last_day($year_start,$_REQUEST["month"],false); }
else $q=1;
}
if ($q==1) { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,3,false); }
if ($q==2) { $date_start=dol_get_first_day($year_start,4,false); $date_end=dol_get_last_day($year_start,6,false); }
if ($q==3) { $date_start=dol_get_first_day($year_start,7,false); $date_end=dol_get_last_day($year_start,9,false); }
if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); }
$q=(! empty($_REQUEST["q"]))?$_REQUEST["q"]:0;
if ($q==0)
{
if (isset($_REQUEST["month"])) { $date_start=dol_get_first_day($year_start,$_REQUEST["month"],false); $date_end=dol_get_last_day($year_start,$_REQUEST["month"],false); }
else $q=1;
}
if ($q==1) { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,3,false); }
if ($q==2) { $date_start=dol_get_first_day($year_start,4,false); $date_end=dol_get_last_day($year_start,6,false); }
if ($q==3) { $date_start=dol_get_first_day($year_start,7,false); $date_end=dol_get_last_day($year_start,9,false); }
if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); }
}
else
{
// TODO We define q
// TODO We define q
}
@@ -89,11 +89,16 @@ $result = restrictedArea($user, 'tax', '', '', 'charges');
*/
$html=new Form($db);
llxHeader();
$company_static=new Societe($db);
$morequerystring='';
$listofparams=array('date_startmonth','date_startyear','date_startday','date_endmonth','date_endyear','date_endday');
foreach($listofparams as $param)
{
if (GETPOST($param)!='') $morequerystring.=($morequerystring?'&':'').$param.'='.GETPOST($param);
}
llxHeader('','','','',0,0,'','',$morequerystring);
$fsearch.='<br>';
$fsearch.=' <input type="hidden" name="year" value="'.$year.'">';
@@ -102,7 +107,7 @@ $fsearch.=' '.$langs->trans("SalesTurnover").' '.$langs->trans("Minimum").': ';
$fsearch.=' <input type="text" name="min" value="'.$min.'">';
// Affiche en-tete du rapport
if ($modetax==1) // Calculate on invoice for goods and services
if ($modetax==1) // Calculate on invoice for goods and services
{
$nom=$langs->trans("VATReportByCustomersInDueDebtMode");
//$nom.='<br>('.$langs->trans("SeeVATReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year_start.'&modetax=0">','</a>').')';
@@ -110,41 +115,41 @@ if ($modetax==1) // Calculate on invoice for goods and services
//$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start-1)."&modetax=".$modetax."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start+1)."&modetax=".$modetax."'>".img_next()."</a>":"");
$description=$langs->trans("RulesVATDue");
//if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='<br>'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite');
$description.=$fsearch;
$description.=$fsearch;
$description.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
$builddate=time();
$builddate=time();
//$exportlink=$langs->trans("NotYetAvailable");
$elementcust=$langs->trans("CustomersInvoices");
$productcust=$langs->trans("Description");
$amountcust=$langs->trans("AmountHT");
if ($mysoc->tva_assuj) $vatcust.=' ('.$langs->trans("ToPay").')';
$elementsup=$langs->trans("SuppliersInvoices");
$productsup=$langs->trans("Description");
$amountsup=$langs->trans("AmountHT");
if ($mysoc->tva_assuj) $vatsup.=' ('.$langs->trans("ToGetBack").')';
$elementcust=$langs->trans("CustomersInvoices");
$productcust=$langs->trans("Description");
$amountcust=$langs->trans("AmountHT");
if ($mysoc->tva_assuj) $vatcust.=' ('.$langs->trans("ToPay").')';
$elementsup=$langs->trans("SuppliersInvoices");
$productsup=$langs->trans("Description");
$amountsup=$langs->trans("AmountHT");
if ($mysoc->tva_assuj) $vatsup.=' ('.$langs->trans("ToGetBack").')';
}
if ($modetax==0) // Invoice for goods, payment for services
if ($modetax==0) // Invoice for goods, payment for services
{
$nom=$langs->trans("VATReportByCustomersInInputOutputMode");
//$nom.='<br>('.$langs->trans("SeeVATReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year_start.'&modetax=1">','</a>').')';
$period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start-1)."&modetax=".$modetax."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start+1)."&modetax=".$modetax."'>".img_next()."</a>":"");
$description=$langs->trans("RulesVATIn");
if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='<br>'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite');
$description.=$fsearch;
//if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='<br>'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite');
$description.=$fsearch;
$description.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
$builddate=time();
$builddate=time();
//$exportlink=$langs->trans("NotYetAvailable");
$elementcust=$langs->trans("CustomersInvoices");
$productcust=$langs->trans("Description");
$amountcust=$langs->trans("AmountHT");
if ($mysoc->tva_assuj) $vatcust.=' ('.$langs->trans("ToPay").')';
$elementsup=$langs->trans("SuppliersInvoices");
$productsup=$langs->trans("Description");
$amountsup=$langs->trans("AmountHT");
if ($mysoc->tva_assuj) $vatsup.=' ('.$langs->trans("ToGetBack").')';
$elementcust=$langs->trans("CustomersInvoices");
$productcust=$langs->trans("Description");
$amountcust=$langs->trans("AmountHT");
if ($mysoc->tva_assuj) $vatcust.=' ('.$langs->trans("ToPay").')';
$elementsup=$langs->trans("SuppliersInvoices");
$productsup=$langs->trans("Description");
$amountsup=$langs->trans("AmountHT");
if ($mysoc->tva_assuj) $vatsup.=' ('.$langs->trans("ToGetBack").')';
}
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink);
@@ -169,54 +174,54 @@ print "</tr>\n";
$coll_list = vat_by_thirdparty($db,0,$date_start,$date_end,$modetax,'sell');
if (is_array($coll_list))
{
$var=true;
$total = 0; $subtotal = 0;
$i = 1;
foreach($coll_list as $coll)
{
if($min == 0 or ($min>0 and $coll[2]>$min))
{
$var=!$var;
$intra = str_replace($find,$replace,$coll[1]);
if(empty($intra))
{
if($coll[4] == '1')
{
$intra = $langs->trans('Unknown');
}
else
{
$intra = $langs->trans('NotRegistered');
}
}
print "<tr $bc[$var]>";
print "<td nowrap>".$i."</td>";
$company_static->id=$coll[5];
$company_static->nom=$coll[0];
print '<td nowrap>'.$company_static->getNomUrl(1).'</td>';
$find = array(' ','.');
$replace = array('','');
print "<td nowrap>".$intra."</td>";
print "<td nowrap align=\"right\">".price($coll[2])."</td>";
print "<td nowrap align=\"right\">".price($coll[3])."</td>";
$total = $total + $coll[3];
print "</tr>\n";
$i++;
}
}
$var=true;
$total = 0; $subtotal = 0;
$i = 1;
foreach($coll_list as $coll)
{
if($min == 0 or ($min > 0 && $coll->amount > $min))
{
$var=!$var;
$intra = str_replace($find,$replace,$coll->tva_intra);
if(empty($intra))
{
if($coll->assuj == '1')
{
$intra = $langs->trans('Unknown');
}
else
{
$intra = $langs->trans('NotRegistered');
}
}
print "<tr $bc[$var]>";
print "<td nowrap>".$i."</td>";
$company_static->id=$coll->socid;
$company_static->nom=$coll->nom;
print '<td nowrap>'.$company_static->getNomUrl(1).'</td>';
$find = array(' ','.');
$replace = array('','');
print "<td nowrap>".$intra."</td>";
print "<td nowrap align=\"right\">".price($coll->amount)."</td>";
print "<td nowrap align=\"right\">".price($coll->tva)."</td>";
$total = $total + $coll->tva;
print "</tr>\n";
$i++;
}
}
print '<tr class="liste_total"><td align="right" colspan="4">'.$langs->trans("Total").':</td><td nowrap align="right"><b>'.price($total).'</b></td>';
print '</tr>';
print '<tr class="liste_total"><td align="right" colspan="4">'.$langs->trans("Total").':</td><td nowrap align="right"><b>'.price($total).'</b></td>';
print '</tr>';
}
else
{
$langs->load("errors");
if ($coll_list == -1)
print '<tr><td colspan="5">'.$langs->trans("ErrorNoAccountancyModuleLoaded").'</td></tr>';
else if ($coll_list == -2)
print '<tr><td colspan="5">'.$langs->trans("FeatureNotYetAvailable").'</td></tr>';
else
print '<tr><td colspan="5">'.$langs->trans("Error").'</td></tr>';
$langs->load("errors");
if ($coll_list == -1)
print '<tr><td colspan="5">'.$langs->trans("ErrorNoAccountancyModuleLoaded").'</td></tr>';
else if ($coll_list == -2)
print '<tr><td colspan="5">'.$langs->trans("FeatureNotYetAvailable").'</td></tr>';
else
print '<tr><td colspan="5">'.$langs->trans("Error").'</td></tr>';
}
//print '</table>';
@@ -241,54 +246,54 @@ $company_static=new Societe($db);
$coll_list = vat_by_thirdparty($db,0,$date_start,$date_end,$modetax,'buy');
if (is_array($coll_list))
{
$var=true;
$total = 0; $subtotal = 0;
$i = 1;
foreach($coll_list as $coll)
{
if($min == 0 or ($min>0 and $coll[2]>$min))
{
$var=!$var;
$intra = str_replace($find,$replace,$coll[1]);
if(empty($intra))
{
if($coll[4] == '1')
{
$intra = $langs->trans('Unknown');
}
else
{
$intra = $langs->trans('NotRegistered');
}
}
print "<tr $bc[$var]>";
print "<td nowrap>".$i."</td>";
$company_static->id=$coll[5];
$company_static->nom=$coll[0];
print '<td nowrap>'.$company_static->getNomUrl(1).'</td>';
$find = array(' ','.');
$replace = array('','');
print "<td nowrap>".$intra."</td>";
print "<td nowrap align=\"right\">".price($coll[2])."</td>";
print "<td nowrap align=\"right\">".price($coll[3])."</td>";
$total = $total + $coll[3];
print "</tr>\n";
$i++;
}
}
$var=true;
$total = 0; $subtotal = 0;
$i = 1;
foreach($coll_list as $coll)
{
if($min == 0 or ($min > 0 && $coll->amount > $min))
{
$var=!$var;
$intra = str_replace($find,$replace,$coll->tva_intra);
if(empty($intra))
{
if($coll->assuj == '1')
{
$intra = $langs->trans('Unknown');
}
else
{
$intra = $langs->trans('NotRegistered');
}
}
print "<tr $bc[$var]>";
print "<td nowrap>".$i."</td>";
$company_static->id=$coll->socid;
$company_static->nom=$coll->nom;
print '<td nowrap>'.$company_static->getNomUrl(1).'</td>';
$find = array(' ','.');
$replace = array('','');
print "<td nowrap>".$intra."</td>";
print "<td nowrap align=\"right\">".price($coll->amount)."</td>";
print "<td nowrap align=\"right\">".price($coll->tva)."</td>";
$total = $total + $coll->tva;
print "</tr>\n";
$i++;
}
}
print '<tr class="liste_total"><td align="right" colspan="4">'.$langs->trans("Total").':</td><td nowrap align="right"><b>'.price($total).'</b></td>';
print '</tr>';
print '<tr class="liste_total"><td align="right" colspan="4">'.$langs->trans("Total").':</td><td nowrap align="right"><b>'.price($total).'</b></td>';
print '</tr>';
}
else
{
$langs->load("errors");
if ($coll_list == -1)
print '<tr><td colspan="5">'.$langs->trans("ErrorNoAccountancyModuleLoaded").'</td></tr>';
else if ($coll_list == -2)
print '<tr><td colspan="5">'.$langs->trans("FeatureNotYetAvailable").'</td></tr>';
else
print '<tr><td colspan="5">'.$langs->trans("Error").'</td></tr>';
$langs->load("errors");
if ($coll_list == -1)
print '<tr><td colspan="5">'.$langs->trans("ErrorNoAccountancyModuleLoaded").'</td></tr>';
else if ($coll_list == -2)
print '<tr><td colspan="5">'.$langs->trans("FeatureNotYetAvailable").'</td></tr>';
else
print '<tr><td colspan="5">'.$langs->trans("Error").'</td></tr>';
}
print '</table>';

View File

@@ -156,7 +156,7 @@ if ($modetax==0) // Invoice for goods, payment for services
else { $nextquarter=1; $nextyear++; }
//$periodlink=($prevyear?"<a href='".$_SERVER["PHP_SELF"]."?year=".$prevyear."&q=".$prevquarter."&modetax=".$modetax."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".$nextyear."&q=".$nextquarter."&modetax=".$modetax."'>".img_next()."</a>":"");
$description=$langs->trans("RulesVATIn");
if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='<br>'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite');
//if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='<br>'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite');
$description.=$fsearch;
$description.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
$builddate=time();

1
htdocs/conf/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/conf.php

View File

@@ -183,8 +183,7 @@ $dolibarr_main_authentication='dolibarr';
# dolibarr_main_demo
# Login and pass to use in a demo mode
# Default value: 0
# Possible values: 0 or 1
# Default value: ''
# Examples:
# $dolibarr_main_demo='autologin,autopass'

View File

@@ -107,16 +107,24 @@ class Contact extends CommonObject
$this->name=trim($this->name);
if (! $this->socid) $this->socid = 0;
if (! $this->priv) $this->priv = 0;
if (! $this->canvas) $this->canvas = 'default';
$sql = "INSERT INTO ".MAIN_DB_PREFIX."socpeople (datec, fk_soc, name, fk_user_creat, priv, canvas)";
$sql.= " VALUES ('".$this->db->idate($now)."',";
$sql = "INSERT INTO ".MAIN_DB_PREFIX."socpeople (";
$sql.= " datec";
$sql.= ", fk_soc";
$sql.= ", name";
$sql.= ", fk_user_creat";
$sql.= ", priv";
$sql.= ", canvas";
$sql.= ", entity";
$sql.= ") VALUES (";
$sql.= "'".$this->db->idate($now)."',";
if ($this->socid > 0) $sql.= " ".$this->socid.",";
else $sql.= "null,";
$sql.= "'".addslashes($this->name)."',";
$sql.= "'".$this->db->escape($this->name)."',";
$sql.= " ".($user->id > 0 ? "'".$user->id."'":"null").",";
$sql.= " ".$this->priv.",";
$sql.= "'".$this->canvas."'";
$sql.= " ".($this->canvas?"'".$this->canvas."'":"null").",";
$sql.= " ".$conf->entity;
$sql.= ")";
dol_syslog("Contact::create sql=".$sql);
@@ -205,24 +213,24 @@ class Contact extends CommonObject
$this->db->begin();
$sql = "UPDATE ".MAIN_DB_PREFIX."socpeople SET ";
if ($this->socid > 0) $sql .= " fk_soc='".addslashes($this->socid)."',";
if ($this->socid > 0) $sql .= " fk_soc='".$this->db->escape($this->socid)."',";
if ($this->socid == -1) $sql .= " fk_soc=null,";
$sql .= " civilite='".addslashes($this->civilite_id)."'";
$sql .= ", name='".addslashes($this->name)."'";
$sql .= ", firstname='".addslashes($this->firstname)."'";
$sql .= ", address='".addslashes($this->address)."'";
$sql .= ", cp='".addslashes($this->cp)."'";
$sql .= ", ville='".addslashes($this->ville)."'";
$sql .= " civilite='".$this->db->escape($this->civilite_id)."'";
$sql .= ", name='".$this->db->escape($this->name)."'";
$sql .= ", firstname='".$this->db->escape($this->firstname)."'";
$sql .= ", address='".$this->db->escape($this->address)."'";
$sql .= ", cp='".$this->db->escape($this->cp)."'";
$sql .= ", ville='".$this->db->escape($this->ville)."'";
$sql .= ", fk_pays=".($this->fk_pays>0?$this->fk_pays:'NULL');
$sql .= ", fk_departement=".($this->fk_departement>0?$this->fk_departement:'NULL');
$sql .= ", poste='".addslashes($this->poste)."'";
$sql .= ", fax='".addslashes($this->fax)."'";
$sql .= ", email='".addslashes($this->email)."'";
$sql .= ", note='".addslashes($this->note)."'";
$sql .= ", phone = '".addslashes($this->phone_pro)."'";
$sql .= ", phone_perso = '".addslashes($this->phone_perso)."'";
$sql .= ", phone_mobile = '".addslashes($this->phone_mobile)."'";
$sql .= ", jabberid = '".addslashes($this->jabberid)."'";
$sql .= ", poste='".$this->db->escape($this->poste)."'";
$sql .= ", fax='".$this->db->escape($this->fax)."'";
$sql .= ", email='".$this->db->escape($this->email)."'";
$sql .= ", note='".$this->db->escape($this->note)."'";
$sql .= ", phone = '".$this->db->escape($this->phone_pro)."'";
$sql .= ", phone_perso = '".$this->db->escape($this->phone_perso)."'";
$sql .= ", phone_mobile = '".$this->db->escape($this->phone_mobile)."'";
$sql .= ", jabberid = '".$this->db->escape($this->jabberid)."'";
$sql .= ", priv = '".$this->priv."'";
$sql .= ", fk_user_modif=".($user->id > 0 ? "'".$user->id."'":"null");
$sql .= ", default_lang=".($this->default_lang?"'".$this->default_lang."'":"null");
@@ -453,50 +461,53 @@ class Contact extends CommonObject
{
$obj = $this->db->fetch_object($resql);
$this->id = $obj->rowid;
$this->ref = $obj->rowid;
$this->civilite_id = $obj->civilite_id;
$this->name = $obj->name;
$this->firstname = $obj->firstname;
$this->nom = $obj->name;
$this->prenom = $obj->firstname;
$this->id = $obj->rowid;
$this->ref = $obj->rowid;
$this->civilite_id = $obj->civilite_id;
$this->name = $obj->name;
$this->firstname = $obj->firstname;
$this->nom = $obj->name; // TODO deprecated
$this->prenom = $obj->firstname; // TODO deprecated
$this->address = $obj->address;
$this->adresse = $obj->address; // TODO obsolete
$this->cp = $obj->cp;
$this->ville = $obj->ville;
$this->address = $obj->address;
$this->adresse = $obj->address; // TODO deprecated
$this->cp = $obj->cp; // TODO deprecated
$this->zip = $obj->cp;
$this->ville = $obj->ville; // TODO deprecated
$this->town = $obj->ville;
$this->fk_departement = $obj->fk_departement;
$this->fk_departement = $obj->fk_departement;
$this->departement_code = $obj->departement_code;
$this->departement = $obj->departement;
$this->departement = $obj->departement; // TODO deprecated
$this->state = $obj->departement;
$this->fk_pays = $obj->fk_pays;
$this->pays_code = $obj->fk_pays?$obj->pays_code:'';
$this->pays = ($obj->fk_pays > 0)?$langs->transnoentities("Country".$obj->pays_code):$langs->transnoentities("SelectCountry");
$this->fk_pays = $obj->fk_pays;
$this->pays_code = $obj->fk_pays?$obj->pays_code:'';
$this->pays = ($obj->fk_pays > 0)?$langs->transnoentities("Country".$obj->pays_code):$langs->transnoentities("SelectCountry");
$this->societeid = $obj->fk_soc;
$this->socid = $obj->fk_soc;
$this->socname = $obj->socname;
$this->poste = $obj->poste;
$this->societeid = $obj->fk_soc;
$this->socid = $obj->fk_soc;
$this->socname = $obj->socname;
$this->poste = $obj->poste;
$this->phone_pro = trim($obj->phone);
$this->fax = trim($obj->fax);
$this->phone_perso = trim($obj->phone_perso);
$this->phone_mobile = trim($obj->phone_mobile);
$this->phone_pro = trim($obj->phone);
$this->fax = trim($obj->fax);
$this->phone_perso = trim($obj->phone_perso);
$this->phone_mobile = trim($obj->phone_mobile);
$this->email = $obj->email;
$this->jabberid = $obj->jabberid;
$this->priv = $obj->priv;
$this->mail = $obj->email;
$this->email = $obj->email;
$this->jabberid = $obj->jabberid;
$this->priv = $obj->priv;
$this->mail = $obj->email;
$this->birthday = dol_stringtotime($obj->birthday);
$this->birthday = dol_stringtotime($obj->birthday);
//print "fetch: ".$obj->birthday.'-'.$this->birthday;
$this->birthday_alert = $obj->birthday_alert;
$this->note = $obj->note;
$this->default_lang = $obj->default_lang;
$this->user_id = $obj->user_id;
$this->user_login = $obj->user_login;
$this->canvas = $obj->canvas;
$this->birthday_alert = $obj->birthday_alert;
$this->note = $obj->note;
$this->default_lang = $obj->default_lang;
$this->user_id = $obj->user_id;
$this->user_login = $obj->user_login;
$this->canvas = $obj->canvas;
// Recherche le user Dolibarr lie a ce contact
$sql = "SELECT u.rowid ";
@@ -753,7 +764,7 @@ class Contact extends CommonObject
{
$sql = "SELECT count(mc.email) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc";
$sql.= " WHERE mc.email = '".addslashes($this->email)."'";
$sql.= " WHERE mc.email = '".$this->db->escape($this->email)."'";
$sql.= " AND mc.statut=1"; // -1 erreur, 0 non envoye, 1 envoye avec succes
$resql=$this->db->query($sql);
if ($resql)
@@ -801,8 +812,8 @@ class Contact extends CommonObject
/**
* \brief Retourne le libelle de civilite du contact
* \return string Nom traduit de la civilite
* Return label of a civility contact
* @return string Translated name of civility
*/
function getCivilityLabel()
{

View File

@@ -40,7 +40,7 @@ $result = restrictedArea($user, 'contact', $contactid, 'socpeople');
* View
*/
llxHeader('',$langs->trans("Contact"),'EN:Module_Third_Parties|FR:Module_Tiers|ES:M&oacute;dulo_Empresas');
llxHeader('',$langs->trans("ContactsAddresses"),'EN:Module_Third_Parties|FR:Module_Tiers|ES:M&oacute;dulo_Empresas');
$form = new Form($db);
@@ -50,7 +50,7 @@ $contact->fetch($_GET["id"], $user);
$head = contact_prepare_head($contact);
dol_fiche_head($head, 'exportimport', $langs->trans("Contact"), 0, 'contact');
dol_fiche_head($head, 'exportimport', $langs->trans("ContactsAddresses"), 0, 'contact');
/*

View File

@@ -37,6 +37,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/class/html.formcompany.class.php");
$langs->load("companies");
$langs->load("users");
$langs->load("other");
$langs->load("commercial");
$errors = array();
$socid = GETPOST("socid");
@@ -247,7 +248,7 @@ else
* View
*/
llxHeader('',$langs->trans("Contacts"),'EN:Module_Third_Parties|FR:Module_Tiers|ES:M&oacute;dulo_Empresas');
llxHeader('',$langs->trans("ContactsAddresses"),'EN:Module_Third_Parties|FR:Module_Tiers|ES:M&oacute;dulo_Empresas');
$form = new Form($db);
$formcompany = new FormCompany($db);
@@ -340,7 +341,7 @@ if (! empty($canvas))
// display_canvas. All output should be processed by template so
// showHead and dol_htmloutput_errors should be moved into
// display_canvas.
// Card header
$objcanvas->showHead();
@@ -399,7 +400,7 @@ else
*/
$head = contact_prepare_head($object);
dol_fiche_head($head, 'card', $langs->trans("Contact"), 0, 'contact');
dol_fiche_head($head, 'card', $langs->trans("ContactsAddresses"), 0, 'contact');
}
if ($user->rights->societe->contact->creer)

View File

@@ -100,7 +100,7 @@ if ($search_priv < 0) $search_priv='';
* View
*/
llxHeader('',$langs->trans("Contacts"),'EN:Module_Third_Parties|FR:Module_Tiers|ES:M&oacute;dulo_Empresas');
llxHeader('',$langs->trans("ContactsAddresses"),'EN:Module_Third_Parties|FR:Module_Tiers|ES:M&oacute;dulo_Empresas');
$form=new Form($db);
@@ -136,19 +136,19 @@ else
if ($search_nom) // filtre sur le nom
{
$sql .= " AND p.name like '%".addslashes($search_nom)."%'";
$sql .= " AND p.name like '%".$db->escape($search_nom)."%'";
}
if ($search_prenom) // filtre sur le prenom
{
$sql .= " AND p.firstname like '%".addslashes($search_prenom)."%'";
$sql .= " AND p.firstname like '%".$db->escape($search_prenom)."%'";
}
if ($search_societe) // filtre sur la societe
{
$sql .= " AND s.nom like '%".addslashes($search_societe)."%'";
$sql .= " AND s.nom like '%".$db->escape($search_societe)."%'";
}
if ($search_email) // filtre sur l'email
{
$sql .= " AND p.email like '%".addslashes($search_email)."%'";
$sql .= " AND p.email like '%".$db->escape($search_email)."%'";
}
if ($type == "o") // filtre sur type
{
@@ -168,7 +168,7 @@ if ($type == "p") // filtre sur type
}
if ($sall)
{
$sql .= " AND (p.name like '%".addslashes($sall)."%' OR p.firstname like '%".addslashes($sall)."%' OR p.email like '%".addslashes($sall)."%') ";
$sql .= " AND (p.name like '%".$db->escape($sall)."%' OR p.firstname like '%".$db->escape($sall)."%' OR p.email like '%".$db->escape($sall)."%') ";
}
if ($socid)
{
@@ -337,8 +337,10 @@ if ($result)
// Private/Public
print '<td align="center">'.$contactstatic->LibPubPriv($obj->priv).'</td>';
// Link export vcard
// Links Add action and Export vcard
print '<td align="right">';
print '<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&amp;backtopage=1&amp;contactid='.$obj->cidp.'&amp;socid='.$obj->socid.'">'.img_object($langs->trans("AddAction"),"calendar").'</a>';
print ' &nbsp; ';
print '<a href="'.DOL_URL_ROOT.'/contact/vcard.php?id='.$obj->cidp.'">';
print img_picto($langs->trans("VCard"),'vcard.png').' ';
print '</a></td>';

View File

@@ -42,7 +42,7 @@ $result = restrictedArea($user, 'contact',$contactid,'socpeople');
* View
*/
llxHeader('',$langs->trans("Contacts"),'EN:Module_Third_Parties|FR:Module_Tiers|ES:M&oacute;dulo_Empresas');
llxHeader('',$langs->trans("ContactsAddresses"),'EN:Module_Third_Parties|FR:Module_Tiers|ES:M&oacute;dulo_Empresas');
$contact = new Contact($db);
@@ -51,7 +51,7 @@ $contact->fetch($_GET["id"], $user);
$head = contact_prepare_head($contact);
dol_fiche_head($head, 'info', $langs->trans("Contact"), 0, 'contact');
dol_fiche_head($head, 'info', $langs->trans("ContactsAddresses"), 0, 'contact');
print '<table width="100%"><tr><td>';

View File

@@ -79,13 +79,13 @@ if ($_GET["action"] == 'dolibarr2ldap')
* View
*/
llxHeader('',$langs->trans("Contacts"),'EN:Module_Third_Parties|FR:Module_Tiers|ES:M&oacute;dulo_Empresas');
llxHeader('',$langs->trans("ContactsAddresses"),'EN:Module_Third_Parties|FR:Module_Tiers|ES:M&oacute;dulo_Empresas');
$form = new Form($db);
$head = contact_prepare_head($contact);
dol_fiche_head($head, 'ldap', $langs->trans("Contact"), 0, 'contact');
dol_fiche_head($head, 'ldap', $langs->trans("ContactsAddresses"), 0, 'contact');
print '<table class="border" width="100%">';

View File

@@ -71,7 +71,7 @@ if ($user->rights->societe->contact->creer)
* View
*/
llxHeader('',$langs->trans("Contacts"),'EN:Module_Third_Parties|FR:Module_Tiers|ES:M&oacute;dulo_Empresas');
llxHeader('',$langs->trans("ContactsAddresses"),'EN:Module_Third_Parties|FR:Module_Tiers|ES:M&oacute;dulo_Empresas');
$form = new Form($db);
@@ -80,7 +80,7 @@ $contact->fetch($_GET["id"], $user);
$head = contact_prepare_head($contact);
dol_fiche_head($head, 'perso', $langs->trans("Contact"), 0, 'contact');
dol_fiche_head($head, 'perso', $langs->trans("ContactsAddresses"), 0, 'contact');

View File

@@ -351,6 +351,8 @@ class Contrat extends CommonObject
$now=dol_now();
$this->lines=array();
// Selectionne les lignes contrats liees a un produit
$sql = "SELECT p.label, p.description as product_desc, p.ref,";
$sql.= " d.rowid, d.fk_contrat, d.statut, d.description, d.price_ht, d.tva_tx, d.localtax1_tx, d.localtax2_tx, d.qty, d.remise_percent, d.subprice,";
@@ -422,9 +424,9 @@ class Contrat extends CommonObject
$line->date_debut_reel = $this->db->jdate($objp->date_ouverture);
$line->date_fin_prevue = $this->db->jdate($objp->date_fin_validite);
$line->date_fin_reel = $this->db->jdate($objp->date_cloture);
$this->lines[] = $line;
//dol_syslog("1 ".$line->desc);
//dol_syslog("2 ".$line->product_desc);

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