Compare commits
424 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a5bafc2dd | ||
|
|
11ddc722f1 | ||
|
|
4215ec3ca9 | ||
|
|
6ddd264178 | ||
|
|
989d6e7bc8 | ||
|
|
1becfbd7b6 | ||
|
|
661526f822 | ||
|
|
5e88de7e2c | ||
|
|
72ccedba98 | ||
|
|
0d992b2b99 | ||
|
|
bc8e203019 | ||
|
|
5d7414dcc3 | ||
|
|
e7c05a778b | ||
|
|
9f40f346cb | ||
|
|
874db10dbe | ||
|
|
9c4d60fd5d | ||
|
|
ed25c0fda5 | ||
|
|
c298bb62ba | ||
|
|
848d046b46 | ||
|
|
b81de6b383 | ||
|
|
6b3cbc918d | ||
|
|
ab4997d26f | ||
|
|
317132fea4 | ||
|
|
0839a9fa4f | ||
|
|
1fc5715040 | ||
|
|
f06545a3fe | ||
|
|
9c22d94bd3 | ||
|
|
919b73b4c4 | ||
|
|
83107746ad | ||
|
|
137f1c4e4f | ||
|
|
fead7967f2 | ||
|
|
7e8b8e9462 | ||
|
|
f9d707ff48 | ||
|
|
88afc4ad5a | ||
|
|
660fcacef2 | ||
|
|
58fc64982f | ||
|
|
69e6f6a489 | ||
|
|
eea175b7e7 | ||
|
|
33ceb5d626 | ||
|
|
f7bb2483d8 | ||
|
|
ddc480b6c9 | ||
|
|
90c918bec6 | ||
|
|
63c5425991 | ||
|
|
5c51cb0f29 | ||
|
|
00443dae3a | ||
|
|
282c50ef34 | ||
|
|
0cb7440647 | ||
|
|
2afc567a53 | ||
|
|
caa0dd75aa | ||
|
|
ba8c2dbf9f | ||
|
|
47489265b1 | ||
|
|
6724901b9e | ||
|
|
a1323756a9 | ||
|
|
c385b86793 | ||
|
|
0ac090e959 | ||
|
|
3932a32399 | ||
|
|
aa17564e93 | ||
|
|
b7420372b7 | ||
|
|
b6f9aa4592 | ||
|
|
f9a9d4d2d8 | ||
|
|
5c92cc7fa3 | ||
|
|
0907465fcf | ||
|
|
3b509db141 | ||
|
|
adc0a73e93 | ||
|
|
5ac175b7e4 | ||
|
|
bf2955909a | ||
|
|
86c90ade3f | ||
|
|
4df9af1ba0 | ||
|
|
7cc7ac5485 | ||
|
|
f674b24945 | ||
|
|
300da71b9c | ||
|
|
55a83f9d8d | ||
|
|
07412b2f79 | ||
|
|
e9962bb887 | ||
|
|
1313ef99d5 | ||
|
|
26df66f9ac | ||
|
|
4e39c41215 | ||
|
|
b52648674d | ||
|
|
cdd84244b2 | ||
|
|
8028b77966 | ||
|
|
b5771ebbfc | ||
|
|
c442ff0d2b | ||
|
|
c391ca5b32 | ||
|
|
cd8585da63 | ||
|
|
d38ff5c246 | ||
|
|
5bb3b5c074 | ||
|
|
43ffb061ef | ||
|
|
9a0fed93d1 | ||
|
|
a1d1396919 | ||
|
|
8c63d68083 | ||
|
|
a2f1291f94 | ||
|
|
8718edc5fd | ||
|
|
321814fae3 | ||
|
|
82b14e30d7 | ||
|
|
4a1fbffba3 | ||
|
|
29fdebe0d9 | ||
|
|
7b6755cfcd | ||
|
|
dd905debb4 | ||
|
|
2262c1c7dd | ||
|
|
54b47d7f4f | ||
|
|
fb3f6972eb | ||
|
|
beadb19fea | ||
|
|
95a66e7e63 | ||
|
|
90cb71f341 | ||
|
|
15f187c466 | ||
|
|
94487cf411 | ||
|
|
4cf01bc685 | ||
|
|
e1e8254bcf | ||
|
|
1b10e27618 | ||
|
|
782ab6a02b | ||
|
|
40723b264a | ||
|
|
c2e81b6edb | ||
|
|
112b945e6b | ||
|
|
5555037346 | ||
|
|
bdf779dfd2 | ||
|
|
16c7d51abc | ||
|
|
48fe3524d5 | ||
|
|
d76c57fed9 | ||
|
|
81fc86ba06 | ||
|
|
5247faf50f | ||
|
|
e0b9496f9e | ||
|
|
182338beb1 | ||
|
|
11ab49d85d | ||
|
|
af150c35fc | ||
|
|
caa987fb61 | ||
|
|
f14ef7b50f | ||
|
|
da84fac390 | ||
|
|
7c97bf900f | ||
|
|
5f415478ac | ||
|
|
965011c8bc | ||
|
|
51a4f9e5d7 | ||
|
|
597f5dae15 | ||
|
|
28efc3e50f | ||
|
|
0d536bff54 | ||
|
|
27603b966e | ||
|
|
21e753d510 | ||
|
|
da274f0ca4 | ||
|
|
abbe204c97 | ||
|
|
6ae8d26a89 | ||
|
|
216ec6ac4b | ||
|
|
88dcb27981 | ||
|
|
176b52f305 | ||
|
|
3ea7a1fcab | ||
|
|
75b909ce93 | ||
|
|
5144f21c6c | ||
|
|
cc21909909 | ||
|
|
86f576f8d3 | ||
|
|
54df49aebe | ||
|
|
fdfe333f69 | ||
|
|
f232ae9160 | ||
|
|
dd2e43754e | ||
|
|
e335ce6f45 | ||
|
|
dfc38351ef | ||
|
|
a35dd9f2d1 | ||
|
|
5eda10e0dd | ||
|
|
a02c539a82 | ||
|
|
7dec327995 | ||
|
|
1e90d0a54c | ||
|
|
4410057106 | ||
|
|
bb99209b5e | ||
|
|
621a7d93fa | ||
|
|
97dd1f4bbb | ||
|
|
58c18f438c | ||
|
|
803fe68061 | ||
|
|
9a0494bd64 | ||
|
|
e998a4b8a5 | ||
|
|
417dd6465c | ||
|
|
e0c232548e | ||
|
|
fb2444c7a3 | ||
|
|
8ce5fcd980 | ||
|
|
0b7a5a4af9 | ||
|
|
4a0eb496fa | ||
|
|
4ee4de4a00 | ||
|
|
3cdb2d45c2 | ||
|
|
26f98a2ab7 | ||
|
|
30ec33f152 | ||
|
|
63220eae18 | ||
|
|
ee7023422a | ||
|
|
1e037a9b95 | ||
|
|
20a2282efc | ||
|
|
ce3b01cf6a | ||
|
|
5f0951dcda | ||
|
|
51e941b9b4 | ||
|
|
0f544919e0 | ||
|
|
33495847b7 | ||
|
|
1b6da075f7 | ||
|
|
64fbff3abc | ||
|
|
e3df4b81f8 | ||
|
|
0414f09e48 | ||
|
|
44b02f1d6c | ||
|
|
b165a31c0d | ||
|
|
8ada144f6e | ||
|
|
04e814d1a6 | ||
|
|
5aa5c5259d | ||
|
|
9191692bb2 | ||
|
|
654ac318d4 | ||
|
|
a87c2f9579 | ||
|
|
246321cd8f | ||
|
|
e5583f1544 | ||
|
|
857de64607 | ||
|
|
7678940e50 | ||
|
|
a6147ee73b | ||
|
|
e3f0ab9109 | ||
|
|
ceb6199e87 | ||
|
|
b3dab8a6f7 | ||
|
|
7a72b9bb09 | ||
|
|
b630f0b710 | ||
|
|
5b4c215526 | ||
|
|
3c3df0c4f6 | ||
|
|
ff9d6ce02a | ||
|
|
45d354ad82 | ||
|
|
eafaa6f4dd | ||
|
|
69247afd06 | ||
|
|
a7b21db210 | ||
|
|
9a4240c292 | ||
|
|
45e38efdfa | ||
|
|
0c456add13 | ||
|
|
9fabfe029b | ||
|
|
45e37c82cd | ||
|
|
b85bb8c0f8 | ||
|
|
b3cdb1f163 | ||
|
|
27243069cb | ||
|
|
86c2ced714 | ||
|
|
537a51b367 | ||
|
|
501a25e1da | ||
|
|
4cadf0e5a3 | ||
|
|
a40ea9387b | ||
|
|
e4f8b9a4b0 | ||
|
|
20144c9883 | ||
|
|
5d97ce038b | ||
|
|
74a9bbbf38 | ||
|
|
80ac99e9b1 | ||
|
|
25a3f8a8fd | ||
|
|
5bc51a3439 | ||
|
|
7b72965315 | ||
|
|
c13c15188b | ||
|
|
b47e6e4520 | ||
|
|
e8b5fc5d06 | ||
|
|
629271cf85 | ||
|
|
e5d0258f33 | ||
|
|
463a130a60 | ||
|
|
0334b58a4b | ||
|
|
fb8f0ed657 | ||
|
|
2a28d77eeb | ||
|
|
889b15689b | ||
|
|
972baa34e7 | ||
|
|
c242e53db6 | ||
|
|
7e37cbb9e3 | ||
|
|
0e79cae9d4 | ||
|
|
968827172d | ||
|
|
799226728d | ||
|
|
12514d0f81 | ||
|
|
58faf94dfc | ||
|
|
5fa8a6c311 | ||
|
|
38471f1670 | ||
|
|
3b1d6818b8 | ||
|
|
4d1885eb59 | ||
|
|
eb06f56164 | ||
|
|
eddac89bad | ||
|
|
f71b5d0605 | ||
|
|
e4f51b7f32 | ||
|
|
03767286ef | ||
|
|
7dc01fc9c1 | ||
|
|
700421179f | ||
|
|
c23fe43b62 | ||
|
|
198adcf440 | ||
|
|
51566970ce | ||
|
|
8959b13bc3 | ||
|
|
a790a97009 | ||
|
|
86e4340287 | ||
|
|
2e4bebbaf9 | ||
|
|
227c6906a8 | ||
|
|
3b57727542 | ||
|
|
c9fa12a8f9 | ||
|
|
7eed738fce | ||
|
|
1ef27913d7 | ||
|
|
a167d56d5a | ||
|
|
7481cfc1a3 | ||
|
|
b615b52f47 | ||
|
|
2866d60240 | ||
|
|
b4a88ca312 | ||
|
|
f0fa9205a2 | ||
|
|
caf963351b | ||
|
|
e0f5a3cfe9 | ||
|
|
fc1c38420c | ||
|
|
8f0738f792 | ||
|
|
71b8ab8336 | ||
|
|
d8f77abf31 | ||
|
|
3029fd0fe1 | ||
|
|
e59a4d510b | ||
|
|
3ef3a038cf | ||
|
|
a9d75b2c91 | ||
|
|
250d29542f | ||
|
|
834356b61e | ||
|
|
efe1cde388 | ||
|
|
4448c5e86f | ||
|
|
23753d849c | ||
|
|
9661f08b38 | ||
|
|
50f76cbb9c | ||
|
|
60c71d88f7 | ||
|
|
59e9d7f397 | ||
|
|
343561be7a | ||
|
|
867a0072e3 | ||
|
|
1b9b4395b9 | ||
|
|
b085ce6916 | ||
|
|
07d0f457b4 | ||
|
|
d7f557c7ed | ||
|
|
5bbd8eded9 | ||
|
|
c0d8bce2df | ||
|
|
1624894346 | ||
|
|
f90946dbde | ||
|
|
80d99651a4 | ||
|
|
3a08a14d56 | ||
|
|
80354cd8d6 | ||
|
|
2d037eb34e | ||
|
|
441a8c4a74 | ||
|
|
ae18178d56 | ||
|
|
42be661b1d | ||
|
|
d71754f577 | ||
|
|
058c431483 | ||
|
|
ff9b2803e7 | ||
|
|
0428d9c887 | ||
|
|
774e327831 | ||
|
|
972d998f7e | ||
|
|
9ebe704506 | ||
|
|
52e5403660 | ||
|
|
6e1d7aebb3 | ||
|
|
918bc9cc26 | ||
|
|
ffa1102949 | ||
|
|
01c140ecac | ||
|
|
455add4130 | ||
|
|
5ea72c8d56 | ||
|
|
7479933c27 | ||
|
|
c5ebb8f983 | ||
|
|
038526bb71 | ||
|
|
fd7c494cb6 | ||
|
|
2c77a901b3 | ||
|
|
621a29d0e0 | ||
|
|
10cd5ba730 | ||
|
|
9a0367db0d | ||
|
|
5e654e8cb3 | ||
|
|
e5235be7d0 | ||
|
|
d3344f5291 | ||
|
|
bc4674bdce | ||
|
|
c37c3d1939 | ||
|
|
bf67cf9dc2 | ||
|
|
1914b98375 | ||
|
|
4382724b86 | ||
|
|
9b47d7e05d | ||
|
|
e52d6db3fd | ||
|
|
60384f6d66 | ||
|
|
970d088510 | ||
|
|
9973f03f3b | ||
|
|
5eeb630a14 | ||
|
|
90a84335ab | ||
|
|
e6da7c5574 | ||
|
|
3b56370060 | ||
|
|
25d9969590 | ||
|
|
653bfd5d43 | ||
|
|
8a303fd4d8 | ||
|
|
587484fabb | ||
|
|
1232e25859 | ||
|
|
4d86291527 | ||
|
|
d0380adc39 | ||
|
|
c3bf1b2619 | ||
|
|
58caf89aab | ||
|
|
87c31d0761 | ||
|
|
931531232c | ||
|
|
e299bad2b5 | ||
|
|
6f489c1fbd | ||
|
|
5aa63ffe73 | ||
|
|
970c4bea75 | ||
|
|
553981426e | ||
|
|
4b854fb33d | ||
|
|
68227d91d9 | ||
|
|
a037e2f2d6 | ||
|
|
feef5b2eff | ||
|
|
cd0849209c | ||
|
|
2ed446d014 | ||
|
|
0c5851d566 | ||
|
|
0f4f4ea61c | ||
|
|
fdfe4d9ac5 | ||
|
|
258662e616 | ||
|
|
241fd8db98 | ||
|
|
9bd937a3bc | ||
|
|
10e7fa51fc | ||
|
|
dc51eb0b75 | ||
|
|
015b941966 | ||
|
|
c787e7f2a1 | ||
|
|
fc5b308605 | ||
|
|
df74fa37de | ||
|
|
490336b2e8 | ||
|
|
73f574b649 | ||
|
|
baeedd3690 | ||
|
|
f972b15f5f | ||
|
|
f1b348da34 | ||
|
|
572b2fdec7 | ||
|
|
9c06e07f07 | ||
|
|
dc138e20e7 | ||
|
|
1756fdbc9f | ||
|
|
f618f330b3 | ||
|
|
7facaac973 | ||
|
|
4b1dfbc2fb | ||
|
|
b72123e7ec | ||
|
|
329bdfc9fd | ||
|
|
d5f221452e | ||
|
|
0367cee671 | ||
|
|
7e000d4ce2 | ||
|
|
1efedbdade | ||
|
|
2e372ced1e | ||
|
|
0291b6f5d7 | ||
|
|
1f7bc1d518 | ||
|
|
914d56bb1b | ||
|
|
db7f7a420b | ||
|
|
d01796a214 | ||
|
|
47d7ac8031 | ||
|
|
a48c79b68b | ||
|
|
0f23cef46c | ||
|
|
2c297bbcc8 | ||
|
|
9895084627 | ||
|
|
931089a924 | ||
|
|
02439bed8b | ||
|
|
4503659cba | ||
|
|
fa73dbe8e9 |
99
ChangeLog
@@ -161,7 +161,41 @@ 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
|
||||
FIX: #4455
|
||||
FIX: #4749
|
||||
FIX: #4756
|
||||
FIX: #4828
|
||||
FIX: #4926
|
||||
FIX: #4964 buyprice in customer from shipping buyprice wasn't load in expedition::fetch_lines
|
||||
FIX: #5004
|
||||
FIX: #5068
|
||||
FIX: #5170 tva sign with INVOICE_POSITIVE_CREDIT_NOTE option
|
||||
FIX: #5338 use of not initialized var $aphour, $apmin, etc
|
||||
FIX: #5343
|
||||
FIX: #5380
|
||||
FIX: #5383 bad object id on don delete
|
||||
FIX: #5414
|
||||
FIX: #5470 User of expense report in bank transactions page is not correct
|
||||
FIX: a case of corrupted ODT by Word that insert <text:s> when it should not.
|
||||
FIX: Can't create thirdparty or validate invoice if profid is mandatory and profid does not exists for other countries
|
||||
FIX: dasboard wrong for late invoice
|
||||
FIX: duplicate jquery.js files
|
||||
FIX: extrafield cloned on project clone
|
||||
FIX: Failed to open file
|
||||
FIX: Filter on opportunity amount and budget
|
||||
FIX: form_confirm to delete payment on supplier invoice
|
||||
FIX: javascript error with german-switzerland language
|
||||
FIX: large expense note
|
||||
FIX: Missing original .js file (license violation if sources are not provided)
|
||||
FIX: Option strict mode compatibility
|
||||
FIX: product stats all bloc module without enbaled test
|
||||
FIX: receiving link never works
|
||||
FIX: task ODT company object not correctly retrieved
|
||||
FIX: Translate group perms as it is done into user perms
|
||||
FIX: We must take the last recent defined price when using price level
|
||||
|
||||
***** ChangeLog for 3.9.2 compared to 3.9.1 *****
|
||||
FIX: #4813 Won translation for the key OppStatusWON instead OppStatusWIN
|
||||
@@ -425,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
|
||||
|
||||
@@ -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, ...).
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
12
README.md
@@ -2,15 +2,15 @@
|
||||
|
||||
 
