2
0
forked from Wavyzz/dolibarr

Compare commits

..

220 Commits

Author SHA1 Message Date
Laurent Destailleur
8a5bafc2dd Prepare 4.0 2016-08-28 21:23:37 +02:00
Laurent Destailleur
11ddc722f1 Release 4.0 2016-08-28 20:17:53 +02:00
Laurent Destailleur
4215ec3ca9 FIX usage of sepa generation setup. 2016-08-28 20:12:25 +02:00
Laurent Destailleur
6ddd264178 Fix not used field 2016-08-28 17:45:20 +02:00
Laurent Destailleur
989d6e7bc8 Fix responsive design 2016-08-28 16:27:15 +02:00
Laurent Destailleur
1becfbd7b6 CSS 2016-08-28 16:26:54 +02:00
Laurent Destailleur
661526f822 Fix for jmobile 2016-08-28 16:00:02 +02:00
Laurent Destailleur
5e88de7e2c Fix field customer/prospect/supplier in list of thirdparties 2016-08-28 15:21:09 +02:00
Laurent Destailleur
72ccedba98 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-08-28 02:17:23 +02:00
Laurent Destailleur
0d992b2b99 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/cron/class/cronjob.class.php
	htdocs/install/pgsql/functions/functions.sql
2016-08-28 02:17:04 +02:00
Laurent Destailleur
bc8e203019 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-08-28 01:58:43 +02:00
Laurent Destailleur
5d7414dcc3 Solve php regression failing travis 2016-08-28 01:58:11 +02:00
Laurent Destailleur
e7c05a778b Merge pull request #5662 from aspangaro/4.0-p43
Fix: Presentation of Donations Area and add search
2016-08-28 01:40:00 +02:00
aspangaro
9f40f346cb Fix: Presentation of Donations Area and add search 2016-08-26 13:23:00 +02:00
Juanjo Menent
874db10dbe Merge pull request #5648 from hregis/3.8_bug
Fix: wrong "lastoutput" and "lastresult" if jobtype is "method" or "function"
2016-08-25 13:43:06 +02:00
Juanjo Menent
9c4d60fd5d Merge pull request #5639 from atm-florian/4.0
fix ressource module  for PGSQL and coding style
2016-08-25 13:41:55 +02:00
Juanjo Menent
ed25c0fda5 Merge pull request #5645 from grandoc/4.0
fix : bad sort
2016-08-25 13:38:59 +02:00
Juanjo Menent
c298bb62ba Merge pull request #5644 from grandoc/3.9
fix : translation
2016-08-25 13:38:18 +02:00
florian HENRY
848d046b46 Merge branch '4.0' of https://github.com/Dolibarr/dolibarr.git into 4.0 2016-08-25 09:06:39 +02:00
Laurent Destailleur
b81de6b383 Fix wrapping with jmobile 2016-08-24 20:23:06 +02:00
Regis Houssin
6b3cbc918d Fix: wrong "lastoutput" and "lastresult" if jobtype is "method" or
"function"
2016-08-22 20:49:14 +02:00
florian HENRY
ab4997d26f Merge branch '4.0' of https://github.com/Dolibarr/dolibarr.git into 4.0 2016-08-22 14:30:08 +02:00
Laurent Destailleur
317132fea4 CSS 2016-08-22 12:25:54 +02:00
Laurent Destailleur
0839a9fa4f Code comment 2016-08-20 00:54:49 +02:00
Laurent Destailleur
1fc5715040 Fix date of contract not used 2016-08-20 00:30:09 +02:00
Laurent Destailleur
f06545a3fe Fix cancel button ignored 2016-08-19 17:22:53 +02:00
philippe grand
9c22d94bd3 fix : bad sort 2016-08-19 17:12:46 +02:00
philippe grand
919b73b4c4 fix : translation 2016-08-19 16:29:54 +02:00
Laurent Destailleur
83107746ad Fix no way to fix the ref of recurring invoice when an error was done
into typing.
2016-08-19 16:18:39 +02:00
florian HENRY
137f1c4e4f Merge branch '4.0' of https://github.com/Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/resource/class/dolresource.class.php
2016-08-18 08:49:54 +02:00
Laurent Destailleur
fead7967f2 Merge remote-tracking branch 'origin/3.9' into 4.0
Conflicts:
	htdocs/commande/list.php
	htdocs/core/class/commonobject.class.php
	htdocs/core/class/extrafields.class.php
	htdocs/resource/class/resource.class.php
2016-08-17 16:55:39 +02:00
Laurent Destailleur
7e8b8e9462 Merge pull request #5638 from atm-florian/3.9_fix_5637
FIX : PgSQL Module Ressource list crash #5637
2016-08-17 16:34:40 +02:00
Laurent Destailleur
f9d707ff48 Merge pull request #5630 from atm-florian/3.9
FIX : #5629 PgSQL Interger string stylish error
2016-08-17 16:24:40 +02:00
Laurent Destailleur
88afc4ad5a Merge pull request #5625 from aspangaro/4.0-p42
Uniformize presentation, add button cancel everywhere
2016-08-17 16:11:59 +02:00
Laurent Destailleur
660fcacef2 Merge pull request #5619 from fappels/4.0_fix_sql_error_insert_supplier_order_line
Fix SQL error insert supplier order line
2016-08-17 16:10:38 +02:00
Laurent Destailleur
58fc64982f Merge pull request #5618 from fappels/4.0_fix_eatby_sellby_check
Fix sellby without hour check
2016-08-17 16:10:09 +02:00
Laurent Destailleur
69e6f6a489 Merge pull request #5608 from aspangaro/4.0-p40
Fix: Some problems on export with language
2016-08-17 15:54:36 +02:00
Laurent Destailleur
eea175b7e7 Merge pull request #5605 from aspangaro/4.0-p39
Uniformize presentation on opensurvey
2016-08-17 15:51:59 +02:00
Laurent Destailleur
33ceb5d626 Merge pull request #5601 from aspangaro/4.0-p37
Uniformize title presentation on product/service card
2016-08-17 15:50:42 +02:00
florian HENRY
f7bb2483d8 fix ressource for PGSQL 2016-08-17 14:53:51 +02:00
florian HENRY
ddc480b6c9 other fix for PgSQL and style 2016-08-17 14:51:25 +02:00
florian HENRY
90c918bec6 Merge branch '4.0' of https://github.com/Dolibarr/dolibarr.git into 4.0 2016-08-17 14:46:25 +02:00
florian HENRY
63c5425991 another fix for Ressource module in PgSQL 2016-08-17 14:46:15 +02:00
florian HENRY
5c51cb0f29 FIX : PgSQL Module Ressource list crash #5637 2016-08-17 14:40:05 +02:00
florian HENRY
00443dae3a Merge branch '3.9' of https://github.com/Dolibarr/dolibarr.git into 3.9 2016-08-17 14:30:15 +02:00
Laurent Destailleur
282c50ef34 Merge pull request #5631 from atm-florian/4.0
FIX #5594
2016-08-17 14:08:06 +02:00
Laurent Destailleur
0cb7440647 Merge pull request #5635 from joseplluis/patch-3
Fix Bug: delivery date value is not hide with global ORDER_DISABLE_DELIVE…
2016-08-17 14:05:56 +02:00
Laurent Destailleur
2afc567a53 Fix fiter on contract date 2016-08-17 11:58:55 +02:00
Laurent Destailleur
caa0dd75aa Fix responsive design on small smartphone 2016-08-17 11:47:39 +02:00
Laurent Destailleur
ba8c2dbf9f Fix order of module for demo. 2016-08-17 11:39:11 +02:00
Laurent Destailleur
47489265b1 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-08-17 11:15:30 +02:00
Laurent Destailleur
6724901b9e Fix closing td 2016-08-17 11:15:20 +02:00
florian HENRY
a1323756a9 FIX : in PgSQL no quote "word style" is permitted around column name 2016-08-17 10:23:23 +02:00
Josep Lluís
c385b86793 Bug: delivery date value is not hide with global ORDER_DISABLE_DELIVERY_DATE
In title and in filter the delivery date column is well hidden. 
The error is only in column value,
2016-08-16 23:12:02 +02:00
florian HENRY
0ac090e959 FIX : #5629 DoliDBPgsql::query SQL Error message: ERROR: 22P02: invalid
input syntax for integer: ""
2016-08-16 09:07:08 +02:00
florian HENRY
3932a32399 FIX : #5629 PgSQL Interger string stylish error 2016-08-16 09:00:52 +02:00
florian HENRY
aa17564e93 FIX: #5594 2016-08-16 08:54:12 +02:00
aspangaro
b7420372b7 Uniformize presentation, add button cancel everywhere 2016-08-12 22:53:30 +02:00
fappels
b6f9aa4592 Fix SQL error insert supplier order line
$this->fk_multicurrency not set gives SQL error
2016-08-11 21:10:56 +02:00
fappels
f9a9d4d2d8 Fix sellby without hour check 2016-08-11 20:59:56 +02:00
Juanjo Menent
5c92cc7fa3 Merge pull request #5613 from atm-florian/40_accountancy
fix export
2016-08-11 20:47:02 +02:00
Juanjo Menent
0907465fcf Merge pull request #5615 from aspangaro/4.0-p41
Fix: Accountancy - Problem to define account_parent for an accounting account + presentation
2016-08-11 20:46:08 +02:00
Juanjo Menent
3b509db141 Merge pull request #5604 from atm-florian/FIX_createpropalfromproject
FIX : create proposal from project
2016-08-11 20:43:44 +02:00
Juanjo Menent
adc0a73e93 Merge pull request #5603 from atm-florian/4.0_FIX_Multicurrency_with_french_number_setting
FIX : MULTICURRENCY if value is 1,56 then GETPOST 'int' check return ''
2016-08-11 20:42:25 +02:00
Juanjo Menent
5ac175b7e4 Merge pull request #5602 from aspangaro/4.0-p38
FIX : Accountancy - BANK_DISABLE_DIRECT_INPUT Add an option
2016-08-11 20:40:10 +02:00
Juanjo Menent
bf2955909a Merge pull request #5600 from atm-florian/FIX_5594
Fix 5594
2016-08-11 20:38:35 +02:00
Laurent Destailleur
86c90ade3f Another fix on bank account missing when bank module enabled. 2016-08-11 18:41:31 +02:00
Laurent Destailleur
4df9af1ba0 Fix several errors with bank account module enabled on sale tax edition 2016-08-11 18:18:03 +02:00
Laurent Destailleur
7cc7ac5485 Fix translation 2016-08-11 17:41:09 +02:00
Laurent Destailleur
f674b24945 Fix look and feel 2016-08-11 17:23:42 +02:00
aspangaro
300da71b9c Replace with 0 2016-08-11 06:12:04 +02:00
aspangaro
55a83f9d8d Fix: Accountancy - Problem to define account_parent for an accounting account & presentation 2016-08-11 06:08:33 +02:00
florian HENRY
07412b2f79 force export txt for ciel and quadratus 2016-08-10 17:37:22 +02:00
florian HENRY
e9962bb887 fix export 2016-08-10 17:22:58 +02:00
aspangaro
1313ef99d5 Uniformize presentation on categories 2016-08-10 15:16:30 +02:00
aspangaro
26df66f9ac Fix: Missing language file for salaries export 2016-08-10 15:11:51 +02:00
aspangaro
4e39c41215 Fix: Typo on invoice export 2016-08-10 15:07:53 +02:00
aspangaro
b52648674d Uniformize presentation on contact 2016-08-10 15:01:43 +02:00
aspangaro
cdd84244b2 Fix: Missing Language file and key for category contact export 2016-08-10 14:48:26 +02:00
aspangaro
8028b77966 Fix: MIssing language file for category members export 2016-08-10 14:39:51 +02:00
aspangaro
b5771ebbfc Fix: Missing language key for bank export 2016-08-10 14:39:11 +02:00
aspangaro
c442ff0d2b Fix: Missing language file for user export when the module members is on 2016-08-10 14:29:19 +02:00
aspangaro
c391ca5b32 Uniformize presentation on opensurvey 2016-08-10 14:17:01 +02:00
florian HENRY
cd8585da63 fix for finche inter same problem 2016-08-10 11:54:49 +02:00
florian HENRY
d38ff5c246 FIX : create proposal from project 2016-08-10 11:34:10 +02:00
florian HENRY
5bb3b5c074 FIX : MULTICURRENCY if value is 1,56 then GETPOST 'int' check return '' 2016-08-10 09:47:25 +02:00
aspangaro
43ffb061ef FIX : Accountancy - BANK_DISABLE_DIRECT_INPUT Add an option 2016-08-10 08:07:27 +02:00
aspangaro
9a0fed93d1 Merge remote-tracking branch 'Upstream/4.0' into 4.0-p37 2016-08-10 07:42:04 +02:00
aspangaro
a1d1396919 Uniformize presentation 2016-08-10 07:40:40 +02:00
Laurent Destailleur
8c63d68083 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-08-09 17:28:16 +02:00
Laurent Destailleur
a2f1291f94 Fix missing supplier proposals in project overview 2016-08-09 17:28:02 +02:00
florian HENRY
8718edc5fd Merge branch '3.9' of https://github.com/Dolibarr/dolibarr.git into FIX_5594 2016-08-09 15:17:57 +02:00
florian HENRY
321814fae3 better fix for #5594 2016-08-09 15:17:19 +02:00
Laurent Destailleur
82b14e30d7 Merge pull request #5596 from atm-florian/40_accountancy
40 accountancy
2016-08-09 13:34:46 +02:00
Laurent Destailleur
4a1fbffba3 Merge pull request #5595 from atm-florian/FIX_5594
FIX #5594
2016-08-09 13:28:07 +02:00
Laurent Destailleur
29fdebe0d9 Fix list of lot 2016-08-09 13:21:30 +02:00
Laurent Destailleur
7b6755cfcd Fix several errors in search an sorting in stock by lot view 2016-08-09 13:14:33 +02:00
aspangaro
dd905debb4 Uniformize presentation 2016-08-09 10:19:42 +02:00
Laurent Destailleur
2262c1c7dd Fix code generator 2016-08-08 21:58:47 +02:00
Laurent Destailleur
54b47d7f4f Fix edit of page in module website
Conflicts:
	htdocs/websites/class/website.class.php
2016-08-08 19:09:37 +02:00
Laurent Destailleur
fb3f6972eb Work on module website
Conflicts:
	htdocs/websites/index.php
2016-08-08 18:29:24 +02:00
florian HENRY
beadb19fea fix list 2016-08-08 15:31:06 +02:00
florian HENRY
95a66e7e63 Work on accoutancy PgSQL comptatiblity and other stuff 2016-08-08 14:52:19 +02:00
florian HENRY
90cb71f341 revert better fix 2016-08-08 13:54:51 +02:00
florian HENRY
15f187c466 better test 2016-08-08 13:54:03 +02:00
florian HENRY
94487cf411 FIX #5594 2016-08-08 13:43:44 +02:00
Laurent Destailleur
4cf01bc685 Fix code comment 2016-08-05 04:48:30 +02:00
Laurent Destailleur
e1e8254bcf Fix thumbs are using same extension than original. 2016-08-05 04:31:19 +02:00
Laurent Destailleur
1b10e27618 Fix bad link 2016-08-05 04:20:38 +02:00
Laurent Destailleur
782ab6a02b Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/core/modules/barcode/modules_barcode.class.php
	htdocs/product/admin/product.php
2016-08-05 00:42:40 +02:00
Laurent Destailleur
40723b264a Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-08-05 00:37:10 +02:00
Laurent Destailleur
c2e81b6edb Fix colspan 2016-08-05 00:36:58 +02:00
Laurent Destailleur
112b945e6b Merge pull request #5583 from atm-florian/3.9
FIX : update limit stock on product stock
2016-08-05 00:34:32 +02:00
Laurent Destailleur
5555037346 Merge pull request #5580 from simnandez/4.0
NEW Add Panama datas
2016-08-05 00:34:05 +02:00
Laurent Destailleur
bdf779dfd2 Merge pull request #5578 from aspangaro/4.0-p37
Uniformize presentation
2016-08-05 00:32:49 +02:00
Laurent Destailleur
16c7d51abc Merge pull request #5576 from atm-florian/3.9_fixPHPStrict
FIX php Strict
2016-08-05 00:26:47 +02:00
Juanjo Menent
48fe3524d5 Fix #5582 Can't add or change customer ref on proposal 2016-08-04 17:34:53 +02:00
Juanjo Menent
d76c57fed9 Merge remote-tracking branch 'upstream/4.0' into 4.0 2016-08-04 17:05:18 +02:00
Laurent Destailleur
81fc86ba06 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-08-04 12:10:40 +02:00
Laurent Destailleur
5247faf50f Fix align 2016-08-04 10:48:19 +02:00
Laurent Destailleur
e0b9496f9e Fix link sometimes fails because of id not defined 2016-08-04 10:44:17 +02:00
Laurent Destailleur
182338beb1 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-08-04 10:27:50 +02:00
Laurent Destailleur
11ab49d85d Fix bad help 2016-08-04 10:27:19 +02:00
Laurent Destailleur
af150c35fc Fix no picto on setup pages 2016-08-04 10:19:30 +02:00
Laurent Destailleur
caa987fb61 Clean obsolete comment 2016-08-04 10:13:27 +02:00
Laurent Destailleur
f14ef7b50f Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-08-04 10:12:34 +02:00
Laurent Destailleur
da84fac390 Fix: data were lost if creation failed 2016-08-04 10:08:58 +02:00
Laurent Destailleur
7c97bf900f Neutral colors 2016-08-03 20:52:50 +02:00
florian HENRY
5f415478ac FIX : update limit stock on product stock 2016-08-03 17:29:04 +02:00
Juanjo Menent
965011c8bc Merge pull request #5579 from atm-florian/3.8
FIX : Weather icon is not calculated correctly
2016-08-03 10:33:29 +02:00
Juanjo Menent
51a4f9e5d7 Merge pull request #5575 from aspangaro/4.0-p36
Fix Expense report | if VAT disable in Dolibarr, traduction of code_libelle & presentation
2016-08-03 10:30:40 +02:00
Juanjo Menent
597f5dae15 Merge pull request #5551 from marcosgdf/bug-5549
FIX #5549 getNomUrl tooltips show Order info even if user has no rights to read them
2016-08-03 10:27:44 +02:00
Juanjo Menent
28efc3e50f NEW Add Panama datas 2016-08-03 09:45:12 +02:00
florian HENRY
0d536bff54 Fix dashboard 2016-08-03 09:04:24 +02:00
aspangaro
27603b966e Uniformize presentation on supplier order 2016-08-03 08:25:35 +02:00
aspangaro
21e753d510 Uniformize presentation on intervention 2016-08-03 08:00:30 +02:00
aspangaro
da274f0ca4 Uniformize presentation on contract 2016-08-03 07:28:00 +02:00
Laurent Destailleur
abbe204c97 Fix design of option PROJECT_ADD_SUBTOTAL_LINES 2016-08-03 01:42:05 +02:00
Laurent Destailleur
6ae8d26a89 Fix max width on combo of tasks 2016-08-03 00:04:38 +02:00
Laurent Destailleur
216ec6ac4b Label week too long with some language 2016-08-02 23:33:31 +02:00
Laurent Destailleur
88dcb27981 Fix option not visible when it should 2016-08-02 21:24:14 +02:00
Laurent Destailleur
176b52f305 Fix No modify trigger must be called during creation 2016-08-02 17:55:13 +02:00
Laurent Destailleur
3ea7a1fcab Fix strict mode 2016-08-02 17:36:24 +02:00
Laurent Destailleur
75b909ce93 Fix missing transaction in update_perso function 2016-08-02 16:55:32 +02:00
florian HENRY
5144f21c6c FIX php Strict 2016-08-02 15:36:00 +02:00
Laurent Destailleur
cc21909909 Fix dol_include_once could not work to get external url of a module 2016-08-02 14:33:46 +02:00
Laurent Destailleur
86f576f8d3 Fix strict sql 2016-08-02 13:45:35 +02:00
Laurent Destailleur
54df49aebe Fix strict sql 2016-08-02 13:36:16 +02:00
Laurent Destailleur
fdfe333f69 Fix strict sql 2016-08-02 13:10:09 +02:00
aspangaro
f232ae9160 Fix Expense report | VAT disable in Dolibarr, traduction of code_libelle & presentation 2016-08-02 07:47:15 +02:00
aspangaro
dd2e43754e Uniformize presentation in Thirdparty 2016-08-02 06:02:01 +02:00
Laurent Destailleur
e335ce6f45 Fix bad var declared 2016-08-01 19:54:03 +02:00
Laurent Destailleur
dfc38351ef Fix $i not initialized 2016-08-01 19:48:39 +02:00
Laurent Destailleur
a35dd9f2d1 Fix bad separation of address 2016-08-01 19:37:17 +02:00
Laurent Destailleur
5eda10e0dd Fix link 2016-08-01 16:04:49 +02:00
Laurent Destailleur
a02c539a82 FIX #5521 2016-08-01 15:53:51 +02:00
Laurent Destailleur
7dec327995 FIX #5568 2016-08-01 15:43:40 +02:00
Laurent Destailleur
1e90d0a54c Fix path using https 2016-08-01 15:22:48 +02:00
Laurent Destailleur
4410057106 Fix typo 2016-08-01 15:18:52 +02:00
Laurent Destailleur
bb99209b5e Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-08-01 15:06:22 +02:00
Laurent Destailleur
621a7d93fa Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-08-01 15:05:57 +02:00
Laurent Destailleur
97dd1f4bbb Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/core/modules/expedition/doc/pdf_rouget.modules.php
	htdocs/filefunc.inc.php
2016-08-01 15:03:59 +02:00
Laurent Destailleur
58c18f438c Move changelog at correct place 2016-08-01 15:02:23 +02:00
Laurent Destailleur
803fe68061 Merge remote-tracking branch 'origin/3.8' into 3.9
Conflicts:
	htdocs/compta/facture.php
	htdocs/core/modules/expedition/doc/pdf_rouget.modules.php
	htdocs/filefunc.inc.php
2016-08-01 15:01:14 +02:00
BENKE Charlie
9a0494bd64 Update bonprelevement.class.php 2016-08-01 14:11:58 +02:00
Laurent Destailleur
e998a4b8a5 Merge pull request #5572 from fmarcet/3.8
Fix: Can't set PRODUIT_LIMIT_SIZE to value 0
2016-08-01 13:40:11 +02:00
Laurent Destailleur
417dd6465c Merge pull request #5570 from aspangaro/4.0-p36
Fix Presentation & uniformize code
2016-08-01 13:39:54 +02:00
Laurent Destailleur
e0c232548e Fix theme crazy after migration 2016-08-01 10:55:41 +02:00
Ferran Marcet
fb2444c7a3 Fix: Can't set PRODUIT_LIMIT_SIZE to value 0 2016-08-01 10:20:10 +02:00
aspangaro
8ce5fcd980 Uniformize presentation salary payment 2016-08-01 07:40:05 +02:00
aspangaro
0b7a5a4af9 Uniformize presentation donation 2016-08-01 07:34:55 +02:00
aspangaro
4a0eb496fa Merge remote-tracking branch 'Upstream/4.0' into 4.0-p36
Conflicts:
	htdocs/societe/rib.php
