forked from Wavyzz/dolibarr
Compare commits
292 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7c0a6946a7 | ||
|
|
1ecc1afa9e | ||
|
|
ceb1e699b7 | ||
|
|
c028819cab | ||
|
|
d59b1bb0c6 | ||
|
|
9d582a53ca | ||
|
|
3d85407619 | ||
|
|
ca1e3b4d55 | ||
|
|
94bb1ac511 | ||
|
|
8893d8d59f | ||
|
|
9253fed754 | ||
|
|
8000777864 | ||
|
|
141df52dd6 | ||
|
|
01a3787664 | ||
|
|
8ac7dd8e9a | ||
|
|
3793ae323a | ||
|
|
e61bcd03ed | ||
|
|
3295498e9e | ||
|
|
d5d337c631 | ||
|
|
71818da6a5 | ||
|
|
c53aef9955 | ||
|
|
a18995d3dc | ||
|
|
d345b9503a | ||
|
|
f8d6eb0d40 | ||
|
|
7d9b9f96f0 | ||
|
|
3017e2b3a0 | ||
|
|
09c271b7c5 | ||
|
|
adbb41799c | ||
|
|
1fcc2c4918 | ||
|
|
e19167dffa | ||
|
|
ccbeb162cf | ||
|
|
f1c23f25f0 | ||
|
|
724392a557 | ||
|
|
4283b1ee30 | ||
|
|
f899408fc9 | ||
|
|
65b9b70ff8 | ||
|
|
a8d7764146 | ||
|
|
99c7867522 | ||
|
|
1f83bef1b5 | ||
|
|
1745d06bb7 | ||
|
|
12d7b92556 | ||
|
|
6fb0fc7b71 | ||
|
|
f694939fc7 | ||
|
|
c4546b6da6 | ||
|
|
03eadcebf1 | ||
|
|
ebc18cd2d4 | ||
|
|
d0d9de37f4 | ||
|
|
1bfdc7438a | ||
|
|
9352ecca1f | ||
|
|
39419bb411 | ||
|
|
774c624687 | ||
|
|
5439390461 | ||
|
|
6fc4dacd42 | ||
|
|
36a72de080 | ||
|
|
6787d717f9 | ||
|
|
0e175ba373 | ||
|
|
d55cc58b8b | ||
|
|
d70c14a411 | ||
|
|
510b1aedcf | ||
|
|
200f4010d8 | ||
|
|
d7b142beb7 | ||
|
|
61a4382bd8 | ||
|
|
d410a320d7 | ||
|
|
dbcb60433b | ||
|
|
0c9f268f99 | ||
|
|
4adfe6de70 | ||
|
|
56e749df9f | ||
|
|
a2287fd183 | ||
|
|
587f5a76e6 | ||
|
|
cd099bf3b1 | ||
|
|
9bbfeed1bc | ||
|
|
e23a44bcdf | ||
|
|
72ff353e9f | ||
|
|
2e759d5156 | ||
|
|
086fa4385f | ||
|
|
30d58f77db | ||
|
|
44302f1aea | ||
|
|
6b2d8a3c34 | ||
|
|
ef7a334414 | ||
|
|
b44143d24d | ||
|
|
b970596310 | ||
|
|
9827887643 | ||
|
|
9e7230e63a | ||
|
|
15d0e6abc5 | ||
|
|
38ccf7ffdd | ||
|
|
3ff456d8ef | ||
|
|
e1f459d67a | ||
|
|
9cd807af1a | ||
|
|
9ecc56ad4d | ||
|
|
290caba160 | ||
|
|
c01988ba43 | ||
|
|
882423f935 | ||
|
|
d5978a5092 | ||
|
|
68a6a08a01 | ||
|
|
797b68fc20 | ||
|
|
90e8f062e9 | ||
|
|
dae3e03603 | ||
|
|
84fec7c5c7 | ||
|
|
2be6011069 | ||
|
|
fcf99c9bc2 | ||
|
|
a47f3cb0e5 | ||
|
|
2cedcfece2 | ||
|
|
ddbd6c371d | ||
|
|
f49552f6b7 | ||
|
|
39f35bbaab | ||
|
|
c953ae2a3d | ||
|
|
98599b0bbf | ||
|
|
cdcbf58ca8 | ||
|
|
9cc2a74221 | ||
|
|
f7e5898b4a | ||
|
|
94eeaf9ed0 | ||
|
|
876722733a | ||
|
|
74e00c4d80 | ||
|
|
dbf96b8f59 | ||
|
|
e0db9a8ca7 | ||
|
|
b3d5f40f37 | ||
|
|
6830fdca98 | ||
|
|
321933f267 | ||
|
|
73e6663230 | ||
|
|
c5db333af8 | ||
|
|
534e2b1282 | ||
|
|
2c4c48ad6f | ||
|
|
1f1c75adfb | ||
|
|
e4dd020887 | ||
|
|
af407a094a | ||
|
|
56b3f2c011 | ||
|
|
530d3503f5 | ||
|
|
4dd740fe2f | ||
|
|
5c4ab99a9a | ||
|
|
7fd75c793a | ||
|
|
b42a2616bc | ||
|
|
56aafa4660 | ||
|
|
6e9d6b4e49 | ||
|
|
5a2b8ff53c | ||
|
|
f49d332b73 | ||
|
|
46d84f8f11 | ||
|
|
97e21cb775 | ||
|
|
829ff2299e | ||
|
|
c2bee0f937 | ||
|
|
ad467989bf | ||
|
|
de5ad57af4 | ||
|
|
191474a5db | ||
|
|
5b6d5df159 | ||
|
|
196428edf5 | ||
|
|
423391f12d | ||
|
|
e539842c28 | ||
|
|
ae36daefbe | ||
|
|
a1cccc021e | ||
|
|
f7e780fa9e | ||
|
|
94544fb9ae | ||
|
|
24c12df356 | ||
|
|
c6f96a81d1 | ||
|
|
0b594eab59 | ||
|
|
f0151c5a4c | ||
|
|
75cc6bcf75 | ||
|
|
f516660c0f | ||
|
|
73f0159578 | ||
|
|
e33654cc45 | ||
|
|
718adef600 | ||
|
|
8b16eeb554 | ||
|
|
b8f8b6dcde | ||
|
|
78eaeab168 | ||
|
|
7c3356baff | ||
|
|
d0bd1d5d36 | ||
|
|
7acc14903c | ||
|
|
57a8e053b4 | ||
|
|
3dbab863a7 | ||
|
|
be493fcf09 | ||
|
|
5e7c72068d | ||
|
|
2a4517e1bc | ||
|
|
e4da87d31c | ||
|
|
acf8874c6a | ||
|
|
a6c2758ca2 | ||
|
|
adb05ec05b | ||
|
|
fe71c0cb2d | ||
|
|
a814e02d53 | ||
|
|
f28c7bbc6d | ||
|
|
6a944bb6a3 | ||
|
|
47ed731242 | ||
|
|
ab34885a89 | ||
|
|
3d1ddbb923 | ||
|
|
87e8ac51be | ||
|
|
dda248cb57 | ||
|
|
567f7e5365 | ||
|
|
ffd486e3d6 | ||
|
|
45dfb8ca62 | ||
|
|
298e5cee61 | ||
|
|
b7b18e3355 | ||
|
|
b19b624908 | ||
|
|
02f4f6d039 | ||
|
|
ee20704a8a | ||
|
|
56245e2c9a | ||
|
|
0b49d6316e | ||
|
|
a90111cbf3 | ||
|
|
30050b51f0 | ||
|
|
5d7f182f59 | ||
|
|
8775a51cec | ||
|
|
67a1bf2b59 | ||
|
|
8829db7d65 | ||
|
|
4cccaae831 | ||
|
|
f9f95dec42 | ||
|
|
2c42697cae | ||
|
|
f1bb69eecf | ||
|
|
937f1fd3ee | ||
|
|
bef5c2748c | ||
|
|
5840ed8258 | ||
|
|
b69f037dd3 | ||
|
|
1d95720644 | ||
|
|
4096981378 | ||
|
|
3d8722ee69 | ||
|
|
da41c3ffa7 | ||
|
|
f5884999a9 | ||
|
|
87fb00c293 | ||
|
|
4777faf49b | ||
|
|
b5db70342b | ||
|
|
e3c2299c67 | ||
|
|
ff632718fa | ||
|
|
b72794216e | ||
|
|
972a2db3a3 | ||
|
|
5de88f6af1 | ||
|
|
3078e6fa4b | ||
|
|
d2ef56f3f1 | ||
|
|
4e5105c220 | ||
|
|
e19743519b | ||
|
|
78b2e9e4bf | ||
|
|
9c8145eb88 | ||
|
|
696b54c6c3 | ||
|
|
70de814c3c | ||
|
|
5c2af9b7bd | ||
|
|
d6a4b58a68 | ||
|
|
570c228ee1 | ||
|
|
5dc7c9c6e5 | ||
|
|
fcd5e1fb2c | ||
|
|
416a0892d7 | ||
|
|
1c626c01ee | ||
|
|
10ced563b3 | ||
|
|
18cf2f8f8b | ||
|
|
b1401d6566 | ||
|
|
a9e5668ea4 | ||
|
|
bc8e203019 | ||
|
|
5d7414dcc3 | ||
|
|
874db10dbe | ||
|
|
c298bb62ba | ||
|
|
6b3cbc918d | ||
|
|
919b73b4c4 | ||
|
|
7e8b8e9462 | ||
|
|
f9d707ff48 | ||
|
|
ddc480b6c9 | ||
|
|
5c51cb0f29 | ||
|
|
00443dae3a | ||
|
|
0cb7440647 | ||
|
|
a1323756a9 | ||
|
|
c385b86793 | ||
|
|
3932a32399 | ||
|
|
bf2955909a | ||
|
|
8718edc5fd | ||
|
|
321814fae3 | ||
|
|
4a1fbffba3 | ||
|
|
90cb71f341 | ||
|
|
15f187c466 | ||
|
|
94487cf411 | ||
|
|
112b945e6b | ||
|
|
16c7d51abc | ||
|
|
1253b73879 | ||
|
|
5f415478ac | ||
|
|
965011c8bc | ||
|
|
597f5dae15 | ||
|
|
aadf52fe59 | ||
|
|
0d536bff54 | ||
|
|
5144f21c6c | ||
|
|
7dec327995 | ||
|
|
621a7d93fa | ||
|
|
58c18f438c | ||
|
|
803fe68061 | ||
|
|
9a0494bd64 | ||
|
|
e998a4b8a5 | ||
|
|
fb2444c7a3 | ||
|
|
69247afd06 | ||
|
|
9a4240c292 | ||
|
|
45e38efdfa | ||
|
|
86c2ced714 | ||
|
|
1ef27913d7 | ||
|
|
71b8ab8336 | ||
|
|
d8f77abf31 | ||
|
|
9e67249b98 | ||
|
|
600a10fa16 | ||
|
|
c0d8bce2df | ||
|
|
1624894346 | ||
|
|
8b275c6e5c | ||
|
|
bd002656cd | ||
|
|
f68d956eaa | ||
|
|
e020a859f0 |
@@ -10,7 +10,7 @@ php:
|
||||
- '5.3'
|
||||
- '5.4'
|
||||
- '5.5'
|
||||
- '5.6'
|
||||
- '5.6.29'
|
||||
- '7.0'
|
||||
- nightly
|
||||
|
||||
@@ -126,10 +126,10 @@ before_script:
|
||||
echo "Set timezone"
|
||||
echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||
if [ "$TRAVIS_PHP_VERSION" = '5.3' ] || [ "$TRAVIS_PHP_VERSION" = '5.4' ]; then
|
||||
echo
|
||||
echo "Enabling APC for PHP <= 5.4"
|
||||
#echo
|
||||
#echo "Enabling APC for PHP <= 5.4"
|
||||
# Documentation says it should be available for PHP <= 5.6 but it's not for 5.5 and 5.6!
|
||||
echo 'extension = apc.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||
#echo 'extension = apc.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||
echo
|
||||
echo "Enabling Memcached for PHP <= 5.4"
|
||||
# Documentation says it should be available for all PHP versions but it's not for 5.5 and 5.6, 7.0 and nightly!
|
||||
|
||||
117
ChangeLog
117
ChangeLog
@@ -12,6 +12,60 @@ Upgrading to any other version or any other database system is abolutely require
|
||||
make a Dolibarr upgrade.
|
||||
|
||||
|
||||
***** ChangeLog for 3.9.4 compared to 3.9.3 *****
|
||||
FIX: #2853
|
||||
FIX: #3128
|
||||
FIX: #4447
|
||||
FIX: #5128 if create method return duplicated code error not use GETPOST in order to get a new code
|
||||
FIX: #5340
|
||||
FIX: #5473
|
||||
FIX: #5474 Country_id of "Don" object is still empty
|
||||
FIX: #5534
|
||||
FIX: #5535 bad dependency.
|
||||
FIX: #5537 AJAX project search does not work properly
|
||||
FIX: #5540 getFormMail is not registered as addReplace hook
|
||||
FIX: #5544 Disabled Contact still appear in lists to send emails
|
||||
FIX: #5549 getNomUrl tooltips show Order info even if user has no rights to read them
|
||||
FIX: #5568
|
||||
FIX: #5594
|
||||
FIX: #5629 PgSQL Interger string stylish error
|
||||
FIX: #5651
|
||||
FIX: #5660
|
||||
FIX: #5853 $conf->global->$calc==0 || $conf->global->$calc==1
|
||||
FIX: #5907
|
||||
FIX: #5966 Bug: getNomUrl tooltips show Proposal info even if user has no rights to read them
|
||||
FIX: #6051
|
||||
FIX: #6088
|
||||
FIX: Can correct stock of lot using eatby or sell by date
|
||||
FIX: Can make a movement on "out of sell" products
|
||||
FIX: cannot update bank account on invoice if module order not activated
|
||||
FIX: Can't create withdrawal document
|
||||
FIX: delete contract extrafields on contract deletion
|
||||
FIX: Direction of movement lost if an error occurs
|
||||
FIX: Error when CATEGORIE_RECURSIV_ADD is enabled and new category is daughter of an already linked to object
|
||||
FIX: export extrafields must not include separe type
|
||||
FIX: External user must not be able to edit its discounts
|
||||
FIX: Failed to export contact categories with contact extra fields
|
||||
FIX: header title in commercial area
|
||||
FIX: HT and TTC price should always be displayed together
|
||||
FIX: incoterms
|
||||
FIX: incoterms do not output into crabe invoice PDF
|
||||
FIX: in PgSQL no quote "word style" is permitted around column name
|
||||
FIX: Introduce hidden option MAIL_PREFIX_FOR_EMAIL_ID to solve pb of tracking email.
|
||||
FIX: margin tab on customer card must filter on current entity invoices
|
||||
FIX: missing column into SQL on thridparty list
|
||||
FIX: only show projects of related third if external user
|
||||
FIX: PgSQL Module Ressource list crash #5637
|
||||
FIX: php Strict
|
||||
FIX: Regression when deleting product
|
||||
FIX: Security to restrict email sending was not efficient
|
||||
FIX: tag for date rfc in odt substitution
|
||||
FIX: Update intervention lline crash with PgSQL
|
||||
FIX: update limit stock on product stock
|
||||
FIX: vat dictionary should allow enter and edit multiple values for localtaxes, separated by: (ex -19:-15)
|
||||
FIX: wrong test on dict.php
|
||||
|
||||
|
||||
***** ChangeLog for 3.9.3 compared to 3.9.2 *****
|
||||
FIX: #4383 $userid not defined
|
||||
FIX: #4448 $filebonprev is not used, $this->filename now
|
||||
@@ -311,7 +365,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
|
||||
|
||||
@@ -222,7 +222,13 @@ $dolibarr_main_prod='0';
|
||||
# $dolibarr_main_limit_users='0';
|
||||
|
||||
# dolibarr_mailing_limit_sendbyweb
|
||||
# Can set a limit for mailing send by web, can be used for a restricted mode.
|
||||
# Can set a limit for mailing send by web. This overwrite database value. Can be used to restrict on OS level.
|
||||
# Default value: 0 (use database value if exist)
|
||||
# Examples:
|
||||
# $dolibarr_mailing_limit_sendbyweb='0';
|
||||
|
||||
# dolibarr_mailing_limit_sendbycli
|
||||
# Can set a limit for mailing send by cli. This overwrite database value. Can be used to restrict on OS level.
|
||||
# Default value: 0 (use database value if exist)
|
||||
# Examples:
|
||||
# $dolibarr_mailing_limit_sendbycli='0';
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<Char_Desc_80>DoliWamp, the easy to use Dolibarr for Windows to manage your company,foundation</Char_Desc_80>
|
||||
<Char_Desc_250>DoliWamp is the Dolibarr ERP/CRM for Windows, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs.</Char_Desc_250>
|
||||
<Char_Desc_450>DoliWamp is the Dolibarr ERP/CRM autoinstaller for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. Dolibarr ERP/CRM is a software package built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations.</Char_Desc_450>
|
||||
<Char_Desc_2000>DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop.
|
||||
<Char_Desc_2000>DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop.
|
||||
DoliWamp is the auto-installer for Windows users with no technical knowledge to install Dolibarr ERP/CRM and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file.</Char_Desc_2000>
|
||||
</English>
|
||||
<French>
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
<Char_Desc_80>Dolibarr ERP & CRM, the easy to use open source software to manage your activity</Char_Desc_80>
|
||||
<Char_Desc_250>Dolibarr ERP & CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to follow.</Char_Desc_250>
|
||||
<Char_Desc_450>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450>
|
||||
<Char_Desc_2000>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple:
|
||||
Simple to install
|
||||
Simple to use
|
||||
Simple to develop
|
||||
<Char_Desc_2000>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple:
|
||||
Simple to install
|
||||
Simple to use
|
||||
Simple to develop
|
||||
Note that Dolibarr is also available with an auto-installer for Windows or Ubuntu users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. This version is called DoliWamp (for Windows) or DoliBuntu (for Ubuntu/Debian).</Char_Desc_2000>
|
||||
</English>
|
||||
<Italian>
|
||||
@@ -62,10 +62,10 @@ Note that Dolibarr is also available with an auto-installer for Windows or Ubunt
|
||||
<Char_Desc_80>Dolibarr ERP & CRM, le gestionnaire simple pour gérer votre activité</Char_Desc_80>
|
||||
<Char_Desc_250>Dolibarr ERP & CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
|
||||
<Char_Desc_450>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP).</Char_Desc_450>
|
||||
<Char_Desc_2000>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S):
|
||||
Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle)
|
||||
Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie)
|
||||
Simple pour le développement (pas de frameworks lourds).
|
||||
<Char_Desc_2000>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S):
|
||||
Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle)
|
||||
Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie)
|
||||
Simple pour le développement (pas de frameworks lourds).
|
||||
Dolibarr intègre en effet sa propre architecture (design patterns) permettant à tout développeur d'être tout de suite opérationnel sans connaissances particulières autre que le PHP. </Char_Desc_2000>
|
||||
</French>
|
||||
</Program_Descriptions>
|
||||
|
||||
@@ -72,10 +72,10 @@
|
||||
<Char_Desc_80>Dolibarr ERP & CRM, the easy to use open source software to manage your activity</Char_Desc_80>
|
||||
<Char_Desc_250>Dolibarr ERP & CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to manage.</Char_Desc_250>
|
||||
<Char_Desc_450>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450>
|
||||
<Char_Desc_2000>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple:
|
||||
Simple to install
|
||||
Simple to use
|
||||
Simple to develop
|
||||
<Char_Desc_2000>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple:
|
||||
Simple to install
|
||||
Simple to use
|
||||
Simple to develop
|
||||
Note that Dolibarr is also available with an auto-installer for Windows or Ubuntu users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. This version is called DoliWamp (for Windows) or DoliBuntu (for Ubuntu/Debian).</Char_Desc_2000>
|
||||
</English>
|
||||
<French>
|
||||
@@ -84,10 +84,10 @@ Note that Dolibarr is also available with an auto-installer for Windows or Ubunt
|
||||
<Char_Desc_80>Dolibarr ERP & CRM, le gestionnaire simple pour gérer votre activité</Char_Desc_80>
|
||||
<Char_Desc_250>Dolibarr ERP & CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
|
||||
<Char_Desc_450>Dolibarr ERP & CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP).</Char_Desc_450>
|
||||
<Char_Desc_2000>Dolibarr ERP & CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S):
|
||||
Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle)
|
||||
Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie)
|
||||
Simple pour le développement (pas de frameworks lourds).
|
||||
<Char_Desc_2000>Dolibarr ERP & CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S):
|
||||
Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle)
|
||||
Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie)
|
||||
Simple pour le développement (pas de frameworks lourds).
|
||||
Dolibarr intègre en effet sa propre architecture (design patterns) permettant à tout développeur d'être tout de suite opérationnel sans connaissances particulières autre que le PHP. </Char_Desc_2000>
|
||||
</French>
|
||||
<Italian>
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
<Char_Desc_80>DoliWamp, the easy to use Dolibarr for Windows to manage your company,foundation</Char_Desc_80>
|
||||
<Char_Desc_250>DoliWamp is the Dolibarr ERP/CRM for Windows, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs.</Char_Desc_250>
|
||||
<Char_Desc_450>DoliWamp is the Dolibarr ERP/CRM autoinstaller for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. Dolibarr ERP/CRM is a software package built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations.</Char_Desc_450>
|
||||
<Char_Desc_2000>DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop.
|
||||
<Char_Desc_2000>DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop.
|
||||
DoliWamp is the auto-installer for Windows users with no technical knowledge to install Dolibarr ERP/CRM and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file.</Char_Desc_2000>
|
||||
</English>
|
||||
<French>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2011 Remy Younes <ryounes@gmail.com>
|
||||
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
|
||||
@@ -624,7 +624,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
$i=0;
|
||||
foreach ($listfieldinsert as $f => $value)
|
||||
{
|
||||
if ($value == 'price' || preg_match('/^amount/i',$value) || preg_match('/^localtax/i',$value) || $value == 'taux') {
|
||||
if ($value == 'price' || preg_match('/^amount/i',$value) || $value == 'taux') {
|
||||
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
|
||||
}
|
||||
else if ($value == 'entity') {
|
||||
@@ -672,7 +672,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
$i = 0;
|
||||
foreach ($listfieldmodify as $field)
|
||||
{
|
||||
if ($field == 'price' || preg_match('/^amount/i',$field) || preg_match('/^localtax/i',$field) || $field == 'taux') {
|
||||
if ($field == 'price' || preg_match('/^amount/i',$field) || $field == 'taux') {
|
||||
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
|
||||
}
|
||||
else if ($field == 'entity') {
|
||||
@@ -1290,23 +1290,10 @@ if ($id)
|
||||
$valuetoshow = '';
|
||||
$align="center";
|
||||
}
|
||||
else if ($fieldlist[$field]=='localtax1') {
|
||||
else if ($fieldlist[$field]=='taux') {
|
||||
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
|
||||
if ($obj->localtax1 == 0)
|
||||
$valuetoshow = '';
|
||||
$align="right";
|
||||
}
|
||||
else if ($fieldlist[$field]=='localtax2') {
|
||||
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
|
||||
if ($obj->localtax2 == 0)
|
||||
$valuetoshow = '';
|
||||
$align="right";
|
||||
}
|
||||
else if (in_array($fieldlist[$field],array('taux','localtax1','localtax2')))
|
||||
{
|
||||
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
|
||||
$align="right";
|
||||
}
|
||||
else if (in_array($fieldlist[$field],array('recuperableonly')))
|
||||
{
|
||||
$align="center";
|
||||
|
||||
@@ -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%">';
|
||||
|
||||
@@ -90,7 +90,8 @@ $configfileparameters=array(
|
||||
'?dolibarr_font_DOL_DEFAULT_TTF_BOLD',
|
||||
'separator',
|
||||
'?dolibarr_mailing_limit_sendbyweb',
|
||||
'?dolibarr_strict_mode'
|
||||
'?dolibarr_mailing_limit_sendbycli',
|
||||
'?dolibarr_strict_mode'
|
||||
);
|
||||
$configfilelib=array(
|
||||
// 'separator',
|
||||
|
||||
@@ -284,7 +284,8 @@ $configfileparameters=array(
|
||||
'separator4' => '',
|
||||
'dolibarr_main_prod' => 'Production mode (Hide all error messages)',
|
||||
'?dolibarr_mailing_limit_sendbyweb' => 'Limit nb of email sent by page',
|
||||
'?dolibarr_strict_mode' => 'Strict mode is on/off',
|
||||
'?dolibarr_mailing_limit_sendbycli' => 'Limit nb of email sent by cli',
|
||||
'?dolibarr_strict_mode' => 'Strict mode is on/off',
|
||||
'?dolibarr_pdf_force_fpdf' => 'Force fpdf usage to generate PDF'
|
||||
);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2006-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013-2016 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
@@ -602,17 +602,19 @@ class Categorie extends CommonObject
|
||||
{
|
||||
if ($this->db->num_rows($resql) > 0)
|
||||
{
|
||||
$objparent = $this->db->fetch_object($resql);
|
||||
$objparent = $this->db->fetch_object($resql);
|
||||
|
||||
if (!empty($objparent->fk_parent))
|
||||
{
|
||||
$cat = new Categorie($this->db);
|
||||
$cat->id=$objparent->fk_parent;
|
||||
$result=$cat->add_type($obj, $type);
|
||||
if ($result < 0)
|
||||
{
|
||||
$this->error=$cat->error;
|
||||
$error++;
|
||||
$cat->id = $objparent->fk_parent;
|
||||
if (!$cat->containsObject($type, $obj->id)) {
|
||||
$result = $cat->add_type($obj, $type);
|
||||
if ($result < 0)
|
||||
{
|
||||
$this->error = $cat->error;
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -928,7 +928,14 @@ if (count($listofextcals))
|
||||
// Complete $eventarray with events coming from external module
|
||||
$parameters=array(); $object=null;
|
||||
$reshook=$hookmanager->executeHooks('getCalendarEvents',$parameters,$object,$action);
|
||||
if (! empty($hookmanager->resArray['eventarray'])) $eventarray=array_merge($eventarray, $hookmanager->resArray['eventarray']);
|
||||
if (! empty($hookmanager->resArray['eventarray'])) {
|
||||
foreach ($hookmanager->resArray['eventarray'] as $keyDate => $events) {
|
||||
if (!isset($eventarray[$keyDate])) {
|
||||
$eventarray[$keyDate]=array();
|
||||
}
|
||||
$eventarray[$keyDate]=array_merge($eventarray[$keyDate], $events);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ if (! empty($conf->propal->enabled)) $propalstatic=new Propal($db);
|
||||
if (! empty($conf->commande->enabled)) $orderstatic=new Commande($db);
|
||||
if (! empty($conf->fournisseur->enabled)) $supplierorderstatic=new CommandeFournisseur($db);
|
||||
|
||||
llxHeader();
|
||||
llxHeader("",$langs->trans("CommercialArea"));
|
||||
|
||||
print load_fiche_titre($langs->trans("CommercialArea"),'','title_commercial.png');
|
||||
|
||||
|
||||
@@ -761,10 +761,12 @@ else
|
||||
$sendingmode=$conf->global->MAIN_MAIL_SENDMODE;
|
||||
if (empty($sendingmode)) $sendingmode='mail'; // If not defined, we use php mail function
|
||||
|
||||
// MAILING_NO_USING_PHPMAIL may be defined or not
|
||||
// MAILING_LIMIT_SENDBYWEB is always defined to something != 0, MAILING_LIMIT_SENDBYCLI may be defined ot not.
|
||||
if (! empty($conf->global->MAILING_NO_USING_PHPMAIL) && $sendingmode == 'mail')
|
||||
{
|
||||
// EMailing feature may be a spam problem, so when you host several users/instance, having this option may force each user to use their own SMTP agent.
|
||||
// You ensure that every user is using its own SMTP server.
|
||||
// You ensure that every user is using its own SMTP server when using the mass emailing module.
|
||||
$linktoadminemailbefore='<a href="'.DOL_URL_ROOT.'/admin/mails.php">';
|
||||
$linktoadminemailend='</a>';
|
||||
setEventMessages($langs->trans("MailSendSetupIs", $listofmethods[$sendingmode]), null, 'warnings');
|
||||
@@ -772,19 +774,27 @@ else
|
||||
if (! empty($conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS)) setEventMessages($langs->trans("MailSendSetupIs3", $conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS), null, 'warnings');
|
||||
$_GET["action"]='';
|
||||
}
|
||||
else if (empty($conf->global->MAILING_LIMIT_SENDBYWEB))
|
||||
else if ($conf->global->MAILING_LIMIT_SENDBYWEB == '-1')
|
||||
{
|
||||
// Pour des raisons de securite, on ne permet pas cette fonction via l'IHM,
|
||||
// on affiche donc juste un message
|
||||
setEventMessages($langs->trans("MailingNeedCommand"), null, 'warnings');
|
||||
if (! empty($conf->global->MAILING_LIMIT_WARNING_PHPMAIL) && $sendingmode == 'mail') setEventMessages($conf->global->MAILING_LIMIT_WARNING_PHPMAIL, null, 'warnings');
|
||||
if (! empty($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL) && $sendingmode != 'mail') setEventMessages($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL, null, 'warnings');
|
||||
|
||||
// The feature is forbidden from GUI, we show just message to use from command line.
|
||||
setEventMessages($langs->trans("MailingNeedCommand"), null, 'warnings');
|
||||
setEventMessages('<textarea cols="60" rows="'.ROWS_1.'" wrap="soft">php ./scripts/emailings/mailing-send.php '.$object->id.'</textarea>', null, 'warnings');
|
||||
setEventMessages($langs->trans("MailingNeedCommand2"), null, 'warnings');
|
||||
if ($conf->file->mailing_limit_sendbyweb != '-1') // MAILING_LIMIT_SENDBYWEB was set to -1 in database, but it is allowed ot increase it.
|
||||
{
|
||||
setEventMessages($langs->trans("MailingNeedCommand2"), null, 'warnings'); // You can send online with constant...
|
||||
}
|
||||
$_GET["action"]='';
|
||||
}
|
||||
else
|
||||
{
|
||||
$text='';
|
||||
if ($conf->file->mailing_limit_sendbyweb == 0)
|
||||
if (! empty($conf->global->MAILING_LIMIT_WARNING_PHPMAIL) && $sendingmode == 'mail') setEventMessages($conf->global->MAILING_LIMIT_WARNING_PHPMAIL, null, 'warnings');
|
||||
if (! empty($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL) && $sendingmode != 'mail') setEventMessages($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL, null, 'warnings');
|
||||
|
||||
$text='';
|
||||
if ($conf->global->MAILING_LIMIT_SENDBYCLI >= 0)
|
||||
{
|
||||
$text.=$langs->trans("MailingNeedCommand");
|
||||
$text.='<br><textarea cols="60" rows="'.ROWS_2.'" wrap="soft">php ./scripts/emailings/mailing-send.php '.$object->id.' '.$user->login.'</textarea>';
|
||||
|
||||
@@ -2734,20 +2734,33 @@ class Propal extends CommonObject
|
||||
*/
|
||||
function getNomUrl($withpicto=0,$option='', $get_params='')
|
||||
{
|
||||
global $langs, $conf;
|
||||
global $langs, $conf, $user;
|
||||
|
||||
$result='';
|
||||
$label = '<u>' . $langs->trans("ShowPropal") . '</u>';
|
||||
if (! empty($this->ref))
|
||||
$label.= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||
if (! empty($this->ref_client))
|
||||
$label.= '<br><b>'.$langs->trans('RefCustomer').':</b> '.$this->ref_client;
|
||||
if (! empty($this->total_ht))
|
||||
$label.= '<br><b>' . $langs->trans('AmountHT') . ':</b> ' . price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency);
|
||||
if (! empty($this->total_tva))
|
||||
$label.= '<br><b>' . $langs->trans('VAT') . ':</b> ' . price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency);
|
||||
if (! empty($this->total_ttc))
|
||||
$label.= '<br><b>' . $langs->trans('AmountTTC') . ':</b> ' . price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency);
|
||||
$label = '';
|
||||
|
||||
if ($user->rights->propal->lire) {
|
||||
$label .= '<u>'.$langs->trans("ShowPropal").'</u>';
|
||||
if (!empty($this->ref)) {
|
||||
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||
}
|
||||
if (!empty($this->ref_client)) {
|
||||
$label .= '<br><b>'.$langs->trans('RefCustomer').':</b> '.$this->ref_client;
|
||||
}
|
||||
if (!empty($this->total_ht)) {
|
||||
$label .= '<br><b>'.$langs->trans('AmountHT').':</b> '.price($this->total_ht, 0, $langs, 0, -1, -1,
|
||||
$conf->currency);
|
||||
}
|
||||
if (!empty($this->total_tva)) {
|
||||
$label .= '<br><b>'.$langs->trans('VAT').':</b> '.price($this->total_tva, 0, $langs, 0, -1, -1,
|
||||
$conf->currency);
|
||||
}
|
||||
if (!empty($this->total_ttc)) {
|
||||
$label .= '<br><b>'.$langs->trans('AmountTTC').':</b> '.price($this->total_ttc, 0, $langs, 0, -1, -1,
|
||||
$conf->currency);
|
||||
}
|
||||
}
|
||||
|
||||
$linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
if ($option == '') {
|
||||
$link = '<a href="'.DOL_URL_ROOT.'/comm/propal.php?id='.$this->id. $get_params .$linkclose;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -255,6 +256,7 @@ if ($result)
|
||||
}
|
||||
|
||||
$param='&socid='.$socid.'&viewstatut='.$viewstatut;
|
||||
if ($sall) $param.='&sall='.$sall;
|
||||
if ($month) $param.='&month='.$month;
|
||||
if ($year) $param.='&year='.$year;
|
||||
if ($search_ref) $param.='&search_ref=' .$search_ref;
|
||||
|
||||
@@ -109,7 +109,7 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
|
||||
$newdiscount2->amount_ttc=price2num($discount->amount_ttc-$newdiscount1->amount_ttc);
|
||||
$newdiscount1->amount_ht=price2num($newdiscount1->amount_ttc/(1+$newdiscount1->tva_tx/100),'MT');
|
||||
$newdiscount2->amount_ht=price2num($newdiscount2->amount_ttc/(1+$newdiscount2->tva_tx/100),'MT');
|
||||
$newdiscount1->amount_tva=price2num($newdiscount1->amount_ttc-$newdiscount2->amount_ht);
|
||||
$newdiscount1->amount_tva=price2num($newdiscount1->amount_ttc-$newdiscount1->amount_ht);
|
||||
$newdiscount2->amount_tva=price2num($newdiscount2->amount_ttc-$newdiscount2->amount_ht);
|
||||
|
||||
$db->begin();
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2016-2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -134,6 +134,7 @@ class Commande extends CommonOrder
|
||||
var $linked_objects=array();
|
||||
|
||||
var $user_author_id;
|
||||
var $user_valid;
|
||||
|
||||
/**
|
||||
* @var OrderLine[]
|
||||
@@ -1460,7 +1461,7 @@ class Commande extends CommonOrder
|
||||
// Check parameters
|
||||
if (empty($id) && empty($ref) && empty($ref_ext) && empty($ref_int)) return -1;
|
||||
|
||||
$sql = 'SELECT c.rowid, c.date_creation, c.ref, c.fk_soc, c.fk_user_author, c.fk_statut';
|
||||
$sql = 'SELECT c.rowid, c.date_creation, c.ref, c.fk_soc, c.fk_user_author, c.fk_user_valid, c.fk_statut';
|
||||
$sql.= ', c.amount_ht, c.total_ht, c.total_ttc, c.tva as total_tva, c.localtax1 as total_localtax1, c.localtax2 as total_localtax2, c.fk_cond_reglement, c.fk_mode_reglement, c.fk_availability, c.fk_input_reason';
|
||||
$sql.= ', c.fk_account';
|
||||
$sql.= ', c.date_commande';
|
||||
@@ -1502,6 +1503,7 @@ class Commande extends CommonOrder
|
||||
$this->socid = $obj->fk_soc;
|
||||
$this->statut = $obj->fk_statut;
|
||||
$this->user_author_id = $obj->fk_user_author;
|
||||
$this->user_valid = $obj->fk_user_valid;
|
||||
$this->total_ht = $obj->total_ht;
|
||||
$this->total_tva = $obj->total_tva;
|
||||
$this->total_localtax1 = $obj->total_localtax1;
|
||||
@@ -2692,8 +2694,8 @@ class Commande extends CommonOrder
|
||||
$sql.= " total_ht=".(isset($this->total_ht)?$this->total_ht:"null").",";
|
||||
$sql.= " total_ttc=".(isset($this->total_ttc)?$this->total_ttc:"null").",";
|
||||
$sql.= " fk_statut=".(isset($this->statut)?$this->statut:"null").",";
|
||||
$sql.= " fk_user_author=".(isset($this->user_author)?$this->user_author:"null").",";
|
||||
$sql.= " fk_user_valid=".(isset($this->fk_user_valid)?$this->fk_user_valid:"null").",";
|
||||
$sql.= " fk_user_author=".(isset($this->user_author_id)?$this->user_author_id:"null").",";
|
||||
$sql.= " fk_user_valid=".(isset($this->user_valid)?$this->user_valid:"null").",";
|
||||
$sql.= " fk_projet=".(isset($this->fk_project)?$this->fk_project:"null").",";
|
||||
$sql.= " fk_cond_reglement=".(isset($this->cond_reglement_id)?$this->cond_reglement_id:"null").",";
|
||||
$sql.= " fk_mode_reglement=".(isset($this->mode_reglement_id)?$this->mode_reglement_id:"null").",";
|
||||
@@ -3071,7 +3073,7 @@ class Commande extends CommonOrder
|
||||
*/
|
||||
function getNomUrl($withpicto=0,$option=0,$max=0,$short=0)
|
||||
{
|
||||
global $conf, $langs;
|
||||
global $conf, $langs, $user;
|
||||
|
||||
$result='';
|
||||
|
||||
@@ -3081,17 +3083,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>';
|
||||
|
||||
@@ -259,6 +259,7 @@ if ($resql)
|
||||
$title.=' - '.$langs->trans('StatusOrderValidated').', '.(empty($conf->expedition->enabled)?'':$langs->trans("StatusOrderSent").', ').$langs->trans('StatusOrderToBill');
|
||||
|
||||
$param='';
|
||||
if ($sall) $param.='&sall='.$sall;
|
||||
if ($socid > 0) $param.='&socid='.$socid;
|
||||
if ($viewstatut != '') $param.='&viewstatut='.$viewstatut;
|
||||
if ($orderday) $param.='&orderday='.$orderday;
|
||||
@@ -274,6 +275,7 @@ if ($resql)
|
||||
if ($search_sale > 0) $param.='&search_sale='.$search_sale;
|
||||
if ($search_total_ht != '') $param.='&search_total_ht='.$search_total_ht;
|
||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||
if ($billed != '') $param.='&billed='.$billed;
|
||||
|
||||
$num = $db->num_rows($resql);
|
||||
print_barre_liste($title, $page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords,'title_commercial.png');
|
||||
@@ -587,10 +589,13 @@ if ($resql)
|
||||
print dol_print_date($db->jdate($objp->date_commande), 'day');
|
||||
print '</td>';
|
||||
|
||||
// Delivery date
|
||||
print '<td align="center">';
|
||||
print dol_print_date($db->jdate($objp->date_delivery), 'day');
|
||||
print '</td>';
|
||||
if (empty($conf->global->ORDER_DISABLE_DELIVERY_DATE))
|
||||
{
|
||||
// Delivery date
|
||||
print '<td align="center">';
|
||||
print dol_print_date($db->jdate($objp->date_delivery), 'day');
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Amount HT
|
||||
print '<td align="right" class="nowrap">'.price($objp->total_ht).'</td>';
|
||||
|
||||
@@ -87,6 +87,17 @@ if ($action == 'delete')
|
||||
{
|
||||
if (GETPOST('categid'))
|
||||
{
|
||||
// Delete bank class
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class";
|
||||
$sql.= " WHERE fk_categ = '".GETPOST('categid')."'";
|
||||
|
||||
$result = $db->query($sql);
|
||||
if (!$result)
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
// Delete bank categ
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_categ";
|
||||
$sql.= " WHERE rowid = '".GETPOST('categid')."'";
|
||||
$sql.= " AND entity = ".$conf->entity;
|
||||
|
||||
@@ -282,6 +282,8 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
|
||||
$refcomp=$societestatic->getNomUrl(1,'',24);
|
||||
|
||||
$paiement = $facturestatic->getSommePaiement(); // Payment already done
|
||||
$paiement+= $facturestatic->getSumDepositsUsed();
|
||||
$paiement+= $facturestatic->getSumCreditNotesUsed();
|
||||
}
|
||||
if ($obj->family == 'social_contribution')
|
||||
{
|
||||
|
||||
@@ -66,7 +66,6 @@ if (!empty($conf->incoterm->enabled)) $langs->load('incoterm');
|
||||
if (! empty($conf->margin->enabled))
|
||||
$langs->load('margins');
|
||||
|
||||
$sall = trim(GETPOST('sall'));
|
||||
$projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0);
|
||||
|
||||
$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility
|
||||
@@ -772,7 +771,7 @@ if (empty($reshook))
|
||||
$line->fk_parent_line = $fk_parent_line;
|
||||
|
||||
$line->subprice =-$line->subprice; // invert price for object
|
||||
$line->pa_ht = -$line->pa_ht;
|
||||
$line->pa_ht = $line->pa_ht;
|
||||
$line->total_ht=-$line->total_ht;
|
||||
$line->total_tva=-$line->total_tva;
|
||||
$line->total_ttc=-$line->total_ttc;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2017 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -164,6 +165,6 @@ else
|
||||
print $langs->trans("ErrorUnknown");
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
|
||||
@@ -530,7 +530,7 @@ if ($search_user > 0)
|
||||
}
|
||||
if (! $sall)
|
||||
{
|
||||
$sql.= ' GROUP BY f.rowid, f.facnumber, ref_client, f.type, f.note_private, f.note_public, f.increment, f.total, f.tva, f.total_ttc,';
|
||||
$sql.= ' GROUP BY f.rowid, f.facnumber, ref_client, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.total, f.tva, f.total_ttc,';
|
||||
$sql.= ' f.datef, f.date_lim_reglement,';
|
||||
$sql.= ' f.paye, f.fk_statut,';
|
||||
$sql.= ' s.nom, s.rowid, s.code_client, s.client';
|
||||
@@ -551,7 +551,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||
$nbtotalofrecords = $db->num_rows($result);
|
||||
}
|
||||
|
||||
$sql.= $db->plimit($limit+1,$offset);
|
||||
$sql.= $db->plimit($limit + 1,$offset);
|
||||
//print $sql;
|
||||
|
||||
$resql = $db->query($sql);
|
||||
@@ -568,6 +568,7 @@ if ($resql)
|
||||
}
|
||||
|
||||
$param='&socid='.$socid;
|
||||
if ($sall) $param.='&sall='.$sall;
|
||||
if ($day) $param.='&day='.$day;
|
||||
if ($month) $param.='&month='.$month;
|
||||
if ($year) $param.='&year=' .$year;
|
||||
@@ -590,7 +591,6 @@ if ($resql)
|
||||
|
||||
$i = 0;
|
||||
print '<form method="POST" name="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
|
||||
print_barre_liste($langs->trans('BillsCustomers').' '.($socid?' '.$soc->name:''),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,$massactionbutton,$num,$nbtotalofrecords,'title_accountancy.png');
|
||||
|
||||
if ($massaction == 'presend')
|
||||
|
||||
@@ -106,7 +106,7 @@ $fsearch.=' <input type="text" name="min" id="min" value="'.$min.'" size="6">';
|
||||
|
||||
$calc=$conf->global->MAIN_INFO_LOCALTAX_CALC.$local;
|
||||
// Affiche en-tete du rapport
|
||||
if ($conf->global->$calc==0 || $conf->global->$calc==1) // Calculate on invoice for goods and services
|
||||
if ($calc==0 || $calc==1) // Calculate on invoice for goods and services
|
||||
{
|
||||
$nom=$langs->transcountry($local==1?"LT1ReportByCustomersInInputOutputMode":"LT2ReportByCustomersInInputOutputMode",$mysoc->country_code);
|
||||
$calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec");
|
||||
@@ -124,7 +124,7 @@ if ($conf->global->$calc==0 || $conf->global->$calc==1) // Calculate on invoice
|
||||
$productsup=$langs->trans("Description");
|
||||
$amountsup=$langs->trans("AmountHT");
|
||||
}
|
||||
if ($conf->global->$calc==2) // Invoice for goods, payment for services
|
||||
if ($calc==2) // Invoice for goods, payment for services
|
||||
{
|
||||
$nom=$langs->transcountry($local==1?"LT1ReportByCustomersInInputOutputMode":"LT2ReportByCustomersInInputOutputMode",$mysoc->country_code);
|
||||
$calcmode=$langs->trans("CalcModeLT2Debt");
|
||||
@@ -149,7 +149,7 @@ $vatcust=$langs->transcountry($local==1?"LT1":"LT2",$mysoc->country_code);
|
||||
$vatsup=$langs->transcountry($local==1?"LT1":"LT2",$mysoc->country_code);
|
||||
|
||||
// IRPF that the customer has retained me
|
||||
if($conf->global->$calc ==0 || $conf->global->$calc == 2)
|
||||
if($calc ==0 || $calc == 2)
|
||||
{
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print "<tr class=\"liste_titre\">";
|
||||
@@ -232,7 +232,7 @@ if($conf->global->$calc ==0 || $conf->global->$calc == 2)
|
||||
}
|
||||
|
||||
// IRPF I retained my supplier
|
||||
if($conf->global->$calc ==0 || $conf->global->$calc == 1){
|
||||
if($calc ==0 || $calc == 1){
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print '<td align="left">'.$langs->trans("Num")."</td>";
|
||||
@@ -309,7 +309,7 @@ if($conf->global->$calc ==0 || $conf->global->$calc == 1){
|
||||
}
|
||||
}
|
||||
|
||||
if($conf->global->$calc ==0){
|
||||
if($calc ==0){
|
||||
// Total to pay
|
||||
print '<br><br>';
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
@@ -273,7 +273,8 @@ $sql.= " WHERE f.entity = ".$conf->entity;
|
||||
$sql.= " AND f.datev >= '".$db->idate(dol_get_first_day($y,1,false))."'";
|
||||
$sql.= " AND f.datev <= '".$db->idate(dol_get_last_day($y,12,false))."'";
|
||||
$sql.= " AND localtaxtype=".$localTaxType;
|
||||
$sql.= " GROUP BY dm ASC";
|
||||
$sql.= " GROUP BY dm";
|
||||
$sql.= " ORDER BY dm ASC";
|
||||
|
||||
pt($db, $sql,$langs->trans("Year")." $y");
|
||||
|
||||
|
||||
@@ -919,7 +919,7 @@ class BonPrelevement extends CommonObject
|
||||
$dir=$conf->prelevement->dir_output.'/receipts';
|
||||
if (! is_dir($dir)) dol_mkdir($dir);
|
||||
|
||||
$this->filename = $dir.$ref.'.xml';
|
||||
$this->filename = $dir.'/'.$ref.'.xml';
|
||||
|
||||
// Create withdraw receipt in database
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_bons (";
|
||||
@@ -1265,18 +1265,6 @@ class BonPrelevement extends CommonObject
|
||||
* section Debiteur (sepa Debiteurs bloc lines)
|
||||
*/
|
||||
|
||||
$tmp_invoices = array();
|
||||
|
||||
$sql = "SELECT f.facnumber as fac FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl, ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."prelevement_facture as pf, ".MAIN_DB_PREFIX."societe as soc, ".MAIN_DB_PREFIX."c_country as p, ".MAIN_DB_PREFIX."societe_rib as rib WHERE pl.fk_prelevement_bons = ".$this->id." AND pl.rowid = pf.fk_prelevement_lignes AND pf.fk_facture = f.rowid AND soc.fk_pays = p.rowid AND soc.rowid = f.fk_soc AND rib.fk_soc = f.fk_soc AND rib.default_rib = 1";
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql) {
|
||||
while ($objfac = $this->db->fetch_object($resql)) {
|
||||
$tmp_invoices[] = $objfac->fac;
|
||||
}
|
||||
}
|
||||
|
||||
$ListOfFactures = implode($tmp_invoices);
|
||||
|
||||
$sql = "SELECT soc.code_client as code, soc.address, soc.zip, soc.town, c.code as country_code,";
|
||||
$sql.= " pl.client_nom as nom, pl.code_banque as cb, pl.code_guichet as cg, pl.number as cc, pl.amount as somme,";
|
||||
$sql.= " f.facnumber as fac, pf.fk_facture as idfac, rib.datec, rib.iban_prefix as iban, rib.bic as bic, rib.rowid as drum";
|
||||
@@ -1303,7 +1291,7 @@ class BonPrelevement extends CommonObject
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
$fileDebiteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->nom, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $ListOfFactures, $obj->idfac, $obj->iban, $obj->bic, $this->db->jdate($obj->datec), $obj->drum);
|
||||
$fileDebiteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->nom, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $obj->fac, $obj->idfac, $obj->iban, $obj->bic, $this->db->jdate($obj->datec), $obj->drum);
|
||||
$this->total = $this->total + $obj->somme;
|
||||
$i++;
|
||||
}
|
||||
@@ -1558,7 +1546,7 @@ class BonPrelevement extends CommonObject
|
||||
$XML_DEBITOR ='';
|
||||
$XML_DEBITOR .=' <DrctDbtTxInf>'.$CrLf;
|
||||
$XML_DEBITOR .=' <PmtId>'.$CrLf;
|
||||
$XML_DEBITOR .=' <EndToEndId>'.('AS-'.$row_facnumber.'-'.$Rowing).'</EndToEndId>'.$CrLf;
|
||||
$XML_DEBITOR .=' <EndToEndId>'.('AS-'.dol_trunc($row_facnumber,20).'-'.$Rowing).'</EndToEndId>'.$CrLf; // ISO20022 states that EndToEndId has a MaxLength of 35 characters
|
||||
$XML_DEBITOR .=' </PmtId>'.$CrLf;
|
||||
$XML_DEBITOR .=' <InstdAmt Ccy="EUR">'.round($row_somme, 2).'</InstdAmt>'.$CrLf;
|
||||
$XML_DEBITOR .=' <DrctDbtTx>'.$CrLf;
|
||||
@@ -1574,11 +1562,11 @@ class BonPrelevement extends CommonObject
|
||||
$XML_DEBITOR .=' </FinInstnId>'.$CrLf;
|
||||
$XML_DEBITOR .=' </DbtrAgt>'.$CrLf;
|
||||
$XML_DEBITOR .=' <Dbtr>'.$CrLf;
|
||||
$XML_DEBITOR .=' <Nm>'.strtoupper(dol_string_unaccent($row_nom)).'</Nm>'.$CrLf;
|
||||
$XML_DEBITOR .=' <Nm>'.strtoupper(dolEscapeXML(dol_string_unaccent($row_nom))).'</Nm>'.$CrLf;
|
||||
$XML_DEBITOR .=' <PstlAdr>'.$CrLf;
|
||||
$XML_DEBITOR .=' <Ctry>'.$row_country_code.'</Ctry>'.$CrLf;
|
||||
$XML_DEBITOR .=' <AdrLine>'.dol_string_unaccent(strtr($row_address, array(CHR(13) => ", ", CHR(10) => ""))).'</AdrLine>'.$CrLf;
|
||||
$XML_DEBITOR .=' <AdrLine>'.dol_string_unaccent($row_zip.' '.$row_town).'</AdrLine>'.$CrLf;
|
||||
$XML_DEBITOR .=' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_unaccent(strtr($row_address, array(CHR(13) => ", ", CHR(10) => "")))),70,'right','UTF-8',true).'</AdrLine>'.$CrLf;
|
||||
$XML_DEBITOR .=' <AdrLine>'.dolEscapeXML(dol_string_unaccent($row_zip.' '.$row_town)).'</AdrLine>'.$CrLf;
|
||||
$XML_DEBITOR .=' </PstlAdr>'.$CrLf;
|
||||
$XML_DEBITOR .=' </Dbtr>'.$CrLf;
|
||||
$XML_DEBITOR .=' <DbtrAcct>'.$CrLf;
|
||||
@@ -1673,8 +1661,9 @@ class BonPrelevement extends CommonObject
|
||||
* @return string String with SEPA Sender
|
||||
*/
|
||||
function EnregEmetteurSEPA($configuration, $ladate, $nombre, $total, $CrLf='\n')
|
||||
{ // SEPA INITIALISATION
|
||||
global $confs;
|
||||
{
|
||||
// SEPA INITIALISATION
|
||||
global $conf;
|
||||
|
||||
$dateTime_YMD = dol_print_date($ladate, '%Y%m%d');
|
||||
$dateTime_ETAD = dol_print_date($ladate, '%Y-%m-%d');
|
||||
|
||||
@@ -141,7 +141,7 @@ if ($prev_id)
|
||||
print price($row[0]);
|
||||
|
||||
print '</td><td align="right">';
|
||||
print round($row[0]/$bon->amount*100,2)." %";
|
||||
if ($bon->amount) print round($row[0]/$bon->amount*100,2)." %";
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
@@ -262,9 +262,15 @@ $dolibarr_main_db_prefix='';
|
||||
// $dolibarr_main_limit_users='0';
|
||||
|
||||
// dolibarr_mailing_limit_sendbyweb
|
||||
// Can set a limit for mailing send by web. Can be used for a restricted mode.
|
||||
// Default value: 0 (use database value if exist)
|
||||
// Examples:
|
||||
// Can set a limit for mailing send by web. This overwrite database value. Can be used to restrict on OS level.
|
||||
// Default value: '0' (no overwrite, use database value if exists)
|
||||
// Examples: '-1' (sending by web is forbidden)
|
||||
// $dolibarr_mailing_limit_sendbyweb='0';
|
||||
|
||||
// dolibarr_mailing_limit_sendbycli
|
||||
// Can set a limit for mailing send by cli. This overwrite database value. Can be used to restrict on OS level.
|
||||
// Default value: '0' (no overwrite, use database value if exists)
|
||||
// Examples: '-1' (sending by cli is forbidden)
|
||||
// $dolibarr_mailing_limit_sendbyweb='0';
|
||||
|
||||
// dolibarr_strict_mode
|
||||
|
||||
@@ -39,7 +39,7 @@ $confirm = GETPOST('confirm', 'alpha');
|
||||
|
||||
// Security check
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'contact', $id, '','');
|
||||
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe');
|
||||
|
||||
// Get parameters
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
|
||||
@@ -364,6 +364,7 @@ if ($result)
|
||||
$param ='&begin='.urlencode($begin).'&view='.urlencode($view).'&userid='.urlencode($userid).'&contactname='.urlencode($sall);
|
||||
$param.='&type='.urlencode($type).'&view='.urlencode($view).'&search_lastname='.urlencode($search_lastname).'&search_firstname='.urlencode($search_firstname).'&search_societe='.urlencode($search_societe).'&search_email='.urlencode($search_email);
|
||||
if (!empty($search_categ)) $param.='&search_categ='.urlencode($search_categ);
|
||||
if ($sall != '') $param.='&sall='.urlencode($sall);
|
||||
if ($search_lastname != '') $param.='&search_lastname='.urlencode($search_lastname);
|
||||
if ($search_firstname != '') $param.='&search_firstname='.urlencode($search_firstname);
|
||||
if ($search_zip != '') $param.='&search_zip='.urlencode($search_zip);
|
||||
|
||||
@@ -56,7 +56,7 @@ class Contrat extends CommonObject
|
||||
* @var string
|
||||
*/
|
||||
var $ref_customer;
|
||||
|
||||
|
||||
/**
|
||||
* Supplier reference of the contract
|
||||
* @var string
|
||||
@@ -536,7 +536,7 @@ class Contrat extends CommonObject
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load a contract from database
|
||||
*
|
||||
@@ -1134,6 +1134,16 @@ class Contrat extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
// Removed extrafields
|
||||
if (! $error) {
|
||||
$result=$this->deleteExtraFields();
|
||||
if ($result < 0)
|
||||
{
|
||||
$error++;
|
||||
dol_syslog(get_class($this)."::delete error -3 ".$this->error, LOG_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
// We remove directory
|
||||
@@ -1333,7 +1343,7 @@ class Contrat extends CommonObject
|
||||
|
||||
$localtaxes_type=getLocalTaxesFromRate($txtva, 0, $this->societe, $mysoc);
|
||||
$txtva = preg_replace('/\s*\(.*\)/','',$txtva); // Remove code into vatrate.
|
||||
|
||||
|
||||
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, 1,$mysoc, $localtaxes_type);
|
||||
$total_ht = $tabprice[0];
|
||||
$total_tva = $tabprice[1];
|
||||
@@ -1356,9 +1366,9 @@ class Contrat extends CommonObject
|
||||
|
||||
if (empty($pa_ht)) $pa_ht=0;
|
||||
|
||||
|
||||
|
||||
// if buy price not defined, define buyprice as configured in margin admin
|
||||
if ($this->pa_ht == 0)
|
||||
if ($this->pa_ht == 0)
|
||||
{
|
||||
if (($result = $this->defineBuyPrice($pu_ht, $remise_percent, $fk_product)) < 0)
|
||||
{
|
||||
@@ -1515,7 +1525,7 @@ class Contrat extends CommonObject
|
||||
|
||||
$localtaxes_type=getLocalTaxesFromRate($tvatx, 0, $this->societe, $mysoc);
|
||||
$tvatx = preg_replace('/\s*\(.*\)/','',$tvatx); // Remove code into vatrate.
|
||||
|
||||
|
||||
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $tvatx, $localtax1tx, $localtax2tx, 0, $price_base_type, $info_bits, 1, $mysoc, $localtaxes_type);
|
||||
$total_ht = $tabprice[0];
|
||||
$total_tva = $tabprice[1];
|
||||
@@ -1539,7 +1549,7 @@ class Contrat extends CommonObject
|
||||
if (empty($pa_ht)) $pa_ht=0;
|
||||
|
||||
// if buy price not defined, define buyprice as configured in margin admin
|
||||
if ($this->pa_ht == 0)
|
||||
if ($this->pa_ht == 0)
|
||||
{
|
||||
if (($result = $this->defineBuyPrice($pu_ht, $remise_percent)) < 0)
|
||||
{
|
||||
@@ -1591,8 +1601,8 @@ class Contrat extends CommonObject
|
||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($array_options) && count($array_options)>0) // For avoid conflicts if trigger used
|
||||
{
|
||||
$contractline = new ContratLigne($this->db);
|
||||
$contractline->array_options=$array_option;
|
||||
$contractline->id= $this->db->last_insert_id(MAIN_DB_PREFIX.$contractline->table_element);
|
||||
$contractline->array_options=$array_options;
|
||||
$contractline->id= $rowid;
|
||||
$result=$contractline->insertExtraFields();
|
||||
if ($result < 0)
|
||||
{
|
||||
@@ -2571,7 +2581,7 @@ class ContratLigne extends CommonObjectLine
|
||||
if (empty($this->pa_ht)) $this->pa_ht=0;
|
||||
|
||||
// if buy price not defined, define buyprice as configured in margin admin
|
||||
if ($this->pa_ht == 0)
|
||||
if ($this->pa_ht == 0)
|
||||
{
|
||||
if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0)
|
||||
{
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Claudio Aschieri <c.aschieri@19.coop>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -222,6 +223,7 @@ if ($resql)
|
||||
$param.='&search_name='.$search_name;
|
||||
$param.='&search_ref_supplier='.$search_ref_supplier;
|
||||
$param.='&search_sale=' .$search_sale;
|
||||
if ($sall != '') $param.='&sall='.$sall;
|
||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||
|
||||
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "c.rowid","","$param",'',$sortfield,$sortorder);
|
||||
|
||||
@@ -80,11 +80,11 @@ if(! empty($_POST['removAll']))
|
||||
{
|
||||
$pathtodelete = $value;
|
||||
$filetodelete = $listofnames[$key];
|
||||
$result = dol_delete_file($pathtodelete,1); // Delete uploded Files
|
||||
|
||||
$result = dol_delete_file($pathtodelete,1); // Delete uploded Files
|
||||
|
||||
$langs->load("other");
|
||||
setEventMessages($langs->trans("FileWasRemoved",$filetodelete), null, 'mesgs');
|
||||
|
||||
|
||||
$formmail->remove_attached_files($key); // Update Session
|
||||
}
|
||||
}
|
||||
@@ -117,29 +117,29 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
|
||||
$dolimail = new Dolimail($db);
|
||||
$possibleaccounts=$dolimail->get_societe_by_email($_POST['sendto'],"1");
|
||||
$possibleuser=$dolimail->get_from_user_by_mail($_POST['sendto'],"1"); // suche in llx_societe and socpeople
|
||||
if (!$possibleaccounts && !$possibleuser)
|
||||
if (!$possibleaccounts && !$possibleuser)
|
||||
{
|
||||
setEventMessages($langs->trans('ErrorFailedToFindSocieteRecord',$_POST['sendto']), null, 'errors');
|
||||
}
|
||||
elseif (count($possibleaccounts)>1)
|
||||
elseif (count($possibleaccounts)>1)
|
||||
{
|
||||
$sendtosocid=$possibleaccounts[1]['id'];
|
||||
$result=$object->fetch($sendtosocid);
|
||||
|
||||
|
||||
setEventMessages($langs->trans('ErrorFoundMoreThanOneRecordWithEmail',$_POST['sendto'],$object->name), null, 'mesgs');
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
if($possibleaccounts){
|
||||
if($possibleaccounts){
|
||||
$sendtosocid=$possibleaccounts[1]['id'];
|
||||
$result=$object->fetch($sendtosocid);
|
||||
}elseif($possibleuser){
|
||||
}elseif($possibleuser){
|
||||
$sendtosocid=$possibleuser[0]['id'];
|
||||
|
||||
$result=$uobject->fetch($sendtosocid);
|
||||
$object=$uobject;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -236,35 +236,35 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
|
||||
$mailboxconfig = new IMAP($db);
|
||||
$mailboxconfig->fetch($mbid);
|
||||
if ($mailboxconfig->mailbox_imap_host) $ref=$mailboxconfig->get_ref();
|
||||
|
||||
|
||||
$mailboxconfig->folder_id=$mailboxconfig->mailbox_imap_outbox;
|
||||
$mailboxconfig->userfolder_fetch();
|
||||
|
||||
|
||||
if ($mailboxconfig->mailbox_save_sent_mails == 1)
|
||||
{
|
||||
|
||||
|
||||
$folder=str_replace($ref, '', $mailboxconfig->folder_cache_key);
|
||||
if (!$folder) $folder = "Sent"; // Default Sent folder
|
||||
|
||||
|
||||
$mailboxconfig->mbox = imap_open($mailboxconfig->get_connector_url().$folder, $mailboxconfig->mailbox_imap_login, $mailboxconfig->mailbox_imap_password);
|
||||
if (FALSE === $mailboxconfig->mbox)
|
||||
if (FALSE === $mailboxconfig->mbox)
|
||||
{
|
||||
$info = FALSE;
|
||||
$err = $langs->trans('Error3_Imap_Connection_Error');
|
||||
setEventMessages($err,$mailboxconfig->element, null, 'errors');
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
$mailboxconfig->mailboxid=$_POST['frommail'];
|
||||
$mailboxconfig->foldername=$folder;
|
||||
$from = $mailfromid[0] . $mailfromid[2];
|
||||
$imap=1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Send mail
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
||||
$mailfile = new CMailFile($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,$sendtobcc,$deliveryreceipt,-1,'','',$trackid);
|
||||
@@ -278,7 +278,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
|
||||
if ($result)
|
||||
{
|
||||
$error=0;
|
||||
|
||||
|
||||
// FIXME This must be moved into a trigger for action $trigger_name
|
||||
if (! empty($conf->dolimail->enabled))
|
||||
{
|
||||
@@ -289,13 +289,13 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
|
||||
$dolimail=new DoliMail($db);
|
||||
$dolimail->id = $mid;
|
||||
$res=$dolimail->set_prop($user, 'answered',1);
|
||||
}
|
||||
}
|
||||
if ($imap==1)
|
||||
{
|
||||
// write mail to IMAP Server
|
||||
$movemail = $mailboxconfig->putMail($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,$folder,$deliveryreceipt,$mailfile);
|
||||
$movemail = $mailboxconfig->putMail($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,$folder,$deliveryreceipt,$mailfile);
|
||||
if ($movemail) setEventMessages($langs->trans("MailMovedToImapFolder",$folder), null, 'mesgs');
|
||||
else setEventMessages($langs->trans("MailMovedToImapFolder_Warning",$folder), null, 'warnings');
|
||||
else setEventMessages($langs->trans("MailMovedToImapFolder_Warning",$folder), null, 'warnings');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
|
||||
$interface=new Interfaces($db);
|
||||
$result=$interface->run_triggers($trigger_name,$object,$user,$langs,$conf);
|
||||
if ($result < 0) {
|
||||
$error++; $this->errors=$interface->errors;
|
||||
$error++; $errors=$interface->errors;
|
||||
}
|
||||
// End call of triggers
|
||||
|
||||
@@ -327,8 +327,8 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
|
||||
// This avoid sending mail twice if going out and then back to page
|
||||
$mesg=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2));
|
||||
setEventMessages($mesg, null, 'mesgs');
|
||||
if($conf->dolimail->enabled) header('Location: '.$_SERVER["PHP_SELF"].'?'.($paramname?$paramname:'id').'='.$object->id.'&'.($paramname2?$paramname2:'mid').'='.$parm2val);
|
||||
else header('Location: '.$_SERVER["PHP_SELF"].'?'.($paramname?$paramname:'id').'='.$object->id);
|
||||
if ($conf->dolimail->enabled) header('Location: '.$_SERVER["PHP_SELF"].'?'.($paramname?$paramname:'id').'='.$object->id.'&'.($paramname2?$paramname2:'mid').'='.$parm2val);
|
||||
else header('Location: '.$_SERVER["PHP_SELF"].'?'.($paramname?$paramname:'id').'='.$object->id);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2012-2014 Charles-François BENKE <charles.fr@benke.fr>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
* Copyright (C) 2016 Juan José Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -79,8 +80,10 @@ class box_project extends ModeleBoxes
|
||||
|
||||
$sql = "SELECT p.rowid, p.ref, p.title, p.fk_statut ";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
|
||||
if($user->socid) $sql.= " INNER JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid=p.fk_soc";
|
||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||
$sql.= " AND p.fk_statut = 1"; // Seulement les projets ouverts
|
||||
if($user->socid) $sql.= " AND s.rowid = ".$user->socid;
|
||||
$sql.= " AND p.fk_statut = 1"; // Seulement les projets ouverts
|
||||
$sql.= " ORDER BY p.datec DESC";
|
||||
$sql.= $db->plimit($max, 0);
|
||||
|
||||
|
||||
@@ -143,6 +143,8 @@ class CMailFile
|
||||
$this->msgishtml = $msgishtml;
|
||||
}
|
||||
|
||||
if (! empty($conf->global->MAIN_MAIL_FORCE_CONTENT_TYPE_TO_HTML)) $this->msgishtml=1; // To force to send everything with content type html.
|
||||
|
||||
// Detect images
|
||||
if ($this->msgishtml)
|
||||
{
|
||||
@@ -366,7 +368,7 @@ class CMailFile
|
||||
*/
|
||||
function sendfile()
|
||||
{
|
||||
global $conf,$db;
|
||||
global $conf,$db,$langs;
|
||||
|
||||
$errorlevel=error_reporting();
|
||||
error_reporting($errorlevel ^ E_WARNING); // Desactive warnings
|
||||
@@ -388,7 +390,31 @@ class CMailFile
|
||||
|
||||
return $reshook;
|
||||
}
|
||||
|
||||
|
||||
// Check number of recipient is lower or equal than MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL
|
||||
if (empty($conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL)) $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL=10;
|
||||
$tmparray = explode(',', $this->addr_to);
|
||||
if (count($tmparray) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL)
|
||||
{
|
||||
$this->error = 'Too much recipients in to:';
|
||||
dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING);
|
||||
return false;
|
||||
}
|
||||
$tmparray = explode(',', $this->addr_cc);
|
||||
if (count($tmparray) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL)
|
||||
{
|
||||
$this->error = 'Too much recipients in cc:';
|
||||
dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING);
|
||||
return false;
|
||||
}
|
||||
$tmparray = explode(',', $this->addr_bcc);
|
||||
if (count($tmparray) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL)
|
||||
{
|
||||
$this->error = 'Too much recipients in bcc:';
|
||||
dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Action according to choosed sending method
|
||||
if ($conf->global->MAIN_MAIL_SENDMODE == 'mail')
|
||||
{
|
||||
@@ -417,8 +443,6 @@ class CMailFile
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog("CMailFile::sendfile: mail start HOST=".ini_get('SMTP').", PORT=".ini_get('smtp_port'), LOG_DEBUG);
|
||||
|
||||
$bounce = ''; // By default
|
||||
if (! empty($conf->global->MAIN_MAIL_ALLOW_SENDMAIL_F))
|
||||
{
|
||||
@@ -431,7 +455,8 @@ class CMailFile
|
||||
{
|
||||
$bounce .= ($bounce?' ':'').'-ba';
|
||||
}
|
||||
|
||||
dol_syslog("CMailFile::sendfile: mail start HOST=".ini_get('SMTP').", PORT=".ini_get('smtp_port').", additionnal_parameters=".$bounce, LOG_DEBUG);
|
||||
|
||||
$this->message=stripslashes($this->message);
|
||||
|
||||
if (! empty($conf->global->MAIN_MAIL_DEBUG)) $this->dump_mail();
|
||||
@@ -449,7 +474,8 @@ class CMailFile
|
||||
{
|
||||
$this->error.=" to HOST=".ini_get('SMTP').", PORT=".ini_get('smtp_port'); // This values are value used only for non linuxlike systems
|
||||
}
|
||||
$this->error.=".<br>Check your server logs and your firewalls setup";
|
||||
$this->error.=".<br>";
|
||||
$this->error.=$langs->trans("ErrorPhpMailDelivery");
|
||||
dol_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_ERR);
|
||||
}
|
||||
else
|
||||
@@ -680,7 +706,7 @@ class CMailFile
|
||||
global $conf;
|
||||
$out = "";
|
||||
|
||||
$host = dol_getprefix();
|
||||
$host = dol_getprefix('email');
|
||||
|
||||
// Sender
|
||||
//$out.= "Sender: ".getValidAddress($this->addr_from,2)).$this->eol2;
|
||||
@@ -798,8 +824,9 @@ class CMailFile
|
||||
$strContent = preg_replace("/\r\n/si", "\n", $strContent);
|
||||
}
|
||||
|
||||
//$strContent = rtrim(chunk_split($strContent)); // Function chunck_split seems bugged
|
||||
$strContent = rtrim(wordwrap($strContent));
|
||||
// Make RFC2045 Compliant, split lines
|
||||
//$strContent = rtrim(chunk_split($strContent)); // Function chunck_split seems ko if not used on a base64 content
|
||||
$strContent = rtrim(wordwrap($strContent)); // TODO Using this method creates unexpected line break on text/plain content.
|
||||
|
||||
if ($this->msgishtml)
|
||||
{
|
||||
|
||||
@@ -35,8 +35,8 @@ abstract class CommonDocGenerator
|
||||
{
|
||||
var $error='';
|
||||
protected $db;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
@@ -59,6 +59,8 @@ abstract class CommonDocGenerator
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$logotouse=$conf->user->dir_output.'/'.get_exdir($user->id, 2, 0, 1, $user, 'user').'/'.$user->photo;
|
||||
|
||||
return array(
|
||||
'myuser_lastname'=>$user->lastname,
|
||||
'myuser_firstname'=>$user->firstname,
|
||||
@@ -75,7 +77,7 @@ abstract class CommonDocGenerator
|
||||
'myuser_fax'=>$user->office_fax,
|
||||
'myuser_mobile'=>$user->user_mobile,
|
||||
'myuser_email'=>$user->email,
|
||||
'myuser_logo'=>$user->photo,
|
||||
'myuser_logo'=>$logotouse,
|
||||
'myuser_job'=>$user->job,
|
||||
'myuser_web'=>'' // url not exist in $user object
|
||||
);
|
||||
@@ -390,7 +392,7 @@ abstract class CommonDocGenerator
|
||||
// Add vat by rates
|
||||
foreach ($object->lines as $line)
|
||||
{
|
||||
// $line->tva_tx format depends on database field accuraty, no reliable. This is kept for backward comaptibility
|
||||
// $line->tva_tx format depends on database field accuraty, no reliable. This is kept for backward comaptibility
|
||||
if (empty($resarray[$array_key.'_total_vat_'.$line->tva_tx])) $resarray[$array_key.'_total_vat_'.$line->tva_tx]=0;
|
||||
$resarray[$array_key.'_total_vat_'.$line->tva_tx]+=$line->total_tva;
|
||||
$resarray[$array_key.'_total_vat_locale_'.$line->tva_tx]=price($resarray[$array_key.'_total_vat_'.$line->tva_tx]);
|
||||
@@ -582,7 +584,7 @@ abstract class CommonDocGenerator
|
||||
$object->array_options['options_'.$key] = $extrafields->attribute_param[$key]['options'][$object->array_options['options_'.$key]];
|
||||
}
|
||||
else if($extrafields->attribute_type[$key] == 'date')
|
||||
{
|
||||
{
|
||||
if (strlen($object->array_options['options_'.$key])>0)
|
||||
{
|
||||
$object->array_options['options_'.$key] = dol_print_date($object->array_options['options_'.$key],'day'); // using company output language
|
||||
|
||||
@@ -448,7 +448,7 @@ abstract class CommonObject
|
||||
global $conf, $langs;
|
||||
|
||||
$countriesusingstate=array('AU','US','IN','GB','ES','UK','TR'); // See also option MAIN_FORCE_STATE_INTO_ADDRESS
|
||||
|
||||
|
||||
$contactid=0;
|
||||
$thirdpartyid=0;
|
||||
if ($this->element == 'societe')
|
||||
@@ -465,12 +465,12 @@ abstract class CommonObject
|
||||
$contactid=$this->contact_id;
|
||||
$thirdpartyid=$object->fk_soc;
|
||||
}
|
||||
|
||||
|
||||
$out='<!-- BEGIN part to show address block -->';
|
||||
|
||||
|
||||
$outdone=0;
|
||||
$coords = $this->getFullAddress(1,', ');
|
||||
if ($coords)
|
||||
if ($coords)
|
||||
{
|
||||
if (! empty($conf->use_javascript_ajax))
|
||||
{
|
||||
@@ -485,7 +485,7 @@ abstract class CommonObject
|
||||
}
|
||||
|
||||
if (! in_array($this->country_code,$countriesusingstate) && empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS) // If MAIN_FORCE_STATE_INTO_ADDRESS is on, state is already returned previously with getFullAddress
|
||||
&& empty($conf->global->SOCIETE_DISABLE_STATE) && $this->state)
|
||||
&& empty($conf->global->SOCIETE_DISABLE_STATE) && $this->state)
|
||||
{
|
||||
$out.=($outdone?' - ':'').$this->state;
|
||||
$outdone++;
|
||||
@@ -516,15 +516,15 @@ abstract class CommonObject
|
||||
if (! empty($this->office_fax)) {
|
||||
$out.=dol_print_phone($this->fax,$this->country_code,$contactid,$thirdpartyid,'AC_FAX',' ','fax',$langs->trans("Fax")); $outdone++;
|
||||
}
|
||||
|
||||
|
||||
$out.='<div style="clear: both;"></div>';
|
||||
$outdone=0;
|
||||
if (! empty($this->email))
|
||||
if (! empty($this->email))
|
||||
{
|
||||
$out.=dol_print_email($this->email,$this->id,$object->id,'AC_EMAIL',0,0,1);
|
||||
$outdone++;
|
||||
}
|
||||
if (! empty($this->url))
|
||||
if (! empty($this->url))
|
||||
{
|
||||
$out.=dol_print_url($this->url,'',0,1);
|
||||
$outdone++;
|
||||
@@ -535,12 +535,12 @@ abstract class CommonObject
|
||||
if ($this->skype) $out.=dol_print_skype($this->skype,$this->id,$object->id,'AC_SKYPE');
|
||||
$outdone++;
|
||||
}
|
||||
|
||||
|
||||
$out.='<!-- END Part to show address block -->';
|
||||
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add a link between element $this->element and a contact
|
||||
*
|
||||
@@ -595,50 +595,56 @@ abstract class CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
$datecreate = dol_now();
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Insertion dans la base
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."element_contact";
|
||||
$sql.= " (element_id, fk_socpeople, datecreate, statut, fk_c_type_contact) ";
|
||||
$sql.= " VALUES (".$this->id.", ".$fk_socpeople." , " ;
|
||||
$sql.= "'".$this->db->idate($datecreate)."'";
|
||||
$sql.= ", 4, '". $id_type_contact . "' ";
|
||||
$sql.= ")";
|
||||
dol_syslog(get_class($this)."::add_contact", LOG_DEBUG);
|
||||
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
if (! $notrigger)
|
||||
{
|
||||
$result=$this->call_trigger(strtoupper($this->element).'_ADD_CONTACT', $user);
|
||||
if ($result < 0)
|
||||
{
|
||||
$this->db->rollback();
|
||||
if(! empty($id_type_contact)) {
|
||||
|
||||
$datecreate = dol_now();
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Insertion dans la base
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."element_contact";
|
||||
$sql.= " (element_id, fk_socpeople, datecreate, statut, fk_c_type_contact) ";
|
||||
$sql.= " VALUES (".$this->id.", ".$fk_socpeople." , " ;
|
||||
$sql.= "'".$this->db->idate($datecreate)."'";
|
||||
$sql.= ", 4, ". $id_type_contact . " ";
|
||||
$sql.= ")";
|
||||
dol_syslog(get_class($this)."::add_contact", LOG_DEBUG);
|
||||
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
if (! $notrigger)
|
||||
{
|
||||
$result=$this->call_trigger(strtoupper($this->element).'_ADD_CONTACT', $user);
|
||||
if ($result < 0)
|
||||
{
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS')
|
||||
{
|
||||
$this->error=$this->db->errno();
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->error();
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS')
|
||||
{
|
||||
$this->error=$this->db->errno();
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->error();
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1196,7 +1202,7 @@ abstract class CommonObject
|
||||
if (!empty($id) && !empty($field) && !empty($table)) {
|
||||
$sql = "SELECT ".$field." FROM ".MAIN_DB_PREFIX.$table;
|
||||
$sql.= " WHERE rowid = ".$id;
|
||||
|
||||
|
||||
dol_syslog(get_class($this).'::getValueFrom', LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
@@ -2275,8 +2281,8 @@ abstract class CommonObject
|
||||
* - all parameters empty -> we look all link to current object (current object can be source or target)
|
||||
* - one couple id+type is provided -> this will set $justsource or $justtarget
|
||||
* - one couple id+type is provided and other type is provided -> this will set $justsource or $justtarget + criteria on other type
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param int $sourceid Object source id (if not defined, id of object)
|
||||
* @param string $sourcetype Object source type (if not defined, element name of object)
|
||||
* @param int $targetid Object target id (if not defined, id of object)
|
||||
@@ -3223,7 +3229,7 @@ abstract class CommonObject
|
||||
$text.= ' - '.(! empty($line->label)?$line->label:$label);
|
||||
$description.=(! empty($conf->global->PRODUIT_DESC_IN_FORM)?'':dol_htmlentitiesbr($line->description)); // Description is what to show on popup. We shown nothing if already into desc.
|
||||
}
|
||||
|
||||
|
||||
$line->pu_ttc = price2num($line->subprice * (1 + ($line->tva_tx/100)), 'MU');
|
||||
|
||||
// Output template part (modules that overwrite templates must declare this into descriptor)
|
||||
@@ -3662,7 +3668,7 @@ abstract class CommonObject
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// We save charset_output to restore it because write_file can change it if needed for
|
||||
// output format that does not support UTF8.
|
||||
$sav_charset_output=$outputlangs->charset_output;
|
||||
@@ -3726,13 +3732,13 @@ abstract class CommonObject
|
||||
/* For default values */
|
||||
|
||||
/**
|
||||
* Return the default value to use for a field when showing the create form of object.
|
||||
* Return the default value to use for a field when showing the create form of object.
|
||||
* Return values in this order:
|
||||
* 1) If parameter is available into POST, we return it first.
|
||||
* 2) If not but an alternate value was provided as parameter of function, we return it.
|
||||
* 3) If not but a constant $conf->global->OBJECTELEMENT_FIELDNAME is set, we return it (It is better to use the dedicated table).
|
||||
* 3) If not but a constant $conf->global->OBJECTELEMENT_FIELDNAME is set, we return it (It is better to use the dedicated table).
|
||||
* 4) Return value found into database (TODO No yet implemented)
|
||||
*
|
||||
*
|
||||
* @param string $fieldname Name of field
|
||||
* @param string $alternatevalue Alternate value to use
|
||||
* @return string Default value
|
||||
@@ -3743,27 +3749,27 @@ abstract class CommonObject
|
||||
|
||||
// If param is has been posted with use this value first.
|
||||
if (isset($_POST[$fieldname])) return GETPOST($fieldname, 2);
|
||||
|
||||
|
||||
if (isset($alternatevalue)) return $alternatevalue;
|
||||
|
||||
|
||||
$newelement=$this->element;
|
||||
if ($newelement == 'facture') $newelement='invoice';
|
||||
if ($newelement == 'commande') $newelement='order';
|
||||
if (empty($newelement))
|
||||
if (empty($newelement))
|
||||
{
|
||||
dol_syslog("Ask a default value using common method getDefaultCreateValueForField on an object with no property ->element defined. Return empty string.", LOG_WARNING);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
$keyforfieldname=strtoupper($newelement.'_DEFAULT_'.$fieldname);
|
||||
//var_dump($keyforfieldname);
|
||||
if (isset($conf->global->$keyforfieldname)) return $conf->global->$keyforfieldname;
|
||||
|
||||
// TODO Ad here a scan into table llx_overwrite_default with a filter on $this->element and $fieldname
|
||||
|
||||
|
||||
// TODO Ad here a scan into table llx_overwrite_default with a filter on $this->element and $fieldname
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* For triggers */
|
||||
|
||||
|
||||
@@ -3963,7 +3969,7 @@ abstract class CommonObject
|
||||
{
|
||||
$res=$object->fetch(0,$value);
|
||||
if ($res > 0) $this->array_options[$key]=$object->id;
|
||||
else
|
||||
else
|
||||
{
|
||||
$this->error="Ref '".$value."' for object '".$object->element."' not found";
|
||||
$this->db->rollback();
|
||||
@@ -4196,25 +4202,25 @@ abstract class CommonObject
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* define buy price if not defined
|
||||
* set buy price = sell price if ForceBuyingPriceIfNull configured,
|
||||
* else if calculation MARGIN_TYPE = 'pmp' and pmp is calculated, set pmp as buyprice
|
||||
* else set min buy price as buy price
|
||||
*
|
||||
*
|
||||
* @param float $unitPrice product unit price
|
||||
* @param float $discountPercent line discount percent
|
||||
* @param int $fk_product product id
|
||||
*
|
||||
* @return float <0 if ko, buyprice if ok
|
||||
*/
|
||||
public function defineBuyPrice($unitPrice = 0, $discountPercent = 0, $fk_product = 0)
|
||||
public function defineBuyPrice($unitPrice = 0, $discountPercent = 0, $fk_product = 0)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
|
||||
$buyPrice = 0;
|
||||
|
||||
|
||||
if (($unitPrice > 0) && (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1))
|
||||
{
|
||||
$buyPrice = $unitPrice * (1 - $discountPercent / 100);
|
||||
|
||||
@@ -108,7 +108,7 @@ class DolEditor
|
||||
// Dolibarr utilise toujours liens avec modulepart='fckeditor' quelque soit modulepart.
|
||||
// Ou se trouve donc cette valeur /viewimage.php?modulepart=fckeditor&file=' ?
|
||||
$modulepart='fckeditor';
|
||||
$this->editor->Config['UserFilesPath'] = '/viewimage.php?modulepart='.$modulepart.'&file=';
|
||||
$this->editor->Config['UserFilesPath'] = '/viewimage.php?modulepart='.$modulepart.'&entity='.$conf->entity.'&file=';
|
||||
$this->editor->Config['UserFilesAbsolutePath'] = DOL_DATA_ROOT.'/'.$modulepart.'/' ;
|
||||
|
||||
$this->editor->Config['LinkBrowser']=($uselocalbrowser?'true':'false');
|
||||
|
||||
@@ -675,7 +675,7 @@ class ExtraFields
|
||||
if ($showsize > 48) $showsize=48;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (in_array($type,array('date','datetime')))
|
||||
{
|
||||
$tmp=explode(',',$size);
|
||||
@@ -729,7 +729,7 @@ class ExtraFields
|
||||
}
|
||||
elseif ($type == 'price')
|
||||
{
|
||||
$out='<input type="text" class="flat" name="'.$keysuffix.'options_'.$key.$keyprefix.'" size="6" value="'.price($value).'" '.($moreparam?$moreparam:'').'> '.$langs->getCurrencySymbol($conf->currency);
|
||||
$out='<input type="text" class="flat" name="'.$keysuffix.'options_'.$key.$keyprefix.'" size="6" value="'.price2num($value).'" '.($moreparam?$moreparam:'').'> '.$langs->getCurrencySymbol($conf->currency);
|
||||
}
|
||||
elseif ($type == 'double')
|
||||
{
|
||||
@@ -812,7 +812,7 @@ class ExtraFields
|
||||
if (strpos($InfoFieldList[4], '$SEL$')!==false) {
|
||||
$InfoFieldList[4]=str_replace('$SEL$','SELECT',$InfoFieldList[4]);
|
||||
}
|
||||
|
||||
|
||||
// current object id can be use into filter
|
||||
if (strpos($InfoFieldList[4], '$ID$')!==false && !empty($objectid)) {
|
||||
$InfoFieldList[4]=str_replace('$ID$',$objectid,$InfoFieldList[4]);
|
||||
@@ -830,14 +830,14 @@ class ExtraFields
|
||||
$sqlwhere.= ' WHERE '.$InfoFieldList[4];
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
$sqlwhere.= ' WHERE 1=1';
|
||||
}
|
||||
// Some tables may have field, some other not. For the moment we disable it.
|
||||
if (in_array($InfoFieldList[0],array('tablewithentity')))
|
||||
if (in_array($InfoFieldList[0],array('tablewithentity')))
|
||||
{
|
||||
$sqlwhere.= ' AND entity = '.$conf->entity;
|
||||
$sqlwhere.= ' AND entity = '.$conf->entity;
|
||||
}
|
||||
$sql.=$sqlwhere;
|
||||
//print $sql;
|
||||
@@ -996,19 +996,19 @@ class ExtraFields
|
||||
$sql = 'SELECT ' . $keyList;
|
||||
$sql .= ' FROM ' . MAIN_DB_PREFIX . $InfoFieldList[0];
|
||||
if (! empty($InfoFieldList[4])) {
|
||||
|
||||
|
||||
// can use SELECT request
|
||||
if (strpos($InfoFieldList[4], '$SEL$')!==false) {
|
||||
$InfoFieldList[4]=str_replace('$SEL$','SELECT',$InfoFieldList[4]);
|
||||
}
|
||||
|
||||
|
||||
// current object id can be use into filter
|
||||
if (strpos($InfoFieldList[4], '$ID$')!==false && !empty($objectid)) {
|
||||
$InfoFieldList[4]=str_replace('$ID$',$objectid,$InfoFieldList[4]);
|
||||
} else {
|
||||
$InfoFieldList[4]=str_replace('$ID$','0',$InfoFieldList[4]);
|
||||
}
|
||||
|
||||
|
||||
// We have to join on extrafield table
|
||||
if (strpos($InfoFieldList[4], 'extra') !== false) {
|
||||
$sql .= ' as main, ' . MAIN_DB_PREFIX . $InfoFieldList[0] . '_extrafields as extra';
|
||||
@@ -1020,13 +1020,13 @@ class ExtraFields
|
||||
$sqlwhere .= ' WHERE 1=1';
|
||||
}
|
||||
// Some tables may have field, some other not. For the moment we disable it.
|
||||
if (in_array($InfoFieldList[0], array ('tablewithentity')))
|
||||
if (in_array($InfoFieldList[0], array ('tablewithentity')))
|
||||
{
|
||||
$sqlwhere .= ' AND entity = ' . $conf->entity;
|
||||
}
|
||||
// $sql.=preg_replace('/^ AND /','',$sqlwhere);
|
||||
// print $sql;
|
||||
|
||||
|
||||
$sql .= $sqlwhere;
|
||||
dol_syslog(get_class($this) . '::showInputField type=chkbxlst',LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
@@ -1232,7 +1232,14 @@ class ExtraFields
|
||||
{
|
||||
$sql.= ' as main';
|
||||
}
|
||||
$sql.= " WHERE ".$selectkey."='".$this->db->escape($value)."'";
|
||||
if ($selectkey=='rowid' && empty($value)) {
|
||||
$sql.= " WHERE ".$selectkey."=0";
|
||||
} elseif ($selectkey=='rowid') {
|
||||
$sql.= " WHERE ".$selectkey."=".$this->db->escape($value);
|
||||
}else {
|
||||
$sql.= " WHERE ".$selectkey."='".$this->db->escape($value)."'";
|
||||
}
|
||||
|
||||
//$sql.= ' AND entity = '.$conf->entity;
|
||||
|
||||
dol_syslog(get_class($this).':showOutputField:$type=sellist', LOG_DEBUG);
|
||||
@@ -1391,10 +1398,10 @@ class ExtraFields
|
||||
$showsize=round($size);
|
||||
if ($showsize > 48) $showsize=48;
|
||||
}
|
||||
|
||||
|
||||
//print $type.'-'.$size;
|
||||
$out=$value;
|
||||
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
@@ -1411,7 +1418,7 @@ class ExtraFields
|
||||
$type=$this->attribute_type[$key];
|
||||
|
||||
$align='';
|
||||
|
||||
|
||||
if ($type == 'date')
|
||||
{
|
||||
$align="center";
|
||||
@@ -1440,10 +1447,10 @@ class ExtraFields
|
||||
{
|
||||
$align="center";
|
||||
}
|
||||
|
||||
|
||||
return $align;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return HTML string to print separator extrafield
|
||||
*
|
||||
@@ -1523,7 +1530,7 @@ class ExtraFields
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* return array_options array for object by extrafields value (using for data send by forms)
|
||||
*
|
||||
|
||||
@@ -135,13 +135,15 @@ class FormProjets
|
||||
// Search all projects
|
||||
$sql = 'SELECT p.rowid, p.ref, p.title, p.fk_soc, p.fk_statut, p.public';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX .'projet as p';
|
||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||
$sql.= " WHERE p.entity IN (".getEntity('project',1).")";
|
||||
if ($projectsListId !== false) $sql.= " AND p.rowid IN (".$projectsListId.")";
|
||||
if ($socid == 0) $sql.= " AND (p.fk_soc=0 OR p.fk_soc IS NULL)";
|
||||
if ($socid > 0) $sql.= " AND (p.fk_soc=".$socid." OR p.fk_soc IS NULL)";
|
||||
if (!empty($filterkey)) {
|
||||
$sql .= " AND p.title LIKE '%".$this->db->escape($filterkey)."%'";
|
||||
$sql .= " OR p.ref LIKE '%".$this->db->escape($filterkey)."%'";
|
||||
$sql .= ' AND (';
|
||||
$sql .= ' p.title LIKE "%'.$this->db->escape($filterkey).'%"';
|
||||
$sql .= ' OR p.ref LIKE "%'.$this->db->escape($filterkey).'%"';
|
||||
$sql .= ')';
|
||||
}
|
||||
$sql.= " ORDER BY p.ref ASC";
|
||||
|
||||
|
||||
@@ -1126,6 +1126,8 @@ class SMTPs
|
||||
$host=preg_replace('@tcp://@i','',$host); // Remove prefix
|
||||
$host=preg_replace('@ssl://@i','',$host); // Remove prefix
|
||||
|
||||
$host=dol_getprefix('email').'-'.$host;
|
||||
|
||||
//NOTE: Message-ID should probably contain the username of the user who sent the msg
|
||||
$_header .= 'Subject: ' . $this->getSubject() . "\r\n";
|
||||
$_header .= 'Date: ' . date("r") . "\r\n";
|
||||
@@ -1186,7 +1188,9 @@ class SMTPs
|
||||
// Make RFC821 Compliant, replace bare linefeeds
|
||||
$strContent = preg_replace("/(?<!\r)\n/si", "\r\n", $strContent);
|
||||
|
||||
$strContent = rtrim(wordwrap($strContent, 75, "\r\n"));
|
||||
// Make RFC2045 Compliant
|
||||
//$strContent = rtrim(chunk_split($strContent)); // Function chunck_split seems ko if not used on a base64 content
|
||||
$strContent = rtrim(wordwrap($strContent, 75, "\r\n")); // TODO Using this method creates unexpected line break on text/plain content.
|
||||
|
||||
$this->_msgContent[$strType] = array();
|
||||
|
||||
|
||||
@@ -439,7 +439,7 @@ class Translate
|
||||
if (! $found)
|
||||
{
|
||||
// Overwrite translation with database read
|
||||
$sql="SELECT transkey, transvalue FROM ".MAIN_DB_PREFIX."overwrite_trans where lang='".$this->defaultlang."'";
|
||||
$sql="SELECT transkey, transvalue FROM ".MAIN_DB_PREFIX."overwrite_trans where lang='".$db->escape($this->defaultlang)."'";
|
||||
$resql=$db->query($sql);
|
||||
|
||||
if ($resql)
|
||||
|
||||
@@ -1093,7 +1093,7 @@ class DoliDBPgsql extends DoliDB
|
||||
*/
|
||||
function DDLDropField($table,$field_name)
|
||||
{
|
||||
$sql= "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`";
|
||||
$sql= "ALTER TABLE ".$table." DROP COLUMN ".$field_name;
|
||||
dol_syslog($sql,LOG_DEBUG);
|
||||
if (! $this->query($sql))
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php
|
||||
|
||||
if (empty($keyforselect) || empty($keyforelement) || empty($keyforaliasextra))
|
||||
{
|
||||
@@ -15,36 +15,38 @@ if ($resql) // This can fail when class is used on old database (during migra
|
||||
{
|
||||
while ($obj=$this->db->fetch_object($resql))
|
||||
{
|
||||
$fieldname=$keyforaliasextra.'.'.$obj->name;
|
||||
$fieldlabel=ucfirst($obj->label);
|
||||
$typeFilter="Text";
|
||||
switch($obj->type)
|
||||
{
|
||||
case 'int':
|
||||
case 'double':
|
||||
case 'price':
|
||||
$typeFilter="Numeric";
|
||||
break;
|
||||
case 'date':
|
||||
case 'datetime':
|
||||
$typeFilter="Date";
|
||||
break;
|
||||
case 'boolean':
|
||||
$typeFilter="Boolean";
|
||||
break;
|
||||
case 'sellist':
|
||||
$tmp='';
|
||||
$tmpparam=unserialize($obj->param); // $tmp ay be array 'options' => array 'c_currencies:code_iso:code_iso' => null
|
||||
if ($tmpparam['options'] && is_array($tmpparam['options'])) {
|
||||
$tmpkeys=array_keys($tmpparam['options']);
|
||||
$tmp=array_shift($tmpkeys);
|
||||
}
|
||||
if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter="List:".$tmp;
|
||||
break;
|
||||
if ($obj->type!='separate') {
|
||||
$fieldname=$keyforaliasextra.'.'.$obj->name;
|
||||
$fieldlabel=ucfirst($obj->label);
|
||||
$typeFilter="Text";
|
||||
switch($obj->type)
|
||||
{
|
||||
case 'int':
|
||||
case 'double':
|
||||
case 'price':
|
||||
$typeFilter="Numeric";
|
||||
break;
|
||||
case 'date':
|
||||
case 'datetime':
|
||||
$typeFilter="Date";
|
||||
break;
|
||||
case 'boolean':
|
||||
$typeFilter="Boolean";
|
||||
break;
|
||||
case 'sellist':
|
||||
$tmp='';
|
||||
$tmpparam=unserialize($obj->param); // $tmp ay be array 'options' => array 'c_currencies:code_iso:code_iso' => null
|
||||
if ($tmpparam['options'] && is_array($tmpparam['options'])) {
|
||||
$tmpkeys=array_keys($tmpparam['options']);
|
||||
$tmp=array_shift($tmpkeys);
|
||||
}
|
||||
if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter="List:".$tmp;
|
||||
break;
|
||||
}
|
||||
$this->export_fields_array[$r][$fieldname]=$fieldlabel;
|
||||
$this->export_TypeFields_array[$r][$fieldname]=$typeFilter;
|
||||
$this->export_entities_array[$r][$fieldname]=$keyforelement;
|
||||
}
|
||||
$this->export_fields_array[$r][$fieldname]=$fieldlabel;
|
||||
$this->export_TypeFields_array[$r][$fieldname]=$typeFilter;
|
||||
$this->export_entities_array[$r][$fieldname]=$keyforelement;
|
||||
}
|
||||
}
|
||||
// End add axtra fields
|
||||
|
||||
@@ -44,7 +44,8 @@ $Config['Enabled'] = true ;
|
||||
|
||||
|
||||
// Path to user files relative to the document root.
|
||||
$Config['UserFilesPath'] = DOL_URL_ROOT.'/viewimage.php?modulepart=fckeditor&file=' ;
|
||||
$extEntity=(empty($entity) ? 1 : $entity); // For multicompany with external access
|
||||
$Config['UserFilesPath'] = DOL_URL_ROOT.'/viewimage.php?modulepart=fckeditor&entity='.$extEntity.'&file=' ;
|
||||
|
||||
// Fill the following value it you prefer to specify the absolute path for the
|
||||
// user files directory. Useful if you are using a virtual directory, symbolic
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011-2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -407,7 +408,7 @@ function dol_get_next_week($day, $week, $month, $year)
|
||||
{
|
||||
$tmparray = dol_get_first_day_week($day, $month, $year);
|
||||
|
||||
$time=dol_mktime(12,0,0,$month,$tmparray['first_day'],$year,1,0);
|
||||
$time=dol_mktime(12,0,0,$tmparray['first_month'],$tmparray['first_day'],$tmparray['first_year'],1,0);
|
||||
$time+=24*60*60*7;
|
||||
$tmparray=dol_getdate($time,true);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2013 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2014 Cédric GROSS <c.gross@kreiz-it.fr>
|
||||
@@ -286,10 +286,20 @@ function GETPOST($paramname,$check='',$method=0,$filter=NULL,$options=NULL)
|
||||
* This prefix is unique for instance and avoid conflict between multi-instances,
|
||||
* even when having two instances with one root dir or two instances in virtual servers
|
||||
*
|
||||
* @param string $mode '' or 'email'
|
||||
* @return string A calculated prefix
|
||||
*/
|
||||
function dol_getprefix()
|
||||
function dol_getprefix($mode='')
|
||||
{
|
||||
global $conf;
|
||||
|
||||
// If MAIL_PREFIX_FOR_EMAIL_ID is set and prefix is for email
|
||||
if ($mode == 'email' && ! empty($conf->global->MAIL_PREFIX_FOR_EMAIL_ID))
|
||||
{
|
||||
if ($conf->global->MAIL_PREFIX_FOR_EMAIL_ID != 'SERVER_NAME') return $conf->global->MAIL_PREFIX_FOR_EMAIL_ID;
|
||||
else if (isset($_SERVER["SERVER_NAME"])) return $_SERVER["SERVER_NAME"];
|
||||
}
|
||||
|
||||
if (isset($_SERVER["SERVER_NAME"]) && isset($_SERVER["DOCUMENT_ROOT"]))
|
||||
{
|
||||
return dol_hash($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"].DOL_DOCUMENT_ROOT.DOL_URL_ROOT);
|
||||
@@ -3320,7 +3330,7 @@ function price2num($amount,$rounding='',$alreadysqlnb=0)
|
||||
* @param float $vatrate Vat rate. Can be '8.5' or '8.5 (VATCODEX)' for example
|
||||
* @param int $local Local tax to search and return (1 or 2 return only tax rate 1 or tax rate 2)
|
||||
* @param Societe $thirdparty_buyer Object of buying third party
|
||||
* @param Societe $thirdparty_seller Object of selling third party
|
||||
* @param Societe $thirdparty_seller Object of selling third party ($mysoc if not defined)
|
||||
* @param int $vatnpr If vat rate is NPR or not
|
||||
* @return mixed 0 if not found, localtax rate if found
|
||||
* @see get_default_tva
|
||||
@@ -3336,7 +3346,7 @@ function get_localtax($vatrate, $local, $thirdparty_buyer="", $thirdparty_seller
|
||||
$vatratecleaned = $vatrate;
|
||||
if (preg_match('/^(.*)\s*\((.*)\)$/', $vatrate, $reg)) // If vat is "xx (yy)"
|
||||
{
|
||||
$vatratecleaned = $reg[1];
|
||||
$vatratecleaned = trim($reg[1]);
|
||||
$vatratecode = $reg[2];
|
||||
}
|
||||
|
||||
@@ -3350,7 +3360,7 @@ function get_localtax($vatrate, $local, $thirdparty_buyer="", $thirdparty_seller
|
||||
{
|
||||
if ($local == 1)
|
||||
{
|
||||
if (! $mysoc->localtax1_assuj) return 0;
|
||||
if (! $mysoc->localtax1_assuj || (string) $vatratecleaned == "0") return 0;
|
||||
if ($thirdparty_seller->id == $mysoc->id)
|
||||
{
|
||||
if (! $thirdparty_buyer->localtax1_assuj) return 0;
|
||||
@@ -3363,7 +3373,7 @@ function get_localtax($vatrate, $local, $thirdparty_buyer="", $thirdparty_seller
|
||||
|
||||
if ($local == 2)
|
||||
{
|
||||
if (! $mysoc->localtax2_assuj) return 0;
|
||||
if (! $mysoc->localtax2_assuj || (string) $vatratecleaned == "0") return 0;
|
||||
if ($thirdparty_seller->id == $mysoc->id)
|
||||
{
|
||||
if (! $thirdparty_buyer->localtax2_assuj) return 0;
|
||||
@@ -3379,18 +3389,15 @@ function get_localtax($vatrate, $local, $thirdparty_buyer="", $thirdparty_seller
|
||||
if ($local == 1 && ! $thirdparty_seller->localtax1_assuj) return 0;
|
||||
if ($local == 2 && ! $thirdparty_seller->localtax2_assuj) return 0;
|
||||
}
|
||||
//if ($local == 0 && ! $thirdparty_seller->localtax1_assuj && ! $thirdparty_seller->localtax2_assuj) return array('localtax1'=>0,'localtax2'=>0);
|
||||
|
||||
// Do not enabled this. We want localtax that match the vat rate.
|
||||
// If we forced a vat, we must also force local tax
|
||||
/*
|
||||
if (is_object($thirdparty_buyer))
|
||||
// For some country MAIN_GET_LOCALTAXES_VALUES_FROM_THIRDPARTY is forced to on.
|
||||
if (in_array($mysoc->country_code, array('ES')))
|
||||
{
|
||||
if ($thirdparty_seller->country_code != $thirdparty_buyer->country_code) return 0;
|
||||
}*/
|
||||
|
||||
$conf->global->MAIN_GET_LOCALTAXES_VALUES_FROM_THIRDPARTY = 1;
|
||||
}
|
||||
|
||||
// Search local taxes
|
||||
if ($mysoc->country_code == 'ES' || ! empty($conf->global->MAIN_GET_LOCALTAXES_VALUES_FROM_THIRDPARTY))
|
||||
if (! empty($conf->global->MAIN_GET_LOCALTAXES_VALUES_FROM_THIRDPARTY))
|
||||
{
|
||||
if ($local==1)
|
||||
{
|
||||
@@ -5195,7 +5202,7 @@ function printCommonFooter($zone='private')
|
||||
print 'window.console && console.log("';
|
||||
if (! empty($conf->global->MEMCACHED_SERVER)) print 'MEMCACHED_SERVER='.$conf->global->MEMCACHED_SERVER.' - ';
|
||||
print 'MAIN_OPTIMIZE_SPEED='.(isset($conf->global->MAIN_OPTIMIZE_SPEED)?$conf->global->MAIN_OPTIMIZE_SPEED:'off');
|
||||
if ($micro_start_time)
|
||||
if (! empty($micro_start_time)) // Works only if MAIN_SHOW_TUNING_INFO is defined at $_SERVER level. Not in global variable.
|
||||
{
|
||||
$micro_end_time = microtime(true);
|
||||
print ' - Build time: '.ceil(1000*($micro_end_time-$micro_start_time)).' ms';
|
||||
|
||||
@@ -1074,7 +1074,7 @@ function check_value($mask,$value)
|
||||
|
||||
// If an offset is asked
|
||||
if (! empty($reg[2]) && preg_match('/^\+/',$reg[2])) $maskoffset=preg_replace('/^\+/','',$reg[2]);
|
||||
if (! empty($reg[3]) && preg_match('^\+',$reg[3])) $maskoffset=preg_replace('/^\+/','',$reg[3]);
|
||||
if (! empty($reg[3]) && preg_match('/^\+/',$reg[3])) $maskoffset=preg_replace('/^\+/','',$reg[3]);
|
||||
|
||||
// Define $sqlwhere
|
||||
|
||||
@@ -1493,7 +1493,8 @@ function getListOfModels($db,$type,$maxfilenamelength=0)
|
||||
|
||||
/**
|
||||
* This function evaluates a string that should be a valid IPv4
|
||||
*
|
||||
* Note: For ip 169.254.0.0, it returns 0 with some PHP (5.6.24) and 2 with some minor patchs of PHP (5.6.25). See https://github.com/php/php-src/pull/1954.
|
||||
*
|
||||
* @param string $ip IP Address
|
||||
* @return int 0 if not valid or reserved range, 1 if valid and public IP, 2 if valid and private range IP
|
||||
*/
|
||||
|
||||
@@ -762,7 +762,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
|
||||
|
||||
// Time spent by user
|
||||
print '<td align="right">';
|
||||
$tmptimespent=$taskstatic->getSummaryOfTimeSpent();
|
||||
$tmptimespent=$taskstatic->getSummaryOfTimeSpent('', $fuser->id);
|
||||
if ($tmptimespent['total_duration']) print convertSecondToTime($tmptimespent['total_duration'],'allhourmin');
|
||||
else print '--:--';
|
||||
print "</td>\n";
|
||||
|
||||
@@ -278,7 +278,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this).'::verif_syntax codefortest='.$codefortest." typefortest=".$typefortest);
|
||||
|
||||
|
||||
$newcodefortest=$codefortest;
|
||||
|
||||
// Special case, if mask is on 12 digits instead of 13, we remove last char into code to test
|
||||
@@ -290,7 +290,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
|
||||
dol_syslog(get_class($this).'::verif_syntax newcodefortest='.$newcodefortest);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$result=check_value($mask,$newcodefortest);
|
||||
|
||||
return $result;
|
||||
|
||||
@@ -87,11 +87,11 @@ abstract class ModeleNumRefBarCode
|
||||
/**
|
||||
* Return next value available
|
||||
*
|
||||
* @param Societe $objsoc Object thirdparty
|
||||
* @param Societe $objproduct Object Product
|
||||
* @param int $type Type
|
||||
* @return string Value
|
||||
*/
|
||||
function getNextValue($objsoc=0,$type=-1)
|
||||
function getNextValue($objproduct,$type='')
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("Function_getNextValue_InModuleNotWorking");
|
||||
|
||||
@@ -110,8 +110,8 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
{
|
||||
$this->posxtva=99;
|
||||
$this->posxup=114;
|
||||
$this->posxqty=133;
|
||||
$this->posxunit=150;
|
||||
$this->posxqty=130;
|
||||
$this->posxunit=147;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -100,7 +100,8 @@ class pdf_merou extends ModelePdfExpedition
|
||||
$outputlangs->load("propal");
|
||||
$outputlangs->load("deliveries");
|
||||
$outputlangs->load("sendings");
|
||||
|
||||
$outputlangs->load("productbatch");
|
||||
|
||||
if ($conf->expedition->dir_output)
|
||||
{
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
@@ -110,7 +110,8 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
$outputlangs->load("propal");
|
||||
$outputlangs->load("deliveries");
|
||||
$outputlangs->load("sendings");
|
||||
|
||||
$outputlangs->load("productbatch");
|
||||
|
||||
$nblignes = count($object->lines);
|
||||
|
||||
// Loop on each lines to detect if there is at least one image to show
|
||||
|
||||
@@ -120,8 +120,8 @@ class pdf_crabe extends ModelePDFFactures
|
||||
{
|
||||
$this->posxtva=99;
|
||||
$this->posxup=114;
|
||||
$this->posxqty=133;
|
||||
$this->posxunit=150;
|
||||
$this->posxqty=130;
|
||||
$this->posxunit=147;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -504,6 +504,10 @@ class ImportCsv extends ModeleImports
|
||||
}
|
||||
if (empty($newval)) $arrayrecord[($key-1)]['type']=-1; // If we get empty value, we will use "null"
|
||||
}
|
||||
elseif ($objimport->array_import_convertvalue[0][$val]['rule']=='numeric')
|
||||
{
|
||||
$newval = price2num($newval);
|
||||
}
|
||||
|
||||
//print 'Val to use as insert is '.$newval.'<br>';
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
||||
* Copyright (C) 2005-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012-2016 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -302,6 +302,7 @@ class modCategorie extends DolibarrModules
|
||||
$this->export_sql_end[$r] = ' FROM ' . MAIN_DB_PREFIX . 'categorie as u, '.MAIN_DB_PREFIX . 'categorie_contact as cp, '.MAIN_DB_PREFIX . 'socpeople as p';
|
||||
$this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'c_country as country ON p.fk_pays = country.rowid';
|
||||
$this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'societe as s ON s.rowid = p.fk_soc';
|
||||
$this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'socpeople_extrafields as extra ON extra.fk_object = p.rowid';
|
||||
$this->export_sql_end[$r] .= ' WHERE u.rowid = cp.fk_categorie AND cp.fk_socpeople = p.rowid AND u.entity IN ('.getEntity('category',1).')';
|
||||
$this->export_sql_end[$r] .= ' AND u.type = 4'; // contact categories
|
||||
|
||||
|
||||
@@ -405,7 +405,8 @@ class modSociete extends DolibarrModules
|
||||
's.code_client'=>array('rule'=>'getcustomercodeifauto'),
|
||||
's.code_fournisseur'=>array('rule'=>'getsuppliercodeifauto'),
|
||||
's.code_compta'=>array('rule'=>'getcustomeraccountancycodeifauto'),
|
||||
's.code_compta_fournisseur'=>array('rule'=>'getsupplieraccountancycodeifauto')
|
||||
's.code_compta_fournisseur'=>array('rule'=>'getsupplieraccountancycodeifauto'),
|
||||
's.capital'=>array('rule'=>'numeric')
|
||||
);
|
||||
//$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t');
|
||||
$this->import_regex_array[$r]=array('s.status'=>'^[0|1]','s.client'=>'^[0|1|2|3]','s.fournisseur'=>'^[0|1]','s.fk_typent'=>'id@'.MAIN_DB_PREFIX.'c_typent','s.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]( [0-9][0-9]:[0-9][0-9]:[0-9][0-9])?$');
|
||||
|
||||
@@ -252,7 +252,7 @@ class mod_codeproduct_elephant extends ModeleProductCode
|
||||
// Get Mask value
|
||||
$mask = '';
|
||||
if ($type==0) $mask = empty($conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT)?'':$conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT;
|
||||
if ($type==1) $mask = empty($conf->global->PRODUCT_ELEPHANT_MASK_SSERVICE)?'':$conf->global->PRODUCT_ELEPHANT_MASK_SERVICE;
|
||||
if ($type==1) $mask = empty($conf->global->PRODUCT_ELEPHANT_MASK_SERVICE)?'':$conf->global->PRODUCT_ELEPHANT_MASK_SERVICE;
|
||||
if (! $mask)
|
||||
{
|
||||
$this->error='NotConfigured';
|
||||
|
||||
@@ -108,8 +108,8 @@ class pdf_azur extends ModelePDFPropales
|
||||
{
|
||||
$this->posxtva=99;
|
||||
$this->posxup=114;
|
||||
$this->posxqty=133;
|
||||
$this->posxunit=150;
|
||||
$this->posxqty=130;
|
||||
$this->posxunit=147;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -102,8 +102,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
if($conf->global->PRODUCT_USE_UNITS) {
|
||||
$this->posxtva=99;
|
||||
$this->posxup=114;
|
||||
$this->posxqty=133;
|
||||
$this->posxunit=150;
|
||||
$this->posxqty=130;
|
||||
$this->posxunit=147;
|
||||
}
|
||||
//if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup;
|
||||
$this->posxpicture=$this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH)?20:$conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images
|
||||
|
||||
@@ -111,8 +111,8 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
{
|
||||
$this->posxtva=99;
|
||||
$this->posxup=114;
|
||||
$this->posxqty=133;
|
||||
$this->posxunit=150;
|
||||
$this->posxqty=130;
|
||||
$this->posxunit=147;
|
||||
} else {
|
||||
$this->posxtva=112;
|
||||
$this->posxup=126;
|
||||
@@ -211,7 +211,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$hookmanager->initHooks(array('pdfgeneration'));
|
||||
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
|
||||
global $action;
|
||||
$reshook=$hookmanager->executeHooks('beforePDFCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||
$reshook=$hookmanager->executeHooks('beforePDFCreation',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
$nblignes = count($object->lines);
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ $coldisplay=-1; // We remove first td
|
||||
$doleditor=new DolEditor('product_desc',$line->description,'',164,$toolbarname,'',false,true,$enable,$nbrows,'98%');
|
||||
$doleditor->Create();
|
||||
} else {
|
||||
print '<textarea id="desc" class="flat" name="desc" readonly style="width: 200px; height:80px;">' . $line->description . '</textarea>';
|
||||
print '<textarea id="product_desc" class="flat" name="product_desc" readonly style="width: 200px; height:80px;">' . $line->description . '</textarea>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -1023,21 +1023,21 @@ class Cronjob extends CommonObject
|
||||
}
|
||||
if (! empty($conf->global->MAIN_UMASK)) @chmod($outputfile, octdec($conf->global->MAIN_UMASK));
|
||||
}
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this)."::run_jobs output_arr:".var_export($output_arr,true), LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::run_jobs output_arr:".var_export($output_arr,true), LOG_DEBUG);
|
||||
|
||||
|
||||
// Update with result
|
||||
$this->lastoutput='';
|
||||
if (is_array($output_arr) && count($output_arr)>0)
|
||||
{
|
||||
foreach($output_arr as $val)
|
||||
// Update with result
|
||||
$this->lastoutput='';
|
||||
if (is_array($output_arr) && count($output_arr)>0)
|
||||
{
|
||||
$this->lastoutput.=$val."\n";
|
||||
foreach($output_arr as $val)
|
||||
{
|
||||
$this->lastoutput.=$val."\n";
|
||||
}
|
||||
}
|
||||
$this->lastresult=$retval;
|
||||
}
|
||||
$this->lastresult=$retval;
|
||||
|
||||
$this->datelastresult=dol_now();
|
||||
$result = $this->update($user);
|
||||
if ($result < 0)
|
||||
|
||||
@@ -712,7 +712,7 @@ if (! empty($id) && $action != 'edit')
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?rowid='.$object->id.'&action=valid_promesse">'.$langs->trans("ValidPromess").'</a></div>';
|
||||
}
|
||||
|
||||
if (($object->statut == 0 || $object->statut == 1) && $remaintopay == 0 && $object->paye == 0)
|
||||
if (($object->statut == 0 || $object->statut == 1) && $remaintopay == 0 && $object->paid == 0)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?rowid='.$object->id.'&action=set_cancel">'.$langs->trans("ClassifyCanceled")."</a></div>";
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -124,6 +125,7 @@ if ($resql)
|
||||
$expedition = new Expedition($db);
|
||||
|
||||
$param="";
|
||||
if ($sall) $param.= "&sall=".$sall;
|
||||
if ($search_ref_exp) $param.= "&search_ref_exp=".$search_ref_exp;
|
||||
if ($search_ref_liv) $param.= "&search_ref_liv=".$search_ref_liv;
|
||||
if ($search_company) $param.= "&search_company=".$search_company;
|
||||
|
||||
@@ -524,13 +524,14 @@ class PaymentExpenseReport extends CommonObject
|
||||
{
|
||||
if ($mode == 'payment_expensereport')
|
||||
{
|
||||
$euser = new User($this->db);
|
||||
$euser->fetch($key);
|
||||
$er = new ExpenseReport($this->db);
|
||||
$er->fetch($key);
|
||||
$er->fetch_user($er->fk_user_author);
|
||||
$result=$acc->add_url_line(
|
||||
$bank_line_id,
|
||||
$euser->id,
|
||||
$er->user->id,
|
||||
DOL_URL_ROOT.'/user/card.php?id=',
|
||||
$euser->getFullName($langs),
|
||||
$er->user->getFullName($langs),
|
||||
'user'
|
||||
);
|
||||
if ($result <= 0)
|
||||
|
||||
@@ -193,6 +193,7 @@ if ($resql)
|
||||
$i = 0;
|
||||
|
||||
$param="";
|
||||
if ($sall) $param.="&sall=".$sall;
|
||||
if ($search_ref) $param.="&search_ref=".$search_ref;
|
||||
if ($search_user) $param.="&search_user=".$search_user;
|
||||
if ($search_amount_ht) $param.="&search_amount_ht=".$search_amount_ht;
|
||||
|
||||
@@ -1202,7 +1202,7 @@ class FichinterLigne extends CommonObjectLine
|
||||
// Mise a jour ligne en base
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."fichinterdet SET";
|
||||
$sql.= " description='".$this->db->escape($this->desc)."'";
|
||||
$sql.= ",date=".$this->db->idate($this->datei);
|
||||
$sql.= ",date='".$this->db->idate($this->datei)."'";
|
||||
$sql.= ",duree=".$this->duration;
|
||||
$sql.= ",rang='".$this->rang."'";
|
||||
$sql.= " WHERE rowid = ".$this->rowid;
|
||||
|
||||
@@ -139,6 +139,7 @@ if ($result)
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
$urlparam='';
|
||||
if ($sall) $urlparam.="&sall=".$sall;
|
||||
if ($socid) $urlparam.="&socid=".$socid;
|
||||
if ($search_ref) $urlparam.="&search_ref=".urlencode($search_ref);
|
||||
if ($search_company) $urlparam.="&search_company=".urlencode($search_company);
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE','Dolibarr');
|
||||
if (! defined('DOL_VERSION')) define('DOL_VERSION','3.9.3');
|
||||
if (! defined('DOL_VERSION')) define('DOL_VERSION','3.9.5');
|
||||
|
||||
if (! defined('EURO')) define('EURO',chr(128));
|
||||
|
||||
@@ -122,6 +122,7 @@ if (empty($dolibarr_main_db_encryption)) $dolibarr_main_db_encryption=0;
|
||||
if (empty($dolibarr_main_db_cryptkey)) $dolibarr_main_db_cryptkey='';
|
||||
if (empty($dolibarr_main_limit_users)) $dolibarr_main_limit_users=0;
|
||||
if (empty($dolibarr_mailing_limit_sendbyweb)) $dolibarr_mailing_limit_sendbyweb=0;
|
||||
if (empty($dolibarr_mailing_limit_sendbycli)) $dolibarr_mailing_limit_sendbycli=0;
|
||||
if (empty($dolibarr_strict_mode)) $dolibarr_strict_mode=0; // For debug in php strict mode
|
||||
// TODO Multicompany Remove this. Useless.
|
||||
if (empty($multicompany_transverse_mode)) $multicompany_transverse_mode=0;
|
||||
|
||||
@@ -383,7 +383,6 @@ if ($object->id > 0)
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as p ";
|
||||
$sql.= " WHERE p.fk_soc =".$object->id;
|
||||
$sql.= " AND p.entity =".$conf->entity;
|
||||
$sql.= " ORDER BY p.date_commande DESC";
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
|
||||
@@ -65,7 +65,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
// -> 9=Refused -> (reopen) 1=Validated
|
||||
// Note: billed or not is on another field "billed"
|
||||
var $statuts; // List of status
|
||||
|
||||
|
||||
var $socid;
|
||||
var $fourn_id;
|
||||
var $date;
|
||||
@@ -254,6 +254,8 @@ class CommandeFournisseur extends CommonOrder
|
||||
|
||||
$this->fetchObjectLinked();
|
||||
|
||||
$this->lines=array();
|
||||
|
||||
$sql = "SELECT l.rowid, l.ref as ref_supplier, l.fk_product, l.product_type, l.label, l.description,";
|
||||
$sql.= " l.qty,";
|
||||
$sql.= " l.tva_tx, l.remise_percent, l.subprice,";
|
||||
@@ -517,7 +519,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
$billedtext='';
|
||||
//if ($statut==5 && $this->billed == 1) $statut = 8;
|
||||
if ($billed == 1) $billedtext=$langs->trans("Billed");
|
||||
|
||||
|
||||
// List of language codes for status
|
||||
$statutshort[0] = 'StatusOrderDraftShort';
|
||||
$statutshort[1] = 'StatusOrderValidatedShort';
|
||||
@@ -991,6 +993,8 @@ class CommandeFournisseur extends CommonOrder
|
||||
$this->date_commande = $this->db->idate($date);
|
||||
$result = 1;
|
||||
$this->log($user, 3, $date, $comment);
|
||||
$this->date_commande = $date;
|
||||
$this->methode_commande = $methode;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1095,6 +1099,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
$this->lines[$i]->remise_percent,
|
||||
'HT',
|
||||
0,
|
||||
$this->lines[$i]->product_type,
|
||||
$this->lines[$i]->info_bits
|
||||
);
|
||||
if ($result < 0)
|
||||
@@ -1356,7 +1361,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
|
||||
$localtaxes_type=getLocalTaxesFromRate($txtva,0,$mysoc,$this->thirdparty);
|
||||
$txtva = preg_replace('/\s*\(.*\)/','',$txtva); // Remove code into vatrate.
|
||||
|
||||
|
||||
$tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $product_type, $this->thirdparty, $localtaxes_type);
|
||||
$total_ht = $tabprice[0];
|
||||
$total_tva = $tabprice[1];
|
||||
@@ -1368,10 +1373,13 @@ class CommandeFournisseur extends CommonOrder
|
||||
$localtax2_type=$localtaxes_type[2];
|
||||
|
||||
$subprice = price2num($pu,'MU');
|
||||
|
||||
$rangmax = $this->line_max();
|
||||
$rang = $rangmax + 1;
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."commande_fournisseurdet";
|
||||
$sql.= " (fk_commande, label, description, date_start, date_end,";
|
||||
$sql.= " fk_product, product_type,";
|
||||
$sql.= " fk_product, product_type, rang,";
|
||||
$sql.= " qty, tva_tx, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type, remise_percent, subprice, ref,";
|
||||
$sql.= " total_ht, total_tva, total_localtax1, total_localtax2, total_ttc, fk_unit";
|
||||
$sql.= ")";
|
||||
@@ -1380,7 +1388,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
$sql.= " ".($date_end?"'".$this->db->idate($date_end)."'":"null").",";
|
||||
if ($fk_product) { $sql.= $fk_product.","; }
|
||||
else { $sql.= "null,"; }
|
||||
$sql.= "'".$product_type."',";
|
||||
$sql.= "'".$product_type."', ".$rang.",";
|
||||
$sql.= "'".$qty."', ".$txtva.", ".$txlocaltax1.", ".$txlocaltax2;
|
||||
|
||||
$sql.= ", '".$localtax1_type."',";
|
||||
@@ -2115,7 +2123,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
|
||||
$localtaxes_type=getLocalTaxesFromRate($txtva,0,$mysoc, $this->thirdparty);
|
||||
$txtva = preg_replace('/\s*\(.*\)/','',$txtva); // Remove code into vatrate.
|
||||
|
||||
|
||||
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $this->thirdparty, $localtaxes_type);
|
||||
$total_ht = $tabprice[0];
|
||||
$total_tva = $tabprice[1];
|
||||
@@ -2533,10 +2541,10 @@ class CommandeFournisseur extends CommonOrder
|
||||
public function hasDelay()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
|
||||
$now = dol_now();
|
||||
$date_to_test = empty($this->date_livraison) ? $this->date_commande : $this->date_livraison;
|
||||
|
||||
|
||||
return ($this->statut != 3) && $date_to_test && $date_to_test < ($now - $conf->commande->fournisseur->warning_delay);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -208,6 +209,7 @@ if ($resql)
|
||||
$i = 0;
|
||||
|
||||
$param="";
|
||||
if ($sall) $param.="&search_all=".$sall;
|
||||
if ($search_ref) $param.="&search_ref=".$search_ref;
|
||||
if ($search_company) $param.="&search_company=".$search_company;
|
||||
if ($search_user) $param.="&search_user=".$search_user;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2012-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012-2016 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2014-2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -39,7 +39,6 @@ require_once DOL_DOCUMENT_ROOT.'/holiday/common.inc.php';
|
||||
$myparam = GETPOST("myparam");
|
||||
$action=GETPOST('action', 'alpha');
|
||||
$id=GETPOST('id', 'int');
|
||||
$userid = GETPOST('userid')?GETPOST('userid'):$user->id;
|
||||
|
||||
// Protection if external user
|
||||
if ($user->societe_id > 0) accessforbidden();
|
||||
@@ -57,7 +56,8 @@ if ($action == 'create')
|
||||
$cp = new Holiday($db);
|
||||
|
||||
// If no right to create a request
|
||||
if (($userid == $user->id && empty($user->rights->holiday->write)) || ($userid != $user->id && empty($user->rights->holiday->write_all)))
|
||||
$fuserid = GETPOST('fuserid');
|
||||
if (($fuserid == $user->id && empty($user->rights->holiday->write)) || ($fuserid != $user->id && empty($user->rights->holiday->write_all)))
|
||||
{
|
||||
$error++;
|
||||
setEventMessages($langs->trans('CantCreateCP'), null, 'errors');
|
||||
@@ -82,7 +82,6 @@ if ($action == 'create')
|
||||
|
||||
$valideur = GETPOST('valideur');
|
||||
$description = trim(GETPOST('description'));
|
||||
$userID = GETPOST('userID');
|
||||
|
||||
// If no type
|
||||
if ($type <= 0)
|
||||
@@ -112,7 +111,7 @@ if ($action == 'create')
|
||||
}
|
||||
|
||||
// Check if there is already holiday for this period
|
||||
$verifCP = $cp->verifDateHolidayCP($userID, $date_debut, $date_fin, $halfday);
|
||||
$verifCP = $cp->verifDateHolidayCP($fuserid, $date_debut, $date_fin, $halfday);
|
||||
if (! $verifCP)
|
||||
{
|
||||
header('Location: '.$_SERVER["PHP_SELF"].'?action=request&error=alreadyCP');
|
||||
@@ -140,7 +139,7 @@ if ($action == 'create')
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$cp->fk_user = $userid;
|
||||
$cp->fk_user = $fuserid;
|
||||
$cp->description = $description;
|
||||
$cp->date_debut = $date_debut;
|
||||
$cp->date_fin = $date_fin;
|
||||
@@ -682,7 +681,7 @@ llxHeader(array(),$langs->trans('CPTitreMenu'));
|
||||
if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create')
|
||||
{
|
||||
// Si l'utilisateur n'a pas le droit de faire une demande
|
||||
if (($userid == $user->id && empty($user->rights->holiday->write)) || ($userid != $user->id && empty($user->rights->holiday->write_all)))
|
||||
if (($fuserid == $user->id && empty($user->rights->holiday->write)) || ($fuserid != $user->id && empty($user->rights->holiday->write_all)))
|
||||
{
|
||||
$errors[]=$langs->trans('CantCreateCP');
|
||||
}
|
||||
@@ -762,7 +761,6 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create
|
||||
// Formulaire de demande
|
||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'" onsubmit="return valider()" name="demandeCP">'."\n";
|
||||
print '<input type="hidden" name="action" value="create" />'."\n";
|
||||
print '<input type="hidden" name="userID" value="'.$userid.'" />'."\n";
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
@@ -793,10 +791,10 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create
|
||||
print '<td>';
|
||||
if (empty($user->rights->holiday->write_all))
|
||||
{
|
||||
print $form->select_dolusers($userid, 'useridbis', 0, '', 1, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
||||
print '<input type="hidden" name="userid" value="'.$userid.'">';
|
||||
print $form->select_dolusers($fuserid, 'useridbis', 0, '', 1, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
||||
print '<input type="hidden" name="fuserid" value="'.($fuserid?$fuserid:$user->id).'">';
|
||||
}
|
||||
else print $form->select_dolusers(GETPOST('userid')?GETPOST('userid'):$user->id,'userid',0,'',0);
|
||||
else print $form->select_dolusers(GETPOST('fuserid')?GETPOST('fuserid'):$user->id,'fuserid',0,'',0);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
##
|
||||
## PHPExcel
|
||||
##
|
||||
##
|
||||
## Copyright (c) 2006 - 2013 PHPExcel
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
##
|
||||
## PHPExcel
|
||||
##
|
||||
##
|
||||
## Copyright (c) 2006 - 2013 PHPExcel
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
##
|
||||
## PHPExcel
|
||||
##
|
||||
##
|
||||
## Copyright (c) 2006 - 2013 PHPExcel
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
@@ -37,7 +37,7 @@ currencySymbol = kr
|
||||
|
||||
|
||||
##
|
||||
## Excel Error Codes (For future use)
|
||||
## Excel Error Codes (For future use)
|
||||
##
|
||||
NULL = #NUL!
|
||||
DIV0 = #DIVISION/0!
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
##
|
||||
## PHPExcel
|
||||
##
|
||||
##
|
||||
## Copyright (c) 2006 - 2013 PHPExcel
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
##
|
||||
## PHPExcel
|
||||
##
|
||||
##
|
||||
## Copyright (c) 2006 - 2013 PHPExcel
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
@@ -36,7 +36,7 @@ currencySymbol = €
|
||||
|
||||
|
||||
##
|
||||
## Excel Error Codes (For future use)
|
||||
## Excel Error Codes (For future use)
|
||||
##
|
||||
NULL = #NULL!
|
||||
DIV0 = #DIV/0!
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
##
|
||||
## PHPExcel
|
||||
##
|
||||
##
|
||||
## Copyright (c) 2006 - 2013 PHPExcel
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
##
|
||||
## PHPExcel
|
||||
##
|
||||
##
|
||||
## Copyright (c) 2006 - 2013 PHPExcel
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
##
|
||||
## PHPExcel
|
||||
##
|
||||
##
|
||||
## Copyright (c) 2006 - 2013 PHPExcel
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
@@ -36,7 +36,7 @@ currencySymbol = $ ## I'm surprised that the Excel Documentation suggests $ rath
|
||||
|
||||
|
||||
##
|
||||
## Excel Error Codes (For future use)
|
||||
## Excel Error Codes (For future use)
|
||||
##
|
||||
NULL = #¡NULO!
|
||||
DIV0 = #¡DIV/0!
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
##
|
||||
## PHPExcel
|
||||
##
|
||||
##
|
||||
## Copyright (c) 2006 - 2013 PHPExcel
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
##
|
||||
## PHPExcel
|
||||
##
|
||||
##
|
||||
## Copyright (c) 2006 - 2013 PHPExcel
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
@@ -36,7 +36,7 @@ currencySymbol = $ # Symbol not known, should it be a € (Euro)?
|
||||
|
||||
|
||||
##
|
||||
## Excel Error Codes (For future use)
|
||||
## Excel Error Codes (For future use)
|
||||
##
|
||||
NULL = #TYHJÄ!
|
||||
DIV0 = #JAKO/0!
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
##
|
||||
## PHPExcel
|
||||
##
|
||||
##
|
||||
## Copyright (c) 2006 - 2013 PHPExcel
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
##
|
||||
## PHPExcel
|
||||
##
|
||||
##
|
||||
## Copyright (c) 2006 - 2013 PHPExcel
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
@@ -36,7 +36,7 @@ currencySymbol = €
|
||||
|
||||
|
||||
##
|
||||
## Excel Error Codes (For future use)
|
||||
## Excel Error Codes (For future use)
|
||||
##
|
||||
NULL = #NUL!
|
||||
DIV0 = #DIV/0!
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
##
|
||||
## PHPExcel
|
||||
##
|
||||
##
|
||||
## Copyright (c) 2006 - 2013 PHPExcel
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
##
|
||||
## PHPExcel
|
||||
##
|
||||
##
|
||||
## Copyright (c) 2006 - 2013 PHPExcel
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
##
|
||||
## PHPExcel
|
||||
##
|
||||
##
|
||||
## Copyright (c) 2006 - 2013 PHPExcel
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
##
|
||||
## PHPExcel
|
||||
##
|
||||
##
|
||||
## Copyright (c) 2006 - 2013 PHPExcel
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
@@ -36,7 +36,7 @@ currencySymbol = €
|
||||
|
||||
|
||||
##
|
||||
## Excel Error Codes (For future use)
|
||||
## Excel Error Codes (For future use)
|
||||
##
|
||||
NULL = #NULLO!
|
||||
DIV0 = #DIV/0!
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
##
|
||||
## PHPExcel
|
||||
##
|
||||
##
|
||||
## Copyright (c) 2006 - 2013 PHPExcel
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
##
|
||||
## PHPExcel
|
||||
##
|
||||
##
|
||||
## Copyright (c) 2006 - 2013 PHPExcel
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
@@ -36,7 +36,7 @@ currencySymbol = €
|
||||
|
||||
|
||||
##
|
||||
## Excel Error Codes (For future use)
|
||||
## Excel Error Codes (For future use)
|
||||
##
|
||||
NULL = #LEEG!
|
||||
DIV0 = #DEEL/0!
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
##
|
||||
## PHPExcel
|
||||
##
|
||||
##
|
||||
## Copyright (c) 2006 - 2013 PHPExcel
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
##
|
||||
## PHPExcel
|
||||
##
|
||||
##
|
||||
## Copyright (c) 2006 - 2013 PHPExcel
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
@@ -36,7 +36,7 @@ currencySymbol = kr
|
||||
|
||||
|
||||
##
|
||||
## Excel Error Codes (For future use)
|
||||
## Excel Error Codes (For future use)
|
||||
##
|
||||
NULL = #NULL!
|
||||
DIV0 = #DIV/0!
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
##
|
||||
## PHPExcel
|
||||
##
|
||||
##
|
||||
## Copyright (c) 2006 - 2013 PHPExcel
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
##
|
||||
## PHPExcel
|
||||
##
|
||||
##
|
||||
## Copyright (c) 2006 - 2013 PHPExcel
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
@@ -36,7 +36,7 @@ currencySymbol = zł
|
||||
|
||||
|
||||
##
|
||||
## Excel Error Codes (For future use)
|
||||
## Excel Error Codes (For future use)
|
||||
##
|
||||
NULL = #ZERO!
|
||||
DIV0 = #DZIEL/0!
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
##
|
||||
## PHPExcel
|
||||
##
|
||||
##
|
||||
## Copyright (c) 2006 - 2013 PHPExcel
|
||||
##
|
||||
## This library is free software; you can redistribute it and/or
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user