diff --git a/README.md b/README.md
index ac8f1d06382..139bdc00b6a 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ You can freely use, study, modify or distribute it according to its licence.
You can use it as a standalone application or as a web application to access it from the Internet or a LAN.
-Dolibarr has a large community ready to help you, free forums and [oficially preferred partners ready to offer commercial support should you need it](https://partners.dolibarr.org)
+Dolibarr has a large community ready to help you, free forums and [officially preferred partners ready to offer commercial support should you need it](https://partners.dolibarr.org)

@@ -45,7 +45,7 @@ On GNU/Linux, first check if your distribution has already packaged Dolibarr.
#### Generic install steps:
-- Check that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Versions).
+- Check that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
- Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommanded if you know git as it makes it easier if you want to upgrade later):
@@ -90,6 +90,7 @@ Dolibarr supports upgrading usually wihtout the need for any (commercial) suppor
See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file.
+
## FEATURES
### Main application/modules (all optional)
@@ -162,8 +163,8 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
### System Environment / Requirements
-- Works with PHP 5.5+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite))
-- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites.
+- Works with PHP 5.6+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite))
+- Compatible with all Cloud solutions that match PHP & MySQL or PostgreSQL prerequisites.
### Extending
diff --git a/dev/resources/iso-normes/company_ids.txt b/dev/resources/iso-normes/company_ids.txt
new file mode 100644
index 00000000000..69c2af1d665
--- /dev/null
+++ b/dev/resources/iso-normes/company_ids.txt
@@ -0,0 +1,2 @@
+Spain https://incwell.eu/en/company-formation-spain/
+France https://www.economie.gouv.fr/entreprises/numeros-identification-entreprise
diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php
index ebf397c2dfd..af8d26bb374 100644
--- a/htdocs/accountancy/class/accountingaccount.class.php
+++ b/htdocs/accountancy/class/accountingaccount.class.php
@@ -460,7 +460,7 @@ class AccountingAccount extends CommonObject
$result = '';
- $url = '';
+ $url = ''; $labelurl = '';
if (empty($option) || $option == 'ledger') {
$url = DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?search_accountancy_code_start='.urlencode($this->account_number).'&search_accountancy_code_end='.urlencode($this->account_number);
$labelurl = $langs->trans("ShowAccountingAccountInLedger");
@@ -617,16 +617,13 @@ class AccountingAccount extends CommonObject
// phpcs:enable
$this->db->begin();
- if ($mode == 0)
- {
- $fieldtouse = 'active';
- } elseif ($mode == 1)
- {
+ $fieldtouse = 'active';
+ if ($mode == 1) {
$fieldtouse = 'reconcilable';
}
- $sql = "UPDATE ".MAIN_DB_PREFIX."accounting_account ";
- $sql .= "SET ".$fieldtouse." = '1'";
+ $sql = "UPDATE ".MAIN_DB_PREFIX."accounting_account";
+ $sql .= " SET ".$fieldtouse." = '1'";
$sql .= " WHERE rowid = ".$this->db->escape($id);
dol_syslog(get_class($this)."::account_activate ".$fieldtouse." sql=".$sql, LOG_DEBUG);
diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php
index 2ea1c310d5a..aebd48963d2 100644
--- a/htdocs/adherents/class/subscription.class.php
+++ b/htdocs/adherents/class/subscription.class.php
@@ -384,7 +384,18 @@ class Subscription extends CommonObject
$result = '';
$langs->load("members");
- $label = $langs->trans("ShowSubscription").': '.$this->ref;
+
+ $label = img_picto('', $this->picto).' '.$langs->trans("Subscription").'';
+ /*if (isset($this->statut)) {
+ $label .= ' '.$this->getLibStatut(5);
+ }*/
+ $label .= '
'.$langs->trans('Ref').': '.$this->ref;
+ if (!empty($this->dateh)) {
+ $label .= '
'.$langs->trans('DateStart').': '.dol_print_date($this->dateh, 'day');
+ }
+ if (!empty($this->datef)) {
+ $label .= '
'.$langs->trans('DateEnd').': '.dol_print_date($this->datef, 'day');
+ }
$url = DOL_URL_ROOT.'/adherents/subscription/card.php?rowid='.$this->id;
@@ -398,8 +409,6 @@ class Subscription extends CommonObject
$linkstart = '';
$linkend = '';
- $picto = 'payment';
-
$result .= $linkstart;
if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
if ($withpicto != 2) $result .= $this->ref;
diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php
index 35b0fcfb478..b2ef8e8854b 100644
--- a/htdocs/adherents/index.php
+++ b/htdocs/adherents/index.php
@@ -181,8 +181,8 @@ if ($conf->use_javascript_ajax) {
}
$total = $SommeA + $SommeB + $SommeC + $SommeD;
$dataseries = array();
- $dataseries[] = array($langs->transnoentitiesnoconv("MenuMembersNotUpToDate"), round($SommeB));
- $dataseries[] = array($langs->transnoentitiesnoconv("MenuMembersUpToDate"), round($SommeC));
+ $dataseries[] = array($langs->transnoentitiesnoconv("OutOfDate"), round($SommeB));
+ $dataseries[] = array($langs->transnoentitiesnoconv("UpToDate"), round($SommeC));
$dataseries[] = array($langs->transnoentitiesnoconv("MembersStatusResiliated"), round($SommeD));
$dataseries[] = array($langs->transnoentitiesnoconv("MembersStatusToValid"), round($SommeA));
@@ -422,8 +422,8 @@ print '
| '.$langs->trans("MembersTypes").' | '; print ''.$langs->trans("MembersStatusToValid").' | '; -print ''.$langs->trans("MenuMembersNotUpToDate").' | '; -print ''.$langs->trans("MenuMembersUpToDate").' | '; +print ''.$langs->trans("OutOfDate").' | '; +print ''.$langs->trans("UpToDate").' | '; print ''.$langs->trans("MembersStatusResiliated").' | '; print "'."\n"; print ' | '.$langs->trans("Value").' | '."\n"; print ''."\n"; +// AGENDA REMINDER BROWSER +print '
|---|---|---|---|---|---|---|
| '.$langs->trans('AGENDA_REMINDER_BROWSER').' | '."\n"; +print ''."\n"; +print ' | '."\n"; + +if (empty($conf->global->AGENDA_REMINDER_BROWSER)) { + print ''.img_picto($langs->trans('Disabled'), 'switch_off').''; + print ' | ||||
| '.$langs->trans('AGENDA_REMINDER_BROWSER_SOUND').' | '."\n"; + print ''."\n"; + print ' | '."\n"; + + if (empty($conf->global->AGENDA_REMINDER_BROWSER_SOUND)) { + print ''.img_picto($langs->trans('Disabled'), 'switch_off').''; + } else { + print ''.img_picto($langs->trans('Enabled'), 'switch_on').''; + } + + print ' | ||||
| '.$langs->trans('AGENDA_REMINDER_EMAIL', $langs->transnoentities("Module2300Name")).' | '."\n"; - print ''."\n"; - print ' | '."\n"; +print ' | ||||
| '.$langs->trans('AGENDA_REMINDER_EMAIL', $langs->transnoentities("Module2300Name"));
+if (!empty($conf->cron->enabled)) {
+ if (!empty($conf->global->AGENDA_REMINDER_EMAIL)) {
+ if ($job->id > 0) {
+ if ($job->status == $job::STATUS_ENABLED) {
+ print ' '.$langs->trans("AGENDA_REMINDER_EMAIL_NOTE", $langs->transnoentitiesnoconv("sendEmailsReminder")).''; + } + } + } +} +print ' | '."\n";
+print ''."\n"; +print ' | '."\n"; +if (empty($conf->cron->enabled)) { + print ''.$langs->trans("WarningModuleNotActive", $langs->transnoentitiesnoconv("Module2300Name")).''; +} else { if (empty($conf->global->AGENDA_REMINDER_EMAIL)) { print ''.img_picto($langs->trans('Disabled'), 'switch_off').''; - print ' | ||||
| '.$langs->trans('AGENDA_REMINDER_BROWSER').' | '."\n"; - print ''."\n"; - print ' | '."\n"; - - if (empty($conf->global->AGENDA_REMINDER_BROWSER)) { - print ''.img_picto($langs->trans('Disabled'), 'switch_off').''; - print ' | ||||
| '.$langs->trans('AGENDA_REMINDER_BROWSER_SOUND').' | '."\n"; - print ''."\n"; - print ' | '."\n"; - - if (empty($conf->global->AGENDA_REMINDER_BROWSER_SOUND)) { - print ''.img_picto($langs->trans('Disabled'), 'switch_off').''; - } else { - print ''.img_picto($langs->trans('Enabled'), 'switch_on').''; + // Get the max frequency of reminder + if ($job->id > 0) { + if ($job->status != $job::STATUS_ENABLED) { + print ''.$langs->trans("JobXMustBeEnabled", $langs->transnoentitiesnoconv("sendEmailsReminder")).''; + } else { + print ''.img_picto($langs->trans('Enabled'), 'switch_on').''; + } } - - print ' |
| '.$langs->trans("Language").' | '; -print ' | '; print ' |
|---|---|---|
| '.$langs->trans("DefaultLangua print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'MAIN_LANG_DEFAULT', 1, null, '', 0, 0, 'minwidth300', 2); print ''; print ' | '; -print ''; print ' | |
| '.$langs->trans("EnableMultilangInterface").' | '; print ajax_constantonoff("MAIN_MULTILANGS", array(), $conf->entity, 0, 0, 1, 0); print ' | '; -print ''; print ' |
| '.$langs->trans("ReminderTime").' | '; - print ''; + print ' '.$form->selectTypeDuration('offsetunit', $actionCommReminder->offsetunit); print ' | ||||
| '.$langs->trans("TimeType").' | '; - print $form->selectTypeDuration('offsetunit', $actionCommReminder->offsetunit); - print ' | ||||
| '.$langs->trans("ReminderType").' | '; print $form->selectarray('selectremindertype', $TRemindTypes, $actionCommReminder->typeremind); print ' | ||||
| '.$langs->trans("EMailTemplates").' | '; print $form->selectModelMail('actioncommsend', 'actioncomm_send', 1); print ' | ';
print ' ';
- print $form->selectDate($search_dateorder_start ? $search_dateorder_start : -1, 'search_dateorder_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
+ print $form->selectDate($search_dateorder_start ? $search_dateorder_start : -1, 'search_dateorder_start_', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
print ' ';
print '';
- print $form->selectDate($search_dateorder_end ? $search_dateorder_end : -1, 'search_dateorder_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
+ print $form->selectDate($search_dateorder_end ? $search_dateorder_end : -1, 'search_dateorder_end_', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
print ' ';
print ' | ';
}
@@ -719,10 +719,10 @@ if ($resql)
{
print '';
print ' ';
- print $form->selectDate($search_datedelivery_start ? $search_datedelivery_start : -1, 'search_datedelivery_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
+ print $form->selectDate($search_datedelivery_start ? $search_datedelivery_start : -1, 'search_datedelivery_start_', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
print ' ';
print '';
- print $form->selectDate($search_datedelivery_end ? $search_datedelivery_end : -1, 'search_datedelivery_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
+ print $form->selectDate($search_datedelivery_end ? $search_datedelivery_end : -1, 'search_datedelivery_end_', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
print ' ';
print ' | ';
}
diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php
index ddc1beb1768..cc9abb8d594 100644
--- a/htdocs/compta/accounting-files.php
+++ b/htdocs/compta/accounting-files.php
@@ -613,7 +613,7 @@ if (!empty($date_start) && !empty($date_stop))
print ''.$langs->trans("Code").' | '; print ''.$langs->trans("Country").' | '; print ''.$langs->trans("VATIntra").' | '; - if ($conf->multicurrency->enabled) print ''.$langs->trans("Currency").' | '; + if (!empty($conf->multicurrency->enabled)) print ''.$langs->trans("Currency").' | '; print ''; if ($result) { diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php index 49c0ff19d70..1a1de43709d 100644 --- a/htdocs/compta/stats/index.php +++ b/htdocs/compta/stats/index.php @@ -108,6 +108,10 @@ if (!empty($conf->accounting->enabled)) $result = restrictedArea($user, 'account * View */ +$param = ''; +if ($date_startday && $date_startmonth && $date_startyear) $param .= '&date_startday='.$date_startday.'&date_startmonth='.$date_startmonth.'&date_startyear='.$date_startyear; +if ($date_endday && $date_endmonth && $date_endyear) $param .= '&date_endday='.$date_endday.'&date_endmonth='.$date_endmonth.'&date_endyear='.$date_endyear; + llxHeader(); $form = new Form($db); @@ -118,7 +122,7 @@ if ($modecompta == "CREANCES-DETTES") $name = $langs->trans("Turnover"); $calcmode = $langs->trans("CalcModeDebt"); //$calcmode.='
| table_element.' SET '.implode(',', $tmp).' WHERE rowid='.$this->id;
+ $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET '.implode(', ', $tmp).' WHERE rowid='.$this->id;
$this->db->begin();
if (!$error)
diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php
index 5ff3f397813..ec8d9fa15bd 100644
--- a/htdocs/core/class/dolreceiptprinter.class.php
+++ b/htdocs/core/class/dolreceiptprinter.class.php
@@ -793,7 +793,7 @@ class dolReceiptPrinter extends Printer
$row = $this->db->fetch_object($resql);
$spacestoadd = $nbcharactbyline - strlen($langs->transnoentitiesnoconv("PaymentTypeShort".$row->code)) - 12;
$spaces = str_repeat(' ', $spacestoadd);
- $amount_payment = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount;
+ $amount_payment = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount;
if ($row->code == "LIQ") $amount_payment = $amount_payment + $row->pos_change; // Show amount with excess received if is cash payment
$this->printer->text($spaces.$langs->transnoentitiesnoconv("PaymentTypeShort".$row->code).' '.str_pad(price($amount_payment), 10, ' ', STR_PAD_LEFT)."\n");
if ($row->code == "LIQ" && $row->pos_change > 0) // Print change only in cash payments
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 0173e03730e..15cfa9e5771 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -6259,7 +6259,7 @@ class Form
* Note: Do not apply langs->trans function on returned content, content may be entity encoded twice.
*
* @param string $htmlname Name of html select area. Must start with "multi" if this is a multiselect
- * @param array $array Array like array(key => value) or array(key=>array('label'=>..., 'data-...'=>...))
+ * @param array $array Array like array(key => value) or array(key=>array('label'=>..., 'data-...'=>..., 'disabled'=>..., 'css'=>...))
* @param string|string[] $id Preselected key or preselected keys for multiselect
* @param int|string $show_empty 0 no empty value allowed, 1 or string to add an empty value into list (key is -1 and value is '' or ' ' if 1, key is -1 and value is text if string), <0 to add an empty value with key that is this value.
* @param int $key_in_label 1 to show key into label with format "[key] value"
@@ -6331,10 +6331,14 @@ class Form
foreach ($array as $key => $tmpvalue)
{
- if (is_array($tmpvalue)) $value = $tmpvalue['label'];
- else $value = $tmpvalue;
-
- $disabled = ''; $style = '';
+ if (is_array($tmpvalue)) {
+ $value = $tmpvalue['label'];
+ $disabled = empty($tmpvalue['disabled']) ? '' : ' disabled';
+ $style = empty($tmpvalue['css']) ? ' class="'.$tmpvalue['css'].'"' : '';
+ } else {
+ $value = $tmpvalue;
+ $disabled = ''; $style = '';
+ }
if (!empty($disablebademail))
{
if (($disablebademail == 1 && !preg_match('/<.+@.+>/', $value))
@@ -7489,10 +7493,11 @@ class Form
* @param string $imagesize 'mini', 'small' or '' (original)
* @param int $addlinktofullsize Add link to fullsize image
* @param int $cache 1=Accept to use image in cache
- * @param string $forcecapture Force parameter capture on HTML input file element to ask a smartphone to allow to open camera to take photo. Auto if empty.
+ * @param string $forcecapture '', 'user' or 'environment'. Force parameter capture on HTML input file element to ask a smartphone to allow to open camera to take photo. Auto if ''.
+ * @param int $noexternsourceoverwrite No overwrite image with extern source (like 'gravatar' or other module)
* @return string HTML code to output photo
*/
- public static function showphoto($modulepart, $object, $width = 100, $height = 0, $caneditfield = 0, $cssclass = 'photowithmargin', $imagesize = '', $addlinktofullsize = 1, $cache = 0, $forcecapture = '')
+ public static function showphoto($modulepart, $object, $width = 100, $height = 0, $caneditfield = 0, $cssclass = 'photowithmargin', $imagesize = '', $addlinktofullsize = 1, $cache = 0, $forcecapture = '', $noexternsourceoverwrite = 0)
{
global $conf, $langs;
@@ -7569,18 +7574,15 @@ class Form
{
if ($file && file_exists($dir."/".$file))
{
- if ($addlinktofullsize)
- {
+ if ($addlinktofullsize) {
$urladvanced = getAdvancedPreviewUrl($modulepart, $originalfile, 0, '&entity='.$entity);
if ($urladvanced) $ret .= '';
else $ret .= '';
}
$ret .= ' | |||||
| '.$ref.' | '; + // Onwer - print ''; + print ' | '; if (!empty($actioncomm->userownerid)) { if (is_object($cacheusers[$actioncomm->userownerid])) @@ -266,13 +268,13 @@ class FormActions if ($actioncomm->type_picto) { $imgpicto = img_picto('', $actioncomm->type_picto); } else { - if ($actioncomm->type_code == 'AC_RDV') $imgpicto = img_picto('', 'object_group', '', false, 0, 0, '', 'paddingright').' '; - elseif ($actioncomm->type_code == 'AC_TEL') $imgpicto = img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright').' '; - elseif ($actioncomm->type_code == 'AC_FAX') $imgpicto = img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright').' '; - elseif ($actioncomm->type_code == 'AC_EMAIL') $imgpicto = img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright').' '; - elseif ($actioncomm->type_code == 'AC_INT') $imgpicto = img_picto('', 'object_intervention', '', false, 0, 0, '', 'paddingright').' '; - elseif ($actioncomm->type_code == 'AC_OTH' && $actioncomm->code == 'TICKET_MSG') $imgpicto = img_picto('', 'object_conversation', '', false, 0, 0, '', 'paddingright').' '; - elseif (!preg_match('/_AUTO/', $actioncomm->type_code)) $imgpicto = img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').' '; + if ($actioncomm->type_code == 'AC_RDV') $imgpicto = img_picto('', 'object_group', '', false, 0, 0, '', 'paddingright'); + elseif ($actioncomm->type_code == 'AC_TEL') $imgpicto = img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright'); + elseif ($actioncomm->type_code == 'AC_FAX') $imgpicto = img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright'); + elseif ($actioncomm->type_code == 'AC_EMAIL') $imgpicto = img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright'); + elseif ($actioncomm->type_code == 'AC_INT') $imgpicto = img_picto('', 'object_intervention', '', false, 0, 0, '', 'paddingright'); + elseif ($actioncomm->type_code == 'AC_OTH' && $actioncomm->code == 'TICKET_MSG') $imgpicto = img_picto('', 'object_conversation', '', false, 0, 0, '', 'paddingright'); + elseif (!preg_match('/_AUTO/', $actioncomm->type_code)) $imgpicto = img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright'); } } print $imgpicto; @@ -282,8 +284,10 @@ class FormActions print $actioncomm->type_short ? $actioncomm->type_short : $actioncomm->type; } print ' | '; + // Label print ''.$label.' | '; + // Date print ''.dol_print_date($actioncomm->datep, 'dayhour', 'tzuserrel');
if ($actioncomm->datef)
diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php
index dc8f969540f..3c4c3ea5d36 100644
--- a/htdocs/core/class/translate.class.php
+++ b/htdocs/core/class/translate.class.php
@@ -738,7 +738,7 @@ class Translate
*/
public function transcountrynoentities($str, $countrycode)
{
- if ($this->tab_translate["$str$countrycode"]) return $this->transnoentities("$str$countrycode");
+ if (! empty($this->tab_translate["$str$countrycode"])) return $this->transnoentities("$str$countrycode");
else return $this->transnoentities($str);
}
diff --git a/htdocs/core/class/vcard.class.php b/htdocs/core/class/vcard.class.php
index 0e3f04fa0f5..9c03475453f 100644
--- a/htdocs/core/class/vcard.class.php
+++ b/htdocs/core/class/vcard.class.php
@@ -85,10 +85,19 @@ function dol_quoted_printable_encode($input, $line_max = 76)
*/
class vCard
{
+ /**
+ * @var array array of properties
+ */
public $properties;
+
+ /**
+ * @var string filename
+ */
public $filename;
- //var $encoding="UTF-8";
+ /**
+ * @var string encoding
+ */
public $encoding = "ISO-8859-1;ENCODING=QUOTED-PRINTABLE";
diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php
index 599ee983296..8241b415726 100644
--- a/htdocs/core/lib/agenda.lib.php
+++ b/htdocs/core/lib/agenda.lib.php
@@ -356,13 +356,10 @@ function agenda_prepare_head()
$head[$h][2] = 'autoactions';
$h++;
- if ($conf->global->MAIN_FEATURES_LEVEL > 0)
- {
- $head[$h][0] = DOL_URL_ROOT."/admin/agenda_reminder.php";
- $head[$h][1] = $langs->trans("Reminders");
- $head[$h][2] = 'reminders';
- $h++;
- }
+ $head[$h][0] = DOL_URL_ROOT."/admin/agenda_reminder.php";
+ $head[$h][1] = $langs->trans("Reminders");
+ $head[$h][2] = 'reminders';
+ $h++;
$head[$h][0] = DOL_URL_ROOT."/admin/agenda_xcal.php";
$head[$h][1] = $langs->trans("ExportCal");
diff --git a/htdocs/core/lib/cron.lib.php b/htdocs/core/lib/cron.lib.php
index 084b781d3b4..fda122be7bf 100644
--- a/htdocs/core/lib/cron.lib.php
+++ b/htdocs/core/lib/cron.lib.php
@@ -39,6 +39,11 @@ function cronadmin_prepare_head()
$head[$h][2] = 'setup';
$h++;
+ $head[$h][0] = dol_buildpath('/cron/list.php?mode=modulesetup', 1);
+ $head[$h][1] = $langs->trans("Module2300Name");
+ $head[$h][2] = 'jobs';
+ $h++;
+
complete_head_from_modules($conf, $langs, null, $head, $h, 'cronadmin');
complete_head_from_modules($conf, $langs, null, $head, $h, 'cronadmin', 'remove');
diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php
index cbfaa883da7..1e7f9b299c6 100644
--- a/htdocs/core/lib/date.lib.php
+++ b/htdocs/core/lib/date.lib.php
@@ -78,7 +78,7 @@ function getServerTimeZoneString()
* Return server timezone int.
*
* @param string $refgmtdate Reference period for timezone (timezone differs on winter and summer. May be 'now', 'winter' or 'summer')
- * @return int An offset in hour (+1 for Europe/Paris on winter and +2 for Europe/Paris on summer)
+ * @return float An offset in hour (+1 for Europe/Paris on winter and +2 for Europe/Paris on summer). Note some countries use half and even quarter hours.
*/
function getServerTimeZoneInt($refgmtdate = 'now')
{
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 74f77c28558..3be41789535 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -1668,13 +1668,11 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
$phototoshow .= '';
}
}
- } elseif (!$phototoshow)
- {
+ } elseif (!$phototoshow) {
$phototoshow .= $form->showphoto($modulepart, $object, 0, 0, 0, 'photoref', 'small', 1, 0, $maxvisiblephotos);
}
- if ($phototoshow)
- {
+ if ($phototoshow) {
$morehtmlleft .= ' ';
$morehtmlleft .= $phototoshow;
$morehtmlleft .= ' ';
@@ -3096,7 +3094,7 @@ function dol_substr($string, $start, $length, $stringencoding = '', $trunconbyte
*
* @param string $string String to truncate
* @param int $size Max string size visible (excluding ...). 0 for no limit. WARNING: Final string size can have 3 more chars (if we added ..., or if size was max+1 or max+2 or max+3 so it does not worse to replace with ...)
- * @param string $trunc Where to trunc: right, left, middle (size must be a 2 power), wrap
+ * @param string $trunc Where to trunc: 'right', 'left', 'middle' (size must be a 2 power), 'wrap'
* @param string $stringencoding Tell what is source string encoding
* @param int $nodot Truncation do not add ... after truncation. So it's an exact truncation.
* @param int $display Trunc is used to display data and can be changed for small screen. TODO Remove this param (must be dealt with CSS)
diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php
index 5e7ddbd38fc..cb5e638ce40 100644
--- a/htdocs/core/lib/pdf.lib.php
+++ b/htdocs/core/lib/pdf.lib.php
@@ -817,8 +817,7 @@ function pdf_bank(&$pdf, $outputlangs, $curx, $cury, $account, $onlynumber = 0,
$pdf->SetFont('', '', $default_font_size - $diffsizecontent);
- if (empty($onlynumber) && !empty($account->domiciliation))
- {
+ if (empty($onlynumber) && !empty($account->domiciliation)) {
$pdf->SetXY($curx, $cury);
$val = $outputlangs->transnoentities("Residence").': '.$outputlangs->convToOutputCharset($account->domiciliation);
$pdf->MultiCell(100, 3, $val, 0, 'L', 0);
@@ -828,15 +827,15 @@ function pdf_bank(&$pdf, $outputlangs, $curx, $cury, $account, $onlynumber = 0,
$cury += $tmpy;
}
- if (!empty($account->proprio))
- {
+ if (!empty($account->proprio)) {
$pdf->SetXY($curx, $cury);
$val = $outputlangs->transnoentities("BankAccountOwner").': '.$outputlangs->convToOutputCharset($account->proprio);
$pdf->MultiCell(100, 3, $val, 0, 'L', 0);
$tmpy = $pdf->getStringHeight(100, $val);
$cury += $tmpy;
- $cur += 1;
- } elseif (!$usedetailedbban) $cury += 1;
+ } elseif (!$usedetailedbban) {
+ $cury += 1;
+ }
// Use correct name of bank id according to country
$ibankey = FormBank::getIBANLabel($account);
@@ -1625,7 +1624,7 @@ function pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails = 0)
{
if (empty($hidedetails) || $hidedetails > 1)
{
- $subprice = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_subprice : $object->lines[$i]->subprice);
+ $subprice = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_subprice : $object->lines[$i]->subprice);
$result .= price($sign * $subprice, 0, $outputlangs);
}
}
@@ -1966,7 +1965,7 @@ function pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails = 0)
}
elseif (empty($hidedetails) || $hidedetails > 1)
{
- $total_ht = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_total_ht : $object->lines[$i]->total_ht);
+ $total_ht = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_total_ht : $object->lines[$i]->total_ht);
if ($object->lines[$i]->situation_percent > 0)
{
// TODO Remove this. The total should be saved correctly in database instead of being modified here.
@@ -2023,7 +2022,7 @@ function pdf_getlinetotalwithtax($object, $i, $outputlangs, $hidedetails = 0)
}
elseif (empty($hidedetails) || $hidedetails > 1)
{
- $total_ttc = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_total_ttc : $object->lines[$i]->total_ttc);
+ $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_total_ttc : $object->lines[$i]->total_ttc);
if ($object->lines[$i]->situation_percent > 0)
{
// TODO Remove this. The total should be saved correctly in database instead of being modified here.
diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php
index 0f0b2474d51..fe9ae98ec61 100644
--- a/htdocs/core/lib/project.lib.php
+++ b/htdocs/core/lib/project.lib.php
@@ -678,10 +678,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
print $hookmanager->resPrint;
// Tick to drag and drop
- if ($addordertick)
- {
- print ' | ';
- }
+ print ''; print " | '; } - if ($addordertick) print ' | '; + print ' | '; print ''; } diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 114a3906392..7f5a18e2521 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -512,7 +512,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 3, $total_excl_tax, 0, 'R', 0); // Collection of totals by value of vat in $this->vat["rate"] = total_tva - if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva; + if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva; else $tvaligne = $object->lines[$i]->total_tva; $localtax1ligne = $object->lines[$i]->total_localtax1; @@ -900,14 +900,14 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetXY($col1x, $tab2_top + 0); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHT") : ''), 0, 'L', 1); - $total_ht = (($conf->multicurrency->enabled && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); + $total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); $pdf->SetXY($col2x, $tab2_top + 0); $pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0), 0, $outputlangs), 0, 'R', 1); // Show VAT by rates and total $pdf->SetFillColor(248, 248, 248); - $total_ttc = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; + $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; $this->atleastoneratenotnull = 0; if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 1f266851a0c..46409b362af 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -735,7 +735,7 @@ class pdf_eratosthene extends ModelePDFCommandes // Collection of totals by value of vat in $this->tva["rate"] = total_tva - if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva; + if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva; else $tvaligne = $object->lines[$i]->total_tva; $localtax1ligne = $object->lines[$i]->total_localtax1; @@ -1114,14 +1114,14 @@ class pdf_eratosthene extends ModelePDFCommandes $pdf->SetFillColor(255, 255, 255); $pdf->SetXY($col1x, $tab2_top + 0); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHT") : ''), 0, 'L', 1); - $total_ht = (($conf->multicurrency->enabled && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); + $total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); $pdf->SetXY($col2x, $tab2_top + 0); $pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0), 0, $outputlangs), 0, 'R', 1); // Show VAT by rates and total $pdf->SetFillColor(248, 248, 248); - $total_ttc = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; + $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; $this->atleastoneratenotnull = 0; if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 63d12a7516a..e005c93e976 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -632,10 +632,10 @@ class pdf_crabe extends ModelePDFFactures $prev_progress = $object->lines[$i]->get_prev_progress($object->id); if ($prev_progress > 0 && !empty($object->lines[$i]->situation_percent)) // Compute progress from previous situation { - if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent; + if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent; else $tvaligne = $sign * $object->lines[$i]->total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent; } else { - if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva; + if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva; else $tvaligne = $sign * $object->lines[$i]->total_tva; } @@ -853,7 +853,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY($tab3_posx, $tab3_top + $y); $pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($obj->datef), 'day', false, $outputlangs, true), 0, 'L', 0); $pdf->SetXY($tab3_posx + 21, $tab3_top + $y); - $pdf->MultiCell(20, 3, price(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $obj->multicurrency_amount_ttc : $obj->amount_ttc, 0, $outputlangs), 0, 'L', 0); + $pdf->MultiCell(20, 3, price((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $obj->multicurrency_amount_ttc : $obj->amount_ttc, 0, $outputlangs), 0, 'L', 0); $pdf->SetXY($tab3_posx + 40, $tab3_top + $y); $pdf->MultiCell(20, 3, $text, 0, 'L', 0); $pdf->SetXY($tab3_posx + 58, $tab3_top + $y); @@ -901,7 +901,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY($tab3_posx, $tab3_top + $y); $pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($row->date), 'day', false, $outputlangs, true), 0, 'L', 0); $pdf->SetXY($tab3_posx + 21, $tab3_top + $y); - $pdf->MultiCell(20, 3, price($sign * (($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount), 0, $outputlangs), 0, 'L', 0); + $pdf->MultiCell(20, 3, price($sign * ((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount), 0, $outputlangs), 0, 'L', 0); $pdf->SetXY($tab3_posx + 40, $tab3_top + $y); $oper = $outputlangs->transnoentitiesnoconv("PaymentTypeShort".$row->code); @@ -1177,14 +1177,14 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY($col1x, $tab2_top + 0); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1); - $total_ht = (($conf->multicurrency->enabled && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); + $total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); $pdf->SetXY($col2x, $tab2_top + 0); $pdf->MultiCell($largcol2, $tab2_hl, price($sign * ($total_ht + (!empty($object->remise) ? $object->remise : 0)), 0, $outputlangs), 0, 'R', 1); // Show VAT by rates and total $pdf->SetFillColor(248, 248, 248); - $total_ttc = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; + $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; $this->atleastoneratenotnull = 0; if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) @@ -1405,8 +1405,8 @@ class pdf_crabe extends ModelePDFFactures } $pdf->SetTextColor(0, 0, 0); - $creditnoteamount = $object->getSumCreditNotesUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0); // Warning, this also include excess received - $depositsamount = $object->getSumDepositsUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0); + $creditnoteamount = $object->getSumCreditNotesUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); // Warning, this also include excess received + $depositsamount = $object->getSumDepositsUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); //print "x".$creditnoteamount."-".$depositsamount;exit; $resteapayer = price2num($total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 'MT'); if (!empty($object->paye)) $resteapayer = 0; diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 532afbdab6e..4107e25ca03 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -293,9 +293,9 @@ class pdf_sponge extends ModelePDFFactures { $object->fetch_thirdparty(); - $deja_regle = $object->getSommePaiement(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0); - $amount_credit_notes_included = $object->getSumCreditNotesUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0); - $amount_deposits_included = $object->getSumDepositsUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0); + $deja_regle = $object->getSommePaiement((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); + $amount_credit_notes_included = $object->getSumCreditNotesUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); + $amount_deposits_included = $object->getSumDepositsUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); // Definition of $dir and $file if ($object->specimen) @@ -782,10 +782,10 @@ class pdf_sponge extends ModelePDFFactures $prev_progress = $object->lines[$i]->get_prev_progress($object->id); if ($prev_progress > 0 && !empty($object->lines[$i]->situation_percent)) // Compute progress from previous situation { - if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent; + if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent; else $tvaligne = $sign * $object->lines[$i]->total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent; } else { - if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva; + if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva; else $tvaligne = $sign * $object->lines[$i]->total_tva; } @@ -1002,7 +1002,7 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetXY($tab3_posx, $tab3_top + $y); $pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($obj->datef), 'day', false, $outputlangs, true), 0, 'L', 0); $pdf->SetXY($tab3_posx + 21, $tab3_top + $y); - $pdf->MultiCell(20, 3, price(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $obj->multicurrency_amount_ttc : $obj->amount_ttc, 0, $outputlangs), 0, 'L', 0); + $pdf->MultiCell(20, 3, price((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $obj->multicurrency_amount_ttc : $obj->amount_ttc, 0, $outputlangs), 0, 'L', 0); $pdf->SetXY($tab3_posx + 40, $tab3_top + $y); $pdf->MultiCell(20, 3, $text, 0, 'L', 0); $pdf->SetXY($tab3_posx + 58, $tab3_top + $y); @@ -1039,7 +1039,7 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetXY($tab3_posx, $tab3_top + $y); $pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($row->date), 'day', false, $outputlangs, true), 0, 'L', 0); $pdf->SetXY($tab3_posx + 21, $tab3_top + $y); - $pdf->MultiCell(20, 3, price($sign * (($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount), 0, $outputlangs), 0, 'L', 0); + $pdf->MultiCell(20, 3, price($sign * ((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount), 0, $outputlangs), 0, 'L', 0); $pdf->SetXY($tab3_posx + 40, $tab3_top + $y); $oper = $outputlangs->transnoentitiesnoconv("PaymentTypeShort".$row->code); @@ -1396,7 +1396,7 @@ class pdf_sponge extends ModelePDFFactures $tab2_top += 3; // Get Total HT - $total_ht = ($conf->multicurrency->enabled && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht); + $total_ht = (!empty($conf->multicurrency->enabled) && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht); // Total remise $total_line_remise = 0; @@ -1432,14 +1432,14 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHT") : ''), 0, 'L', 1); - $total_ht = (($conf->multicurrency->enabled && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); + $total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($sign * ($total_ht + (!empty($object->remise) ? $object->remise : 0)), 0, $outputlangs), 0, 'R', 1); // Show VAT by rates and total $pdf->SetFillColor(248, 248, 248); - $total_ttc = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; + $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; $this->atleastoneratenotnull = 0; if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) @@ -1693,8 +1693,8 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetTextColor(0, 0, 0); - $creditnoteamount = $object->getSumCreditNotesUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0); // Warning, this also include excess received - $depositsamount = $object->getSumDepositsUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0); + $creditnoteamount = $object->getSumCreditNotesUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); // Warning, this also include excess received + $depositsamount = $object->getSumDepositsUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); $resteapayer = price2num($total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 'MT'); if (!empty($object->paye)) $resteapayer = 0; diff --git a/htdocs/core/modules/modAgenda.class.php b/htdocs/core/modules/modAgenda.class.php index 0712adc59fb..559260a77c2 100644 --- a/htdocs/core/modules/modAgenda.class.php +++ b/htdocs/core/modules/modAgenda.class.php @@ -113,7 +113,7 @@ class modAgenda extends DolibarrModules //------------ $datestart = dol_now(); $this->cronjobs = array( - 0=>array('label'=>'SendEmailsReminders', 'jobtype'=>'method', 'class'=>'comm/action/class/actioncomm.class.php', 'objectname'=>'ActionComm', 'method'=>'sendEmailsReminder', 'parameters'=>'', 'comment'=>'SendEMailsReminder', 'frequency'=>10, 'unitfrequency'=>60, 'priority'=>10, 'status'=>1, 'test'=>'$conf->agenda->enabled', 'datestart'=>$datestart), + 0=>array('label'=>'SendEmailsReminders', 'jobtype'=>'method', 'class'=>'comm/action/class/actioncomm.class.php', 'objectname'=>'ActionComm', 'method'=>'sendEmailsReminder', 'parameters'=>'', 'comment'=>'SendEMailsReminder', 'frequency'=>5, 'unitfrequency'=>60, 'priority'=>10, 'status'=>1, 'test'=>'$conf->agenda->enabled', 'datestart'=>$datestart), ); // Permissions diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php index 7908fcaa4ba..f92d9b30890 100644 --- a/htdocs/core/modules/modProduct.class.php +++ b/htdocs/core/modules/modProduct.class.php @@ -649,7 +649,7 @@ class modProduct extends DolibarrModules 'sp.remise_percent'=>'DiscountQtyMin' )); - if ($conf->multicurrency->enabled) + if (!empty($conf->multicurrency->enabled)) { $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array( 'sp.fk_multicurrency'=>'CurrencyCodeId', //ideally this should be automatically obtained from the CurrencyCode on the next line @@ -708,7 +708,7 @@ class modProduct extends DolibarrModules // TODO Make this field not required and calculate it from price and qty 'sp.remise_percent' => '20' )); - if ($conf->multicurrency->enabled) + if (!empty($conf->multicurrency->enabled)) { $this->import_examplevalues_array[$r] = array_merge($this->import_examplevalues_array[$r], array( 'sp.fk_multicurrency'=>'eg: 2, rowid for code of multicurrency currency', diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index a4032c6a13a..66f17e21e5a 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -444,7 +444,7 @@ class pdf_standard extends ModelePDFProduct $pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalht, 3, $total_excl_tax, 0, 'R', 0); // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva - if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva; + if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva; else $tvaligne=$object->lines[$i]->total_tva; $localtax1ligne=$object->lines[$i]->total_localtax1; diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 3405b6a2774..b88a3d367dd 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -605,7 +605,7 @@ class pdf_azur extends ModelePDFPropales $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 3, $total_excl_tax, 0, 'R', 0); // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva - if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva; + if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva; else $tvaligne = $object->lines[$i]->total_tva; $localtax1ligne = $object->lines[$i]->total_localtax1; @@ -1056,14 +1056,14 @@ class pdf_azur extends ModelePDFPropales $pdf->SetXY($col1x, $tab2_top + 0); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1); - $total_ht = (($conf->multicurrency->enabled && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); + $total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); $pdf->SetXY($col2x, $tab2_top + 0); $pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0), 0, $outputlangs), 0, 'R', 1); // Show VAT by rates and total $pdf->SetFillColor(248, 248, 248); - $total_ttc = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; + $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; $this->atleastoneratenotnull = 0; if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index 8199f3ac11e..ac83d194749 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -747,7 +747,7 @@ class pdf_cyan extends ModelePDFPropales // Collection of totals by value of vat in $this->tva["rate"] = total_tva - if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva; + if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva; else $tvaligne = $object->lines[$i]->total_tva; $localtax1ligne = $object->lines[$i]->total_localtax1; @@ -1199,14 +1199,14 @@ class pdf_cyan extends ModelePDFPropales $pdf->SetXY($col1x, $tab2_top + 0); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHT") : ''), 0, 'L', 1); - $total_ht = (($conf->multicurrency->enabled && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); + $total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); $pdf->SetXY($col2x, $tab2_top + 0); $pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0), 0, $outputlangs), 0, 'R', 1); // Show VAT by rates and total $pdf->SetFillColor(248, 248, 248); - $total_ttc = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; + $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; $this->atleastoneratenotnull = 0; if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) diff --git a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php index 517f96a99d6..2409ffeca54 100644 --- a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php @@ -224,9 +224,9 @@ class pdf_canelle extends ModelePDFSuppliersInvoices { $object->fetch_thirdparty(); - $deja_regle = $object->getSommePaiement(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0); - $amount_credit_notes_included = $object->getSumCreditNotesUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0); - $amount_deposits_included = $object->getSumDepositsUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0); + $deja_regle = $object->getSommePaiement((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); + $amount_credit_notes_included = $object->getSumCreditNotesUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); + $amount_deposits_included = $object->getSumDepositsUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); // Definition of $dir and $file if ($object->specimen) @@ -490,7 +490,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 3, $total_excl_tax, 0, 'R', 0); // Collection of totals by VAT value in $this->tva["taux"]=total_tva - if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva; + if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva; else $tvaligne = $object->lines[$i]->total_tva; $localtax1ligne = $object->lines[$i]->total_localtax1; @@ -656,14 +656,14 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetXY($col1x, $tab2_top + 0); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1); - $total_ht = (($conf->multicurrency->enabled && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); + $total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); $pdf->SetXY($col2x, $tab2_top + 0); $pdf->MultiCell($largcol2, $tab2_hl, price($sign * ($total_ht + (!empty($object->remise) ? $object->remise : 0)), 0, $outputlangs), 0, 'R', 1); // Show VAT by rates and total $pdf->SetFillColor(248, 248, 248); - $total_ttc = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; + $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; $this->atleastoneratenotnull = 0; foreach ($this->tva as $tvakey => $tvaval) @@ -785,8 +785,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->MultiCell($largcol2, $tab2_hl, price($sign * $total_ttc, 0, $outputlangs), $useborder, 'R', 1); $pdf->SetTextColor(0, 0, 0); - $creditnoteamount = $object->getSumCreditNotesUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0); // Warning, this also include excess received - $depositsamount = $object->getSumDepositsUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0); + $creditnoteamount = $object->getSumCreditNotesUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); // Warning, this also include excess received + $depositsamount = $object->getSumDepositsUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); //print "x".$creditnoteamount."-".$depositsamount;exit; $resteapayer = price2num($total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 'MT'); if (!empty($object->paye)) $resteapayer = 0; @@ -1020,7 +1020,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetXY($tab3_posx, $tab3_top + $y); $pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($row->date), 'day', false, $outputlangs, true), 0, 'L', 0); $pdf->SetXY($tab3_posx + 21, $tab3_top + $y); - $pdf->MultiCell(20, 3, price($sign * (($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount)), 0, 'L', 0); + $pdf->MultiCell(20, 3, price($sign * ((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount)), 0, 'L', 0); $pdf->SetXY($tab3_posx + 40, $tab3_top + $y); $oper = $outputlangs->transnoentitiesnoconv("PaymentTypeShort".$row->code); diff --git a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php index 681b5316682..6c1b5aef21d 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php @@ -666,7 +666,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva - if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva; + if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva; else $tvaligne = $object->lines[$i]->total_tva; $localtax1ligne = $object->lines[$i]->total_localtax1; @@ -924,7 +924,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pdf->SetXY($col1x, $tab2_top + 0); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1); - $total_ht = (($conf->multicurrency->enabled && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); + $total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); $pdf->SetXY($col2x, $tab2_top + 0); $pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0)), 0, 'R', 1); @@ -1058,7 +1058,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pdf->SetFillColor(224, 224, 224); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1); - $total_ttc = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; + $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($total_ttc), $useborder, 'R', 1); $pdf->SetFont('', '', $default_font_size - 1); diff --git a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php index 13111da6fa9..1595659093c 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php @@ -549,7 +549,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 3, $total_excl_tax, 0, 'R', 0); // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva - if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva; + if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva; else $tvaligne = $object->lines[$i]->total_tva; $localtax1ligne = $object->lines[$i]->total_localtax1; @@ -805,7 +805,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->SetXY($col1x, $tab2_top + 0); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1); - $total_ht = (($conf->multicurrency->enabled && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); + $total_ht = ((!empty($conf->multicurrency->enabled) && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht); $pdf->SetXY($col2x, $tab2_top + 0); $pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0)), 0, 'R', 1); @@ -939,7 +939,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->SetFillColor(224, 224, 224); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1); - $total_ttc = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; + $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($total_ttc), $useborder, 'R', 1); $pdf->SetFont('', '', $default_font_size - 1); diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php index 8a3880dc93e..8022bcbae86 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -545,7 +545,7 @@ class pdf_aurore extends ModelePDFSupplierProposal */ // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva - if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva; + if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva; else $tvaligne = $object->lines[$i]->total_tva; $localtax1ligne = $object->lines[$i]->total_localtax1; diff --git a/htdocs/core/tpl/ajaxrow.tpl.php b/htdocs/core/tpl/ajaxrow.tpl.php index dea5ce60d6e..25d5f6f3526 100644 --- a/htdocs/core/tpl/ajaxrow.tpl.php +++ b/htdocs/core/tpl/ajaxrow.tpl.php @@ -44,7 +44,8 @@ $forcereloadpage = empty($conf->global->MAIN_FORCE_RELOAD_PAGE) ? 0 : 1; $tagidfortablednd = (empty($tagidfortablednd) ? 'tablelines' : $tagidfortablednd); $filepath = (empty($filepath) ? '' : $filepath); -if (GETPOST('action', 'aZ09') != 'editline' && $nboflines > 1) { ?> + +if (GETPOST('action', 'aZ09') != 'editline' && $nboflines > 1 && $conf->browser->layout != 'phone') { ?> '; } - if ($conf->multicurrency->enabled) { + if (!empty($conf->multicurrency->enabled)) { // Currency print ' |
| '.$langs->trans("Currency").' | '; print ''; @@ -725,7 +725,7 @@ END; // Option to define a transport cost on supplier price print ' | ||||
| '.$langs->trans('BarcodeValue').' | '; - print ''; + print ' | '; print ' | |||
| '.$langs->trans('BarcodeType').' | '; print ''; - print $formbarcode->selectBarcodeType(($rowid ? $object->fourn_fk_barcode_type : $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE), 'fk_barcode_type', 1); + print $formbarcode->selectBarcodeType(($rowid ? $object->supplier_fk_barcode_type : $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE), 'fk_barcode_type', 1); print ' | '; print ''; print $productfourn->fourn_multicurrency_price ? price($productfourn->fourn_multicurrency_price) : ""; @@ -1041,7 +1041,7 @@ END; print ' | '; } // Currency - if ($conf->multicurrency->enabled) { + if (!empty($conf->multicurrency->enabled)) { print ''; print $productfourn->fourn_multicurrency_code ? currency_name($productfourn->fourn_multicurrency_code) : ''; print ' | '; @@ -1071,16 +1071,16 @@ END; // Barcode if (!empty($arrayfields['pfp.barcode']['checked'])) { print ''; - print $productfourn->barcode; + print $productfourn->supplier_barcode; print ' | '; } // Barcode type if (!empty($arrayfields['pfp.fk_barcode_type']['checked'])) { print '';
- $productfourn->barcode_type = !empty($productfourn->fk_barcode_type) ? $productfourn->fk_barcode_type : 0;
+ $productfourn->barcode_type = !empty($productfourn->supplier_fk_barcode_type) ? $productfourn->supplier_fk_barcode_type : 0;
$productfourn->fetch_barcode();
- print $productfourn->barcode_type_label ? $productfourn->barcode_type_label : ($productfourn->barcode ? ' '.$langs->trans("SetDefaultBarcodeType").' ' : '');
+ print $productfourn->barcode_type_label ? $productfourn->barcode_type_label : ($productfourn->supplier_barcode ? ' '.$langs->trans("SetDefaultBarcodeType").' ' : '');
print ' | ';
}
diff --git a/htdocs/product/list.php b/htdocs/product/list.php
index b1dbb2609e1..b69786cca30 100644
--- a/htdocs/product/list.php
+++ b/htdocs/product/list.php
@@ -600,7 +600,7 @@ if ($resql)
$categoriesProductArr = $form->select_all_categories(Categorie::TYPE_PRODUCT, '', '', 64, 0, 1);
$categoriesProductArr[-2] = '- '.$langs->trans('NotCategorized').' -';
$moreforfilter .= Form::multiselectarray('search_category_product_list', $categoriesProductArr, $searchCategoryProductList, 0, 0, 'minwidth300');
- $moreforfilter .= ' '.$langs->trans('UseOrOperatorForCategories').'';
+ $moreforfilter .= ' '.$langs->trans('UseOrOperatorForCategories').'';
$moreforfilter .= '';
}
diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php
index 2df22bc933e..523b5e7543c 100644
--- a/htdocs/projet/class/task.class.php
+++ b/htdocs/projet/class/task.class.php
@@ -673,7 +673,9 @@ class Task extends CommonObject
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
}
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
- $linkclose .= ' class="classfortooltip"';
+ $linkclose .= ' class="classfortooltip nowraponall"';
+ } else {
+ $linkclose .= ' class="nowraponall"';
}
$linkstart = 'rights->projet->creer && (empty($object->third
print '';
$title = $langs->trans("ListOfTasks");
- $linktotasks = dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-list-alt paddingleft imgforviewmode', DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id, '', 1, array('morecss'=>'reposition btnTitleSelected'));
- $linktotasks .= dolGetButtonTitle($langs->trans('ViewGantt'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id.'&withproject=1', '', 1, array('morecss'=>'reposition marginleftonly'));
+ $linktotasks = dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-list-alt imgforviewmode', DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id, '', 1, array('morecss'=>'reposition btnTitleSelected'));
+ $linktotasks .= dolGetButtonTitle($langs->trans('ViewGantt'), '', 'fa fa-stream imgforviewmode', DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id.'&withproject=1', '', 1, array('morecss'=>'reposition marginleftonly'));
//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'generic', 0, '', '', 0, 1);
print load_fiche_titre($title, $linktotasks.' '.$linktocreatetask, 'projecttask');
diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php
index 81243ac735d..f872890b548 100644
--- a/htdocs/projet/tasks/time.php
+++ b/htdocs/projet/tasks/time.php
@@ -897,6 +897,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0)
if ($id) $param .= '&id='.urlencode($id);
if ($projectid) $param .= '&projectid='.urlencode($projectid);
if ($withproject) $param .= '&withproject='.urlencode($withproject);
+ if ($page) $param .= '&page='.urlencode($page);
print '