2016-08-01 07:27:49 +02:00
aspangaro
4ee4de4a00 Uniformize presentation supplier invoice 2016-08-01 07:21:24 +02:00
aspangaro
3cdb2d45c2 Uniformize presentation customer invoice 2016-08-01 07:10:42 +02:00
aspangaro
26f98a2ab7 Presentation 2016-08-01 06:45:29 +02:00
aspangaro
30ec33f152 Missing key language 2016-08-01 06:45:00 +02:00
aspangaro
63220eae18 Presentation 2016-08-01 04:40:56 +02:00
Laurent Destailleur
ee7023422a Update dump 2016-07-31 23:19:01 +02:00
Laurent Destailleur
1e037a9b95 Fix pb of responsive design 2016-07-31 18:28:59 +02:00
Laurent Destailleur
20a2282efc Updated screenshots 2016-07-31 16:24:32 +02:00
Laurent Destailleur
ce3b01cf6a Update icons 2016-07-31 15:06:25 +02:00
Laurent Destailleur
5f0951dcda Fix for option MAIN_OPTIMIZEFORTEXTBROWSER 2016-07-31 13:20:40 +02:00
Laurent Destailleur
51e941b9b4 Fix for option MAIN_OPTIMIZEFORTEXTBROWSER 2016-07-31 13:07:55 +02:00
Laurent Destailleur
0f544919e0 git push origin 4.0Merge branch 'aspangaro-4.0-p36' into 4.0 2016-07-31 03:05:53 +02:00
Laurent Destailleur
33495847b7 Merge branch '4.0-p36' of https://github.com/aspangaro/dolibarr into
aspangaro-4.0-p36

Conflicts:
	htdocs/societe/rib.php
2016-07-31 03:05:34 +02:00
Laurent Destailleur
1b6da075f7 Fix new apache 2.4 directives 2016-07-31 02:26:06 +02:00
Laurent Destailleur
64fbff3abc Fix for 4.0 doliwamp 2016-07-31 02:18:48 +02:00
Laurent Destailleur
e3df4b81f8 Update demo 4.0 2016-07-30 21:13:16 +02:00
Laurent Destailleur
0414f09e48 Fix permissions 2016-07-30 21:09:30 +02:00
Laurent Destailleur
44b02f1d6c Hide module cron 2016-07-30 20:59:06 +02:00
Laurent Destailleur
b165a31c0d Fix old module to disable 2016-07-30 20:55:20 +02:00
Laurent Destailleur
8ada144f6e Fix demo 2016-07-30 20:53:00 +02:00
Laurent Destailleur
04e814d1a6 Update demo 2016-07-30 20:51:22 +02:00
Laurent Destailleur
5aa5c5259d demo is in mode stable 2016-07-30 20:39:25 +02:00
Laurent Destailleur
9191692bb2 More files for demo data 2016-07-30 20:33:01 +02:00
Laurent Destailleur
654ac318d4 Prepare dump for 4.0 demo 2016-07-30 20:26:05 +02:00
Laurent Destailleur
a87c2f9579 Fix several fixes on margin reports 2016-07-30 18:57:26 +02:00
Laurent Destailleur
246321cd8f Fix clean orphelins of leave request logs in repair tools
Fix date of supplier proposal missing.
2016-07-30 18:08:07 +02:00
Laurent Destailleur
e5583f1544 Fix bad translation. Confusionbetween internal tranfert and bank
tranfert for payements
2016-07-30 17:28:18 +02:00
Laurent Destailleur
857de64607 Fix multicurrency 2016-07-30 16:41:10 +02:00
Laurent Destailleur
7678940e50 Fix refresh cache value of nb of files into a dir into ECM module 2016-07-30 15:51:27 +02:00
Laurent Destailleur
a6147ee73b Miscellaneous fixes 2016-07-30 14:49:29 +02:00
Laurent Destailleur
e3f0ab9109 Fix tag was not visible 2016-07-30 14:05:39 +02:00
Laurent Destailleur
ceb6199e87 Fix default numbering module of customer code was not enabled. 2016-07-30 12:31:32 +02:00
Laurent Destailleur
b3dab8a6f7 Better translation 2016-07-30 11:56:22 +02:00
Laurent Destailleur
7a72b9bb09 Use https links 2016-07-30 11:40:55 +02:00
Laurent Destailleur
b630f0b710 Fix use https and not http 2016-07-30 11:30:19 +02:00
Laurent Destailleur
5b4c215526 Fix size of field too small and bad translation 2016-07-30 10:31:56 +02:00
aspangaro
3c3df0c4f6 Fix Presentation 2016-07-29 23:52:49 +02:00
Laurent Destailleur
ff9d6ce02a Fix missing translation 2016-07-29 23:02:40 +02:00
Laurent Destailleur
45d354ad82 Fix variable names MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN... 2016-07-29 22:58:39 +02:00
Laurent Destailleur
69247afd06 FIX #4447 2016-07-29 17:26:24 +02:00
Laurent Destailleur
9a4240c292 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.8 2016-07-29 17:20:30 +02:00
Laurent Destailleur
45e38efdfa FIX #5473 2016-07-29 17:20:14 +02:00
Marcos García de La Fuente
86c2ced714 Missing $user variable 2016-07-29 11:53:24 +02:00
Marcos García de La Fuente
1ef27913d7 FIX #5549 getNomUrl tooltips show Order info even if user has no rights to read them 2016-07-26 17:07:56 +02:00
Juanjo Menent
71b8ab8336 Merge pull request #5542 from hregis/3.8_bug
Fix: missing sourcetype can create false positive
2016-07-25 18:21:44 +02:00
Regis Houssin
d8f77abf31 Fix: missing sourcetype can create fault positive 2016-07-25 14:36:20 +02:00
Laurent Destailleur
c0d8bce2df Prepare 3.8.5 2016-07-21 19:44:25 +02:00
Laurent Destailleur
1624894346 Fix missing load 2016-07-21 19:35:45 +02:00
256 changed files with 11161 additions and 1657 deletions

View File

@@ -161,7 +161,6 @@ So if you included it into your module, change your code like this to be compati
if (! $res) include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_pre_headers.tpl.php';
***** ChangeLog for 3.9.3 compared to 3.9.2 *****
FIX: #4383 $userid not defined
FIX: #4448 $filebonprev is not used, $this->filename now
@@ -460,7 +459,68 @@ This is list of hooks modified:
- Remove deprecated Product::hidden property
***** ChangeLog for 3.8.5 compared to 3.8.4 *****
FIX: #3815 Call to undefined function local_by_date().
FIX: #4424 Missing email of user popup in supplier orders area
FIX: #4442 Missing translation in Banks menu
FIX: #4448 $filebonprev is not used, $this->filename now
FIX: #4455
FIX: #4737 Bank transacion type selector translation is cropped
FIX: #4742 Able to delete a supplier invoice with a registered payment
FIX: #4743 UI glitch in project summary page
FIX: #4747 Missing UI background when registering a supplier invoice payment
FIX: #4748 Supplier invoice payment confirmation amount is not translated
FIX: #4749
FIX: #4756
FIX: #4766 VAT not shown in supplier invoice popup
FIX: #4809 - Duplicate functions with different content
FIX: #4851 Project selector in supplier invoices shows the project label twice
FIX: #4870
FIX: #5008 SQL error when editing the reference of a supplier invoice that already exists
FIX: #5048 Product supplier list display only one produc
FIX: #5170 tva sign with INVOICE_POSITIVE_CREDIT_NOTE option
FIX: #5203
FIX: #5207
FIX: #5338 use of not initialized var $aphour, $apmin, etc
FIX: #5380
FIX: #5383 bad object id on don delete
FIX: #5474 Country_id of "Don" object is still empty
FIX: Accountancy - 3.8 - Chart of accounts are limited on only one country
FIX: Bad include and param for project numbering module call
FIX: Box disabled because bugged
FIX: bug on email template
FIX: Can correct stock of lot using eatby or sell by date
FIX: Can make a movement on "out of sell" products
FIX: Can't create thirdparty or validate invoice if profid is mandatory and profid does not exists for other countries
FIX: can't fetch by siret or siren because of first "if"
FIX: Check stock of product by warehouse if $entrepot_id defined on shippings
FIX: correct display of minimum buying price
FIX: Creation of thumb image for size "small" was not done.
FIX: Direction of movement lost if an error occurs
FIX: dont retrieve new buying price on margin display
FIX: Duplicate records into export
FIX: Email templates not compatible with Multicompany
FIX: end of select when no fournprice
FIX: finished parameters not used
FIX: hook on group card called but not initialized
FIX: It doesn't check if there is enough stock to update the lines of orders/invoices
FIX: large expense note
FIX: missing column when module was installed before standard integration
FIX: Missing database escaping on supplier price insert/update
FIX: Not filtering correctly when come from dashboard
FIX: PROPAL_MERGE_PDF with PRODUCT_USE_OLD_PATH
FIX: real min buying price
FIX: receiving link never works
FIX: same page added several times on mergepropal option
FIX: search on date into supplier invoice list dont work because of status -1
FIX: Search supplier ref on contract
FIX: SQL error function on getAvailableDiscounts function, on bill create mode if socid is empty
FIX: systematic rounding causes prices to be updated without reason
FIX: task ODT company object not correctly retrieved
FIX: Template email must take care of positino column
FIX: VAT rate can be negative. Example spain selling to morroco.
***** ChangeLog for 3.8.4 compared to 3.8.3 *****
FIX: #3694
FIX: #3798 #2519 Cron jobs would never be executed

View File