|
||||
|
||||
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 and medium companies, foundation and freelances.
|
||||
It's an Open Source software (wrote in PHP language) designed for small, medium or large companies, foundations and freelances.
|
||||
|
||||
You can freely use, study, modify or distribute it according to its Free Software licence.
|
||||
|
||||
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.
|
||||
|
||||

|
||||

|
||||
|
||||
## 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)
|
||||
|
||||
@@ -13,7 +13,7 @@ Architecture: all
|
||||
Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5,
|
||||
php5-cli,
|
||||
# Required PHP extensions
|
||||
php5-mysql | php5-mysqli, php5-curl, php5-gd, php5-ldap, php5-geoip,
|
||||
php5-mysql | php5-mysqli, php5-curl, php5-gd, php5-ldap,
|
||||
# Required PHP libraries
|
||||
php-pear, php-mail-mime,
|
||||
# php-tcpdf, libfpdi-php,
|
||||
@@ -31,10 +31,10 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm |
|
||||
${misc:Depends},
|
||||
${perl:Depends}
|
||||
Recommends: apache2 | lighttpd | httpd
|
||||
Suggests: www-browser
|
||||
Suggests: www-browser, php5-geoip
|
||||
Description: Web based software to manage a company or foundation
|
||||
Dolibarr ERP & CRM is an easy to use open source/free software for small
|
||||
and medium companies, foundations or freelances. It includes different
|
||||
Dolibarr ERP & CRM is an easy to use open source/free software package for
|
||||
companies, foundations or freelances. It includes different
|
||||
features for Enterprise Resource Planning (ERP) and Customer Relationship
|
||||
Management (CRM) but also for different other activities.
|
||||
.
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
README.md
|
||||
README-FR.md
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Remove warning, we want to keep both standard and minified sources.
|
||||
dolibarr: source-contains-prebuilt-javascript-object htdocs/includes/jsgantt/*
|
||||
dolibarr: source-contains-prebuilt-javascript-object htdocs/includes/jquery/*
|
||||
dolibarr: source-contains-prebuilt-javascript-object htdocs/includes/jquery/*
|
||||
# This is a textual data file
|
||||
source-is-missing htdocs/includes/mobiledetect/mobiledetectlib/Mobile_Detect.json
|
||||
@@ -2,4 +2,4 @@
|
||||
version=3
|
||||
|
||||
#http://sf.net/dolibarr/dolibarr-(.+)\.tgz
|
||||
http://www.dolibarr.org/files/stable/standard/dolibarr-(.+)\.tgz
|
||||
http://www.dolibarr.org/files/stable/package_debian-ubuntu/dolibarr_(.+)\.orig\.tar\.gz
|
||||
|
||||
@@ -4,17 +4,14 @@ File added into doxygen generated documentation
|
||||
|
||||
|
||||
<!-- Google analytics -->
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-9049390-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
ga('create', 'UA-9049390-16', 'auto');
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
||||
<!-- End google analytics -->
|
||||
@@ -22,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 -->
|
||||
@@ -35,11 +32,20 @@ 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>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Twitter ad collector -->
|
||||
<script src="//platform.twitter.com/oct.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">twttr.conversion.trackPid('ntm4n', { tw_sale_amount: 0, tw_order_quantity: 0 });</script>
|
||||
<noscript>
|
||||
<img height="1" width="1" style="display:none;" alt="" src="https://analytics.twitter.com/i/adsct?txn_id=ntm4n&p_id=Twitter&tw_sale_amount=0&tw_order_quantity=0" />
|
||||
<img height="1" width="1" style="display:none;" alt="" src="//t.co/i/adsct?txn_id=ntm4n&p_id=Twitter&tw_sale_amount=0&tw_order_quantity=0" />
|
||||
</noscript>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,6 +1,4 @@
|
||||
<!--
|
||||
File added into doxygen generated documentation
|
||||
-->
|
||||
<!-- File added into doxygen generated documentation -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
@@ -14,7 +12,23 @@ File added into doxygen generated documentation
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css" />
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<!-- End from dolibarr.org -->
|
||||
|
||||
<!-- Facebook Pixel Code -->
|
||||
<script>
|
||||
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
|
||||
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
|
||||
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
|
||||
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
|
||||
document,'script','//connect.facebook.net/en_US/fbevents.js');
|
||||
|
||||
fbq('init', '1998533953704960');
|
||||
fbq('track', "PageView");</script>
|
||||
<noscript><img height="1" width="1" style="display:none"
|
||||
src="https://www.facebook.com/tr?id=1998533953704960&ev=PageView&noscript=1"
|
||||
/></noscript>
|
||||
<!-- End Facebook Pixel Code -->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="top">
|
||||
|
||||
|
||||
@@ -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
|
||||
#
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
@@ -173,6 +173,7 @@ $build =~ s/-.*$//g;
|
||||
# now build is 0+nmu1 for example
|
||||
$FILENAMEDEBNATIVE="${PROJECT}_${MAJOR}.${MINOR}.${build}";
|
||||
$FILENAMEDEB="${PROJECT}_${MAJOR}.${MINOR}.${newbuild}";
|
||||
$FILENAMEDEBSHORT="${PROJECT}_${MAJOR}.${MINOR}.${build}";
|
||||
|
||||
|
||||
my $copyalreadydone=0;
|
||||
@@ -389,10 +390,15 @@ if ($nboftargetok) {
|
||||
{
|
||||
print 'Run git tag -a -f -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n";
|
||||
$ret=`git tag -a -f -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD"`;
|
||||
print 'Run git push -f --tags'."\n";
|
||||
$ret=`git push -f --tags`;
|
||||
}
|
||||
}
|
||||
print 'Run git push --tags'."\n";
|
||||
$ret=`git push --tags`;
|
||||
else
|
||||
{
|
||||
print 'Run git push --tags'."\n";
|
||||
$ret=`git push --tags`;
|
||||
}
|
||||
chdir("$olddir");
|
||||
}
|
||||
|
||||
@@ -597,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'; }
|
||||
@@ -629,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'; }
|
||||
@@ -666,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'; }
|
||||
@@ -707,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; }
|
||||
@@ -793,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'; }
|
||||
@@ -824,7 +830,7 @@ if ($nboftargetok) {
|
||||
$ret=`$cmd`;
|
||||
|
||||
print "Remove other files\n";
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/README-FR`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/README-FR.md`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/README`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/README-FR`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/aps`;
|
||||
@@ -996,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'; }
|
||||
@@ -1082,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'; }
|
||||
@@ -1111,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;
|
||||
@@ -1127,6 +1134,7 @@ if ($nboftargetok) {
|
||||
%filestoscansf=(
|
||||
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'Dolibarr installer for Fedora-Redhat-Mandriva-Opensuse (DoliRpm)',
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'Dolibarr installer for Debian-Ubuntu (DoliDeb)',
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'none',
|
||||
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'Dolibarr installer for Windows (DoliWamp)',
|
||||
"$DESTI/standard/$FILENAMETGZ.tgz"=>'Dolibarr ERP-CRM',
|
||||
"$DESTI/standard/$FILENAMETGZ.zip"=>'Dolibarr ERP-CRM'
|
||||
@@ -1134,6 +1142,7 @@ if ($nboftargetok) {
|
||||
%filestoscanstableasso=(
|
||||
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'package_rpm_generic',
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'package_debian-ubuntu',
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'package_debian-ubuntu',
|
||||
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'package_windows',
|
||||
"$DESTI/standard/$FILENAMETGZ.tgz"=>'standard',
|
||||
"$DESTI/standard/$FILENAMETGZ.zip"=>'standard'
|
||||
@@ -1195,7 +1204,7 @@ if ($nboftargetok) {
|
||||
|
||||
print "\n";
|
||||
|
||||
if ($target eq 'SF') {
|
||||
if ($target eq 'SF' && $filestoscan{$file} ne 'none') {
|
||||
$destFolder="$NEWPUBLISH/$filestoscan{$file}/".$MAJOR.'.'.$MINOR.'.'.$BUILD;
|
||||
}
|
||||
elsif ($target eq 'ASSO' and $NEWPUBLISH =~ /stable/) {
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -31,8 +31,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
}
|
||||
|
||||
// Recupere root dolibarr
|
||||
$path=preg_replace('/generate-facture.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require ($path."../../htdocs/master.inc.php");
|
||||
//$path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require (__DIR__. '/../../htdocs/master.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");
|
||||
|
||||
|
||||
@@ -32,8 +32,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
}
|
||||
|
||||
// Recupere root dolibarr
|
||||
$path=preg_replace('/generate-commande.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require ($path."../../htdocs/master.inc.php");
|
||||
//$path=preg_replace('/generate-commande.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require (__DIR__. '/../../htdocs/master.inc.php');
|
||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
|
||||
@@ -32,8 +32,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
}
|
||||
|
||||
// Recupere root dolibarr
|
||||
$path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require ($path."../../htdocs/master.inc.php");
|
||||
//$path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require (__DIR__. '/../../htdocs/master.inc.php');
|
||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
|
||||
@@ -32,8 +32,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
}
|
||||
|
||||
// Recupere root dolibarr
|
||||
$path=preg_replace('/generate-propale.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require ($path."../../htdocs/master.inc.php");
|
||||
//$path=preg_replace('/generate-propale.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require (__DIR__. '/../../htdocs/master.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php");
|
||||
|
||||
@@ -32,8 +32,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
}
|
||||
|
||||
// Recupere root dolibarr
|
||||
$path=preg_replace('/generate-societe.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require ($path."../../htdocs/master.inc.php");
|
||||
//$path=preg_replace('/generate-societe.php/i','',$_SERVER["PHP_SELF"]);
|
||||
require (__DIR__. '/../../htdocs/master.inc.php');
|
||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
|
||||
|
After Width: | Height: | Size: 33 KiB |
BIN
dev/initdemo/documents_demo/produit/DOLICLOUD/dolicloud_logo.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 17 KiB |
BIN
dev/initdemo/documents_demo/societe/contact/10/eldy_php.jpg
Normal file
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
BIN
dev/initdemo/documents_demo/users/9/1/eldy_php.jpg
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
dev/initdemo/documents_demo/users/9/1/thumbs/eldy_php_mini.jpg
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
dev/initdemo/documents_demo/users/9/1/thumbs/eldy_php_small.jpg
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
@@ -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."
|
||||
|
||||
8576
dev/initdemo/mysqldump_dolibarr_4.0.0.sql
Normal 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
@@ -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);
|
||||
@@ -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)
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -294,7 +294,11 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
|
||||
if (preg_match('/^DescADHERENT_/', $value)) $qualifiedforclean=0;
|
||||
if (preg_match('/^SubmitTranslation/', $value)) $qualifiedforclean=0;
|
||||
if (preg_match('/^ModuleCompanyCode/', $value)) $qualifiedforclean=0;
|
||||
|
||||
// boxes.lang
|
||||
if (preg_match('/^BoxTitleLast/', $value)) $qualifiedforclean=0;
|
||||
if (preg_match('/^BoxTitleLatest/', $value)) $qualifiedforclean=0;
|
||||
// install.lang
|
||||
if (preg_match('/^KeepDefaultValues/', $value)) $qualifiedforclean=0;
|
||||
// main.lang
|
||||
if (preg_match('/^Duration/', $value)) $qualifiedforclean=0;
|
||||
if (preg_match('/^FormatDate/', $value)) $qualifiedforclean=0;
|
||||
@@ -339,7 +343,7 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
|
||||
}
|
||||
|
||||
//$search = '\'trans("'.$value.'")\'';
|
||||
$search = '-e "\''.$value.'\'" -e \'"'.$value.'"\' -e "('.$value.')"';
|
||||
$search = '-e "\''.$value.'\'" -e \'"'.$value.'"\' -e "('.$value.')" -e "('.$value.',"';
|
||||
$string = 'grep -R -m 1 -F --exclude=includes/* --include=*.php '.$search.' '.$htdocs.'* '.$scripts.'*';
|
||||
//print $string."<br>\n";
|
||||
exec($string,$output);
|
||||
|
||||
|
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 212 KiB |
|
Before Width: | Height: | Size: 149 KiB After Width: | Height: | Size: 228 KiB |
|
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 159 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 57 KiB |
BIN
doc/images/dolibarr_screenshot6_1280x800.png
Normal file
|
After Width: | Height: | Size: 175 KiB |
|
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 156 KiB |
|
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 232 KiB |
|
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 171 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 2.2 KiB |
@@ -58,11 +58,21 @@ if ($action == 'add') {
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
// Clean code
|
||||
$account_number = clean_account(GETPOST('account_number')); // Accounting account without zero on the right
|
||||
if (GETPOST('account_category') <= 0) {
|
||||
$account_parent = '';
|
||||
|
||||
// To manage zero or not at the end of the accounting account
|
||||
if($conf->global->ACCOUNTING_MANAGE_ZERO == 1)
|
||||
{
|
||||
$account_number = GETPOST('account_number');
|
||||
}
|
||||
else
|
||||
{
|
||||
$account_number = clean_account(GETPOST('account_number'));
|
||||
}
|
||||
|
||||
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;
|
||||
@@ -88,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;
|
||||
@@ -98,11 +108,21 @@ if ($action == 'add') {
|
||||
$obj = $db->fetch_object($result2);
|
||||
|
||||
// Clean code
|
||||
$account_number = clean_account(GETPOST('account_number')); // Accounting account without zero on the right
|
||||
if (GETPOST('account_category') <= 0) {
|
||||
$account_parent = '';
|
||||
|
||||
// To manage zero or not at the end of the accounting account
|
||||
if($conf->global->ACCOUNTING_MANAGE_ZERO == 1)
|
||||
{
|
||||
$account_number = GETPOST('account_number');
|
||||
}
|
||||
else
|
||||
{
|
||||
$account_number = clean_account(GETPOST('account_number'));
|
||||
}
|
||||
|
||||
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;
|
||||
@@ -145,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);
|
||||
@@ -164,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
|
||||
@@ -227,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
|
||||
@@ -279,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>';
|
||||
|
||||
|
||||
@@ -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 ++;
|
||||
}
|
||||
|
||||
@@ -130,6 +130,7 @@ if ($action == 'update') {
|
||||
}
|
||||
}
|
||||
|
||||
// TO DO Mutualize code for yes/no constants
|
||||
if ($action == 'setlistsorttodo') {
|
||||
$setlistsorttodo = GETPOST('value', 'int');
|
||||
$res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_TODO", $setlistsorttodo, 'yesno', 0, '', $conf->entity);
|
||||
@@ -155,6 +156,30 @@ if ($action == 'setlistsortdone') {
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'setmanagezero') {
|
||||
$setmanagezero = GETPOST('value', 'int');
|
||||
$res = dolibarr_set_const($db, "ACCOUNTING_MANAGE_ZERO", $setmanagezero, 'yesno', 0, '', $conf->entity);
|
||||
if (! $res > 0)
|
||||
$error ++;
|
||||
if (! $error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
setEventMessages($langs->trans("Error"), null, 'mesgs');
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
*/
|
||||
@@ -286,6 +311,7 @@ foreach ( $list_account as $key ) {
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// TO DO Mutualize code for yes/no constants
|
||||
$var = ! $var;
|
||||
print "<tr " . $bc[$var] . ">";
|
||||
print '<td width="80%">' . $langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_TODO") . '</td>';
|
||||
@@ -314,6 +340,34 @@ if (! empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE)) {
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
$var = ! $var;
|
||||
print "<tr " . $bc[$var] . ">";
|
||||
print '<td width="80%">' . $langs->trans("ACCOUNTING_MANAGE_ZERO") . '</td>';
|
||||
if (! empty($conf->global->ACCOUNTING_MANAGE_ZERO)) {
|
||||
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setmanagezero&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=setmanagezero&value=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a></td>';
|
||||
}
|
||||
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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();" />';
|
||||
|
||||
@@ -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();" />';
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2012-2016 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* 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
|
||||
@@ -1418,11 +1418,11 @@ else
|
||||
// Login
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
||||
}
|
||||
|
||||
// Type
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
|
||||
// Morphy
|
||||
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||
@@ -1463,7 +1463,7 @@ else
|
||||
print '<table class="border tableforfield" width="100%">';
|
||||
|
||||
// Birthday
|
||||
print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';
|
||||
|
||||
// Public
|
||||
print '<tr><td>'.$langs->trans("Public").'</td><td class="valeur">'.yn($object->public).'</td></tr>';
|
||||
|
||||
@@ -591,11 +591,11 @@ if ($rowid > 0)
|
||||
// Login
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
||||
}
|
||||
|
||||
// Type
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
|
||||
// Morphy
|
||||
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||
@@ -630,7 +630,7 @@ if ($rowid > 0)
|
||||
print '<table class="border tableforfield" width="100%">';
|
||||
|
||||
// Birthday
|
||||
print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';
|
||||
|
||||
// Public
|
||||
print '<tr><td>'.$langs->trans("Public").'</td><td class="valeur">'.yn($object->public).'</td></tr>';
|
||||
|
||||
@@ -83,7 +83,7 @@ $search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search
|
||||
// List of fields to search into when doing a "search in all"
|
||||
$fieldstosearchall = array(
|
||||
'd.rowid'=>'Ref',
|
||||
//'d.ref'=>'Ref',
|
||||
'd.login'=>'Login',
|
||||
'd.lastname'=>'Lastname',
|
||||
'd.firstname'=>'Firstname',
|
||||
'd.login'=>'Login',
|
||||
@@ -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']))
|
||||
|
||||
@@ -54,7 +54,7 @@ $langs->load("companies");
|
||||
|
||||
$memberstatic=new Adherent($db);
|
||||
|
||||
llxHeader('',$langs->trans("MembersStatisticsByProperties"),'','',0,0,array('http://www.google.com/jsapi'));
|
||||
llxHeader('',$langs->trans("MembersStatisticsByProperties"),'','',0,0,array('https://www.google.com/jsapi'));
|
||||
|
||||
$title=$langs->trans("MembersStatisticsByProperties");
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ $langs->load("companies");
|
||||
* View
|
||||
*/
|
||||
|
||||
$arrayjs=array('http://www.google.com/jsapi');
|
||||
$arrayjs=array('https://www.google.com/jsapi');
|
||||
if (! empty($conf->dol_use_jmobile)) $arrayjs=array();
|
||||
|
||||
$title=$langs->trans("Statistics");
|
||||
|
||||
@@ -602,6 +602,8 @@ print "</td></tr>\n";
|
||||
print '</form>';
|
||||
|
||||
// Shippable Icon in List
|
||||
/* Kept as hidden feature for the moment, result seems bugged.
|
||||
Whet is definition of "shippable" according to all different STOCK_CALCULATE_... options ?
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td>'.$langs->trans("ShippableOrderIconInList").'</td>';
|
||||
@@ -617,6 +619,8 @@ if (!empty($conf->global->SHIPPABLE_ORDER_ICON_IN_LIST)) {
|
||||
print '</a></td>';
|
||||
print '</tr>';
|
||||
|
||||
/* Seems to be not so used. So kept hidden for the moment to avoid dangerous options inflation.
|
||||
/*
|
||||
// Ask for payment bank during order
|
||||
if ($conf->banque->enabled)
|
||||
{
|
||||
@@ -676,6 +680,7 @@ else
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER").'</td><td> </td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
|
||||
}
|
||||
*/
|
||||
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
@@ -596,7 +596,9 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
if ($value == 'color' && empty($_POST['color'])) continue;
|
||||
if ($value == 'formula' && empty($_POST['formula'])) continue;
|
||||
if ((! isset($_POST[$value]) || $_POST[$value]=='')
|
||||
&& (! in_array($listfield[$f], array('decalage','module','accountancy_code','accountancy_code_sell','accountancy_code_buy'))) // Fields that are not mandatory
|
||||
&& (! in_array($listfield[$f], array('decalage','module','accountancy_code','accountancy_code_sell','accountancy_code_buy')) // Fields that are not mandatory
|
||||
&& (! ($id == 10 && $listfield[$f] == 'code')) // Code is mandatory fir table 10
|
||||
)
|
||||
)
|
||||
{
|
||||
$ok=0;
|
||||
|
||||
@@ -372,7 +372,6 @@ else
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Name").'</td>';
|
||||
|
||||
@@ -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))
|
||||
);
|
||||
|
||||
@@ -167,7 +167,7 @@ if ($action == 'edit') // Edit
|
||||
print '<td width="20"> </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%">';
|
||||
|
||||
@@ -237,7 +237,7 @@ else
|
||||
{
|
||||
print '<input size="25" type="text" name="pass" value="'.$conf->global->LDAP_ADMIN_PASS.'">';
|
||||
}
|
||||
print '</td><td>secret</td></tr>';
|
||||
print '</td><td>'.$langs->trans('Password').' (ex: secret)</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
@@ -243,7 +243,7 @@ if ($action == 'confirm_delete' && $_POST["confirm"] == 'yes')
|
||||
{
|
||||
$this->db->begin();
|
||||
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."menu WHERE rowid = ".$_GET['menuId'];
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."menu WHERE rowid = ".GETPOST('menuId', 'int');
|
||||
$db->query($sql);
|
||||
|
||||
if ($result == 0)
|
||||
@@ -312,7 +312,7 @@ if ($action == 'create')
|
||||
$parent_rowid = $_GET['menuId'];
|
||||
if ($_GET['menuId'])
|
||||
{
|
||||
$sql = "SELECT m.rowid, m.mainmenu, m.leftmenu, m.level, m.langs FROM ".MAIN_DB_PREFIX."menu as m WHERE m.rowid = ".$_GET['menuId'];
|
||||
$sql = "SELECT m.rowid, m.mainmenu, m.leftmenu, m.level, m.langs FROM ".MAIN_DB_PREFIX."menu as m WHERE m.rowid = ".GETPOST('menuId', 'int');
|
||||
$res = $db->query($sql);
|
||||
if ($res)
|
||||
{
|
||||
|
||||
@@ -304,7 +304,7 @@ $h++;
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
dol_fiche_head($head, $mode, $langs->trans("Modules"));
|
||||
dol_fiche_head($head, $mode, '');
|
||||
|
||||
$var=true;
|
||||
|
||||
@@ -443,11 +443,11 @@ if ($mode != 'marketplace')
|
||||
if ($familykey!=$oldfamily)
|
||||
{
|
||||
print '<tr class="liste_titre">'."\n";
|
||||
print '<td colspan="6">';
|
||||
print '<td colspan="5">';
|
||||
$familytext=empty($familyinfo[$familykey]['label'])?$familykey:$familyinfo[$familykey]['label'];
|
||||
print $familytext;
|
||||
print "</td>\n";
|
||||
print '<td align="right">'.$langs->trans("SetupShort").'</td>'."\n";
|
||||
print '<td colspan="2" align="right">'.$langs->trans("SetupShort").'</td>'."\n";
|
||||
print "</tr>\n";
|
||||
$atleastoneforfamily=0;
|
||||
//print "<tr><td>yy".$oldfamily."-".$familykey."-".$atleastoneforfamily."<br></td><tr>";
|
||||
|
||||
@@ -200,13 +200,13 @@ if ($result)
|
||||
{
|
||||
print img_picto($langs->trans("Active"),'tick');
|
||||
print '</td><td>';
|
||||
print '<a href="perms.php?pid='.$obj->id.'&action=remove#'.$objMod->getName().'">'.img_edit_remove().'</a>';
|
||||
print '<a class="reposition" href="perms.php?pid='.$obj->id.'&action=remove">'.img_edit_remove().'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print ' ';
|
||||
print '</td><td>';
|
||||
print '<a href="perms.php?pid='.$obj->id.'&action=add#'.$objMod->getName().'">'.img_edit_add().'</a>';
|
||||
print '<a class="reposition" href="perms.php?pid='.$obj->id.'&action=add">'.img_edit_add().'</a>';
|
||||
}
|
||||
|
||||
print '</td></tr>';
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -606,6 +606,7 @@ print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'
|
||||
print "</td></tr>\n";
|
||||
print '</form>';
|
||||
|
||||
/* Seems to be not so used. So kept hidden for the moment to avoid dangerous options inflation.
|
||||
if ($conf->banque->enabled)
|
||||
{
|
||||
$var=!$var;
|
||||
@@ -634,6 +635,7 @@ else
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL").'</td><td> </td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
|
||||
}
|
||||
*/
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
@@ -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>';
|
||||
|
||||
|
||||
@@ -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">';
|
||||
|
||||
@@ -168,36 +168,39 @@ print load_fiche_titre($langs->trans("Upgrade"),'','title_setup');
|
||||
|
||||
print $langs->trans("CurrentVersion").' : <b>'.DOL_VERSION.'</b><br>';
|
||||
|
||||
$result = getURLContent('http://sourceforge.net/projects/dolibarr/rss');
|
||||
//var_dump($result['content']);
|
||||
$sfurl = simplexml_load_string($result['content']);
|
||||
if ($sfurl)
|
||||
if (function_exists('curl_init'))
|
||||
{
|
||||
$i=0;
|
||||
$version='0.0';
|
||||
while (! empty($sfurl->channel[0]->item[$i]->title) && $i < 10000)
|
||||
$result = getURLContent('http://sourceforge.net/projects/dolibarr/rss');
|
||||
//var_dump($result['content']);
|
||||
$sfurl = simplexml_load_string($result['content']);
|
||||
if ($sfurl)
|
||||
{
|
||||
$title=$sfurl->channel[0]->item[$i]->title;
|
||||
if (preg_match('/([0-9]+\.([0-9\.]+))/', $title, $reg))
|
||||
$i=0;
|
||||
$version='0.0';
|
||||
while (! empty($sfurl->channel[0]->item[$i]->title) && $i < 10000)
|
||||
{
|
||||
$newversion=$reg[1];
|
||||
$newversionarray=explode('.',$newversion);
|
||||
$versionarray=explode('.',$version);
|
||||
//var_dump($newversionarray);var_dump($versionarray);
|
||||
if (versioncompare($newversionarray, $versionarray) > 0) $version=$newversion;
|
||||
$title=$sfurl->channel[0]->item[$i]->title;
|
||||
if (preg_match('/([0-9]+\.([0-9\.]+))/', $title, $reg))
|
||||
{
|
||||
$newversion=$reg[1];
|
||||
$newversionarray=explode('.',$newversion);
|
||||
$versionarray=explode('.',$version);
|
||||
//var_dump($newversionarray);var_dump($versionarray);
|
||||
if (versioncompare($newversionarray, $versionarray) > 0) $version=$newversion;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
$i++;
|
||||
|
||||
// Show version
|
||||
print $langs->trans("LastStableVersion").' : <b>'. (($version != '0.0')?$version:$langs->trans("Unknown")) .'</b><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("LastStableVersion").' : <b>' .$langs->trans("UpdateServerOffline").'</b><br>';
|
||||
}
|
||||
|
||||
// Show version
|
||||
print $langs->trans("LastStableVersion").' : <b>'. (($version != '0.0')?$version:$langs->trans("Unknown")) .'</b><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("LastStableVersion").' : <b>' .$langs->trans("UpdateServerOffline").'</b><br>';
|
||||
}
|
||||
print '<br>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
// Upgrade
|
||||
print $langs->trans("Upgrade").'<br>';
|
||||
|
||||
@@ -28,6 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/api/class/api.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/api/class/api_access.class.php';
|
||||
|
||||
$langs->load("admin");
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
@@ -36,7 +38,6 @@ require_once DOL_DOCUMENT_ROOT.'/api/class/api_access.class.php';
|
||||
// Enable and test if module Api is enabled
|
||||
if (empty($conf->global->MAIN_MODULE_API))
|
||||
{
|
||||
$langs->load("admin");
|
||||
dol_syslog("Call Dolibarr API interfaces with module REST disabled");
|
||||
print $langs->trans("WarningModuleNotActive",'Api').'.<br><br>';
|
||||
print $langs->trans("ToActivateModule");
|
||||
@@ -165,6 +166,7 @@ print $langs->trans("ListOfAvailableAPIs").':<br>';
|
||||
foreach($listofapis['v1'] as $key => $val)
|
||||
{
|
||||
if ($key == 'login') continue;
|
||||
if ($key == 'index') continue;
|
||||
|
||||
if ($key)
|
||||
{
|
||||
|
||||
@@ -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++;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>";
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -996,7 +996,7 @@ class ActionComm extends CommonObject
|
||||
}
|
||||
|
||||
$this->date_creation = $this->db->jdate($obj->datec);
|
||||
$this->date_modification = $this->db->jdate($obj->datem);
|
||||
if (! empty($obj->fk_user_mod)) $this->date_modification = $this->db->jdate($obj->datem);
|
||||
}
|
||||
$this->db->free($result);
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
else
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td colspan="3">'.$langs->trans("NoProposal").'</td></tr>';
|
||||
print '<tr '.$bc[$var].'><td colspan="3" class="opacitymedium">'.$langs->trans("NoProposal").'</td></tr>';
|
||||
}
|
||||
print "</table><br>";
|
||||
|
||||
@@ -277,7 +277,7 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos
|
||||
else
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td colspan="3">'.$langs->trans("NoProposal").'</td></tr>';
|
||||
print '<tr '.$bc[$var].'><td colspan="3" class="opacitymedium">'.$langs->trans("NoProposal").'</td></tr>';
|
||||
}
|
||||
print "</table><br>";
|
||||
|
||||
@@ -357,7 +357,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
|
||||
else
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td colspan="3">'.$langs->trans("NoOrder").'</td></tr>';
|
||||
print '<tr '.$bc[$var].'><td colspan="3" class="opacitymedium">'.$langs->trans("NoOrder").'</td></tr>';
|
||||
}
|
||||
print "</table><br>";
|
||||
|
||||
@@ -438,7 +438,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande
|
||||
else
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td colspan="3">'.$langs->trans("NoSupplierOrder").'</td></tr>';
|
||||
print '<tr '.$bc[$var].'><td colspan="3" class="opacitymedium">'.$langs->trans("NoSupplierOrder").'</td></tr>';
|
||||
}
|
||||
print "</table><br>";
|
||||
|
||||
|
||||
@@ -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&id='.$object->id.'">'.$langs->trans("EditMailing").'</a>';
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
@@ -1356,7 +1358,7 @@ if ($action == 'create')
|
||||
print '</td></tr>';
|
||||
|
||||
// Bank Account
|
||||
if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL) && $conf->banque->enabled) {
|
||||
if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL) && ! empty($conf->banque->enabled)) {
|
||||
print '<tr><td>' . $langs->trans('BankAccount') . '</td><td colspan="2">';
|
||||
$form->select_comptes($fk_account, 'fk_account', 0, '', 1);
|
||||
print '</td></tr>';
|
||||
@@ -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&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
||||
@@ -2001,7 +2003,7 @@ if ($action == 'create')
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL) && $conf->banque->enabled)
|
||||
if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL) && ! empty($conf->banque->enabled))
|
||||
{
|
||||
// Bank Account
|
||||
print '<tr><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)
|
||||
@@ -2417,7 +2419,7 @@ if ($action == 'create')
|
||||
|
||||
// Tableau des substitutions
|
||||
$formmail->setSubstitFromObject($object);
|
||||
$formmail->substit['__PROPREF__'] = $object->ref;
|
||||
$formmail->substit['__PROPREF__'] = $object->ref; // For backward compatibility
|
||||
|
||||
// Find the good contact adress
|
||||
$custcontact = '';
|
||||
|
||||
@@ -135,7 +135,7 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'setremise')
|
||||
if ($action == 'setremise' && $user->rights->societe->creer)
|
||||
{
|
||||
//if ($user->rights->societe->creer)
|
||||
//if ($user->rights->facture->creer)
|
||||
@@ -266,39 +266,48 @@ if ($socid > 0)
|
||||
print '<tr><td class="titlefield">'.$langs->trans("CustomerAbsoluteDiscountAllUsers").'</td>';
|
||||
print '<td>'.$remise_all.' '.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("CustomerAbsoluteDiscountMy").'</td>';
|
||||
print '<td>'.$remise_user.' '.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").'</td></tr>';
|
||||
if (! empty($user->fk_soc)) // No need to show this for external users
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("CustomerAbsoluteDiscountMy").'</td>';
|
||||
print '<td>'.$remise_user.' '.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").'</td></tr>';
|
||||
}
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
print load_fiche_titre($langs->trans("NewGlobalDiscount"),'','');
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr><td width="38%" class="fieldrequired">'.$langs->trans("AmountHT").'</td>';
|
||||
print '<td><input type="text" size="5" name="amount_ht" value="'.$_POST["amount_ht"].'">';
|
||||
print '<span class="hideonsmartphone"> '.$langs->trans("Currency".$conf->currency).'</span></td></tr>';
|
||||
print '<tr><td width="38%">'.$langs->trans("VAT").'</td>';
|
||||
print '<td>';
|
||||
print $form->load_tva('tva_tx',GETPOST('tva_tx'),$mysoc,$object);
|
||||
print '</td></tr>';
|
||||
print '<tr><td class="fieldrequired" >'.$langs->trans("NoteReason").'</td>';
|
||||
print '<td><input type="text" size="60" name="desc" value="'.GETPOST('desc').'"></td></tr>';
|
||||
|
||||
print "</table>";
|
||||
|
||||
if ($user->rights->societe->creer)
|
||||
{
|
||||
print '<br>';
|
||||
|
||||
print load_fiche_titre($langs->trans("NewGlobalDiscount"),'','');
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr><td width="38%" class="fieldrequired">'.$langs->trans("AmountHT").'</td>';
|
||||
print '<td><input type="text" size="5" name="amount_ht" value="'.$_POST["amount_ht"].'">';
|
||||
print '<span class="hideonsmartphone"> '.$langs->trans("Currency".$conf->currency).'</span></td></tr>';
|
||||
print '<tr><td width="38%">'.$langs->trans("VAT").'</td>';
|
||||
print '<td>';
|
||||
print $form->load_tva('tva_tx',GETPOST('tva_tx'),$mysoc,$object);
|
||||
print '</td></tr>';
|
||||
print '<tr><td class="fieldrequired" >'.$langs->trans("NoteReason").'</td>';
|
||||
print '<td><input type="text" size="60" name="desc" value="'.GETPOST('desc').'"></td></tr>';
|
||||
|
||||
print "</table>";
|
||||
}
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button" name="submit" value="'.$langs->trans("AddGlobalDiscount").'">';
|
||||
if (! empty($backtopage))
|
||||
{
|
||||
print ' ';
|
||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
if ($user->rights->societe->creer)
|
||||
{
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button" name="submit" value="'.$langs->trans("AddGlobalDiscount").'">';
|
||||
if (! empty($backtopage))
|
||||
{
|
||||
print ' ';
|
||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
}
|
||||
print '</div>';
|
||||
}
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
print '</form>';
|
||||
|
||||
|
||||
print '<br>';
|
||||
@@ -423,7 +432,7 @@ if ($socid > 0)
|
||||
print '<br>';
|
||||
|
||||
/*
|
||||
* Liste ristournes appliquees (=liees a une ligne de facture ou facture)
|
||||
* List discount consumed (=liees a une ligne de facture ou facture)
|
||||
*/
|
||||
|
||||
// Remises liees a lignes de factures
|
||||
|
||||
@@ -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'));
|
||||
@@ -523,9 +523,9 @@ if (empty($reshook))
|
||||
else if ($action == 'setmode' && $user->rights->commande->creer) {
|
||||
$result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int'));
|
||||
if ($result < 0)
|
||||
dol_print_error($db, $object->error);
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
||||
|
||||
// Multicurrency Code
|
||||
else if ($action == 'setmulticurrencycode' && $user->rights->commande->creer) {
|
||||
$result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha'));
|
||||
@@ -533,19 +533,19 @@ 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)
|
||||
dol_print_error($db, $object->error);
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
||||
else if ($action == 'setdemandreason' && $user->rights->commande->creer) {
|
||||
$result = $object->demand_reason(GETPOST('demand_reason_id'));
|
||||
if ($result < 0)
|
||||
dol_print_error($db, $object->error);
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
||||
else if ($action == 'setconditions' && $user->rights->commande->creer) {
|
||||
@@ -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');
|
||||
@@ -1472,7 +1472,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
print '</td>';
|
||||
} else {
|
||||
print '<td colspan="2">';
|
||||
print $form->select_company('', 'socid', 's.client = 1 OR s.client = 3', 1);
|
||||
print $form->select_company('', 'socid', 's.client = 1 OR s.client = 3', 'SelectThirdParty');
|
||||
// reload page to retrieve customer informations
|
||||
if (!empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE))
|
||||
{
|
||||
@@ -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 ' ';
|
||||
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&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
|
||||
|
||||
@@ -160,6 +160,7 @@ class CommandeApi extends DolibarrApi
|
||||
|
||||
if ($result)
|
||||
{
|
||||
$i=0;
|
||||
$num = $db->num_rows($result);
|
||||
while ($i < $num)
|
||||
{
|
||||
|
||||
@@ -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>';
|
||||
|
||||
@@ -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">';
|
||||
|
||||