@@ -3,7 +3,7 @@
Dolibarr ERP & CRM est un logiciel moderne pour gérer votre activité (société, association, auto-entrepreneurs, artisans).
Il est simple d'utilisation et modulaire, vous permettant de n'activez que les fonctions dont vous avez besoin (contacts, fournisseurs, factures, commandes, stocks, agenda, ...).
![ScreenShot](http://www.dolibarr.org/images/dolibarr_screenshot1_640x480.png)
![ScreenShot](https://www.dolibarr.org/images/dolibarr_screenshot1_640x480.png)
@@ -23,7 +23,7 @@ Ubuntu) ou DoliRpm (la version tout-en-un de Dolibarr pour Fedora, Redhat,
OpenSuse, Mandriva ou Mageia).
Vous pouvez les télécharger depuis la rubrique *download* du portail officiel:
http://www.dolibarr.org/
https://www.dolibarr.org/
Si vous avez déjà installé un serveur Web avec PHP et une base de donnée (Mysql),
vous pouvez installer Dolibarr avec cette version de la manière suivante:
@@ -139,13 +139,13 @@ Suivez le projet Dolibarr project sur les réseaux francophones
- Facebook: <https://www.facebook.com/dolibarr.fr>
- Google+: <https://plus.google.com/+DolibarrFrance>
- Twitter: <http://www.twitter.com/dolibarr_france>
- Twitter: <https://www.twitter.com/dolibarr_france>
ou sur les réseaux anglophones
- [Facebook](https://www.facebook.com/dolibarr)
- [Google+](https://plus.google.com/+DolibarrOrg)
- [Twitter](http://www.twitter.com/dolibarr)
- [Twitter](https://www.twitter.com/dolibarr)
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
- [GitHub](https://github.com/Dolibarr/dolibarr)

View File

@@ -2,7 +2,7 @@
![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/develop.svg) ![Downloads per day](https://img.shields.io/sourceforge/dm/dolibarr.svg)
Dolibarr ERP & CRM is a modern software to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda, ...).
Dolibarr ERP & CRM is a modern software package to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda, ...).
It's an Open Source software (wrote in PHP language) designed for small, medium or large companies, foundations and freelances.
@@ -10,7 +10,7 @@ You can freely use, study, modify or distribute it according to its Free Softwar
You can use it as a standalone application or as a web application to be able to access it from the Internet or a LAN.
![ScreenShot](http://www.dolibarr.org/images/dolibarr_screenshot1_640x400.png)
![ScreenShot](https://www.dolibarr.org/images/dolibarr_screenshot1_640x400.png)
## LICENSE
@@ -24,7 +24,7 @@ Other licenses apply for some included dependencies. See [COPYRIGHT](https://git
### Download
Releases can be downloaded from [official website](http://www.dolibarr.org/).
Releases can be downloaded from [official website](https://www.dolibarr.org/).
### Simple setup
@@ -133,7 +133,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
### Extending
Dolibarr can be extended with a lot of other external modules from third party developers available at the [DoliStore](http://www.dolistore.com).
Dolibarr can be extended with a lot of other external modules from third party developers available at the [DoliStore](https://www.dolistore.com).
## FUTURE
@@ -165,7 +165,7 @@ Follow Dolibarr project on:
- [Facebook](https://www.facebook.com/dolibarr)
- [Google+](https://plus.google.com/+DolibarrOrg)
- [Twitter](http://www.twitter.com/dolibarr)
- [Twitter](https://www.twitter.com/dolibarr)
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
- [GitHub](https://github.com/Dolibarr/dolibarr)

View File

@@ -19,7 +19,7 @@ File added into doxygen generated documentation
<hr class="footer" />
<address class="footer"><small>Generated on $datetime
for <a href="http://www.dolibarr.org">$projectname</a> by Doxygen $doxygenversion </small></address>
for <a href="https://www.dolibarr.org">$projectname</a> by Doxygen $doxygenversion </small></address>
<!-- Google AdSense -->
@@ -32,7 +32,7 @@ google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript" src="https://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div>
<!-- End google adsense -->
<br>

View File

@@ -15,10 +15,7 @@ Alias /dolibarr "WAMPROOT/www/dolibarr/htdocs/"
# NOTE FOR APACHE 2.3:
# To restrict access to dolibarr from outside set lines
#
# <RequireAny>
# Require ip 127.0.0.1
# Require host localhost
# <RequireAny>
# Require local
#
# instead of
#

View File

@@ -42,6 +42,7 @@ SolidCompression=yes
WizardImageFile=build\exe\doliwamp\doliwamp.bmp
WizardSmallImageFile=build\exe\doliwamp\doliwampsmall.bmp
SetupIconFile=doc\images\dolibarr.ico
;To say the installer must be ran as admin
PrivilegesRequired=admin
DisableProgramGroupPage=yes
ChangesEnvironment=no
@@ -148,8 +149,12 @@ Name: "{userdesktop}\Dolibarr Help center"; Filename: "{app}\rundolihelp.bat"; W
[Registry]
; Add "run as admin" flag. Same than command line: reg add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "<Path to your exe>" /t REG_SZ /d RUNASADMIN
Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\"; ValueType: String; ValueName: "{app}\startdoliwamp.bat"; ValueData: "RUNASADMIN"; Flags: uninsdeletekeyifempty uninsdeletevalue;
Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\"; ValueType: String; ValueName: "{app}\stopdoliwamp.bat"; ValueData: "RUNASADMIN"; Flags: uninsdeletekeyifempty uninsdeletevalue;
Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"; ValueType: string; ValueName: "{app}\startdoliwamp.bat"; ValueData: "RUNASADMIN";
Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"; ValueType: string; ValueName: "{app}\stopdoliwamp.bat"; ValueData: "RUNASADMIN";
Root: "HKLM32"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"; ValueType: string; ValueName: "{app}\startdoliwamp.bat"; ValueData: "RUNASADMIN";
Root: "HKLM32"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"; ValueType: string; ValueName: "{app}\stopdoliwamp.bat"; ValueData: "RUNASADMIN";
Root: "HKLM64"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"; ValueType: string; ValueName: "{app}\startdoliwamp.bat"; ValueData: "RUNASADMIN"; Check: IsWin64
Root: "HKLM64"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"; ValueType: string; ValueName: "{app}\stopdoliwamp.bat"; ValueData: "RUNASADMIN"; Check: IsWin64
[Code]
@@ -239,9 +244,9 @@ begin
if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\MSCRM','SMTPServer', value) then
begin
if value <> '' then smtpServer:=value;
end
end
end
end;
end;
end;
end;
if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp','apachePort', value) then
@@ -419,7 +424,7 @@ begin
begin
themessage := FmtMessage(CustomMessage('FailedToDeleteLock'),[pathWithSlashes]);
MsgBox(themessage,mbInformation,MB_OK);
end
end;
// Check if parameters already defined in conf.php file
@@ -592,7 +597,7 @@ begin
StringChangeEx (srcContents, 'WAMPAPACHEPORT', myporta, True);
StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
SaveStringToFile(destFileA,srcContents, False);
end
end;
if MsgBox(CustomMessage('DoliWampWillStartApacheMysql'),mbConfirmation,MB_YESNO) = IDYES then
@@ -615,7 +620,7 @@ begin
StringChangeEx (srcContents, 'WAMPPHPMYADMINVERSION', phpmyadminVersion, True);
SaveStringToFile(destFile,srcContents, False);
end
end;
DeleteFile(srcFile);
@@ -648,8 +653,8 @@ begin
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
SaveStringToFile(destFile, srcContents, False);
end
end
end;
end;
DeleteFile(srcFile);
@@ -679,8 +684,8 @@ begin
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
SaveStringToFile(destFile,srcContents, False);
end
end
end;
end;
@@ -703,7 +708,7 @@ begin
StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
SaveStringToFile(destFile,srcContents, False);
end
end;
@@ -725,7 +730,7 @@ begin
StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
SaveStringToFile(destFile,srcContents, False);
end
end;
@@ -757,7 +762,7 @@ begin
StringChangeEx (srcContents, 'WAMPAPACHEPORT', myporta, True);
StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
SaveStringToFile(destFile, srcContents, False);
end
end;
@@ -780,7 +785,7 @@ begin
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
SaveStringToFile(destFile,srcContents, False);
end
end;
@@ -801,7 +806,7 @@ begin
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
SaveStringToFile(destFile,srcContents, False);
end
end;
@@ -822,7 +827,7 @@ begin
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
SaveStringToFile(destFile,srcContents, False);
end
end;
@@ -843,7 +848,7 @@ begin
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
SaveStringToFile(destFile,srcContents, False);
end
end;
//----------------------------------------------
@@ -864,7 +869,7 @@ begin
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
SaveStringToFile(destFile,srcContents, False);
end
end;
//----------------------------------------------
@@ -885,7 +890,7 @@ begin
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
SaveStringToFile(destFile,srcContents, False);
end
end;
//----------------------------------------------
@@ -904,7 +909,7 @@ begin
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
SaveStringToFile(destFile,srcContents, False);
end
end;
//----------------------------------------------
@@ -921,7 +926,7 @@ begin
StringChangeEx (srcContents, 'WAMPSMTP', mysmtp, True);
StringChangeEx (srcContents, 'WAMPPHPVERSION', phpVersion, True);
SaveStringToFile(destFile,srcContents, False);
end
end;
//----------------------------------------------
// Create file php.ini in apache (if not exists)
@@ -937,7 +942,7 @@ begin
StringChangeEx (srcContents, 'WAMPSMTP', mysmtp, True);
StringChangeEx (srcContents, 'WAMPPHPVERSION', phpVersion, True);
SaveStringToFile(destFile,srcContents, False);
end
end;
@@ -979,7 +984,7 @@ begin
res := False;
end
end;
end
else
@@ -989,9 +994,9 @@ begin
res := False;
end
end;
end
end;
Result := res;

View File

@@ -255,6 +255,9 @@ KeepAliveTimeout 30
# Controls who can get stuff from this server.
#
# onlineoffline tag - don't remove
Require all granted
<RequireAny>
Require ip 127.0.0.1
Require host localhost

View File

@@ -19,17 +19,11 @@ Alias /phpmyadmin "WAMPROOT/apps/phpmyadminWAMPPHPMYADMINVERSION/"
#
# instead of
#
# <RequireAny>
# Require ip 127.0.0.1
# Require host localhost
# <RequireAny>
# Require local
#
<Directory "WAMPROOT/apps/phpmyadminWAMPPHPMYADMINVERSION/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
<RequireAny>
Require ip 127.0.0.1
Require host localhost
</RequireAny>
Require local
</Directory>

View File

@@ -603,7 +603,7 @@ if ($nboftargetok) {
if ($target eq 'TGZ')
{
$NEWDESTI=$DESTI;
if ($NEWPUBLISH =~ /stable/)
if ($NEWDESTI =~ /stable/)
{
mkdir($DESTI.'/standard');
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
@@ -635,7 +635,7 @@ if ($nboftargetok) {
if ($target eq 'XZ')
{
$NEWDESTI=$DESTI;
if ($NEWPUBLISH =~ /stable/)
if ($NEWDESTI =~ /stable/)
{
mkdir($DESTI.'/standard');
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
@@ -672,7 +672,7 @@ if ($nboftargetok) {
if ($target eq 'ZIP')
{
$NEWDESTI=$DESTI;
if ($NEWPUBLISH =~ /stable/)
if ($NEWDESTI =~ /stable/)
{
mkdir($DESTI.'/standard');
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
@@ -713,7 +713,7 @@ if ($nboftargetok) {
if ($target =~ /FEDO/i) { $subdir="package_rpm_redhat-fedora"; }
if ($target =~ /MAND/i) { $subdir="package_rpm_mandriva"; }
if ($target =~ /OPEN/i) { $subdir="package_rpm_opensuse"; }
if ($NEWPUBLISH =~ /stable/)
if ($NEWDESTI =~ /stable/)
{
mkdir($DESTI.'/'.$subdir);
if (-d $DESTI.'/'.$subdir) { $NEWDESTI=$DESTI.'/'.$subdir; }
@@ -799,7 +799,7 @@ if ($nboftargetok) {
if ($target eq 'DEB')
{
$NEWDESTI=$DESTI;
if ($NEWPUBLISH =~ /stable/)
if ($NEWDESTI =~ /stable/)
{
mkdir($DESTI.'/package_debian-ubuntu');
if (-d $DESTI.'/package_debian-ubuntu') { $NEWDESTI=$DESTI.'/package_debian-ubuntu'; }
@@ -1002,7 +1002,7 @@ if ($nboftargetok) {
if ($target eq 'APS')
{
$NEWDESTI=$DESTI;
if ($NEWPUBLISH =~ /stable/)
if ($NEWDESTI =~ /stable/)
{
mkdir($DESTI.'/package_aps');
if (-d $DESTI.'/package_aps') { $NEWDESTI=$DESTI.'/package_aps'; }
@@ -1088,7 +1088,7 @@ if ($nboftargetok) {
if ($target eq 'EXEDOLIWAMP')
{
$NEWDESTI=$DESTI;
if ($NEWPUBLISH =~ /stable/)
if ($NEWDESTI =~ /stable/)
{
mkdir($DESTI.'/package_windows');
if (-d $DESTI.'/package_windows') { $NEWDESTI=$DESTI.'/package_windows'; }
@@ -1117,6 +1117,7 @@ if ($nboftargetok) {
print "Move $SOURCE/build/$FILENAMEEXEDOLIWAMP.exe to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
$ret=`mv "$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`;
print "Remove tmp file $SOURCE/build/exe/doliwamp/doliwamp.tmp.iss\n";
$ret=`rm "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
next;

View File

@@ -2,4 +2,4 @@ README
------
Scripts in this directory can be used to load or purge data of a database instance.
WARNING: This may erase data.
WARNING: Some of this script may delete definitely data.

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@@ -15,7 +15,7 @@
export mydir=`echo "$0" | sed -e 's/initdemo.sh//'`;
if [ "x$mydir" = "x" ]
if [ "x$mydir" = 'x' -o "x$mydir" = 'x./' ]
then
export mydir="."
fi
@@ -132,24 +132,7 @@ then
exit;;
esac
# ---------------------------- chemin d'acces du repertoire documents
#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 "Full path to documents directory (ex: /var/www/dolibarr/documents)- no / at end :" 16 55 2> $fichtemp
#valret=$?
#case $valret in
# 0)
#docs=`cat $fichtemp`;;
# 1)
#exit;;
# 255)
#exit;;
#esac
# ---------------------------- confirmation
DIALOG=${DIALOG=dialog}
$DIALOG --title "Init Dolibarr with demo values" --clear \
@@ -177,6 +160,25 @@ echo "mysql -P$port -u$admin -p***** $base < $mydir/$dumpfile"
mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile
export res=$?
# ---------------------------- copy demo files
export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" `
if [ "x$documentdir" != "x" ]
then
echo cp -pr $mydir/documents_demo/* "$documentdir/"
cp -pr $mydir/documents_demo/* "$documentdir/"
echo cp -pr $mydir/../../htdocs/install/doctemplates/* "$documentdir/doctemplates/"
cp -pr $mydir/../../htdocs/install/doctemplates/* "$documentdir/doctemplates/"
mkdir -p "$documentdir/ecm/Administrative documents"
mkdir -p "$documentdir/ecm/Images"
echo cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
else
echo Detection of documents directory failed so demo files were not copied.
fi
if [ "x$res" = "x0" ]
then
echo "Success, file successfully loaded."

File diff suppressed because one or more lines are too long

View File

@@ -187,7 +187,6 @@ export list="
--ignore-table=$base.llx_bt_webseedfiles
--ignore-table=$base.llx_c_civilite
--ignore-table=$base.llx_c_dolicloud_plans
--ignore-table=$base.llx_c_lead_status
--ignore-table=$base.llx_c_source
--ignore-table=$base.llx_cabinetmed_c_banques
--ignore-table=$base.llx_cabinetmed_c_ccam

126
dev/initdemo/updatedemo.php Executable file
View File

@@ -0,0 +1,126 @@
#!/usr/bin/env php
<?php
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* or see http://www.gnu.org/
*
* Get a distant dump file and load it into a mysql database
*/
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path=dirname(__FILE__).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
exit;
}
// Global variables
$error=0;
$confirm=isset($argv[1])?$argv[1]:'';
// Include Dolibarr environment
$res=0;
if (! $res && file_exists($path."../../master.inc.php")) $res=@include($path."../../master.inc.php");
if (! $res && file_exists($path."../../htdocs/master.inc.php")) $res=@include($path."../../htdocs/master.inc.php");
if (! $res && file_exists("../master.inc.php")) $res=@include("../master.inc.php");
if (! $res && file_exists("../../master.inc.php")) $res=@include("../../master.inc.php");
if (! $res && file_exists("../../../master.inc.php")) $res=@include("../../../master.inc.php");
if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include($path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"); // Used on dev env only
if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include("../../../dolibarr".$reg[1]."/htdocs/master.inc.php"); // Used on dev env only
if (! $res) die ("Failed to include master.inc.php file\n");
include_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php');
/*
* Main
*/
if (empty($confirm))
{
print "Usage: $script_file confirm\n";
print "Return code: 0 if success, <>0 if error\n";
exit(-1);
}
$tmp=dol_getdate(dol_now());
$tables=array(
'propal'=>array(0=>'datep', 1=>'fin_validite', 2=>'date_valid', 3=>'date_cloture'),
'commande'=>array(0=>'date_commande', 1=>'date_valid', 2=>'date_cloture'),
'facture'=>array(0=>'datef', 1=>'date_valid', 2=>'date_lim_reglement'),
'paiement'=>array(0=>'datep'),
'bank'=>array(0=>'datev', 1=>'dateo'),
'commande_fournisseur'=>array(0=>'date_commande', 1=>'date_valid', 3=>'date_creation', 4=>'date_approve', 5=>'date_approve2', 6=>'date_livraison'),
'supplier_proposal'=>array(0=>'datec', 1=>'date_valid', 2=>'date_cloture')
);
$year=2010;
$currentyear=$tmp['year'];
while ($year <= $currentyear)
{
//$year=2021;
$delta=($currentyear - $year);
//$delta=-1;
if ($delta)
{
foreach($tables as $tablekey => $tableval)
{
print "\nCorrect ".$tablekey." for year ".$year." and move them to current year ".$currentyear." ";
$sql="select rowid from ".MAIN_DB_PREFIX.$tablekey." where ".$tableval[0]." between '".$year."-01-01' and '".$year."-12-31' and ".$tableval[0]." < DATE_ADD(NOW(), INTERVAL -1 YEAR)";
//$sql="select rowid from ".MAIN_DB_PREFIX.$tablekey." where ".$tableval[0]." between '".$year."-01-01' and '".$year."-12-31' and ".$tableval[0]." > NOW()";
$resql = $db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
$i=0;
while ($i < $num)
{
$obj=$db->fetch_object($resql);
if ($obj)
{
print ".";
$sql2="UPDATE ".MAIN_DB_PREFIX.$tablekey." set ";
$j=0;
foreach($tableval as $field)
{
if ($j) $sql2.=", ";
$sql2.= $field." = DATE_ADD(".$field.", INTERVAL ".$delta." YEAR)";
$j++;
}
$sql2.=" WHERE rowid = ".$obj->rowid;
//print $sql2."\n";
$resql2 = $db->query($sql2);
if (! $resql2) dol_print_error($db);
}
$i++;
}
}
else dol_print_error($db);
}
}
$year++;
}
print "\n";
exit(0);

View File

@@ -587,11 +587,10 @@ foreach ($skeletonfiles as $skeletonfile => $outfile)
{
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
{
$varprop.="if (! empty(\$arrayfields['t.".$prop['field']."']['checked'])) print_liste_field_titre(\$arrayfields['t.".$prop['field']."']['label'],\$_SERVER['PHP_SELF'],'t.".$prop['field']."','',\$param,'',\$sortfield,\$sortorder);\n";
$varprop.="if (! empty(\$arrayfields['t.".$prop['field']."']['checked'])) print_liste_field_titre(\$arrayfields['t.".$prop['field']."']['label'],\$_SERVER['PHP_SELF'],'t.".$prop['field']."','',\$params,'',\$sortfield,\$sortorder);\n";
}
}
$targetcontent=preg_replace('/'.preg_quote("if (! empty(\$arrayfields['t.field1']['checked'])) print_liste_field_titre(\$langs->trans('field1'),\$_SERVER['PHP_SELF'],'t.field1','',\$param,'',\$sortfield,\$sortorder);",'/').'/', $varprop, $targetcontent);
$targetcontent=preg_replace('/'.preg_quote("if (! empty(\$arrayfields['t.field2']['checked'])) print_liste_field_titre(\$langs->trans('field2'),\$_SERVER['PHP_SELF'],'t.field2','',\$param,'',\$sortfield,\$sortorder);",'/').'/', '', $targetcontent);
$targetcontent=preg_replace('/LIST_OF_TD_TITLE_FIELDS/', $varprop, $targetcontent);
// Substitute fields title search
$varprop="\n";
@@ -603,8 +602,7 @@ foreach ($skeletonfiles as $skeletonfile => $outfile)
$varprop.="if (! empty(\$arrayfields['t.".$prop['field']."']['checked'])) print '<td class=\"liste_titre\"><input type=\"text\" class=\"flat\" name=\"search_".$prop['field']."\" value=\"'.\$search_".$prop['field'].".'\" size=\"10\"></td>';\n";
}
}
$targetcontent=preg_replace('/'.preg_quote("if (! empty(\$arrayfields['t.field1']['checked'])) print '<td class=\"liste_titre\"><input type=\"text\" class=\"flat\" name=\"search_field1\" value=\"'.\$search_field1.'\" size=\"10\"></td>';",'/').'/', $varprop, $targetcontent);
$targetcontent=preg_replace('/'.preg_quote("if (! empty(\$arrayfields['t.field2']['checked'])) print '<td class=\"liste_titre\"><input type=\"text\" class=\"flat\" name=\"search_field2\" value=\"'.\$search_field2.'\" size=\"10\"></td>';",'/').'/', '', $targetcontent);
$targetcontent=preg_replace('/LIST_OF_TD_TITLE_SEARCH/', $varprop, $targetcontent);
// Substitute where for <td>.fieldx.</td>
$varprop="\n";
@@ -656,6 +654,10 @@ foreach ($skeletonfiles as $skeletonfile => $outfile)
$targetcontent=preg_replace('/LIST_OF_TD_LABEL_FIELDS_VIEW/', $varprop, $targetcontent);
// LIST_OF_TD_FIELDS_LIST
// Build file
$fp=fopen($outfile,"w");
if ($fp)

View File

@@ -104,7 +104,7 @@ $arrayfields=array(
't.field1'=>array('label'=>$langs->trans("Field1"), 'checked'=>1),
't.field2'=>array('label'=>$langs->trans("Field2"), 'checked'=>1),
//'t.entity'=>array('label'=>$langs->trans("Entity"), 'checked'=>1, 'enabled'=>(! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode))),
't.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
't.datec'=>array('label'=>$langs->trans("DateCreationShort"), 'checked'=>0, 'position'=>500),
't.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
//'t.statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000),
);
@@ -188,12 +188,16 @@ if (empty($reshook))
* Put here all code to build page
****************************************************/
llxHeader('','MyPageName','');
$now=dol_now();
$form=new Form($db);
// Put here content of your page
//$help_url="EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_Pedidos_de_clientes";
$help_url='';
$title = $langs->trans('MyModuleListTitle');
llxHeader('', $title, $help_url);
// Put here content of your page
// Example : Adding jquery code
print '<script type="text/javascript" language="javascript">
@@ -317,8 +321,9 @@ if ($resql)
// Fields title
print '<tr class="liste_titre">';
if (! empty($arrayfields['t.field1']['checked'])) print_liste_field_titre($arrayfields['t.field1']['label'],$_SERVER['PHP_SELF'],'t.field1','',$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['t.field2']['checked'])) print_liste_field_titre($arrayfields['t.field2']['label'],$_SERVER['PHP_SELF'],'t.field2','',$param,'',$sortfield,$sortorder);
// LIST_OF_TD_TITLE_FIELDS
//if (! empty($arrayfields['t.field1']['checked'])) print_liste_field_titre($arrayfields['t.field1']['label'],$_SERVER['PHP_SELF'],'t.field1','',$params,'',$sortfield,$sortorder);
//if (! empty($arrayfields['t.field2']['checked'])) print_liste_field_titre($arrayfields['t.field2']['label'],$_SERVER['PHP_SELF'],'t.field2','',$params,'',$sortfield,$sortorder);
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
@@ -343,8 +348,9 @@ if ($resql)
// Fields title search
print '<tr class="liste_titre">';
if (! empty($arrayfields['t.field1']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" name="search_field1" value="'.$search_field1.'" size="10"></td>';
if (! empty($arrayfields['t.field2']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" name="search_field2" value="'.$search_field2.'" size="10"></td>';
// LIST_OF_TD_TITLE_SEARCH
//if (! empty($arrayfields['t.field1']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" name="search_field1" value="'.$search_field1.'" size="10"></td>';
//if (! empty($arrayfields['t.field2']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" name="search_field2" value="'.$search_field2.'" size="10"></td>';
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
@@ -407,8 +413,12 @@ if ($resql)
$obj = $db->fetch_object($resql);
if ($obj)
{
// You can use here results
print '<tr>';
$var = !$var;
// Show here line of result
print '<tr '.$bc[$var].'>';
// LIST_OF_TD_FIELDS_LIST
/*
if (! empty($arrayfields['t.field1']['checked']))
{
print '<td>'.$obj->field1.'</td>';
@@ -418,7 +428,7 @@ if ($resql)
{
print '<td>'.$obj->field2.'</td>';
if (! $i) $totalarray['nbfield']++;
}
}*/
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

After

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 KiB

After

Width:  |  Height:  |  Size: 228 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 232 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -69,10 +69,10 @@ if ($action == 'add') {
$account_number = clean_account(GETPOST('account_number'));
}
if (GETPOST('account_category') <= 0) {
$account_parent = '';
if (GETPOST('account_parent') <= 0) {
$account_parent = 0;
} else {
$account_parent = GETPOST('account_category','int');
$account_parent = GETPOST('account_parent','int');
}
$object->fk_pcg_version = $obj->pcg_version;
@@ -98,7 +98,7 @@ if ($action == 'add') {
header("Location: account.php");
exit;
} else if ($action == 'edit') {
if (! GETPOST('cancel', 'alpha')) {
if (! $cancel) {
$result = $object->fetch($id);
$sql = 'SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $conf->global->CHARTOFACCOUNTS;
@@ -119,10 +119,10 @@ if ($action == 'add') {
$account_number = clean_account(GETPOST('account_number'));
}
if (GETPOST('account_category') <= 0) {
$account_parent = '';
if (GETPOST('account_parent') <= 0) {
$account_parent = 0;
} else {
$account_parent = GETPOST('account_category','int');
$account_parent = GETPOST('account_parent','int');
}
$object->fk_pcg_version = $obj->pcg_version;
@@ -165,7 +165,9 @@ if ($action == 'add') {
/*
* View
*/
llxheader('', $langs->trans('AccountAccounting'));
$title = $langs->trans('AccountAccounting') ." - ". $langs->trans('Card');
$helpurl = '';
llxheader('', $title, $helpurl);
$form = new Form($db);
$htmlacc = new FormVentilation($db);
@@ -184,7 +186,7 @@ if ($action == 'create') {
print '<table class="border" width="100%">';
// Account number
print '<tr><td width="25%"><span class="fieldrequired">' . $langs->trans("AccountNumber") . '</span></td>';
print '<tr><td class="titlefieldcreate"><span class="fieldrequired">' . $langs->trans("AccountNumber") . '</span></td>';
print '<td><input name="account_number" size="30" value="' . $object->account_number . '"</td></tr>';
// Label
@@ -247,7 +249,7 @@ if ($action == 'create') {
print '<table class="border" width="100%">';
// Account number
print '<tr><td width="25%"><span class="fieldrequired">' . $langs->trans("AccountNumber") . '</span></td>';
print '<tr><td class="titlefieldcreate"><span class="fieldrequired">' . $langs->trans("AccountNumber") . '</span></td>';
print '<td><input name="account_number" size="30" value="' . $object->account_number . '"</td></tr>';
// Label
@@ -299,7 +301,7 @@ if ($action == 'create') {
print '<table class="border" width="100%">';
// Account number
print '<tr><td width="25%">' . $langs->trans("AccountNumber") . '</td>';
print '<tr><td class="titlefield">' . $langs->trans("AccountNumber") . '</td>';
print '<td>' . $object->account_number . '</td>';
print '<td align="right" width="25%">' . $linkback . '</td></tr>';

View File

@@ -81,6 +81,9 @@ if ($action == 'update') {
if (! dolibarr_set_const($db, 'ACCOUNTING_EXPORT_MODELCSV', $modelcsv, 'chaine', 0, '', $conf->entity)) {
$error ++;
}
if ($modelcsv==AccountancyExport::$EXPORT_TYPE_QUADRATUS || $modelcsv==AccountancyExport::$EXPORT_TYPE_CIEL) {
dolibarr_set_const($db, 'ACCOUNTING_EXPORT_FORMAT', 'txt', 'chaine', 0, '', $conf->entity);
}
} else {
$error ++;
}

View File

@@ -168,6 +168,18 @@ if ($action == 'setmanagezero') {
}
}
if ($action == 'setdisabledirectinput') {
$setdisabledirectinput = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "BANK_DISABLE_DIRECT_INPUT", $setdisabledirectinput, 'yesno', 0, '', $conf->entity);
if (! $res > 0)
$error ++;
if (! $error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'mesgs');
}
}
/*
* View
*/
@@ -342,6 +354,20 @@ if (! empty($conf->global->ACCOUNTING_MANAGE_ZERO)) {
}
print '</tr>';
$var = ! $var;
print "<tr " . $bc[$var] . ">";
print '<td width="80%">' . $langs->trans("BANK_DISABLE_DIRECT_INPUT") . '</td>';
if (! empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) {
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=0">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>';
} else {
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=1">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>';
}
print '</tr>';
print "</table>\n";
dol_fiche_end();

View File

@@ -295,6 +295,8 @@ class AccountancyExport
public function exportCiel(&$TData) {
global $conf;
$this->end_line ="\r\n";
$i = 1;
$date_ecriture = dol_print_date(time(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be yyyymmdd
foreach ( $TData as $data ) {
@@ -333,6 +335,8 @@ class AccountancyExport
public function exportQuadratus(&$TData) {
global $conf;
$this->end_line ="\r\n";
$date_ecriture = dol_print_date(time(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy
foreach ( $TData as $data ) {
$code_compta = $data->numero_compte;

View File

@@ -43,7 +43,7 @@ if ($user->societe_id > 0)
accessforbidden();
if (! $user->rights->accounting->ventilation->read)
accessforbidden();
// Filter
$year = $_GET["year"];
if ($year == 0) {
@@ -57,17 +57,17 @@ if ($year == 0) {
// Validate History
$action = GETPOST('action');
if ($action == 'validatehistory') {
$error = 0;
$db->begin();
if ($db->type == 'pgsql') {
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet as fd";
$sql1 .= " SET fd.fk_code_ventilation = accnt.rowid";
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet";
$sql1 .= " SET fk_code_ventilation = accnt.rowid";
$sql1 .= " FROM " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
$sql1 .= " WHERE fd.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS;
$sql1 .= " WHERE " . MAIN_DB_PREFIX . "facturedet.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS;
$sql1 .= " AND accnt.active = 1 AND p.accountancy_code_sell=accnt.account_number";
$sql1 .= " AND fd.fk_code_ventilation = 0";
$sql1 .= " AND " . MAIN_DB_PREFIX . "facturedet.fk_code_ventilation = 0";
} else {
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet as fd, " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
$sql1 .= " SET fd.fk_code_ventilation = accnt.rowid";
@@ -75,9 +75,9 @@ if ($action == 'validatehistory') {
$sql1 .= " AND accnt.active = 1 AND p.accountancy_code_sell=accnt.account_number";
$sql1 .= " AND fd.fk_code_ventilation = 0";
}
dol_syslog("htdocs/accountancy/customer/index.php sql=" . $sql, LOG_DEBUG);
$resql1 = $db->query($sql1);
if (! $resql1) {
$error ++;
@@ -90,7 +90,7 @@ if ($action == 'validatehistory') {
} elseif ($action == 'fixaccountancycode') {
$error = 0;
$db->begin();
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet as fd";
$sql1 .= " SET fd.fk_code_ventilation = 0";
$sql1 .= ' WHERE fd.fk_code_ventilation NOT IN ';
@@ -98,9 +98,9 @@ if ($action == 'validatehistory') {
$sql1 .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
$sql1 .= ' INNER JOIN ' . MAIN_DB_PREFIX . 'accounting_system as syst';
$sql1 .= ' ON accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=' . $conf->global->CHARTOFACCOUNTS . ')';
dol_syslog("htdocs/accountancy/customer/index.php fixaccountancycode", LOG_DEBUG);
$resql1 = $db->query($sql1);
if (! $resql1) {
$error ++;
@@ -113,15 +113,15 @@ if ($action == 'validatehistory') {
} elseif ($action == 'cleanaccountancycode') {
$error = 0;
$db->begin();
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet as fd";
$sql1 .= " SET fd.fk_code_ventilation = 0";
$sql1 .= " WHERE fd.fk_facture IN ( SELECT f.rowid FROM " . MAIN_DB_PREFIX . "facture as f";
$sql1 .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($year_current, 1, false)) . "'";
$sql1 .= " AND f.datef <= '" . $db->idate(dol_get_last_day($year_current, 12, false)) . "')";
dol_syslog("htdocs/accountancy/customer/index.php fixaccountancycode", LOG_DEBUG);
$resql1 = $db->query($sql1);
if (! $resql1) {
$error ++;
@@ -196,11 +196,10 @@ $sql .= " GROUP BY fd.fk_code_ventilation,aa.account_number,aa.label";
dol_syslog("htdocs/accountancy/customer/index.php sql=" . $sql, LOG_DEBUG);
$resql = $db->query($sql);
if ($resql) {
$i = 0;
$num = $db->num_rows($resql);
while ( $i < $num ) {
$row = $db->fetch_row($resql);
while ( $row = $db->fetch_row($resql)) {
$var = ! $var;
print '<tr ' . $bc[$var] . '><td>' . length_accountg($row[0]) . '</td>';
print '<td align="left">' . $row[1] . '</td>';
@@ -210,7 +209,6 @@ if ($resql) {
print '<td align="right">' . price($row[13]) . '</td>';
print '<td align="right"><b>' . price($row[14]) . '</b></td>';
print '</tr>';
$i ++;
}
$db->free($resql);
} else {
@@ -245,10 +243,8 @@ $resql = $db->query($sql);
if ($resql) {
$i = 0;
$num = $db->num_rows($resql);
while ( $i < $num ) {
$row = $db->fetch_row($resql);
while ($row = $db->fetch_row($resql)) {
print '<tr><td>' . $row[0] . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';
@@ -271,37 +267,34 @@ if (! empty($conf->margin->enabled)) {
print '<td width="60" align="center">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="center"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT '" . $langs->trans("Vide") . "' AS 'Marge',";
$sql = "SELECT '" . $langs->trans("Vide") . "' AS marge,";
for($i = 1; $i <= 12; $i ++) {
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, '(fd.total_ht-(fd.qty * fd.buy_price_ht))', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
}
$sql .= " SUM((fd.total_ht-(fd.qty * fd.buy_price_ht))) as 'Total'";
$sql .= " SUM((fd.total_ht-(fd.qty * fd.buy_price_ht))) as total";
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
if (! empty($conf->multicompany->enabled)) {
$sql .= " AND f.entity IN (" . getEntity("facture", 1) . ")";
}
dol_syslog('htdocs/accountancy/customer/index.php:: $sql=' . $sql);
$resql = $db->query($sql);
if ($resql) {
$i = 0;
$num = $db->num_rows($resql);
while ( $i < $num ) {
$row = $db->fetch_row($resql);
while ($row = $db->fetch_row($resql)) {
print '<tr><td>' . $row[0] . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';
}
print '<td align="right"><b>' . price($row[13]) . '</b></td>';
print '</tr>';
$i ++;
}
$db->free($resql);
} else {

View File

@@ -185,7 +185,7 @@ $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accountancy_code_sell = aa.account_number";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_system as accsys ON accsys.pcg_version = aa.fk_pcg_version";
$sql .= " WHERE f.fk_statut > 0";
$sql .= " AND fk_code_ventilation <= 0";
$sql .= " AND l.fk_code_ventilation <= 0";
$sql .= " AND product_type <= 2";
$sql .= " AND (accsys.rowid='" . $conf->global->CHARTOFACCOUNTS . "' OR p.accountancy_code_sell IS NULL OR p.accountancy_code_sell ='')";
@@ -307,6 +307,7 @@ if ($result) {
// Ref Invoice
$facture_static->ref = $objp->facnumber;
$facture_static->id = $objp->facid;
$facture_static->type = $objp->ftype;
print '<td>' . $facture_static->getNomUrl(1) . '</td>';
// Ref Product
$product_static->ref = $objp->product_ref;

View File

@@ -166,7 +166,7 @@ if ($action == 'writebookkeeping') {
$now = dol_now();
$error = 0;
foreach ($tabfac as $key => $val)
foreach ($tabfac as $key => $val)
{
$companystatic = new Societe($db);
$invoicestatic = new FactureFournisseur($db);
@@ -425,7 +425,7 @@ if ($action == 'export_csv') {
'action' => ''
));
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV != 1 || $conf->global->ACCOUNTING_EXPORT_MODELCSV != 2) {
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV != 1 && $conf->global->ACCOUNTING_EXPORT_MODELCSV != 2) {
print '<input type="button" class="butActionRefused" style="float: right;" value="' . $langs->trans("Export") . '" disabeld="disabled" title="' . $langs->trans('ExportNotSupported') . '"/>';
} else {
print '<input type="button" class="button" style="float: right;" value="' . $langs->trans("Export") . '" onclick="launch_export();" />';

View File

@@ -443,7 +443,7 @@ if ($action == 'export_csv') {
'action' => ''
));
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV != 1 || $conf->global->ACCOUNTING_EXPORT_MODELCSV != 2) {
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV != 1 && $conf->global->ACCOUNTING_EXPORT_MODELCSV != 2) {
print '<input type="button" class="butActionRefused" style="float: right;" value="' . $langs->trans("Export") . '" disabeld="disabled" title="' . $langs->trans('ExportNotSupported') . '"/>';
} else {
print '<input type="button" class="butAction" style="float: right;" value="' . $langs->trans("Export") . '" onclick="launch_export();" />';

View File

@@ -41,7 +41,7 @@ if ($user->societe_id > 0)
accessforbidden();
if (! $user->rights->accounting->ventilation->read)
accessforbidden();
// Filter
$year = $_GET["year"];
if ($year == 0) {
@@ -55,17 +55,17 @@ if ($year == 0) {
// Validate History
$action = GETPOST('action');
if ($action == 'validatehistory') {
$error = 0;
$db->begin();
if ($db->type == 'pgsql') {
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det as fd";
$sql1 .= " SET fd.fk_code_ventilation = accnt.rowid";
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det";
$sql1 .= " SET fk_code_ventilation = accnt.rowid";
$sql1 .= " FROM " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
$sql1 .= " WHERE fd.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS;
$sql1 .= " WHERE " . MAIN_DB_PREFIX . "facture_fourn_det.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS;
$sql1 .= " AND accnt.active = 1 AND p.accountancy_code_buy=accnt.account_number";
$sql1 .= " AND fd.fk_code_ventilation = 0";
$sql1 .= " AND " . MAIN_DB_PREFIX . "facture_fourn_det.fk_code_ventilation = 0";
} else {
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det as fd, " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
$sql1 .= " SET fd.fk_code_ventilation = accnt.rowid";
@@ -73,7 +73,7 @@ if ($action == 'validatehistory') {
$sql1 .= " AND accnt.active = 1 AND p.accountancy_code_buy=accnt.account_number";
$sql1 .= " AND fd.fk_code_ventilation = 0";
}
$resql1 = $db->query($sql1);
if (! $resql1) {
$error ++;
@@ -86,7 +86,7 @@ if ($action == 'validatehistory') {
} elseif ($action == 'fixaccountancycode') {
$error = 0;
$db->begin();
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det as fd";
$sql1 .= " SET fd.fk_code_ventilation = 0";
$sql1 .= ' WHERE fd.fk_code_ventilation NOT IN ';
@@ -94,9 +94,9 @@ if ($action == 'validatehistory') {
$sql1 .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
$sql1 .= ' INNER JOIN ' . MAIN_DB_PREFIX . 'accounting_system as syst';
$sql1 .= ' ON accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=' . $conf->global->CHARTOFACCOUNTS . ')';
dol_syslog("htdocs/accountancy/customer/index.php fixaccountancycode", LOG_DEBUG);
$resql1 = $db->query($sql1);
if (! $resql1) {
$error ++;
@@ -109,15 +109,15 @@ if ($action == 'validatehistory') {
} elseif ($action == 'cleanaccountancycode') {
$error = 0;
$db->begin();
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det as fd";
$sql1 .= " SET fd.fk_code_ventilation = 0";
$sql1 .= " WHERE fd.fk_facture_fourn IN ( SELECT f.rowid FROM " . MAIN_DB_PREFIX . "facture_fourn as f";
$sql1 .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($year_current, 1, false)) . "'";
$sql1 .= " AND f.datef <= '" . $db->idate(dol_get_last_day($year_current, 12, false)) . "')";
dol_syslog("htdocs/accountancy/customer/index.php fixaccountancycode", LOG_DEBUG);
$resql1 = $db->query($sql1);
if (! $resql1) {
$error ++;
@@ -154,35 +154,17 @@ $var = true;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td width="200" align="left">' . $langs->trans("Account") . '</td>';
print '<td width="200" align="left">' . $langs->trans("Label") . '</td>';
print '<td width="60" align="center">' . $langs->trans("JanuaryMin") . '</td>';
print '<td width="60" align="center">' . $langs->trans("FebruaryMin") . '</td>';
print '<td width="60" align="center">' . $langs->trans("MarchMin") . '</td>';
print '<td width="60" align="center">' . $langs->trans("AprilMin") . '</td>';
print '<td width="60" align="center">' . $langs->trans("MayMin") . '</td>';
print '<td width="60" align="center">' . $langs->trans("JuneMin") . '</td>';
print '<td width="60" align="center">' . $langs->trans("JulyMin") . '</td>';
print '<td width="60" align="center">' . $langs->trans("AugustMin") . '</td>';
print '<td width="60" align="center">' . $langs->trans("SeptemberMin") . '</td>';
print '<td width="60" align="center">' . $langs->trans("OctoberMin") . '</td>';
print '<td width="60" align="center">' . $langs->trans("NovemberMin") . '</td>';
print '<td width="60" align="center">' . $langs->trans("DecemberMin") . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td width="60" align="center">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="center"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT IF(aa.account_number IS NULL, 'Non pointe', aa.account_number) AS 'code comptable',";
$sql .= " IF(aa.label IS NULL, 'Non pointe', aa.label) AS 'Intitulé',";
$sql .= " ROUND(SUM(IF(MONTH(ff.datef)=1,ffd.total_ht,0)),2) AS 'Janvier',";
$sql .= " ROUND(SUM(IF(MONTH(ff.datef)=2,ffd.total_ht,0)),2) AS 'Fevrier',";
$sql .= " ROUND(SUM(IF(MONTH(ff.datef)=3,ffd.total_ht,0)),2) AS 'Mars',";
$sql .= " ROUND(SUM(IF(MONTH(ff.datef)=4,ffd.total_ht,0)),2) AS 'Avril',";
$sql .= " ROUND(SUM(IF(MONTH(ff.datef)=5,ffd.total_ht,0)),2) AS 'Mai',";
$sql .= " ROUND(SUM(IF(MONTH(ff.datef)=6,ffd.total_ht,0)),2) AS 'Juin',";
$sql .= " ROUND(SUM(IF(MONTH(ff.datef)=7,ffd.total_ht,0)),2) AS 'Juillet',";
$sql .= " ROUND(SUM(IF(MONTH(ff.datef)=8,ffd.total_ht,0)),2) AS 'Aout',";
$sql .= " ROUND(SUM(IF(MONTH(ff.datef)=9,ffd.total_ht,0)),2) AS 'Septembre',";
$sql .= " ROUND(SUM(IF(MONTH(ff.datef)=10,ffd.total_ht,0)),2) AS 'Octobre',";
$sql .= " ROUND(SUM(IF(MONTH(ff.datef)=11,ffd.total_ht,0)),2) AS 'Novembre',";
$sql .= " ROUND(SUM(IF(MONTH(ff.datef)=12,ffd.total_ht,0)),2) AS 'Decembre',";
$sql .= " ROUND(SUM(ffd.total_ht),2) as 'Total'";
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.account_number') ." AS codecomptable,";
$sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.label') . " AS intitule,";
for($i = 1; $i <= 12; $i ++) {
$sql .= " SUM(" . $db->ifsql('MONTH(ff.datef)=' . $i, 'ffd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
}
$sql .= " ROUND(SUM(ffd.total_ht),2) as total";
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as ffd";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture_fourn as ff ON ff.rowid = ffd.fk_facture_fourn";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = ffd.fk_code_ventilation";
@@ -194,35 +176,24 @@ if (! empty($conf->multicompany->enabled)) {
$sql .= " AND ff.entity IN (" . getEntity("facture_fourn", 1) . ")";
}
$sql .= " GROUP BY ffd.fk_code_ventilation";
$sql .= " GROUP BY ffd.fk_code_ventilation,aa.account_number,aa.label";
dol_syslog('/accountancy/supplier/index.php:: sql=' . $sql);
$resql = $db->query($sql);
if ($resql) {
$i = 0;
$num = $db->num_rows($resql);
while ( $i < $num ) {
$row = $db->fetch_row($resql);
while ( $row = $db->fetch_row($resql)) {
$var = ! $var;
print '<tr ' . $bc[$var] . '><td>' . length_accountg($row[0]) . '</td>';
print '<td align="left">' . $row[1] . '</td>';
print '<td align="right">' . price($row[2]) . '</td>';
print '<td align="right">' . price($row[3]) . '</td>';
print '<td align="right">' . price($row[4]) . '</td>';
print '<td align="right">' . price($row[5]) . '</td>';
print '<td align="right">' . price($row[6]) . '</td>';
print '<td align="right">' . price($row[7]) . '</td>';
print '<td align="right">' . price($row[8]) . '</td>';
print '<td align="right">' . price($row[9]) . '</td>';
print '<td align="right">' . price($row[10]) . '</td>';
print '<td align="right">' . price($row[11]) . '</td>';
print '<td align="right">' . price($row[12]) . '</td>';
for($i = 2; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';
}
print '<td align="right">' . price($row[13]) . '</td>';
print '<td align="right"><b>' . price($row[14]) . '</b></td>';
print '</tr>';
$i ++;
}
$db->free($resql);
} else {
@@ -233,34 +204,16 @@ print "</table>\n";
print "<br>\n";
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td width="400" align="left">' . $langs->trans("Total") . '</td>';
print '<td width="60" align="center">' . $langs->trans("JanuaryMin") . '</td>';
print '<td width="60" align="center">' . $langs->trans("FebruaryMin") . '</td>';
print '<td width="60" align="center">' . $langs->trans("MarchMin") . '</td>';
print '<td width="60" align="center">' . $langs->trans("AprilMin") . '</td>';
print '<td width="60" align="center">' . $langs->trans("MayMin") . '</td>';
print '<td width="60" align="center">' . $langs->trans("JuneMin") . '</td>';
print '<td width="60" align="center">' . $langs->trans("JulyMin") . '</td>';
print '<td width="60" align="center">' . $langs->trans("AugustMin") . '</td>';
print '<td width="60" align="center">' . $langs->trans("SeptemberMin") . '</td>';
print '<td width="60" align="center">' . $langs->trans("OctoberMin") . '</td>';
print '<td width="60" align="center">' . $langs->trans("NovemberMin") . '</td>';
print '<td width="60" align="center">' . $langs->trans("DecemberMin") . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td width="60" align="center">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="center"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT '" . $langs->trans("CAHTF") . "' AS 'Total',";
$sql .= " ROUND(SUM(IF(MONTH(ff.datef)=1,ffd.total_ht,0)),2) AS 'Janvier',";
$sql .= " ROUND(SUM(IF(MONTH(ff.datef)=2,ffd.total_ht,0)),2) AS 'Fevrier',";
$sql .= " ROUND(SUM(IF(MONTH(ff.datef)=3,ffd.total_ht,0)),2) AS 'Mars',";
$sql .= " ROUND(SUM(IF(MONTH(ff.datef)=4,ffd.total_ht,0)),2) AS 'Avril',";
$sql .= " ROUND(SUM(IF(MONTH(ff.datef)=5,ffd.total_ht,0)),2) AS 'Mai',";
$sql .= " ROUND(SUM(IF(MONTH(ff.datef)=6,ffd.total_ht,0)),2) AS 'Juin',";
$sql .= " ROUND(SUM(IF(MONTH(ff.datef)=7,ffd.total_ht,0)),2) AS 'Juillet',";
$sql .= " ROUND(SUM(IF(MONTH(ff.datef)=8,ffd.total_ht,0)),2) AS 'Aout',";
$sql .= " ROUND(SUM(IF(MONTH(ff.datef)=9,ffd.total_ht,0)),2) AS 'Septembre',";
$sql .= " ROUND(SUM(IF(MONTH(ff.datef)=10,ffd.total_ht,0)),2) AS 'Octobre',";
$sql .= " ROUND(SUM(IF(MONTH(ff.datef)=11,ffd.total_ht,0)),2) AS 'Novembre',";
$sql .= " ROUND(SUM(IF(MONTH(ff.datef)=12,ffd.total_ht,0)),2) AS 'Decembre',";
$sql .= " ROUND(SUM(ffd.total_ht),2) as 'Total'";
$sql = "SELECT '" . $langs->trans("CAHTF") . "' AS label,";
for($i = 1; $i <= 12; $i ++) {
$sql .= " SUM(" . $db->ifsql('MONTH(ff.datef)=' . $i, 'ffd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
}
$sql .= " ROUND(SUM(ffd.total_ht),2) as total";
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as ffd";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture_fourn as ff ON ff.rowid = ffd.fk_facture_fourn";
$sql .= " WHERE ff.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
@@ -274,31 +227,19 @@ if (! empty($conf->multicompany->enabled)) {
dol_syslog('/accountancy/supplier/index.php:: sql=' . $sql);
$resql = $db->query($sql);
if ($resql) {
$i = 0;
$num = $db->num_rows($resql);
while ( $i < $num ) {
$row = $db->fetch_row($resql);
while ( $row = $db->fetch_row($resql)) {
print '<tr><td>' . $row[0] . '</td>';
print '<td align="right">' . $row[1] . '</td>';
print '<td align="right">' . price($row[2]) . '</td>';
print '<td align="right">' . price($row[3]) . '</td>';
print '<td align="right">' . price($row[4]) . '</td>';
print '<td align="right">' . price($row[5]) . '</td>';
print '<td align="right">' . price($row[6]) . '</td>';
print '<td align="right">' . price($row[7]) . '</td>';
print '<td align="right">' . price($row[8]) . '</td>';
print '<td align="right">' . price($row[9]) . '</td>';
print '<td align="right">' . price($row[10]) . '</td>';
print '<td align="right">' . price($row[11]) . '</td>';
print '<td align="right">' . price($row[12]) . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';
}
print '<td align="right"><b>' . price($row[13]) . '</b></td>';
print '</tr>';
$i ++;
}
$db->free($resql);
} else {
print $db->lasterror(); // Show last sql error

View File

@@ -610,6 +610,13 @@ if ($resql)
print "<td>";
print $memberstatic->getNomUrl(1);
print "</td>\n";
}
// Firstname
if (! empty($arrayfields['d.firstname']['checked']))
{
print "<td>";
print $obj->firstname;
print "</td>\n";
}
// Lastname
if (! empty($arrayfields['d.lastname']['checked']))
@@ -617,13 +624,6 @@ if ($resql)
print "<td>";
print $obj->lastname;
print "</td>\n";
}
// Firstname
if (! empty($arrayfields['d.firstname']['checked']))
{
print "<td>";
print $obj->firstname;
print "</td>\n";
}
// Company
if (! empty($arrayfields['d.company']['checked']))

View File

@@ -56,7 +56,7 @@ $conditions = array(
'SOCIETE' => 1,
'PRODUCTDESC' => (! empty($conf->product->enabled) || ! empty($conf->service->enabled)),
'MAILING' => ! empty($conf->mailing->enabled),
'DETAILS' => (! empty($conf->facture->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->commande->enabled)),
'DETAILS' => (! empty($conf->facture->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->commande->enabled) || ! empty($conf->supplier_proposal->enabled) || ! empty($conf->fournisseur->enabled)),
'USERSIGN' => 1,
'MAIL' => (! empty($conf->facture->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->commande->enabled))
);

View File

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

View File

@@ -48,11 +48,11 @@ if ($action == "set")
$id=GETPOST('PRELEVEMENT_ID_BANKACCOUNT','int');
$account = new Account($db);
if($account->fetch($id)>0)
{
$res = dolibarr_set_const($db, "PRELEVEMENT_ID_BANKACCOUNT", $id,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
/*
$res = dolibarr_set_const($db, "PRELEVEMENT_CODE_BANQUE", $account->code_banque,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
$res = dolibarr_set_const($db, "PRELEVEMENT_CODE_GUICHET", $account->code_guichet,'chaine',0,'',$conf->entity);
@@ -67,6 +67,7 @@ if ($action == "set")
if (! $res > 0) $error++;
$res = dolibarr_set_const($db, "PRELEVEMENT_RAISON_SOCIALE", $account->proprio,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
*/
}
else $error++;
@@ -141,7 +142,7 @@ print '</td></tr>';
// ICS
print '<tr class="pair"><td class="fieldrequired">'.$langs->trans("ICS").'</td>';
print '<td align="left">';
print '<input type="text" name="PRELEVEMENT_ICS" value="'.$conf->global->PRELEVEMENT_ICS.'" size="9" ></td>';
print '<input type="text" name="PRELEVEMENT_ICS" value="'.$conf->global->PRELEVEMENT_ICS.'" size="15" ></td>';
print '</td></tr>';
//User

View File

@@ -176,7 +176,7 @@ if (ini_get('safe_mode') && ! empty($conf->global->MAIN_ANTIVIRUS_COMMAND))
dol_syslog("safe_mode is on, basedir is ".$basedir.", safe_mode_exec_dir is ".ini_get('safe_mode_exec_dir'), LOG_WARNING);
}
}
print '<input type="text" name="MAIN_ANTIVIRUS_COMMAND" size="72" value="'.(! empty($conf->global->MAIN_ANTIVIRUS_COMMAND)?dol_htmlentities($conf->global->MAIN_ANTIVIRUS_COMMAND):'').'">';
print '<input type="text" name="MAIN_ANTIVIRUS_COMMAND" class="minwidth500imp" value="'.(! empty($conf->global->MAIN_ANTIVIRUS_COMMAND)?dol_htmlentities($conf->global->MAIN_ANTIVIRUS_COMMAND):'').'">';
print "</td>";
print '</tr>';
@@ -187,7 +187,7 @@ print '<td colspan="2">'.$langs->trans("AntiVirusParam").'<br>';
print $langs->trans("AntiVirusParamExample");
print '</td>';
print '<td>';
print '<input type="text" name="MAIN_ANTIVIRUS_PARAM" size="72" value="'.(! empty($conf->global->MAIN_ANTIVIRUS_PARAM)?dol_htmlentities($conf->global->MAIN_ANTIVIRUS_PARAM):'').'">';
print '<input type="text" name="MAIN_ANTIVIRUS_PARAM" class="minwidth500imp" value="'.(! empty($conf->global->MAIN_ANTIVIRUS_PARAM)?dol_htmlentities($conf->global->MAIN_ANTIVIRUS_PARAM):'').'">';
print "</td>";
print '</tr>';

View File

@@ -94,7 +94,7 @@ dol_fiche_head($head, 'supplierpayment', $langs->trans("Suppliers"), 0, 'company
if (empty($conf->global->SUPPLIER_PAYMENT_ADDON)) $conf->global->SUPPLIER_PAYMENT_ADDON = 'mod_supplier_payment_bronan';
print load_fiche_titre($langs->trans("PaymentsNumberingModule"));
print load_fiche_titre($langs->trans("PaymentsNumberingModule"), '', '');
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';

View File

@@ -72,7 +72,7 @@ function printBookmarksList($aDb, $aLangs)
while ($i < $conf->global->BOOKMARKS_SHOW_IN_MENU && $obj = $db->fetch_object($resql))
{
$ret.='<div class="menu_contenu"><a class="vsmenu" title="'.$obj->title.'" href="'.$obj->url.'"'.($obj->target == 1?' target="_blank"':'').'>';
$ret.=' '.img_object('','bookmark').' ';
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $ret.=' '.img_object('','bookmark').' ';
$ret.= dol_trunc($obj->title, 20).'</a><br></div>';
$i++;
}

View File

@@ -215,7 +215,8 @@ if (($action == 'add' || $action == 'confirmed') && $user->rights->categorie->cr
$form = new Form($db);
$formother = new FormOther($db);
llxHeader("","",$langs->trans("Categories"));
$helpurl='';
llxHeader("",$langs->trans("Categories"),$helpurl);
if ($user->rights->categorie->creer)
{
@@ -244,7 +245,7 @@ if ($user->rights->categorie->creer)
// Ref
print '<tr>';
print '<td width="20%" class="fieldrequired">'.$langs->trans("Ref").'</td><td><input id="label" class="flat" name="label" size="25" value="'.$label.'">';
print '<td class="titlefieldcreate fieldrequired">'.$langs->trans("Ref").'</td><td><input id="label" class="flat" name="label" size="25" value="'.$label.'">';
print'</td></tr>';
// Description

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2006-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
@@ -118,9 +118,14 @@ if ($catname || $id > 0)
$categstatic->ref=$cat->label;
$categstatic->label=$cat->label;
$categstatic->type=$cat->type;
$categstatic->color=$cat->color;
print '<span class="noborderoncategories" '.($categstatic->color?' style="background: #'.$categstatic->color.';"':' style="background: #aaa"').'>';
print $categstatic->getNomUrl(1,'');
print '</span>';
print "</td>\n";
print "\t\t<td>";
print $cat->description;
print "</td>\n";
print "\t\t<td>".$cat->description."</td>\n";
print "\t</tr>\n";
}
print "</table>";

View File

@@ -169,7 +169,8 @@ if ($type == Categorie::TYPE_PRODUCT && $elemid && $action == 'addintocategory'
$form = new Form($db);
$formother = new FormOther($db);
llxHeader("","",$langs->trans("Categories"));
$helpurl='';
llxHeader("",$langs->trans("Categories"),$helpurl);
if ($type == Categorie::TYPE_PRODUCT) $title=$langs->trans("ProductsCategoryShort");
elseif ($type == Categorie::TYPE_SUPPLIER) $title=$langs->trans("SuppliersCategoryShort");

View File

@@ -876,7 +876,7 @@ else
{
print "\n\n<div class=\"tabsAction\">\n";
if (($object->statut == 0) && $user->rights->mailing->creer)
if (($object->statut == 0 || $object->statut == 1) && $user->rights->mailing->creer)
{
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=edit&amp;id='.$object->id.'">'.$langs->trans("EditMailing").'</a>';
}

View File

@@ -5,7 +5,7 @@
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2015 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
@@ -279,7 +279,7 @@ if (empty($reshook))
if ($socid < 1) {
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Customer")), null, 'errors');
$action = 'create';
$error ++;
}
@@ -345,7 +345,7 @@ if (empty($reshook))
$object->origin = GETPOST('origin');
$object->origin_id = GETPOST('originid');
// Multicurrency
if (!empty($conf->multicurrency->enabled))
{
@@ -718,7 +718,7 @@ if (empty($reshook))
$tva_tx = get_default_tva($mysoc, $object->thirdparty, $prod->id);
$tva_npr = get_default_npr($mysoc, $object->thirdparty, $prod->id);
if (empty($tva_tx)) $tva_npr=0;
$pu_ht = $prod->price;
$pu_ttc = $prod->price_ttc;
$price_min = $prod->price_min;
@@ -932,7 +932,7 @@ if (empty($reshook))
// Add buying price
$fournprice = price2num(GETPOST('fournprice') ? GETPOST('fournprice') : '');
$buyingprice = price2num(GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we muste keep this value
$buyingprice = price2num(GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we muste keep this value
$date_start = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), GETPOST('date_startsec'), GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear'));
$date_end = dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), GETPOST('date_endsec'), GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear'));
@@ -1082,7 +1082,7 @@ if (empty($reshook))
// Multicurrency rate
else if ($action == 'setmulticurrencyrate' && $user->rights->propal->creer) {
$result = $object->setMulticurrencyRate(GETPOST('multicurrency_tx', 'int'));
$result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')));
}
// bank account
@@ -1167,12 +1167,12 @@ if (empty($reshook))
}
}
}
// Actions to build doc
$upload_dir = $conf->propal->dir_output;
$permissioncreate=$user->rights->propal->creer;
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
}
@@ -1266,6 +1266,8 @@ if ($action == 'create')
if ($origin != 'project' && $originid) {
print '<input type="hidden" name="origin" value="' . $origin . '">';
print '<input type="hidden" name="originid" value="' . $originid . '">';
} elseif ($origin == 'project' && !empty($projectid)) {
print '<input type="hidden" name="projectid" value="' . $projectid . '">';
}
dol_fiche_head();
@@ -1432,11 +1434,11 @@ if ($action == 'create')
print '<tr>';
print '<td>'.fieldLabel('Currency','multicurrency_code').'</td>';
print '<td colspan="3" class="maxwidthonsmartphone">';
$currency_code = (!empty($soc->multicurrency_code) ? $soc->multicurrency_code : ($object->multicurrency_code ? $object->multicurrency_code : $conf->currency));
$currency_code = (!empty($soc->multicurrency_code) ? $soc->multicurrency_code : ($object->multicurrency_code ? $object->multicurrency_code : $conf->currency));
print $form->selectMultiCurrency($currency_code, 'multicurrency_code', 0);
print '</td></tr>';
}
// Public note
print '<tr>';
print '<td class="border" valign="top">' . $langs->trans('NotePublic') . '</td>';
@@ -1717,7 +1719,7 @@ if ($action == 'create')
print '</tr></table>';
print '</td><td colspan="5">';
if ($user->rights->propal->creer && $action == 'refclient') {
print '<form action="propal.php?id=' . $object->id . '" method="post">';
print '<form action="'.$_SERVER["PHP_SELF"].'?id=' . $object->id . '" method="post">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="action" value="set_ref_client">';
print '<input type="text" class="flat" size="20" name="ref_client" value="' . $object->ref_client . '">';
@@ -1934,12 +1936,12 @@ if ($action == 'create')
$form->form_multicurrency_code($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_code, 'none');
}
print '</td></tr>';
// Multicurrency rate
print '<tr>';
print '<td width="25%">';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print fieldLabel('Rate','multicurrency_tx');
print fieldLabel('CurrencyRate','multicurrency_tx');
print '</td>';
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon))
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
@@ -2053,7 +2055,7 @@ if ($action == 'create')
print '<td class="nowrap" colspan="2">' . price($object->total_ht, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
// Margin Infos
if (! empty($conf->margin->enabled))
if (! empty($conf->margin->enabled))
{
$rowspan=4;
if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) $rowspan++;
@@ -2087,25 +2089,25 @@ if ($action == 'create')
print '<tr><td height="10">' . $langs->trans('AmountTTC') . '</td>';
print '<td class="nowrap" colspan="2">' . price($object->total_ttc, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
print '</tr>';
if (!empty($conf->multicurrency->enabled))
{
// Multicurrency Amount HT
print '<tr><td height="10">' . fieldLabel('MulticurrencyAmountHT','multicurrency_total_ht') . '</td>';
print '<td class="nowrap" colspan="2">' . price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
print '</tr>';
// Multicurrency Amount VAT
print '<tr><td height="10">' . fieldLabel('MulticurrencyAmountVAT','multicurrency_total_tva') . '</td>';
print '<td class="nowrap" colspan="2">' . price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
print '</tr>';
// Multicurrency Amount TTC
print '<tr><td height="10">' . fieldLabel('MulticurrencyAmountTTC','multicurrency_total_ttc') . '</td>';
print '<td class="nowrap" colspan="2">' . price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
print '</tr>';
print '</tr>';
}
// Statut
print '<tr><td height="10">' . $langs->trans('Status') . '</td><td align="left" colspan="2">' . $object->getLibStatut(4) . '</td></tr>';
@@ -2397,7 +2399,7 @@ if ($action == 'create')
{
include DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
$formmail->frommail=dolAddEmailTrackId($formmail->frommail, 'pro'.$object->id);
}
}
$formmail->withfrom = 1;
$liste = array();
foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key => $value)

View File

@@ -262,14 +262,14 @@ if (empty($reshook))
$object->location_incoterms = GETPOST('location_incoterms', 'alpha');
$object->multicurrency_code = GETPOST('multicurrency_code', 'alpha');
$object->multicurrency_tx = GETPOST('originmulticurrency_tx', 'int');
// Fill array 'array_options' with data from add form
if (! $error)
{
$ret = $extrafields->setOptionalsFromPost($extralabels, $object);
if ($ret < 0) $error++;
}
// If creation from another object of another module (Example: origin=propal, originid=1)
if (! empty($origin) && ! empty($originid))
{
@@ -388,7 +388,7 @@ if (empty($reshook))
}
$sqlcontact = "SELECT code, fk_socpeople FROM ".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as ctc";
$sqlcontact.= " WHERE element_id = ".$originidforcontact." AND ec.fk_c_type_contact = ctc.rowid AND ctc.element = '".$originforcontact."'";
$resqlcontact = $db->query($sqlcontact);
if ($resqlcontact)
{
@@ -400,14 +400,14 @@ if (empty($reshook))
}
else dol_print_error($resqlcontact);
}
// Hooks
$parameters = array('objFrom' => $srcobject);
$reshook = $hookmanager->executeHooks('createFrom', $parameters, $object, $action); // Note that $action and $object may have been
// modified by hook
if ($reshook < 0)
$error++;
} else {
setEventMessages($object->error, $object->errors, 'errors');
$error++;
@@ -475,12 +475,12 @@ if (empty($reshook))
else if ($action == 'classifyunbilled' && $user->rights->commande->creer)
{
$ret=$object->classifyUnBilled();
if ($ret < 0) {
setEventMessages($object->error, $object->errors, 'errors');
}
}
// Positionne ref commande client
else if ($action == 'set_ref_client' && $user->rights->commande->creer) {
$object->set_ref_client($user, GETPOST('ref_client'));
@@ -525,7 +525,7 @@ if (empty($reshook))
if ($result < 0)
setEventMessages($object->error, $object->errors, 'errors');
}
// Multicurrency Code
else if ($action == 'setmulticurrencycode' && $user->rights->commande->creer) {
$result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha'));
@@ -533,9 +533,9 @@ if (empty($reshook))
// Multicurrency rate
else if ($action == 'setmulticurrencyrate' && $user->rights->commande->creer) {
$result = $object->setMulticurrencyRate(GETPOST('multicurrency_tx', 'int'));
$result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')));
}
else if ($action == 'setavailability' && $user->rights->commande->creer) {
$result = $object->availability(GETPOST('availability_id'));
if ($result < 0)
@@ -1334,7 +1334,7 @@ if ($action == 'create' && $user->rights->commande->creer)
$remise_absolue = 0;
$currency_code = $conf->currency;
if (! empty($origin) && ! empty($originid)) {
// Parse element/subelement (ex: project_task)
$element = $subelement = $origin;
@@ -1405,7 +1405,7 @@ if ($action == 'create' && $user->rights->commande->creer)
if (!empty($conf->multicurrency->enabled))
{
if (!empty($objectsrc->multicurrency_code)) $currency_code = $objectsrc->multicurrency_code;
if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX) && !empty($objectsrc->multicurrency_tx)) $currency_tx = $objectsrc->multicurrency_tx;
if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX) && !empty($objectsrc->multicurrency_tx)) $currency_tx = $objectsrc->multicurrency_tx;
}
$note_private = $object->getDefaultCreateValueFor('note_private', (! empty($objectsrc->note_private) ? $objectsrc->note_private : null));
@@ -1428,7 +1428,7 @@ if ($action == 'create' && $user->rights->commande->creer)
$remise_absolue = 0;
$dateorder = empty($conf->global->MAIN_AUTOFILL_DATE_ORDER)?-1:'';
$projectid = 0;
if (!empty($conf->multicurrency->enabled) && !empty($soc->multicurrency_code)) $currency_code = $soc->multicurrency_code;
$note_private = $object->getDefaultCreateValueFor('note_private');
@@ -1696,12 +1696,12 @@ if ($action == 'create' && $user->rights->commande->creer)
}
print '<tr><td>' . $langs->trans('TotalTTC') . '</td><td colspan="2">' . price($objectsrc->total_ttc) . "</td></tr>";
if (!empty($conf->multicurrency->enabled))
{
print '<tr><td>' . $langs->trans('MulticurrencyTotalHT') . '</td><td colspan="2">' . price($objectsrc->multicurrency_total_ht) . '</td></tr>';
print '<tr><td>' . $langs->trans('MulticurrencyTotalVAT') . '</td><td colspan="2">' . price($objectsrc->multicurrency_total_tva) . "</td></tr>";
print '<tr><td>' . $langs->trans('MulticurrencyTotalTTC') . '</td><td colspan="2">' . price($objectsrc->multicurrency_total_ttc) . "</td></tr>";
print '<tr><td>' . $langs->trans('MulticurrencyTotalTTC') . '</td><td colspan="2">' . price($objectsrc->multicurrency_total_ttc) . "</td></tr>";
}
}
else
@@ -1747,7 +1747,7 @@ if ($action == 'create' && $user->rights->commande->creer)
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input type="button" class="button" value="' . $langs->trans("Cancel") . '" onClick="javascript:history.go(-1)">';
print '</div>';
print '</form>';
// Show origin lines
@@ -2018,7 +2018,7 @@ if ($action == 'create' && $user->rights->commande->creer)
print '</td>';
print '</tr>';
}
// Relative and absolute discounts
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$filterabsolutediscount = "fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final
@@ -2203,12 +2203,12 @@ if ($action == 'create' && $user->rights->commande->creer)
$form->form_multicurrency_code($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_code, 'none');
}
print '</td></tr>';
// Multicurrency rate
print '<tr>';
print '<td width="25%">';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print fieldLabel('Rate','multicurrency_tx');
print fieldLabel('CurrencyRate','multicurrency_tx');
print '</td>';
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon))
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
@@ -2269,8 +2269,8 @@ if ($action == 'create' && $user->rights->commande->creer)
print ' / ';
print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND)?$conf->global->MAIN_VOLUME_DEFAULT_ROUND:-1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT)?$conf->global->MAIN_VOLUME_DEFAULT_UNIT:'no');
print '</td></tr>';
}
}
// TODO How record was recorded OrderMode (llx_c_input_method)
// Project
@@ -2385,16 +2385,16 @@ if ($action == 'create' && $user->rights->commande->creer)
print '<tr><td height="10">' . fieldLabel('MulticurrencyAmountHT','multicurrency_total_ht') . '</td>';
print '<td class="nowrap" colspan="2">' . price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
print '</tr>';
// Multicurrency Amount VAT
print '<tr><td height="10">' . fieldLabel('MulticurrencyAmountVAT','multicurrency_total_tva') . '</td>';
print '<td class="nowrap" colspan="2">' . price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
print '</tr>';
// Multicurrency Amount TTC
print '<tr><td height="10">' . fieldLabel('MulticurrencyAmountTTC','multicurrency_total_ttc') . '</td>';
print '<td class="nowrap" colspan="2">' . price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
print '</tr>';
print '</tr>';
}
// Statut

View File

@@ -160,6 +160,7 @@ class CommandeApi extends DolibarrApi
if ($result)
{
$i=0;
$num = $db->num_rows($result);
while ($i < $num)
{

View File

@@ -3144,7 +3144,7 @@ class Commande extends CommonOrder
*/
function getNomUrl($withpicto=0,$option=0,$max=0,$short=0)
{
global $conf, $langs;
global $conf, $langs, $user;
$result='';
@@ -3154,17 +3154,29 @@ class Commande extends CommonOrder
if ($short) return $url;
$picto = 'order';
$label = '<u>' . $langs->trans("ShowOrder") . '</u>';
if (! empty($this->ref))
$label .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
if (! empty($this->ref_client))
$label.= '<br><b>' . $langs->trans('RefCustomer') . ':</b> ' . $this->ref_client;
if (! empty($this->total_ht))
$label.= '<br><b>' . $langs->trans('AmountHT') . ':</b> ' . price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency);
if (! empty($this->total_tva))
$label.= '<br><b>' . $langs->trans('VAT') . ':</b> ' . price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency);
if (! empty($this->total_ttc))
$label.= '<br><b>' . $langs->trans('AmountTTC') . ':</b> ' . price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency);
$label = '';
if ($user->rights->commande->lire) {
$label = '<u>'.$langs->trans("ShowOrder").'</u>';
if (!empty($this->ref)) {
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
}
if (!empty($this->ref_client)) {
$label .= '<br><b>'.$langs->trans('RefCustomer').':</b> '.$this->ref_client;
}
if (!empty($this->total_ht)) {
$label .= '<br><b>'.$langs->trans('AmountHT').':</b> '.price($this->total_ht, 0, $langs, 0, -1, -1,
$conf->currency);
}
if (!empty($this->total_tva)) {
$label .= '<br><b>'.$langs->trans('VAT').':</b> '.price($this->total_tva, 0, $langs, 0, -1, -1,
$conf->currency);
}
if (!empty($this->total_ttc)) {
$label .= '<br><b>'.$langs->trans('AmountTTC').':</b> '.price($this->total_ttc, 0, $langs, 0, -1, -1,
$conf->currency);
}
}
$linkstart = '<a href="'.$url.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
$linkend='</a>';

View File

@@ -665,7 +665,7 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
print '<td class="nobordernopadding nowrap">';
print $generic_commande->getNomUrl(1,$objp->fk_statut);
print $generic_commande->getNomUrl(1,0);
print '</td>';
print '<td width="20" class="nobordernopadding nowrap">';

View File

@@ -366,16 +366,11 @@ if ($id > 0 || ! empty($ref))
{
if (empty($conf->global->BANK_DISABLE_DIRECT_INPUT))
{
if (empty($conf->accounting->enabled))
{
if ($user->rights->banque->modifier) {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=addline&amp;id='.$object->id.'&amp;page='.$page.($vline?'&amp;vline='.$vline:'').'">'.$langs->trans("AddBankRecord").'</a>';
} else {
print '<a class="butActionRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("AddBankRecord").'</a>';
}
} else {
print '<a class="butActionRefused" title="'.$langs->trans("FeatureDisabled").'" href="#">'.$langs->trans("AddBankRecord").'</a>';
}
if ($user->rights->banque->modifier) {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=addline&amp;id='.$object->id.'&amp;page='.$page.($vline?'&amp;vline='.$vline:'').'">'.$langs->trans("AddBankRecord").'</a>';
} else {
print '<a class="butActionRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("AddBankRecord").'</a>';
}
} else {
print '<a class="butActionRefused" title="'.$langs->trans("FeatureDisabled").'" href="#">'.$langs->trans("AddBankRecord").'</a>';
}

View File

@@ -507,7 +507,11 @@ if ($action == 'create')
dol_fiche_end();
print '<div class="center"><input value="'.$langs->trans("CreateAccount").'" type="submit" class="button"></div>';
print '<div class="center">';
print '<input type="submit" class="button" value="' . $langs->trans("CreateAccount") . '">';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input type="button" class="button" value="' . $langs->trans("Cancel") . '" onClick="javascript:history.go(-1)">';
print '</div>';
print '</form>';
}

View File

@@ -152,7 +152,7 @@ if($error)
$amount = GETPOST('amount','int');
}
print load_fiche_titre($langs->trans("BankTransfer"), '', 'title_bank.png');
print load_fiche_titre($langs->trans("MenuBankInternalTransfer"), '', 'title_bank.png');
print $langs->trans("TransferDesc");
print "<br><br>";

View File

@@ -32,6 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/paymentsocialcontribution.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
$langs->load("compta");
$langs->load("bills");
@@ -45,6 +46,8 @@ $year=GETPOST("year",'int');
$filtre=GETPOST("filtre",'alpha');
if (! $year && $mode != 'sconly') { $year=date("Y", time()); }
$search_account = GETPOST('search_account','int');
$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
@@ -65,6 +68,7 @@ $tva_static = new Tva($db);
$socialcontrib=new ChargeSociales($db);
$payment_sc_static=new PaymentSocialContribution($db);
$sal_static = new PaymentSalary($db);
$accountstatic = new Account($db);
llxHeader('',$langs->trans("SpecialExpensesArea"));
@@ -122,17 +126,21 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
print_liste_field_titre($langs->trans("RefPayment"),$_SERVER["PHP_SELF"],"pc.rowid","",$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DatePayment"),$_SERVER["PHP_SELF"],"pc.datep","",$param,'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"pct.code","",$param,'',$sortfield,$sortorder);
if (! empty($conf->banque->enabled)) print_liste_field_titre($langs->trans("Account"),$_SERVER["PHP_SELF"],"ba.label","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("PayedByThisPayment"),$_SERVER["PHP_SELF"],"pc.amount","",$param,'align="right"',$sortfield,$sortorder);
print "</tr>\n";
$sql = "SELECT c.id, c.libelle as lib,";
$sql.= " cs.rowid, cs.libelle, cs.fk_type as type, cs.periode, cs.date_ech, cs.amount as total,";
$sql.= " pc.rowid as pid, pc.datep, pc.amount as totalpaye, pc.num_paiement as num_payment,";
$sql.= " pct.code as payment_code";
$sql.= " pc.rowid as pid, pc.datep, pc.amount as totalpaye, pc.num_paiement as num_payment, pc.fk_bank,";
$sql.= " pct.code as payment_code,";
$sql.= " ba.rowid as bid, ba.label as blabel";
$sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c,";
$sql.= " ".MAIN_DB_PREFIX."chargesociales as cs";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiementcharge as pc ON pc.fk_charge = cs.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pct ON pc.fk_typepaiement = pct.id";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON pc.fk_bank = b.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid";
$sql.= " WHERE cs.fk_type = c.id";
$sql.= " AND cs.entity = ".$conf->entity;
if ($year > 0)
@@ -189,6 +197,20 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
print '<td>';
if ($obj->payment_code) print $langs->trans("PaymentTypeShort".$obj->payment_code).' ';
print $obj->num_payment.'</td>';
// Account
if (! empty($conf->banque->enabled))
{
print '<td>';
if ($obj->fk_bank > 0)
{
//$accountstatic->fetch($obj->fk_bank);
$accountstatic->id=$obj->bid;
$accountstatic->label=$obj->blabel;
print $accountstatic->getNomUrl(1);
}
else print '&nbsp;';
print '</td>';
}
// Paid
print '<td align="right">';
if ($obj->totalpaye) print price($obj->totalpaye);
@@ -205,6 +227,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
print '<td align="center" class="liste_total">&nbsp;</td>';
print '<td align="center" class="liste_total">&nbsp;</td>';
print '<td align="center" class="liste_total">&nbsp;</td>';
if (! empty($conf->banque->enabled)) print '<td></td>';
print '<td align="right" class="liste_total">'.price($totalpaye)."</td>";
print "</tr>";
}

View File

@@ -141,7 +141,7 @@ if (empty($reshook))
$object->fetch_thirdparty();
$result = $object->add_object_linked('commande', GETPOST('linkedOrder'));
}
// Action clone object
if ($action == 'confirm_clone' && $confirm == 'yes' && $user->rights->facture->creer) {
// if (1 == 0 && empty($_REQUEST["clone_content"]) && empty($_REQUEST["clone_receivers"])) {
@@ -290,9 +290,9 @@ if (empty($reshook))
// Multicurrency rate
else if ($action == 'setmulticurrencyrate' && $user->rights->facture->creer) {
$result = $object->setMulticurrencyRate(GETPOST('multicurrency_tx', 'int'));
$result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')));
}
else if ($action == 'setinvoicedate' && $user->rights->facture->creer)
{
$object->fetch($id);
@@ -320,7 +320,7 @@ if (empty($reshook))
$result = $object->update($user);
if ($result < 0) dol_print_error($db, $object->error);
}
else if ($action == 'setconditions' && $user->rights->facture->creer)
{
$object->fetch($id);
@@ -713,7 +713,7 @@ if (empty($reshook))
}
$date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']);
if (! $error) {
// This is a replacement invoice
$result = $object->fetch($_POST['fac_replacement']);
@@ -766,7 +766,7 @@ if (empty($reshook))
}
$date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']);
if (! $error)
{
$object->socid = GETPOST('socid','int');
@@ -788,7 +788,7 @@ if (empty($reshook))
$object->location_incoterms = GETPOST('location_incoterms', 'alpha');
$object->multicurrency_code = GETPOST('multicurrency_code', 'alpha');
$object->multicurrency_tx = GETPOST('originmulticurrency_tx', 'int');
// Proprietes particulieres a facture avoir
$object->fk_facture_source = $sourceinvoice > 0 ? $sourceinvoice : '';
$object->type = Facture::TYPE_CREDIT_NOTE;
@@ -875,7 +875,7 @@ if (empty($reshook))
}
$date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']);
if (! $error)
{
$object->socid = GETPOST('socid','int');
@@ -899,7 +899,7 @@ if (empty($reshook))
$object->location_incoterms = GETPOST('location_incoterms', 'alpha');
$object->multicurrency_code = GETPOST('multicurrency_code', 'alpha');
$object->multicurrency_tx = GETPOST('originmulticurrency_tx', 'int');
// Source facture
$object->fac_rec = GETPOST('fac_rec');
@@ -924,7 +924,7 @@ if (empty($reshook))
}
$date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']);
if (! $error)
{
// Si facture standard
@@ -1206,9 +1206,9 @@ if (empty($reshook))
$object->add_contact($objcontact->fk_socpeople, $objcontact->code);
}
}
else dol_print_error($resqlcontact);
else dol_print_error($resqlcontact);
}
// Hooks
$parameters = array('objFrom' => $srcobject);
$reshook = $hookmanager->executeHooks('createFrom', $parameters, $object, $action); // Note that $action and $object may have been
@@ -1218,7 +1218,7 @@ if (empty($reshook))
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
$error++;
}
} else {
setEventMessages($object->error, $object->errors, 'errors');
$error++;
@@ -1250,7 +1250,7 @@ if (empty($reshook))
}
$date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']);
if (!($_POST['situations'] > 0)) {
$error++;
$mesg = '<div class="error">' . $langs->trans("ErrorFieldRequired", $langs->trans("InvoiceSituation")) . '</div>';
@@ -1265,8 +1265,8 @@ if (empty($reshook))
{
$object->origin = $origin;
$object->origin_id = $originid;
foreach ($object->lines as &$line)
foreach ($object->lines as &$line)
{
$line->origin = $object->origin;
$line->origin_id = $line->id;
@@ -1612,7 +1612,7 @@ if (empty($reshook))
$pu_ht = GETPOST('price_ht');
$vat_rate = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0);
$qty = GETPOST('qty');
// Define info_bits
$info_bits = 0;
if (preg_match('/\*/', $vat_rate))
@@ -1797,7 +1797,7 @@ if (empty($reshook))
$upload_dir = $conf->facture->dir_output;
$permissioncreate=$user->rights->facture->creer;
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
if ($action == 'update_extras') {
// Fill array 'array_options' with data from add form
@@ -1887,7 +1887,7 @@ if (! empty($conf->projet->enabled)) { $formproject = new FormProjets($db); }
$now = dol_now();
llxHeader('', $langs->trans('Bill'), 'EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes');
llxHeader('', $langs->trans('InvoiceCustomer'), 'EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes');
// Mode creation
@@ -1904,7 +1904,7 @@ if ($action == 'create')
$res = $soc->fetch($socid);
$currency_code = $conf->currency;
// Load objectsrc
$remise_absolue = 0;
@@ -1976,9 +1976,9 @@ if ($action == 'create')
if (!empty($conf->multicurrency->enabled))
{
if (!empty($objectsrc->multicurrency_code)) $currency_code = $objectsrc->multicurrency_code;
if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX) && !empty($objectsrc->multicurrency_tx)) $currency_tx = $objectsrc->multicurrency_tx;
if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX) && !empty($objectsrc->multicurrency_tx)) $currency_tx = $objectsrc->multicurrency_tx;
}
// Replicate extrafields
$objectsrc->fetch_optionals($originid);
$object->array_options = $objectsrc->array_options;
@@ -1992,7 +1992,7 @@ if ($action == 'create')
$remise_percent = $soc->remise_percent;
$remise_absolue = 0;
$dateinvoice = (empty($dateinvoice)?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''):$dateinvoice); // Do not set 0 here (0 for a date is 1970)
if (!empty($conf->multicurrency->enabled) && !empty($soc->multicurrency_code)) $currency_code = $soc->multicurrency_code;
}
@@ -2018,7 +2018,7 @@ if ($action == 'create')
}
print info_admin($text, 0, 0, 0).'<br>';
}
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="action" value="add">';
@@ -2029,7 +2029,7 @@ if ($action == 'create')
print '<input type="hidden" name="origin" value="' . $origin . '">';
print '<input type="hidden" name="originid" value="' . $originid . '">';
if (!empty($currency_tx)) print '<input type="hidden" name="originmulticurrency_tx" value="' . $currency_tx . '">';
dol_fiche_head('');
print '<table class="border" width="100%">';
@@ -2083,7 +2083,7 @@ if ($action == 'create')
{
$invoice_predefined = new FactureRec($db);
$invoice_predefined->fetch(GETPOST('fac_rec','int'));
$dateinvoice = $invoice_predefined->date_when; // To use next gen date by default later
$sql = 'SELECT r.rowid, r.titre, r.total_ttc';
@@ -2349,7 +2349,7 @@ if ($action == 'create')
$desc = $form->textwithpicto($text, $langs->transnoentities("YouMustCreateStandardInvoiceFirstDesc"), 1, 'help', '', 0, 3);
print $desc;
print '</div></div>';
print '</div>';
print '</td></tr>';
@@ -2388,7 +2388,7 @@ if ($action == 'create')
print $form->select_date($date_pointoftax?$date_pointoftax:-1, 'date_pointoftax', '', '', '', "add", 1, 1, 1);
print '</td></tr>';
}
// Payment term
print '<tr><td class="nowrap">' . $langs->trans('PaymentConditionsShort') . '</td><td colspan="2">';
$form->select_conditions_paiements(isset($_POST['cond_reglement_id']) ? $_POST['cond_reglement_id'] : $cond_reglement_id, 'cond_reglement_id');
@@ -2453,7 +2453,7 @@ if ($action == 'create')
print $form->selectMultiCurrency($currency_code, 'multicurrency_code');
print '</td></tr>';
}
// Public note
print '<tr>';
print '<td class="border" valign="top">' . $langs->trans('NotePublic') . '</td>';
@@ -2536,12 +2536,12 @@ if ($action == 'create')
print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td><td colspan="2">' . price($objectsrc->total_localtax2) . "</td></tr>";
}
print '<tr><td>' . $langs->trans('TotalTTC') . '</td><td colspan="2">' . price($objectsrc->total_ttc) . "</td></tr>";
if (!empty($conf->multicurrency->enabled))
{
print '<tr><td>' . $langs->trans('MulticurrencyTotalHT') . '</td><td colspan="2">' . price($objectsrc->multicurrency_total_ht) . '</td></tr>';
print '<tr><td>' . $langs->trans('MulticurrencyTotalVAT') . '</td><td colspan="2">' . price($objectsrc->multicurrency_total_tva) . "</td></tr>";
print '<tr><td>' . $langs->trans('MulticurrencyTotalTTC') . '</td><td colspan="2">' . price($objectsrc->multicurrency_total_ttc) . "</td></tr>";
print '<tr><td>' . $langs->trans('MulticurrencyTotalTTC') . '</td><td colspan="2">' . price($objectsrc->multicurrency_total_ttc) . "</td></tr>";
}
}
else
@@ -2931,7 +2931,7 @@ else if ($id > 0 || ! empty($ref))
$linkback = '<a href="' . DOL_URL_ROOT . '/compta/facture/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
// Ref
print '<tr><td width="20%">' . $langs->trans('Ref') . '</td>';
print '<tr><td class="titlefield">' . $langs->trans('Ref') . '</td>';
print '<td colspan="5">';
$morehtmlright = '';
$discount = new DiscountAbsolute($db);
@@ -2946,7 +2946,7 @@ else if ($id > 0 || ! empty($ref))
print '</td></tr>';
// Ref customer
print '<tr><td width="20%">';
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('RefCustomer');
print '</td>';
@@ -3153,13 +3153,13 @@ else if ($id > 0 || ! empty($ref))
$nbrows ++;
if (! empty($conf->multicurrency->enabled)) $nbrows+=5;
if (! empty($conf->incoterm->enabled)) $nbrows+=1;
print '<td rowspan="' . $nbrows . '" colspan="2" valign="top">';
if ($object->type == Facture::TYPE_SITUATION && !empty($conf->global->INVOICE_USE_SITUATION))
{
if (count($object->tab_previous_situation_invoice) > 0 || count($object->tab_next_situation_invoice) > 0) print '<table class="nobordernopadding paymenttable" width="100%">';
if (count($object->tab_previous_situation_invoice) > 0)
{
//List of previous invoices
@@ -3172,7 +3172,7 @@ else if ($id > 0 || ! empty($ref))
print '<td align="right">' . $langs->trans('AmountTTC') . '</td>';
print '<td width="18">&nbsp;</td>';
print '</tr>';
$total_prev_ht = $total_prev_ttc = 0;
$var = true;
foreach ($object->tab_previous_situation_invoice as $prev_invoice)
@@ -3189,10 +3189,10 @@ else if ($id > 0 || ! empty($ref))
print '<td align="right">' . price($prev_invoice->total_ttc) . '</td>';
print '<td align="right">'.$prev_invoice->getLibStatut(3, $totalpaye).'</td>';
print '</tr>';
$var = !$var;
}
print '<tr '.$bc [$var].'>';
print '<td colspan="2" align="right"></td>';
print '<td align="right"><b>' . price($total_prev_ht) . '</b></td>';
@@ -3200,7 +3200,7 @@ else if ($id > 0 || ! empty($ref))
print '<td width="18">&nbsp;</td>';
print '</tr>';
}
if (count($object->tab_next_situation_invoice) > 0)
{
//List of next invoices
@@ -3213,9 +3213,9 @@ else if ($id > 0 || ! empty($ref))
print '<td align="right">' . $langs->trans('AmountTTC') . '</td>';
print '<td width="18">&nbsp;</td>';
print '</tr>';
$total_next_ht = $total_next_ttc = 0;
$var = true;
foreach ($object->tab_next_situation_invoice as $next_invoice)
{
@@ -3231,10 +3231,10 @@ else if ($id > 0 || ! empty($ref))
print '<td align="right">' . price($next_invoice->total_ttc) . '</td>';
print '<td align="right">'.$next_invoice->getLibStatut(3, $totalpaye).'</td>';
print '</tr>';
$var = !$var;
}
print '<tr '.$bc [$var].'>';
print '<td colspan="2" align="right"></td>';
print '<td align="right"><b>' . price($total_next_ht) . '</b></td>';
@@ -3242,7 +3242,7 @@ else if ($id > 0 || ! empty($ref))
print '<td width="18">&nbsp;</td>';
print '</tr>';
}
if (count($object->tab_previous_situation_invoice) > 0 || count($object->tab_next_situation_invoice) > 0) print '</table>';
}
@@ -3469,7 +3469,7 @@ else if ($id > 0 || ! empty($ref))
print dol_print_date($object->date_pointoftax, 'daytext');
}
print '</td></tr>';
}
}
// Conditions de reglement
print '<tr><td>';
@@ -3554,12 +3554,12 @@ else if ($id > 0 || ! empty($ref))
$form->form_multicurrency_code($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_code, 'none');
}
print '</td></tr>';
// Multicurrency rate
print '<tr>';
print '<td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print fieldLabel('Rate','multicurrency_tx');
print fieldLabel('CurrencyRate','multicurrency_tx');
print '</td>';
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon))
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
@@ -3695,16 +3695,16 @@ else if ($id > 0 || ! empty($ref))
print '<tr><td height="10">' . fieldLabel('MulticurrencyAmountHT','multicurrency_total_ht') . '</td>';
print '<td class="nowrap" colspan="2">' . price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
print '</tr>';
// Multicurrency Amount VAT
print '<tr><td height="10">' . fieldLabel('MulticurrencyAmountVAT','multicurrency_total_tva') . '</td>';
print '<td class="nowrap" colspan="2">' . price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
print '</tr>';
// Multicurrency Amount TTC
print '<tr><td height="10">' . fieldLabel('MulticurrencyAmountTTC','multicurrency_total_ttc') . '</td>';
print '<td class="nowrap" colspan="2">' . price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
print '</tr>';
print '</tr>';
}
// Statut
@@ -4003,7 +4003,7 @@ else if ($id > 0 || ! empty($ref))
}
// Classify 'closed not completely paid' (possible si validee et pas encore classee payee)
if ($object->statut == 1 && $object->paye == 0 && $resteapayer > 0 && $user->rights->facture->paiement)
{
if ($totalpaye > 0 || $totalcreditnotes > 0)
@@ -4015,11 +4015,11 @@ else if ($id > 0 || ! empty($ref))
{
if ( empty($conf->global->INVOICE_CAN_NEVER_BE_CANCELED))
{
if ($objectidnext)
if ($objectidnext)
{
print '<div class="inline-block divButAction"><span class="butActionRefused" title="' . $langs->trans("DisabledBecauseReplacedInvoice") . '">' . $langs->trans('ClassifyCanceled') . '</span></div>';
}
else
else
{
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?facid=' . $object->id . '&amp;action=canceled">' . $langs->trans('ClassifyCanceled') . '</a></div>';
}

View File

@@ -158,6 +158,7 @@ class InvoiceApi extends DolibarrApi
$result = $db->query($sql);
if ($result)
{
$i=0;
$num = $db->num_rows($result);
while ($i < $num)
{

View File

@@ -114,7 +114,7 @@ else if ($action == 'deletecontact' && $user->rights->facture->creer)
* View
*/
llxHeader('', $langs->trans("Bill"), "Facture");
llxHeader('', $langs->trans("InvoiceCustomer"));
$form = new Form($db);
$formcompany = new FormCompany($db);
@@ -146,7 +146,7 @@ if ($id > 0 || ! empty($ref))
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
// Ref
print '<tr><td width="20%">'.$langs->trans('Ref').'</td>';
print '<tr><td class="titlefield">'.$langs->trans('Ref').'</td>';
print '<td colspan="3">';
$morehtmlref='';
$discount=new DiscountAbsolute($db);
@@ -163,13 +163,10 @@ if ($id > 0 || ! empty($ref))
print '</td></tr>';
// Ref customer
print '<tr><td width="20%">';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print '<tr><td>';
print $langs->trans('RefCustomer');
print '</td>';
print '</tr></table>';
print '</td>';
print '<td colspan="5">';
print '<td colspan="3">';
print $object->ref_client;
print '</td></tr>';

View File

@@ -82,7 +82,7 @@ include_once DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php';
* View
*/
llxHeader();
llxHeader('', $langs->trans("InvoiceCustomer"));
$form = new Form($db);
@@ -113,7 +113,7 @@ if ($id > 0 || ! empty($ref))
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
// Ref
print '<tr><td width="30%">'.$langs->trans('Ref').'</td>';
print '<tr><td class="titlefield">'.$langs->trans('Ref').'</td>';
print '<td colspan="3">';
$morehtmlref='';
$discount=new DiscountAbsolute($db);
@@ -130,13 +130,10 @@ if ($id > 0 || ! empty($ref))
print '</td></tr>';
// Ref customer
print '<tr><td width="20%">';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print '<tr><td>';
print $langs->trans('RefCustomer');
print '</td>';
print '</tr></table>';
print '</td>';
print '<td colspan="5">';
print '<td colspan="3">';
print $object->ref_client;
print '</td></tr>';

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
@@ -128,6 +128,8 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include,
include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once
if (GETPOST('cancel')) $action='';
// Create predefined invoice
if ($action == 'add')
{
@@ -266,6 +268,16 @@ elseif ($action == 'classin' && $user->rights->facture->creer)
$object->setProject(GETPOST('projectid', 'int'));
}
// Set bank account
elseif ($action == 'setref' && $user->rights->facture->creer)
{
$result=$object->setValueFrom('titre', GETPOST('ref', 'alpha'));
if ($result > 0)
{
$object->titre = GETPOST('ref', 'alpha');
$object->ref = $object->titre;
}
}
// Set bank account
elseif ($action == 'setbankaccount' && $user->rights->facture->creer)
{
$result=$object->setBankAccount(GETPOST('fk_account', 'int'));
@@ -840,15 +852,15 @@ if ($action == 'create')
$object->fetch_thirdparty();
// Title
print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("Title").'</td><td>';
print '<input class="flat quatrevingtpercent" type="text" name="titre" value="'.$_POST["titre"].'">';
print '</td></tr>';
// Third party
print '<tr><td class="titlefieldcreate">'.$langs->trans("Customer").'</td><td>'.$object->thirdparty->getNomUrl(1,'customer').'</td>';
print '</tr>';
// Title
print '<tr><td class="fieldrequired">'.$langs->trans("Title").'</td><td>';
print '<input class="flat quatrevingtpercent" type="text" name="titre" value="'.$_POST["titre"].'">';
print '</td></tr>';
// Note public
print '<tr><td>'.$langs->trans("NotePublic").'</td><td valign="top">';
print '<textarea class="flat centpercent" name="note_public" wrap="soft" rows="'.ROWS_4.'"></textarea>';
@@ -950,176 +962,7 @@ if ($action == 'create')
}
print "</table>\n";
/*
print '<table class="notopnoleftnoright" width="100%">';
print '<tr><td colspan="3">';
$sql = 'SELECT l.fk_product, l.product_type, l.label as custom_label, l.description, l.qty, l.rowid, l.tva_tx,';
$sql.= ' l.fk_remise_except,';
$sql.= ' l.remise_percent, l.subprice, l.info_bits,';
$sql.= ' l.total_ht, l.total_tva as total_vat, l.total_ttc,';
$sql.= ' l.date_start,';
$sql.= ' l.date_end,';
$sql.= ' l.product_type,';
$sql.= ' l.fk_unit,';
$sql.= ' p.ref, p.fk_product_type, p.label as product_label,';
$sql.= ' p.description as product_desc';
$sql.= " FROM ".MAIN_DB_PREFIX."facturedet as l";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON l.fk_product = p.rowid";
$sql.= " WHERE l.fk_facture = ".$object->id;
$sql.= " ORDER BY l.rowid";
$result = $db->query($sql);
if ($result)
{
$num = $db->num_rows($result);
$i = 0; $total = 0;
echo '<table class="noborder" width="100%">';
if ($num)
{
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Description").'</td>';
print '<td align="center">'.$langs->trans("VAT").'</td>';
print '<td align="center">'.$langs->trans("Qty").'</td>';
if ($conf->global->PRODUCT_USE_UNITS) {
print '<td width="8%" align="left">'.$langs->trans("Unit").'</td>';
}
print '<td>'.$langs->trans("ReductionShort").'</td>';
print '<td align="right">'.$langs->trans("TotalHT").'</td>';
print '<td align="right">'.$langs->trans("TotalVAT").'</td>';
print '<td align="right">'.$langs->trans("TotalTTC").'</td>';
print '<td align="right">'.$langs->trans("PriceUHT").'</td>';
if (empty($conf->global->PRODUIT_MULTIPRICES)) print '<td align="right">'.$langs->trans("CurrentProductPrice").'</td>';
print "</tr>\n";
}
$var=true;
while ($i < $num)
{
$objp = $db->fetch_object($result);
if ($objp->fk_product > 0)
{
$product = New Product($db);
$product->fetch($objp->fk_product);
}
$var=!$var;
print "<tr ".$bc[$var].">";
// Show product and description
$type=(isset($objp->product_type)?$objp->product_type:$objp->fk_product_type);
$product_static->fk_unit=$objp->fk_unit;
if ($objp->fk_product > 0)
{
print '<td>';
print '<a name="'.$objp->rowid.'"></a>'; // ancre pour retourner sur la ligne
// Show product and description
$product_static->fetch($objp->fk_product); // We need all information later
$text=$product_static->getNomUrl(1);
$text.= ' - '.(! empty($objp->custom_label)?$objp->custom_label:$objp->product_label);
$description=(! empty($conf->global->PRODUIT_DESC_IN_FORM)?'':dol_htmlentitiesbr($objp->description));
print $form->textwithtooltip($text,$description,3,'','',$i);
// Show range
print_date_range($db->jdate($objp->date_start), $db->jdate($objp->date_end));
// Add description in form
if (! empty($conf->global->PRODUIT_DESC_IN_FORM))
print (! empty($objp->description) && $objp->description!=$objp->product_label)?'<br>'.dol_htmlentitiesbr($objp->description):'';
print '</td>';
}
else
{
print '<td>';
print '<a name="'.$objp->rowid.'"></a>'; // ancre pour retourner sur la ligne
if ($type==1) $text = img_object($langs->trans('Service'),'service');
else $text = img_object($langs->trans('Product'),'product');
if (! empty($objp->custom_label)) {
$text.= ' <strong>'.$objp->custom_label.'</strong>';
print $form->textwithtooltip($text,dol_htmlentitiesbr($objp->description),3,'','',$i);
} else {
print $text.' '.nl2br($objp->description);
}
// Show range
print_date_range($db->jdate($objp->date_start), $db->jdate($objp->date_end));
print "</td>\n";
}
// Vat rate
print '<td align="center">'.vatrate($objp->tva_tx).'%</td>';
// Qty
print '<td align="center">'.$objp->qty.'</td>';
if ($conf->global->PRODUCT_USE_UNITS) {
print '<td align="left">'.$product_static->getLabelOfUnit().'</td>';
}
// Percent
if ($objp->remise_percent > 0)
{
print '<td align="right">'.$objp->remise_percent." %</td>\n";
}
else
{
print '<td>&nbsp;</td>';
}
// Total HT
print '<td align="right">'.price($objp->total_ht)."</td>\n";
// Total VAT
print '<td align="right">'.price($objp->total_vat)."</td>\n";
// Total TTC
print '<td align="right">'.price($objp->total_ttc)."</td>\n";
// Total Unit price
print '<td align="right">'.price($objp->subprice)."</td>\n";
// Current price of product
if (empty($conf->global->PRODUIT_MULTIPRICES))
{
if ($objp->fk_product > 0)
{
$flag_price_may_change++;
$prodprice=$product_static->price; // price HT
print '<td align="right">'.price($prodprice)."</td>\n";
}
else
{
print '<td>&nbsp;</td>';
}
}
print "</tr>";
$i++;
}
$db->free($result);
}
else
{
print $db->error();
}
print "</table>";
*/
print '</td></tr>';
if ($flag_price_may_change)
@@ -1178,20 +1021,13 @@ else
$linkback = '<a href="' . DOL_URL_ROOT . '/compta/facture/fiche-rec.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
// Ref
print '<tr><td width="20%">' . $langs->trans('Ref') . '</td>';
print '<td colspan="5">';
$morehtmlref = '';
/*
require_once DOL_DOCUMENT_ROOT . '/core/class/discount.class.php';
$discount = new DiscountAbsolute($db);
$result = $discount->fetch(0, $object->id);
if ($result > 0) {
$morehtmlref = ' (' . $langs->trans("CreditNoteConvertedIntoDiscount", $discount->getNomUrl(1, 'discount')) . ')';
}
if ($result < 0) {
dol_print_error('', $discount->error);
}*/
print $form->showrefnav($object, 'ref', $linkback, 1, 'titre', 'titre', $morehtmlref);
print '<tr><td class="titlefield">';
//print $langs->trans('Ref');
print $form->editfieldkey($langs->trans("Ref"), 'ref', $object->ref, $object, $user->rights->facture->creer);
print '</td>';
print '<td colspan="3">';
$morehtmlref = $form->editfieldval($langs->trans("Ref"), 'ref', $object->ref, $object, $user->rights->facture->creer, 'string');
print $form->showrefnav($object, 'ref', $linkback, 1, 'titre', 'none', $morehtmlref);
print '</td></tr>';

View File

@@ -35,7 +35,7 @@ $langs->load("bills");
* View
*/
llxHeader();
llxHeader('', $langs->trans("InvoiceCustomer"));
$fac = new Facture($db);
$fac->fetch($_GET["facid"]);

View File

@@ -761,7 +761,7 @@ $sql.=$hookmanager->resPrint;
if (! $sall)
{
$sql.= ' GROUP BY f.rowid, f.facnumber, ref_client, f.type, f.note_private, f.note_public, f.increment, f.total, f.tva, f.total_ttc,';
$sql.= ' GROUP BY f.rowid, f.facnumber, ref_client, f.type, f.note_private, f.note_public, f.increment, fk_mode_reglement, f.total, f.tva, f.total_ttc,';
$sql.= ' f.datef, f.date_lim_reglement,';
$sql.= ' f.paye, f.fk_statut,';
$sql.= ' f.datec, f.tms,';

View File

@@ -60,7 +60,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include,
* View
*/
llxHeader();
llxHeader('', $langs->trans("InvoiceCustomer"));
$form = new Form($db);
@@ -81,7 +81,7 @@ if ($id > 0 || ! empty($ref))
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
// Ref
print '<tr><td width="25%">'.$langs->trans('Ref').'</td>';
print '<tr><td class="titlefield">'.$langs->trans('Ref').'</td>';
print '<td colspan="3">';
$morehtmlref='';
$discount=new DiscountAbsolute($db);
@@ -98,13 +98,10 @@ if ($id > 0 || ! empty($ref))
print '</td></tr>';
// Ref customer
print '<tr><td width="20%">';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print '<tr><td>';
print $langs->trans('RefCustomer');
print '</td>';
print '</tr></table>';
print '</td>';
print '<td colspan="5">';
print '<td colspan="3">';
print $object->ref_client;
print '</td></tr>';

View File

@@ -106,7 +106,7 @@ if ($action == "delete")
$now=dol_now();
llxHeader('', $langs->trans("Bill"));
llxHeader('', $langs->trans("InvoiceCustomer"));
$form = new Form($db);
@@ -155,7 +155,7 @@ if ($object->id > 0)
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
// Ref
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td colspan="5">';
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td colspan="3">';
$morehtmlref='';
$discount=new DiscountAbsolute($db);
$result=$discount->fetch(0,$object->id);
@@ -171,24 +171,24 @@ if ($object->id > 0)
print "</td></tr>";
// Ref customer
print '<tr><td width="20%">';
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('RefCustomer');
print '</td>';
print '</tr></table>';
print '</td>';
print '<td colspan="5">';
print '<td colspan="3">';
print $object->ref_client;
print '</td></tr>';
// Third party
print '<tr><td>'.$langs->trans('Company').'</td>';
print '<td colspan="5">'.$object->thirdparty->getNomUrl(1,'compta');
print '<td colspan="3">'.$object->thirdparty->getNomUrl(1,'compta');
print ' &nbsp; (<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?socid='.$object->socid.'">'.$langs->trans('OtherBills').'</a>)</td>';
print '</tr>';
// Type
print '<tr><td>'.$langs->trans('Type').'</td><td colspan="5">';
print '<tr><td>'.$langs->trans('Type').'</td><td colspan="3">';
print $object->getLibType();
if ($object->type == Facture::TYPE_REPLACEMENT)
{
@@ -229,7 +229,7 @@ if ($object->id > 0)
print '</td></tr>';
// Discounts
print '<tr><td>'.$langs->trans('Discounts').'</td><td colspan="5">';
print '<tr><td>'.$langs->trans('Discounts').'</td><td colspan="3">';
if ($object->thirdparty->remise_percent) print $langs->trans("CompanyHasRelativeDiscount",$object->thirdparty->remise_percent);
else print $langs->trans("CompanyHasNoRelativeDiscount");
print '. ';
@@ -443,7 +443,7 @@ if ($object->id > 0)
print '<tr><td>'.$langs->trans('Status').'</td>';
print '<td align="left" colspan="3">'.($object->getLibStatut(4,$totalpaye)).'</td></tr>';
print '<tr><td>'.$langs->trans("RIB").'</td><td colspan="5">';
print '<tr><td>'.$langs->trans("RIB").'</td><td colspan="3">';
print $object->thirdparty->display_rib();
print '</td></tr>';
@@ -509,7 +509,7 @@ if ($object->id > 0)
{
if ($num == 0)
{
if ($object->statut > Facture::STATUS_DRAFT) print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("AlreadyPayed")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
if ($object->statut > Facture::STATUS_DRAFT) print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("AlreadyPaid")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
else print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("Draft")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
}
else print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("RequestAlreadyDone")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';

View File

@@ -229,7 +229,10 @@ if ($resql)
print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"c.libelle","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Numero"),$_SERVER["PHP_SELF"],"p.num_paiement","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Account"),$_SERVER["PHP_SELF"],"ba.label","",$param,"",$sortfield,$sortorder);
if (! empty($conf->banque->enabled))
{
print_liste_field_titre($langs->trans("Account"),$_SERVER["PHP_SELF"],"ba.label","",$param,"",$sortfield,$sortorder);
}
print_liste_field_titre($langs->trans("Amount"),$_SERVER["PHP_SELF"],"p.amount","",$param,'align="right"',$sortfield,$sortorder);
//print_liste_field_titre($langs->trans("Invoices"),"","","",$param,'align="left"',$sortfield,$sortorder);
@@ -260,9 +263,12 @@ if ($resql)
print '<td align="left">';
print '<input class="flat" type="text" size="4" name="search_payment_num" value="'.$search_payment_num.'">';
print '</td>';
print '<td>';
$form->select_comptes($search_account,'search_account',0,'',1);
print '</td>';
if (! empty($conf->banque->enabled))
{
print '<td>';
$form->select_comptes($search_account,'search_account',0,'',1);
print '</td>';
}
print '<td align="right">';
print '<input class="flat" type="text" size="4" name="search_amount" value="'.$search_amount.'">';
print '</td>';
@@ -309,16 +315,21 @@ if ($resql)
// Payment number
print '<td>'.$objp->num_paiement.'</td>';
print '<td>';
if ($objp->bid)
{
$accountstatic->id=$objp->bid;
$accountstatic->label=$objp->label;
print $accountstatic->getNomUrl(1);
}
else print '&nbsp;';
print '</td>';
// Account
if (! empty($conf->banque->enabled))
{
print '<td>';
if ($objp->bid)
{
$accountstatic->id=$objp->bid;
$accountstatic->label=$objp->label;
print $accountstatic->getNomUrl(1);
}
else print '&nbsp;';
print '</td>';
}
// Amount
print '<td align="right">'.price($objp->amount).'</td>';
if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))

View File

@@ -162,25 +162,25 @@ if ($action == 'valide')
print '<table class="border" width="100%">';
// Ref
print '<tr><td valign="top" width="140">'.$langs->trans('Ref').'</td>';
print '<tr><td class="titlefield">'.$langs->trans('Ref').'</td>';
print '<td colspan="3">';
print $form->showrefnav($paiement,'id','',1,'rowid','id');
print '</td></tr>';
// Date
print '<tr><td valign="top" width="120">'.$langs->trans('Date').'</td><td colspan="3">'.dol_print_date($paiement->datep,'day').'</td></tr>';
print '<tr><td>'.$langs->trans('Date').'</td><td colspan="3">'.dol_print_date($paiement->datep,'day').'</td></tr>';
// Mode
print '<tr><td valign="top">'.$langs->trans('Mode').'</td><td colspan="3">'.$langs->trans("PaymentType".$paiement->type_code).'</td></tr>';
print '<tr><td>'.$langs->trans('Mode').'</td><td colspan="3">'.$langs->trans("PaymentType".$paiement->type_code).'</td></tr>';
// Numero
print '<tr><td valign="top">'.$langs->trans('Numero').'</td><td colspan="3">'.$paiement->num_paiement.'</td></tr>';
print '<tr><td>'.$langs->trans('Numero').'</td><td colspan="3">'.$paiement->num_paiement.'</td></tr>';
// Montant
print '<tr><td valign="top">'.$langs->trans('Amount').'</td><td colspan="3">'.price($paiement->amount, 0, $outputlangs, 1, -1, -1, $conf->currency).'</td></tr>';
print '<tr><td>'.$langs->trans('Amount').'</td><td colspan="3">'.price($paiement->amount, 0, $outputlangs, 1, -1, -1, $conf->currency).'</td></tr>';
// Note
print '<tr><td valign="top">'.$langs->trans('Note').'</td><td colspan="3">'.nl2br($paiement->note).'</td></tr>';
print '<tr><td>'.$langs->trans('Note').'</td><td colspan="3">'.nl2br($paiement->note).'</td></tr>';
// Bank account
if (! empty($conf->banque->enabled))
@@ -278,7 +278,7 @@ else
dol_print_error($db);
}
print '</div>';
dol_fiche_end();
/*

View File

@@ -27,6 +27,7 @@
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
@@ -920,7 +921,7 @@ class BonPrelevement extends CommonObject
$dir=$conf->prelevement->dir_output.'/receipts';
if (! is_dir($dir)) dol_mkdir($dir);
$this->filename = $dir.$ref.'.xml';
$this->filename = $dir.'/'.$ref.'.xml';
// Create withdraw receipt in database
$sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_bons (";
@@ -1015,15 +1016,21 @@ class BonPrelevement extends CommonObject
$this->date_echeance = $datetimeprev;
$this->reference_remise = $ref;
$this->raison_sociale = $conf->global->PRELEVEMENT_RAISON_SOCIALE;
$id=$conf->global->PRELEVEMENT_ID_BANKACCOUNT;
$account = new Account($this->db);
if ($account->fetch($id)>0)
{
$this->emetteur_code_banque = $account->code_banque;
$this->emetteur_code_guichet = $account->code_guichet;
$this->emetteur_numero_compte = $account->number;
$this->emetteur_number_key = $account->cle_rib;
$this->emetteur_iban = $account->iban;
$this->emetteur_bic = $account->bic;
$this->emetteur_code_banque = $conf->global->PRELEVEMENT_CODE_BANQUE;
$this->emetteur_code_guichet = $conf->global->PRELEVEMENT_CODE_GUICHET;
$this->emetteur_numero_compte = $conf->global->PRELEVEMENT_NUMERO_COMPTE;
$this->emetteur_number_key = $conf->global->PRELEVEMENT_NUMBER_KEY;
$this->emetteur_iban = $conf->global->PRELEVEMENT_IBAN;
$this->emetteur_bic = $conf->global->PRELEVEMENT_BIC;
$this->emetteur_ics = $conf->global->PRELEVEMENT_ICS; // Ex: PRELEVEMENT_ICS = "FR78ZZZ123456";
$this->emetteur_ics = $conf->global->PRELEVEMENT_ICS; // Ex: PRELEVEMENT_ICS = "FR78ZZZ123456";
$this->raison_sociale = $account->proprio;
}
$this->factures = $factures_prev_id;
@@ -1680,6 +1687,23 @@ class BonPrelevement extends CommonObject
$dateTime_ETAD = dol_print_date($ladate, '%Y-%m-%d');
$dateTime_YMDHMS = dol_print_date($ladate, '%Y-%m-%dT%H:%M:%S');
// Get data of bank account
$id=$configuration->global->PRELEVEMENT_ID_BANKACCOUNT;
$account = new Account($this->db);
if ($account->fetch($id)>0)
{
$this->emetteur_code_banque = $account->code_banque;
$this->emetteur_code_guichet = $account->code_guichet;
$this->emetteur_numero_compte = $account->number;
$this->emetteur_number_key = $account->cle_rib;
$this->emetteur_iban = $account->iban;
$this->emetteur_bic = $account->bic;
$this->emetteur_ics = $conf->global->PRELEVEMENT_ICS; // Ex: PRELEVEMENT_ICS = "FR78ZZZ123456";
$this->raison_sociale = $account->proprio;
}
// Récupération info demandeur
$sql = "SELECT rowid, ref";
$sql.= " FROM";
@@ -1714,7 +1738,7 @@ class BonPrelevement extends CommonObject
$XML_SEPA_INFO .= ' </PmtTpInf>'.$CrLf;
$XML_SEPA_INFO .= ' <ReqdColltnDt>'.$dateTime_ETAD.'</ReqdColltnDt>'.$CrLf;
$XML_SEPA_INFO .= ' <Cdtr>'.$CrLf;
$XML_SEPA_INFO .= ' <Nm>'.strtoupper(dol_string_unaccent($configuration->global->PRELEVEMENT_RAISON_SOCIALE)).'</Nm>'.$CrLf;
$XML_SEPA_INFO .= ' <Nm>'.strtoupper(dol_string_unaccent($this->raison_sociale)).'</Nm>'.$CrLf;
$XML_SEPA_INFO .= ' <PstlAdr>'.$CrLf;
$XML_SEPA_INFO .= ' <Ctry>'.$country[1].'</Ctry>'.$CrLf;
$XML_SEPA_INFO .= ' <AdrLine>'.strtoupper(dol_string_unaccent($configuration->global->MAIN_INFO_SOCIETE_ADDRESS)).'</AdrLine>'.$CrLf;
@@ -1723,16 +1747,16 @@ class BonPrelevement extends CommonObject
$XML_SEPA_INFO .= ' </Cdtr>'.$CrLf;
$XML_SEPA_INFO .= ' <CdtrAcct>'.$CrLf;
$XML_SEPA_INFO .= ' <Id>'.$CrLf;
$XML_SEPA_INFO .= ' <IBAN>'.preg_replace('/\s/', '', $configuration->global->PRELEVEMENT_IBAN).'</IBAN>'.$CrLf;
$XML_SEPA_INFO .= ' <IBAN>'.preg_replace('/\s/', '', $this->emetteur_iban).'</IBAN>'.$CrLf;
$XML_SEPA_INFO .= ' </Id>'.$CrLf;
$XML_SEPA_INFO .= ' </CdtrAcct>'.$CrLf;
$XML_SEPA_INFO .= ' <CdtrAgt>'.$CrLf;
$XML_SEPA_INFO .= ' <FinInstnId>'.$CrLf;
$XML_SEPA_INFO .= ' <BIC>'.$configuration->global->PRELEVEMENT_BIC.'</BIC>'.$CrLf;
$XML_SEPA_INFO .= ' <BIC>'.$this->emetteur_bic.'</BIC>'.$CrLf;
$XML_SEPA_INFO .= ' </FinInstnId>'.$CrLf;
$XML_SEPA_INFO .= ' </CdtrAgt>'.$CrLf;
/* $XML_SEPA_INFO .= ' <UltmtCdtr>'.$CrLf;
$XML_SEPA_INFO .= ' <Nm>'.$configuration->global->PRELEVEMENT_RAISON_SOCIALE.'</Nm>'.$CrLf;
$XML_SEPA_INFO .= ' <Nm>'.$this->raison_sociale.'</Nm>'.$CrLf;
$XML_SEPA_INFO .= ' <PstlAdr>'.$CrLf;
$XML_SEPA_INFO .= ' <Ctry>'.$country[1].'</Ctry>'.$CrLf;
$XML_SEPA_INFO .= ' <AdrLine>'.$conf->global->MAIN_INFO_SOCIETE_ADDRESS.'</AdrLine>'.$CrLf;
@@ -1744,7 +1768,7 @@ class BonPrelevement extends CommonObject
$XML_SEPA_INFO .= ' <Id>'.$CrLf;
$XML_SEPA_INFO .= ' <PrvtId>'.$CrLf;
$XML_SEPA_INFO .= ' <Othr>'.$CrLf;
$XML_SEPA_INFO .= ' <Id>'.$configuration->global->PRELEVEMENT_ICS.'</Id>'.$CrLf;
$XML_SEPA_INFO .= ' <Id>'.$this->emetteur_ics.'</Id>'.$CrLf;
$XML_SEPA_INFO .= ' <SchmeNm>'.$CrLf;
$XML_SEPA_INFO .= ' <Prtry>SEPA</Prtry>'.$CrLf;
$XML_SEPA_INFO .= ' </SchmeNm>'.$CrLf;

View File

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

View File

@@ -1,8 +1,8 @@
<?php
/* Copyright (C) 2011-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
/* Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2015 Charlie BENKE <charlie@patas-monkey.com>
* Copyright (C) 2015 Charlie BENKE <charlie@patas-monkey.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -187,7 +187,7 @@ if ($action == 'delete')
* View
*/
llxHeader();
llxHeader("",$langs->trans("SalaryPayment"));
$form = new Form($db);
@@ -339,7 +339,7 @@ if ($id)
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/salaries/index.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
print "<tr>";
print '<td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">';
print '<td class="titlefield">'.$langs->trans("Ref").'</td><td colspan="3">';
print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', '');
print '</td></tr>';

View File

@@ -6,7 +6,7 @@
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -81,7 +81,7 @@ include_once DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php';
$form = new Form($db);
llxHeader("","",$langs->trans("SalaryPayment"));
llxHeader("",$langs->trans("SalaryPayment"));
if ($object->id)
@@ -107,7 +107,7 @@ if ($object->id)
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/salaries/index.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
// Ref
print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td>';
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>';
print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', '');
print '</td></tr>';

View File

@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2011-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
/* Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2015-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
*
@@ -25,6 +25,7 @@
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
$langs->load("compta");
$langs->load("salaries");
@@ -40,6 +41,8 @@ $search_ref = GETPOST('search_ref','int');
$search_user = GETPOST('search_user','alpha');
$search_label = GETPOST('search_label','alpha');
$search_amount = GETPOST('search_amount','alpha');
$search_account = GETPOST('search_account','int');
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
@@ -68,11 +71,12 @@ else
$typeid=$_REQUEST['typeid'];
}
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
{
$search_ref="";
$search_label="";
$search_amount="";
$search_account='';
$typeid="";
}
@@ -85,12 +89,16 @@ llxHeader();
$form = new Form($db);
$salstatic = new PaymentSalary($db);
$userstatic = new User($db);
$accountstatic = new Account($db);
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.admin, u.salary as current_salary, u.fk_soc as fk_soc,";
$sql.= " s.rowid, s.fk_user, s.amount, s.salary, s.label, s.datep as datep, s.datev as datev, s.fk_typepayment as type, s.num_payment,";
$sql.= " s.rowid, s.fk_user, s.amount, s.salary, s.label, s.datep as datep, s.datev as datev, s.fk_typepayment as type, s.num_payment, s.fk_bank,";
$sql.= " ba.rowid as bid, ba.label as blabel,";
$sql.= " pst.code as payment_code";
$sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as s";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pst ON s.fk_typepayment = pst.id,";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pst ON s.fk_typepayment = pst.id";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON s.fk_bank = b.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid,";
$sql.= " ".MAIN_DB_PREFIX."user as u";
$sql.= " WHERE u.rowid = s.fk_user";
$sql.= " AND s.entity = ".$conf->entity;
@@ -100,6 +108,7 @@ if ($search_ref) $sql.=" AND s.rowid=".$search_ref;
if ($search_user) $sql.=natural_search(array('u.login', 'u.lastname', 'u.firstname', 'u.email', 'u.note'), $search_user);
if ($search_label) $sql.=natural_search(array('s.label'), $search_label);
if ($search_amount) $sql.=natural_search("s.amount", $search_amount, 1);
if ($search_account > 0) $sql .=" AND b.fk_account=".$search_account;
if ($filtre) {
$filtre=str_replace(":","=",$filtre);
$sql .= " AND ".$filtre;
@@ -150,6 +159,7 @@ if ($result)
print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"s.label","",$param,'align="left"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DatePayment"),$_SERVER["PHP_SELF"],"s.datep","",$param,'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("PaymentMode"),$_SERVER["PHP_SELF"],"type","",$param,'align="left"',$sortfield,$sortorder);
if (! empty($conf->banque->enabled)) print_liste_field_titre($langs->trans("Account"),$_SERVER["PHP_SELF"],"ba.label","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("PayedByThisPayment"),$_SERVER["PHP_SELF"],"s.amount","",$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch ');
print "</tr>\n";
@@ -173,6 +183,13 @@ if ($result)
print '<td class="liste_titre" align="left">';
$form->select_types_paiements($typeid,'typeid','',0,0,1,16);
print '</td>';
// Account
if (! empty($conf->banque->enabled))
{
print '<td>';
$form->select_comptes($search_account,'search_account',0,'',1);
print '</td>';
}
// Amount
print '<td class="liste_titre" align="right"><input name="search_amount" class="flat" type="text" size="8" value="'.$search_amount.'"></td>';
@@ -210,7 +227,21 @@ if ($result)
print '<td align="center">'.dol_print_date($db->jdate($obj->datep),'day')."</td>\n";
// Type
print '<td>'.$langs->trans("PaymentTypeShort".$obj->payment_code).' '.$obj->num_payment.'</td>';
// Amount
// Account
if (! empty($conf->banque->enabled))
{
print '<td>';
if ($obj->fk_bank > 0)
{
//$accountstatic->fetch($obj->fk_bank);
$accountstatic->id=$obj->bid;
$accountstatic->label=$obj->blabel;
print $accountstatic->getNomUrl(1);
}
else print '&nbsp;';
print '</td>';
}
// Amount
print "<td align=\"right\">".price($obj->amount)."</td>";
print "<td></td>";
print "</tr>\n";
@@ -220,8 +251,10 @@ if ($result)
$i++;
}
print '<tr class="liste_total"><td colspan="6" class="liste_total">'.$langs->trans("Total").'</td>';
print '<td class="liste_total" align="right">'.price($total,0,$outputlangs,1,-1,-1,$conf->currency)."</td>";
$colspan=6;
if (! empty($conf->banque->enabled)) $colspan++;
print '<tr class="liste_total"><td colspan="'.$colspan.'" class="liste_total">'.$langs->trans("Total").'</td>';
print '<td class="liste_total" align="right">'.price($total)."</td>";
print "<td></td></tr>";
print "</table>";

View File

@@ -44,9 +44,7 @@ $result = restrictedArea($user, 'salaries', '', '', '');
* View
*/
$help_url='EN:Module_Salaries|FR:Module Fiche de paie|ES:M&oacute;dulo Salarios';
llxHeader("",$langs->trans("Salaries"),$help_url);
llxHeader("",$langs->trans("SalaryPayment"));
$salpayment = new PaymentSalary($db);
$result = $salpayment->fetch($id);

View File

@@ -260,7 +260,7 @@ if ($action == 'create')
print '<table class="border" width="100%">';
print "<tr>";
// Label
print '<td class="fieldrequired">';
print '<td class="titlefield fieldrequired">';
print $langs->trans("Label");
print '</td>';
print '<td align="left"><input type="text" size="34" name="label" class="flat" value="'.GETPOST('label').'"></td>';
@@ -305,8 +305,10 @@ if ($action == 'create')
dol_fiche_end();
print '<div class="center">';
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
print '<div>';
print '<input type="submit" class="button" value="' . $langs->trans("Create") . '">';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input type="button" class="button" value="' . $langs->trans("Cancel") . '" onClick="javascript:history.go(-1)">';
print '</div>';
print '</form>';
}
@@ -496,7 +498,7 @@ if ($id > 0)
if ($action == 'edit')
{
print '<div align="center">';
print '<div class="center">';
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
print ' &nbsp; ';
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
*
@@ -266,19 +266,19 @@ if ($action == 'create')
print '<tr><td class="fieldrequired">'.$langs->trans("Account").'</td><td>';
$form->select_comptes($_POST["accountid"],"accountid",0,"courant=1",1); // Affiche liste des comptes courant
print '</td></tr>';
}
// Type payment
print '<tr><td class="fieldrequired">'.$langs->trans("PaymentMode").'</td><td>';
$form->select_types_paiements(GETPOST("type_payment"), "type_payment");
print "</td>\n";
print "</tr>";
// Number
print '<tr><td>'.$langs->trans('Numero');
print ' <em>('.$langs->trans("ChequeOrTransferNumber").')</em>';
print '<td><input name="num_payment" type="text" value="'.GETPOST("num_payment").'"></td></tr>'."\n";
}
// Type payment
print '<tr><td class="fieldrequired">'.$langs->trans("PaymentMode").'</td><td>';
$form->select_types_paiements(GETPOST("type_payment"), "type_payment");
print "</td>\n";
print "</tr>";
// Number
print '<tr><td>'.$langs->trans('Numero');
print ' <em>('.$langs->trans("ChequeOrTransferNumber").')</em>';
print '<td><input name="num_payment" type="text" value="'.GETPOST("num_payment").'"></td></tr>'."\n";
// Other attributes
$parameters=array('colspan' => ' colspan="1"');
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook

View File

@@ -26,6 +26,7 @@
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
@@ -40,6 +41,7 @@ $result = restrictedArea($user, 'tax', '', '', 'charges');
$search_ref = GETPOST('search_ref','int');
$search_label = GETPOST('search_label','alpha');
$search_amount = GETPOST('search_amount','alpha');
$search_account = GETPOST('search_account','int');
$month = GETPOST("month","int");
$year = GETPOST("year","int");
@@ -71,16 +73,18 @@ else
$typeid=$_REQUEST['typeid'];
}
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
{
$search_ref="";
$search_label="";
$search_amount="";
$search_account='';
$year="";
$month="";
$typeid="";
}
/*
* View
*/
@@ -90,14 +94,19 @@ llxHeader();
$form = new Form($db);
$formother=new FormOther($db);
$tva_static = new Tva($db);
$accountstatic = new Account($db);
$sql = "SELECT t.rowid, t.amount, t.label, t.datev as dv, t.datep as dp, t.fk_typepayment as type, t.num_payment, pst.code as payment_code";
$sql = "SELECT t.rowid, t.amount, t.label, t.datev as dv, t.datep as dp, t.fk_typepayment as type, t.num_payment, t.fk_bank, pst.code as payment_code,";
$sql.= " ba.rowid as bid, ba.label as blabel";
$sql.= " FROM ".MAIN_DB_PREFIX."tva as t";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pst ON t.fk_typepayment = pst.id";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON t.fk_bank = b.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid";
$sql.= " WHERE t.entity = ".$conf->entity;
if ($search_ref) $sql.=" AND t.rowid=".$search_ref;
if ($search_label) $sql.=" AND t.label LIKE '%".$db->escape($search_label)."%'";
if ($search_amount) $sql.=" AND t.amount='".$db->escape(price2num(trim($search_amount)))."'";
if ($search_account > 0) $sql .=" AND b.fk_account=".$search_account;
if ($month > 0)
{
if ($year > 0)
@@ -155,8 +164,9 @@ if ($result)
print_liste_field_titre($langs->trans("DateValue"),$_SERVER["PHP_SELF"],"dv","",$param,'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DatePayment"),$_SERVER["PHP_SELF"],"dp","",$param,'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"type","",$param,'align="left"',$sortfield,$sortorder);
if (! empty($conf->banque->enabled)) print_liste_field_titre($langs->trans("Account"),$_SERVER["PHP_SELF"],"ba.label","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("PayedByThisPayment"),$_SERVER["PHP_SELF"],"t.amount","",$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch ');
print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch ');
print "</tr>\n";
print '<tr class="liste_titre">';
@@ -172,8 +182,14 @@ if ($result)
print '<td class="liste_titre" align="left">';
$form->select_types_paiements($typeid,'typeid','',0,0,1,16);
print '</td>';
// Account
if (! empty($conf->banque->enabled))
{
print '<td>';
$form->select_comptes($search_account,'search_account',0,'',1);
print '</td>';
}
print '<td class="liste_titre" align="right"><input name="search_amount" class="flat" type="text" size="8" value="'.$search_amount.'"></td>';
print '<td class="liste_titre" align="right">';
$searchpitco=$form->showFilterAndCheckAddButtons(0);
print $searchpitco;
@@ -204,15 +220,32 @@ if ($result)
print '<td align="center">'.dol_print_date($db->jdate($obj->dp),'day')."</td>\n";
// Type
print $type;
// Account
if (! empty($conf->banque->enabled))
{
print '<td>';
if ($obj->fk_bank > 0)
{
//$accountstatic->fetch($obj->fk_bank);
$accountstatic->id=$obj->bid;
$accountstatic->label=$obj->blabel;
print $accountstatic->getNomUrl(1);
}
else print '&nbsp;';
print '</td>';
}
// Amount
$total = $total + $obj->amount;
print "<td align=\"right\">".price($obj->amount)."</td>";
print "<td>&nbsp;</td>";
print "<td>&nbsp;</td>";
print "</tr>\n";
$i++;
}
print '<tr class="liste_total"><td colspan="5">'.$langs->trans("Total").'</td>';
$colspan=5;
if (! empty($conf->banque->enabled)) $colspan++;
print '<tr class="liste_total"><td colspan="'.$colspan.'">'.$langs->trans("Total").'</td>';
print "<td align=\"right\"><b>".price($total)."</b></td>";
print "<td>&nbsp;</td></tr>";

View File

@@ -5,7 +5,7 @@
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
*
@@ -529,10 +529,10 @@ else
// Name
print '<tr><td width="20%" class="fieldrequired"><label for="lastname">'.$langs->trans("Lastname").' / '.$langs->trans("Label").'</label></td>';
print '<td width="30%"><input name="lastname" id="lastname" type="text" size="30" maxlength="80" value="'.dol_escape_htmltag(GETPOST("lastname")?GETPOST("lastname"):$object->lastname).'" autofocus="autofocus"></td>';
print '<td width="20%"><label for="firstname">'.$langs->trans("Firstname").'</label></td>';
print '<td width="30%"><input name="firstname" id="firstname"type="text" size="30" maxlength="80" value="'.dol_escape_htmltag(GETPOST("firstname")?GETPOST("firstname"):$object->firstname).'"></td></tr>';
print '<tr><td class="titlefieldcreate fieldrequired"><label for="lastname">'.$langs->trans("Lastname").' / '.$langs->trans("Label").'</label></td>';
print '<td><input name="lastname" id="lastname" type="text" size="30" maxlength="80" value="'.dol_escape_htmltag(GETPOST("lastname")?GETPOST("lastname"):$object->lastname).'" autofocus="autofocus"></td>';
print '<td><label for="firstname">'.$langs->trans("Firstname").'</label></td>';
print '<td><input name="firstname" id="firstname"type="text" size="30" maxlength="80" value="'.dol_escape_htmltag(GETPOST("firstname")?GETPOST("firstname"):$object->firstname).'"></td></tr>';
// Company
if (empty($conf->global->SOCIETE_DISABLE_CONTACTS))
@@ -548,13 +548,13 @@ else
}
else {
print '<tr><td><label for="socid">'.$langs->trans("ThirdParty").'</label></td><td colspan="3" class="maxwidthonsmartphone">';
print $form->select_company($socid,'socid','',1);
print $form->select_company($socid,'socid','','SelectThirdParty');
print '</td></tr>';
}
}
// Civility
print '<tr><td width="15%"><label for="civility_id">'.$langs->trans("UserTitle").'</label></td><td colspan="3">';
print '<tr><td><label for="civility_id">'.$langs->trans("UserTitle").'</label></td><td colspan="3">';
print $formcompany->select_civility(GETPOST("civility_id",'alpha')?GETPOST("civility_id",'alpha'):$object->civility_id);
print '</td></tr>';
@@ -783,10 +783,10 @@ else
}
// Lastname
print '<tr><td width="20%" class="fieldrequired"><label for="lastname">'.$langs->trans("Lastname").' / '.$langs->trans("Label").'</label></td>';
print '<td width="30%"><input name="lastname" id="lastname" type="text" size="20" maxlength="80" value="'.(isset($_POST["lastname"])?$_POST["lastname"]:$object->lastname).'" autofocus="autofocus"></td>';
print '<td width="20%"><label for="firstname">'.$langs->trans("Firstname").'</label></td>';
print '<td width="30%"><input name="firstname" id="firstname" type="text" size="20" maxlength="80" value="'.(isset($_POST["firstname"])?$_POST["firstname"]:$object->firstname).'"></td></tr>';
print '<tr><td class="titlefieldcreate fieldrequired"><label for="lastname">'.$langs->trans("Lastname").' / '.$langs->trans("Label").'</label></td>';
print '<td><input name="lastname" id="lastname" type="text" size="20" maxlength="80" value="'.(isset($_POST["lastname"])?$_POST["lastname"]:$object->lastname).'" autofocus="autofocus"></td>';
print '<td><label for="firstname">'.$langs->trans("Firstname").'</label></td>';
print '<td><input name="firstname" id="firstname" type="text" size="20" maxlength="80" value="'.(isset($_POST["firstname"])?$_POST["firstname"]:$object->firstname).'"></td></tr>';
// Company
if (empty($conf->global->SOCIETE_DISABLE_CONTACTS))
@@ -890,7 +890,7 @@ else
print $form->selectarray('priv',$selectarray,$object->priv,0);
print '</td></tr>';
// Note Public
// Note Public
print '<tr><td class="tdtop"><label for="note_public">'.$langs->trans("NotePublic").'</label></td><td colspan="3">';
$doleditor = new DolEditor('note_public', $object->note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
print $doleditor->Create(1);
@@ -902,7 +902,7 @@ else
print $doleditor->Create(1);
print '</td></tr>';
// Statut
// Status
print '<tr><td>'.$langs->trans("Status").'</td>';
print '<td colspan="3">';
print $object->getLibStatut(4);
@@ -1058,7 +1058,7 @@ else
// Company
if (empty($conf->global->SOCIETE_DISABLE_CONTACTS))
{
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
print '<tr><td class="titlefield">'.$langs->trans("ThirdParty").'</td><td>';
if ($object->socid > 0)
{
$objsoc->fetch($object->socid);
@@ -1074,7 +1074,7 @@ else
print '</tr>';
// Civility
print '<tr><td>'.$langs->trans("UserTitle").'</td><td>';
print '<tr><td class="titlefield">'.$langs->trans("UserTitle").'</td><td>';
print $object->getCivilityLabel();
print '</td></tr>';
@@ -1122,7 +1122,7 @@ else
// Categories
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire)) {
print '<tr><td>' . $langs->trans( "Categories" ) . '</td>';
print '<tr><td class="titlefield">' . $langs->trans("Categories") . '</td>';
print '<td colspan="3">';
print $form->showCategories( $object->id, 'contact', 1 );
print '</td></tr>';
@@ -1141,7 +1141,7 @@ else
if (! empty($conf->propal->enabled))
{
print '<tr><td>'.$langs->trans("ContactForProposals").'</td><td colspan="3">';
print '<tr><td class="titlefield">'.$langs->trans("ContactForProposals").'</td><td colspan="3">';
print $object->ref_propal?$object->ref_propal:$langs->trans("NoContactForAnyProposal");
print '</td></tr>';
}

View File

@@ -216,9 +216,9 @@ class Contact extends CommonObject
}
}
if (! $error)
if (! $error)
{
$result=$this->update_perso($this->id, $user);
$result=$this->update_perso($this->id, $user, 1); // TODO Remove function update_perso, should be same than update
if ($result < 0)
{
$error++;
@@ -226,7 +226,7 @@ class Contact extends CommonObject
}
}
if (! $error)
if (! $error)
{
// Call trigger
$result=$this->call_trigger('CONTACT_CREATE',$user);
@@ -474,13 +474,16 @@ class Contact extends CommonObject
*
* @param int $id Id of contact
* @param User $user User asking to change alert or birthday
* @param int $notrigger 0=no, 1=yes
* @return int <0 if KO, >=0 if OK
*/
function update_perso($id, $user=null)
function update_perso($id, $user=null, $notrigger=0)
{
$error=0;
$result=false;
$this->db->begin();
// Mis a jour contact
$sql = "UPDATE ".MAIN_DB_PREFIX."socpeople SET";
$sql.= " birthday=".($this->birthday ? "'".$this->db->idate($this->birthday)."'" : "null");
@@ -531,6 +534,26 @@ class Contact extends CommonObject
}
}
if (! $error && ! $notrigger)
{
// Call trigger
$result=$this->call_trigger('CONTACT_MODIFY',$user);
if ($result < 0) { $error++; }
// End call triggers
}
if (! $error)
{
$this->db->commit();
return 1;
}
else
{
dol_syslog(get_class($this)."::update Error ".$this->error,LOG_ERR);
$this->db->rollback();
return -$error;
}
return $result;
}

View File

@@ -135,11 +135,9 @@ $object->fetch($id, $user);
$head = contact_prepare_head($object);
dol_fiche_head($head, 'perso', $title, 0, 'contact');
if ($action == 'edit')
{
/*
/*
* Fiche en mode edition
*/
@@ -148,15 +146,17 @@ if ($action == 'edit')
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
dol_fiche_head($head, 'perso', $title, 0, 'contact');
print '<table class="border" width="100%">';
// Ref
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td colspan="3">';
print '<tr><td class="titlefieldcreate">'.$langs->trans("Ref").'</td><td colspan="3">';
print $object->id;
print '</td>';
// Photo
print '<td align="center" class="hideonsmartphone" valign="middle" width="25%" rowspan="5">';
print '<td align="center" class="hideonsmartphone" valign="middle" rowspan="6">';
print $form->showphoto('contact',$object)."\n";
if ($object->photo) print "<br>\n";
@@ -170,8 +170,8 @@ if ($action == 'edit')
print '</td></tr>';
// Name
print '<tr><td width="20%">'.$langs->trans("Lastname").' / '.$langs->trans("Label").'</td><td width="30%">'.$object->lastname.'</td>';
print '<td width="20%">'.$langs->trans("Firstname").'</td><td width="30%">'.$object->firstname.'</td>';
print '<tr><td>'.$langs->trans("Lastname").' / '.$langs->trans("Label").'</td><td colspan="3">'.$object->lastname.'</td></tr>';
print '<tr><td>'.$langs->trans("Firstname").'</td><td colspan="3">'.$object->firstname.'</td>';
// Company
if (empty($conf->global->SOCIETE_DISABLE_CONTACTS))
@@ -213,8 +213,10 @@ if ($action == 'edit')
}
print '</tr>';
print "</table><br>";
print "</table>";
dol_fiche_end();
print '<div class="center">';
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
@@ -227,6 +229,8 @@ else
{
// View mode
dol_fiche_head($head, 'perso', $title, 0, 'contact');
$linkback = '<a href="'.DOL_URL_ROOT.'/contact/list.php">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '');
@@ -285,16 +289,17 @@ else
}
else
{
print '<td>'.$langs->trans("DateToBirth").'</td><td colspan="3">'.$langs->trans("Unknown")."</td>";
print '<td>'.$langs->trans("DateToBirth").'</td><td colspan="3"></td>';
}
print "</tr>";
print "</table>";
print '</div>';
dol_fiche_end();
}
dol_fiche_end();
if ($action != 'edit')
{

View File

@@ -998,7 +998,7 @@ if (empty($reshook))
* View
*/
llxHeader('',$langs->trans("ContractCard"),"Contrat");
llxHeader('',$langs->trans("Contract"),"");
$form = new Form($db);
$formfile = new FormFile($db);
@@ -1094,7 +1094,7 @@ if ($action == 'create')
} else {
$tmpcode='<input name="ref" size="20" maxlength="128" value="'.dol_escape_htmltag(GETPOST('ref')?GETPOST('ref'):$tmpcode).'">';
}
print '<tr><td class="fieldrequired">'.$langs->trans('Ref').'</td><td colspan="2">'.$tmpcode.'</td></tr>';
print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans('Ref').'</td><td colspan="2">'.$tmpcode.'</td></tr>';
// Ref customer
print '<tr><td>'.$langs->trans('RefCustomer').'</td>';
@@ -1137,12 +1137,12 @@ if ($action == 'create')
}
// Commercial suivi
print '<tr><td width="20%" class="nowrap"><span class="fieldrequired">'.$langs->trans("TypeContact_contrat_internal_SALESREPFOLL").'</span></td><td>';
print '<tr><td class="nowrap"><span class="fieldrequired">'.$langs->trans("TypeContact_contrat_internal_SALESREPFOLL").'</span></td><td>';
print $form->select_dolusers(GETPOST("commercial_suivi_id")?GETPOST("commercial_suivi_id"):$user->id,'commercial_suivi_id',1,'');
print '</td></tr>';
// Commercial signature
print '<tr><td width="20%" class="nowrap"><span class="fieldrequired">'.$langs->trans("TypeContact_contrat_internal_SALESREPSIGN").'</span></td><td>';
print '<tr><td class="nowrap"><span class="fieldrequired">'.$langs->trans("TypeContact_contrat_internal_SALESREPSIGN").'</span></td><td>';
print $form->select_dolusers(GETPOST("commercial_signature_id")?GETPOST("commercial_signature_id"):$user->id,'commercial_signature_id',1,'');
print '</td></tr>';
@@ -1188,7 +1188,7 @@ if ($action == 'create')
dol_fiche_end();
print '<div align="center">';
print '<div class="center">';
print '<input type="submit" class="button" value="'.$langs->trans("Create").'">';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input type="button" class="button" value="' . $langs->trans("Cancel") . '" onClick="javascript:history.go(-1)">';
@@ -1295,13 +1295,13 @@ else
$linkback = '<a href="'.DOL_URL_ROOT.'/contrat/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
// Ref du contrat
if (!empty($modCodeContract->code_auto)) {
print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">';
if (! empty($modCodeContract->code_auto)) {
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td colspan="3">';
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
print "</td></tr>";
} else {
print '<tr>';
print '<td width="20%">';
print '<td class="titlefieldcreate">';
print $form->editfieldkey("Ref",'ref',$object->ref,$object,$user->rights->contrat->creer);
print '</td><td>';
print $form->editfieldval("Ref",'ref',$object->ref,$object,$user->rights->contrat->creer);
@@ -1310,7 +1310,7 @@ else
}
print '<tr>';
print '<td width="20%">';
print '<td>';
print $form->editfieldkey("RefCustomer",'ref_customer',$object->ref_customer,$object,$user->rights->contrat->creer);
print '</td><td>';
print $form->editfieldval("RefCustomer",'ref_customer',$object->ref_customer,$object,$user->rights->contrat->creer);
@@ -1318,7 +1318,7 @@ else
print '</tr>';
print '<tr>';
print '<td width="20%">';
print '<td>';
print $form->editfieldkey("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->contrat->creer);
print '</td><td>';
print $form->editfieldval("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->contrat->creer);
@@ -1348,7 +1348,7 @@ else
// Date
print '<tr>';
print '<td width="20%">';
print '<td>';
print $form->editfieldkey("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer);
print '</td><td>';
print $form->editfieldval("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer,'datehourpicker');
@@ -1584,7 +1584,7 @@ else
}
//Display lines extrafields
// Display lines extrafields
if (is_array($extralabelslines) && count($extralabelslines)>0) {
print '<tr '.$bc[$var].'>';
$line = new ContratLigne($db);

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