';
- $diffval = floatval($task->progress) - floatval($progressCalculated);
+ $diffval = (float) $task->progress - (float) $progressCalculated;
if ($diffval >= 0) {
// good
- $out .= '
';
+ $out .= '
';
if (!empty($task->progress)) {
- $out .= '
';
+ $out .= '
';
}
$out .= '
';
} else {
// bad
- $out .= '
';
- $out .= '
';
+ $out .= '
';
+ $out .= '
';
$out .= '
';
}
$out .= '
';
@@ -2977,17 +2977,17 @@ function getTaskProgressBadge($task, $label = '', $tooltip = '')
// define color according to time spend vs workload
$badgeClass = 'badge ';
if ($task->planned_workload) {
- $progressCalculated = round(100 * floatval($task->duration_effective) / floatval($task->planned_workload), 2);
+ $progressCalculated = round(100 * (float) $task->duration_effective / (float) $task->planned_workload, 2);
// this conf is actually hidden, by default we use 10% for "be carefull or warning"
$warningRatio = getDolGlobalString('PROJECT_TIME_SPEND_WARNING_PERCENT') ? (1 + $conf->global->PROJECT_TIME_SPEND_WARNING_PERCENT / 100) : 1.10;
- if (floatval($progressCalculated) > floatval($task->progress * $warningRatio)) {
+ if ((float) $progressCalculated > (float) ($task->progress * $warningRatio)) {
$badgeClass .= 'badge-danger';
if (empty($tooltip)) {
$tooltip = $task->progress.'% < '.$langs->trans("TimeConsumed").' '.$progressCalculated.'%';
}
- } elseif (floatval($progressCalculated) > floatval($task->progress)) { // warning if close at 10%
+ } elseif ((float) $progressCalculated > (float) $task->progress) { // warning if close at 10%
$badgeClass .= 'badge-warning';
if (empty($tooltip)) {
$tooltip = $task->progress.'% < '.$langs->trans("TimeConsumed").' '.$progressCalculated.'%';
diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php
index 60b52ba3101..bed487971d5 100644
--- a/htdocs/core/lib/usergroups.lib.php
+++ b/htdocs/core/lib/usergroups.lib.php
@@ -406,8 +406,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
$handle = opendir($dirtheme);
if (is_resource($handle)) {
while (($subdir = readdir($handle)) !== false) {
- if (is_dir($dirtheme."/".$subdir) && substr($subdir, 0, 1) <> '.'
- && substr($subdir, 0, 3) <> 'CVS' && !preg_match('/common|phones/i', $subdir)) {
+ if (is_dir($dirtheme."/".$subdir) && substr($subdir, 0, 1) != '.'
+ && substr($subdir, 0, 3) != 'CVS' && !preg_match('/common|phones/i', $subdir)) {
// Disable not stable themes (dir ends with _exp or _dev)
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2 && preg_match('/_dev$/i', $subdir)) {
continue;
diff --git a/htdocs/core/lib/website2.lib.php b/htdocs/core/lib/website2.lib.php
index 144d46d31de..8767a8a227c 100644
--- a/htdocs/core/lib/website2.lib.php
+++ b/htdocs/core/lib/website2.lib.php
@@ -581,7 +581,7 @@ function showWebsiteTemplates(Website $website)
$handle = opendir($dirtheme);
if (is_resource($handle)) {
while (($subdir = readdir($handle)) !== false) {
- if (is_file($dirtheme."/".$subdir) && substr($subdir, 0, 1) <> '.' && substr($subdir, 0, 3) <> 'CVS' && preg_match('/\.zip$/i', $subdir)) {
+ if (is_file($dirtheme."/".$subdir) && substr($subdir, 0, 1) != '.' && substr($subdir, 0, 3) != 'CVS' && preg_match('/\.zip$/i', $subdir)) {
$subdirwithoutzip = preg_replace('/\.zip$/i', '', $subdir);
// Disable not stable themes (dir ends with _exp or _dev)
diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php
index 13ff885a2d0..1f300718385 100644
--- a/htdocs/core/modules/DolibarrModules.class.php
+++ b/htdocs/core/modules/DolibarrModules.class.php
@@ -619,7 +619,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
global $langs;
$langs->load("admin");
- if ($langs->transnoentitiesnoconv("Module".$this->numero."Name") != ("Module".$this->numero."Name")) {
+ if ($langs->transnoentitiesnoconv("Module".$this->numero."Name") != "Module".$this->numero."Name") {
// If module name translation exists
return $langs->transnoentitiesnoconv("Module".$this->numero."Name");
} else {
@@ -632,7 +632,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
}
}
- if ($langs->trans("Module".$this->name."Name") != ("Module".$this->name."Name")) {
+ if ($langs->trans("Module".$this->name."Name") != "Module".$this->name."Name") {
// If module name translation exists
return $langs->transnoentitiesnoconv("Module".$this->name."Name");
}
@@ -653,7 +653,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
global $langs;
$langs->load("admin");
- if ($langs->transnoentitiesnoconv("Module".$this->numero."Desc") != ("Module".$this->numero."Desc")) {
+ if ($langs->transnoentitiesnoconv("Module".$this->numero."Desc") != "Module".$this->numero."Desc") {
// If module description translation exists
return $langs->transnoentitiesnoconv("Module".$this->numero."Desc");
} else {
@@ -666,7 +666,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
}
}
- if ($langs->transnoentitiesnoconv("Module".$this->name."Desc") != ("Module".$this->name."Desc")) {
+ if ($langs->transnoentitiesnoconv("Module".$this->name."Desc") != "Module".$this->name."Desc") {
// If module name translation exists
return $langs->trans("Module".$this->name."Desc");
}
diff --git a/htdocs/core/modules/barcode/mod_barcode_product_standard.php b/htdocs/core/modules/barcode/mod_barcode_product_standard.php
index cf8e067b8d4..6a8feaefccd 100644
--- a/htdocs/core/modules/barcode/mod_barcode_product_standard.php
+++ b/htdocs/core/modules/barcode/mod_barcode_product_standard.php
@@ -261,7 +261,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
} else {
if ($this->verif_syntax($code, $type) >= 0) {
$is_dispo = $this->verif_dispo($db, $code, $product);
- if ($is_dispo <> 0) {
+ if ($is_dispo != 0) {
$result = -3;
} else {
$result = 0;
diff --git a/htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php b/htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php
index 7c7921cf461..3037f29d33d 100644
--- a/htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php
+++ b/htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php
@@ -262,7 +262,7 @@ class mod_barcode_thirdparty_standard extends ModeleNumRefBarCode
} else {
if ($this->verif_syntax($code, $type) >= 0) {
$is_dispo = $this->verif_dispo($db, $code, $thirdparty);
- if ($is_dispo <> 0) {
+ if ($is_dispo != 0) {
$result = -3;
} else {
$result = 0;
diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
index dddb16a3dd7..3c9a8d348e3 100644
--- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
@@ -719,7 +719,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetFont('', '', $default_font_size - $diffsizetitle);
$pdf->SetXY($posxval, $posy);
- $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
+ $lib_condition_paiement = ($outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != 'PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
if ($object->deposit_percent > 0) {
$lib_condition_paiement = str_replace('__DEPOSIT_PERCENT__', $object->deposit_percent, $lib_condition_paiement);
@@ -778,7 +778,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFont('', '', $default_font_size - $diffsizetitle);
$pdf->SetXY($posxval, $posy);
- $lib_availability = $outputlangs->transnoentities("AvailabilityType".$object->availability_code) != ('AvailabilityType'.$object->availability_code) ? $outputlangs->transnoentities("AvailabilityType".$object->availability_code) : $outputlangs->convToOutputCharset(isset($object->availability) ? $object->availability : '');
+ $lib_availability = $outputlangs->transnoentities("AvailabilityType".$object->availability_code) != 'AvailabilityType'.$object->availability_code ? $outputlangs->transnoentities("AvailabilityType".$object->availability_code) : $outputlangs->convToOutputCharset(isset($object->availability) ? $object->availability : '');
$lib_availability = str_replace('\n', "\n", $lib_availability);
$pdf->MultiCell(80, 4, $lib_availability, 0, 'L');
@@ -796,7 +796,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetFont('', '', $default_font_size - $diffsizetitle);
$pdf->SetXY($posxval, $posy);
- $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != ('PaymentType'.$object->mode_reglement_code) ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement);
+ $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != 'PaymentType'.$object->mode_reglement_code ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement);
$pdf->MultiCell(80, 5, $lib_mode_reg, 0, 'L');
$posy = $pdf->GetY() + 2;
diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
index a55f63c2233..74851a34c7e 100644
--- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
@@ -921,7 +921,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$pdf->SetFont('', '', $default_font_size - $diffsizetitle);
$pdf->SetXY($posxval, $posy);
- $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
+ $lib_condition_paiement = ($outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != 'PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
if ($object->deposit_percent > 0) {
$lib_condition_paiement = str_replace('__DEPOSIT_PERCENT__', $object->deposit_percent, $lib_condition_paiement);
@@ -979,7 +979,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFont('', '', $default_font_size - $diffsizetitle);
$pdf->SetXY($posxval, $posy);
- $lib_availability = $outputlangs->transnoentities("AvailabilityType".$object->availability_code) != ('AvailabilityType'.$object->availability_code) ? $outputlangs->transnoentities("AvailabilityType".$object->availability_code) : $outputlangs->convToOutputCharset(isset($object->availability) ? $object->availability : '');
+ $lib_availability = $outputlangs->transnoentities("AvailabilityType".$object->availability_code) != 'AvailabilityType'.$object->availability_code ? $outputlangs->transnoentities("AvailabilityType".$object->availability_code) : $outputlangs->convToOutputCharset(isset($object->availability) ? $object->availability : '');
$lib_availability = str_replace('\n', "\n", $lib_availability);
$pdf->MultiCell(80, 4, $lib_availability, 0, 'L');
@@ -997,7 +997,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$pdf->SetFont('', '', $default_font_size - $diffsizetitle);
$pdf->SetXY($posxval, $posy);
- $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != ('PaymentType'.$object->mode_reglement_code) ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement);
+ $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != 'PaymentType'.$object->mode_reglement_code ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement);
$pdf->MultiCell(80, 5, $lib_mode_reg, 0, 'L');
$posy = $pdf->GetY() + 2;
diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
index ed3701527c0..018d41dbb53 100644
--- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
+++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
@@ -1145,7 +1145,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posxval, $posy);
- $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
+ $lib_condition_paiement = ($outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != 'PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
@@ -1199,7 +1199,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posxval, $posy);
- $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != ('PaymentType'.$object->mode_reglement_code) ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement);
+ $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != 'PaymentType'.$object->mode_reglement_code ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement);
//#21654: add account number used for the debit
if ($object->mode_reglement_code == "PRE") {
require_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php';
diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
index 7a3e443d6ac..de9ec3f2a09 100644
--- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
+++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
@@ -1238,7 +1238,7 @@ class pdf_sponge extends ModelePDFFactures
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posxval, $posy);
- $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
+ $lib_condition_paiement = ($outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != 'PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
$pdf->MultiCell($posxend - $posxval, 4, $lib_condition_paiement, 0, 'L');
@@ -1292,7 +1292,7 @@ class pdf_sponge extends ModelePDFFactures
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posxval, $posy);
- $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != ('PaymentType'.$object->mode_reglement_code) ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement);
+ $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != 'PaymentType'.$object->mode_reglement_code ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement);
//#21654: add account number used for the debit
if ($object->mode_reglement_code == "PRE") {
diff --git a/htdocs/core/modules/mailings/contacts1.modules.php b/htdocs/core/modules/mailings/contacts1.modules.php
index 83059884b80..4868f64dbfc 100644
--- a/htdocs/core/modules/mailings/contacts1.modules.php
+++ b/htdocs/core/modules/mailings/contacts1.modules.php
@@ -454,7 +454,7 @@ class mailing_contacts1 extends MailingTargets
$old = '';
while ($i < $num) {
$obj = $this->db->fetch_object($result);
- if ($old <> $obj->email) {
+ if ($old != $obj->email) {
$cibles[$j] = array(
'email' => $obj->email,
'fk_contact' => $obj->fk_contact,
diff --git a/htdocs/core/modules/mailings/eventorganization.modules.php b/htdocs/core/modules/mailings/eventorganization.modules.php
index c2a2c0d3c8d..006405f63c8 100644
--- a/htdocs/core/modules/mailings/eventorganization.modules.php
+++ b/htdocs/core/modules/mailings/eventorganization.modules.php
@@ -99,7 +99,7 @@ class mailing_eventorganization extends MailingTargets
$old = '';
while ($i < $num) {
$obj = $this->db->fetch_object($result);
- if ($old <> $obj->email) {
+ if ($old != $obj->email) {
$otherTxt = ($obj->ref ? $langs->transnoentities("Project").'='.$obj->ref : '');
if (strlen($addDescription) > 0 && strlen($otherTxt) > 0) {
$otherTxt .= ";";
diff --git a/htdocs/core/modules/mailings/fraise.modules.php b/htdocs/core/modules/mailings/fraise.modules.php
index 1ffd718a44f..43ece5ec3f6 100644
--- a/htdocs/core/modules/mailings/fraise.modules.php
+++ b/htdocs/core/modules/mailings/fraise.modules.php
@@ -297,7 +297,7 @@ class mailing_fraise extends MailingTargets
$old = '';
while ($i < $num) {
$obj = $this->db->fetch_object($result);
- if ($old <> $obj->email) {
+ if ($old != $obj->email) {
$cibles[$j] = array(
'email' => $obj->email,
'fk_contact' => $obj->fk_contact,
diff --git a/htdocs/core/modules/mailings/partnership.modules.php b/htdocs/core/modules/mailings/partnership.modules.php
index 03d6a59dba8..739ef8c52f8 100644
--- a/htdocs/core/modules/mailings/partnership.modules.php
+++ b/htdocs/core/modules/mailings/partnership.modules.php
@@ -121,7 +121,7 @@ class mailing_partnership extends MailingTargets
$old = '';
while ($i < $num) {
$obj = $this->db->fetch_object($result);
- if ($old <> $obj->email) {
+ if ($old != $obj->email) {
$otherTxt = ($obj->label ? $langs->transnoentities("PartnershipType").'='.$obj->label : '');
if (strlen($addDescription) > 0 && strlen($otherTxt) > 0) {
$otherTxt .= ";";
diff --git a/htdocs/core/modules/mailings/pomme.modules.php b/htdocs/core/modules/mailings/pomme.modules.php
index 25d4d8a4192..9dc1c18f696 100644
--- a/htdocs/core/modules/mailings/pomme.modules.php
+++ b/htdocs/core/modules/mailings/pomme.modules.php
@@ -199,7 +199,7 @@ class mailing_pomme extends MailingTargets
$old = '';
while ($i < $num) {
$obj = $this->db->fetch_object($result);
- if ($old <> $obj->email) {
+ if ($old != $obj->email) {
$cibles[$j] = array(
'email' => $obj->email,
'fk_contact' => $obj->fk_contact,
diff --git a/htdocs/core/modules/mailings/thirdparties.modules.php b/htdocs/core/modules/mailings/thirdparties.modules.php
index dcda0f2b0aa..b11f80712ec 100644
--- a/htdocs/core/modules/mailings/thirdparties.modules.php
+++ b/htdocs/core/modules/mailings/thirdparties.modules.php
@@ -69,7 +69,7 @@ class mailing_thirdparties extends MailingTargets
$addDescription = "";
$addFilter = "";
- if (GETPOSTISSET("filter_client_thirdparties") && GETPOST("filter_client_thirdparties") <> '-1') {
+ if (GETPOSTISSET("filter_client_thirdparties") && GETPOST("filter_client_thirdparties") != '-1') {
$addFilter .= " AND s.client=".((int) GETPOST("filter_client_thirdparties", 'int'));
$addDescription = $langs->trans('ProspectCustomer')."=";
if (GETPOST("filter_client_thirdparties") == 0) {
@@ -84,7 +84,7 @@ class mailing_thirdparties extends MailingTargets
$addDescription .= "Unknown status ".GETPOST("filter_client_thirdparties");
}
}
- if (GETPOSTISSET("filter_supplier_thirdparties") && GETPOST("filter_supplier_thirdparties") <> '-1') {
+ if (GETPOSTISSET("filter_supplier_thirdparties") && GETPOST("filter_supplier_thirdparties") != '-1') {
$addFilter .= " AND s.fournisseur = ".((int) GETPOST("filter_supplier_thirdparties", 'int'));
$addDescription = $langs->trans('Supplier')."=";
if (GETPOST("filter_supplier_thirdparties") == 0) {
@@ -188,7 +188,7 @@ class mailing_thirdparties extends MailingTargets
$old = '';
while ($i < $num) {
$obj = $this->db->fetch_object($result);
- if ($old <> $obj->email) {
+ if ($old != $obj->email) {
$otherTxt = ($obj->label ? $langs->transnoentities("Category").'='.$obj->label : '');
if (strlen($addDescription) > 0 && strlen($otherTxt) > 0) {
$otherTxt .= ";";
diff --git a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php
index 4d0ac4ea0bb..b628890f8a8 100644
--- a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php
+++ b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php
@@ -129,7 +129,7 @@ class mailing_thirdparties_services_expired extends MailingTargets
$old = '';
while ($i < $num) {
$obj = $this->db->fetch_object($result);
- if ($old <> $obj->email) {
+ if ($old != $obj->email) {
$cibles[$j] = array(
'email' => $obj->email,
'lastname' => $obj->name, // For thirdparties, lastname must be name
diff --git a/htdocs/core/modules/mailings/xinputfile.modules.php b/htdocs/core/modules/mailings/xinputfile.modules.php
index 3fcbace468b..e1eed1ffb6d 100644
--- a/htdocs/core/modules/mailings/xinputfile.modules.php
+++ b/htdocs/core/modules/mailings/xinputfile.modules.php
@@ -165,7 +165,7 @@ class mailing_xinputfile extends MailingTargets
if (!empty($buffer)) {
//print 'xx'.dol_strlen($buffer).empty($buffer)."
\n";
if (isValidEMail($email)) {
- if ($old <> $email) {
+ if ($old != $email) {
$cibles[$j] = array(
'email' => $email,
'lastname' => $name,
diff --git a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php
index 36ae75629c2..865452c6e6a 100644
--- a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php
+++ b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php
@@ -704,7 +704,7 @@ class pdf_vinci extends ModelePDFMo
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posxval, $posy);
- $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
+ $lib_condition_paiement = ($outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != 'PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
$pdf->MultiCell(80, 4, $lib_condition_paiement, 0, 'L');
@@ -720,7 +720,7 @@ class pdf_vinci extends ModelePDFMo
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posxval, $posy);
- $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != ('PaymentType'.$object->mode_reglement_code) ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement);
+ $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != 'PaymentType'.$object->mode_reglement_code ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement);
$pdf->MultiCell(80, 5, $lib_mode_reg, 0, 'L');
$posy = $pdf->GetY() + 2;
diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
index 0f83b667b95..53a2b63ec49 100644
--- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
@@ -925,7 +925,7 @@ class pdf_azur extends ModelePDFPropales
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFont('', '', $default_font_size - $diffsizetitle);
$pdf->SetXY($posxval, $posy);
- $lib_availability = $outputlangs->transnoentities("AvailabilityType".$object->availability_code) != ('AvailabilityType'.$object->availability_code) ? $outputlangs->transnoentities("AvailabilityType".$object->availability_code) : $outputlangs->convToOutputCharset($object->availability);
+ $lib_availability = ($outputlangs->transnoentities("AvailabilityType".$object->availability_code) != 'AvailabilityType'.$object->availability_code) ? $outputlangs->transnoentities("AvailabilityType".$object->availability_code) : $outputlangs->convToOutputCharset($object->availability);
$lib_availability = str_replace('\n', "\n", $lib_availability);
$pdf->MultiCell(80, 4, $lib_availability, 0, 'L');
@@ -966,7 +966,7 @@ class pdf_azur extends ModelePDFPropales
$pdf->SetFont('', '', $default_font_size - $diffsizetitle);
$pdf->SetXY($posxval, $posy);
- $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
+ $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != 'PaymentCondition'.$object->cond_reglement_code ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
if ($object->deposit_percent > 0) {
$lib_condition_paiement = str_replace('__DEPOSIT_PERCENT__', $object->deposit_percent, $lib_condition_paiement);
@@ -987,7 +987,7 @@ class pdf_azur extends ModelePDFPropales
$pdf->MultiCell(80, 5, $titre, 0, 'L');
$pdf->SetFont('', '', $default_font_size - $diffsizetitle);
$pdf->SetXY($posxval, $posy);
- $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != ('PaymentType'.$object->mode_reglement_code) ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement);
+ $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != 'PaymentType'.$object->mode_reglement_code ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement);
$pdf->MultiCell(80, 5, $lib_mode_reg, 0, 'L');
$posy = $pdf->GetY() + 2;
diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
index 1cda855a095..4bed358b2ba 100644
--- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
@@ -1018,7 +1018,7 @@ class pdf_cyan extends ModelePDFPropales
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFont('', '', $default_font_size - $diffsizetitle);
$pdf->SetXY($posxval, $posy);
- $lib_availability = $outputlangs->transnoentities("AvailabilityType".$object->availability_code) != ('AvailabilityType'.$object->availability_code) ? $outputlangs->transnoentities("AvailabilityType".$object->availability_code) : $outputlangs->convToOutputCharset($object->availability);
+ $lib_availability = ($outputlangs->transnoentities("AvailabilityType".$object->availability_code) != 'AvailabilityType'.$object->availability_code) ? $outputlangs->transnoentities("AvailabilityType".$object->availability_code) : $outputlangs->convToOutputCharset($object->availability);
$lib_availability = str_replace('\n', "\n", $lib_availability);
$pdf->MultiCell(80, 4, $lib_availability, 0, 'L');
@@ -1059,7 +1059,7 @@ class pdf_cyan extends ModelePDFPropales
$pdf->SetFont('', '', $default_font_size - $diffsizetitle);
$pdf->SetXY($posxval, $posy);
- $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
+ $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != 'PaymentCondition'.$object->cond_reglement_code ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
if ($object->deposit_percent > 0) {
$lib_condition_paiement = str_replace('__DEPOSIT_PERCENT__', $object->deposit_percent, $lib_condition_paiement);
@@ -1080,7 +1080,7 @@ class pdf_cyan extends ModelePDFPropales
$pdf->MultiCell(80, 5, $titre, 0, 'L');
$pdf->SetFont('', '', $default_font_size - $diffsizetitle);
$pdf->SetXY($posxval, $posy);
- $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != ('PaymentType'.$object->mode_reglement_code) ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement);
+ $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != 'PaymentType'.$object->mode_reglement_code ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement);
$pdf->MultiCell(80, 5, $lib_mode_reg, 0, 'L');
$posy = $pdf->GetY() + 2;
diff --git a/htdocs/core/modules/rapport/pdf_paiement.class.php b/htdocs/core/modules/rapport/pdf_paiement.class.php
index 62091507449..50100967a03 100644
--- a/htdocs/core/modules/rapport/pdf_paiement.class.php
+++ b/htdocs/core/modules/rapport/pdf_paiement.class.php
@@ -490,7 +490,7 @@ class pdf_paiement extends CommonDocGenerator
$pdf->SetFont('', '', $default_font_size - 1);
$yp = 0;
}
- if ($oldprowid <> $lines[$j][7]) {
+ if ($oldprowid != $lines[$j][7]) {
if ($yp > $this->tab_height - 15) {
$pdf->SetFillColor(255, 255, 255);
$pdf->Rect($this->marge_gauche + 1, $this->tab_top + 10 + $yp, $this->posxpaymentamount - $this->marge_droite - 3, $this->line_height, 'F', array(), array());
@@ -547,7 +547,7 @@ class pdf_paiement extends CommonDocGenerator
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount, $this->line_height, $lines[$j][6], 0, 'R', 0);
$yp = $yp + 5;
- if ($oldprowid <> $lines[$j][7]) {
+ if ($oldprowid != $lines[$j][7]) {
$oldprowid = $lines[$j][7];
}
diff --git a/htdocs/core/modules/societe/mod_codeclient_elephant.php b/htdocs/core/modules/societe/mod_codeclient_elephant.php
index 89dcab90827..1c27d563ecb 100644
--- a/htdocs/core/modules/societe/mod_codeclient_elephant.php
+++ b/htdocs/core/modules/societe/mod_codeclient_elephant.php
@@ -329,7 +329,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
return -6;
} else {
$is_dispo = $this->verif_dispo($db, $code, $soc, $type);
- if ($is_dispo <> 0) {
+ if ($is_dispo != 0) {
$result = -3;
}
}
diff --git a/htdocs/core/modules/societe/mod_codeclient_monkey.php b/htdocs/core/modules/societe/mod_codeclient_monkey.php
index bf7a5ea84f4..4ae2207fecf 100644
--- a/htdocs/core/modules/societe/mod_codeclient_monkey.php
+++ b/htdocs/core/modules/societe/mod_codeclient_monkey.php
@@ -188,7 +188,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
} else {
if ($this->verif_syntax($code) >= 0) {
$is_dispo = $this->verif_dispo($db, $code, $soc, $type);
- if ($is_dispo <> 0) {
+ if ($is_dispo != 0) {
$result = -3;
} else {
$result = 0;
diff --git a/htdocs/core/modules/societe/mod_codecompta_digitaria.php b/htdocs/core/modules/societe/mod_codecompta_digitaria.php
index 0a33980e694..ccb480dcc52 100644
--- a/htdocs/core/modules/societe/mod_codecompta_digitaria.php
+++ b/htdocs/core/modules/societe/mod_codecompta_digitaria.php
@@ -237,7 +237,7 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode
if (!isset($conf->global->COMPANY_DIGITARIA_UNIQUE_CODE) || getDolGlobalString('COMPANY_DIGITARIA_UNIQUE_CODE')) {
$disponibility = $this->checkIfAccountancyCodeIsAlreadyUsed($db, $this->code, $type);
- while ($disponibility <> 0 && $i < 1000) {
+ while ($disponibility != 0 && $i < 1000) {
$widthsupplier = $this->supplieraccountancycodecharacternumber;
$widthcustomer = $this->customeraccountancycodecharacternumber;
diff --git a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php
index de7a1f65f5e..76db4f7a157 100644
--- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php
+++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php
@@ -855,7 +855,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posxval, $posy);
- $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc);
+ $lib_condition_paiement = ($outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != 'PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc);
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
@@ -910,7 +910,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posxval, $posy);
- $lib_availability = $outputlangs->transnoentities("AvailabilityType".$object->availability_code) != ('AvailabilityType'.$object->availability_code) ? $outputlangs->transnoentities("AvailabilityType".$object->availability_code) : $outputlangs->convToOutputCharset(isset($object->availability) ? $object->availability : '');
+ $lib_availability = $outputlangs->transnoentities("AvailabilityType".$object->availability_code) != 'AvailabilityType'.$object->availability_code ? $outputlangs->transnoentities("AvailabilityType".$object->availability_code) : $outputlangs->convToOutputCharset(isset($object->availability) ? $object->availability : '');
$lib_availability = str_replace('\n', "\n", $lib_availability);
$pdf->MultiCell(80, 4, $lib_availability, 0, 'L');
@@ -928,7 +928,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posxval, $posy);
- $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != ('PaymentType'.$object->mode_reglement_code) ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement);
+ $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != 'PaymentType'.$object->mode_reglement_code ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement);
$pdf->MultiCell(80, 5, $lib_mode_reg, 0, 'L');
$posy = $pdf->GetY() + 2;
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 940a4f09a6d..44abdcd64a3 100644
--- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
+++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
@@ -875,7 +875,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$pdf->SetFont('', '', $default_font_size - $diffsizetitle);
$pdf->SetXY($posxval, $posy);
- $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
+ $lib_condition_paiement = ($outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != 'PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
$pdf->MultiCell(80, 4, $lib_condition_paiement, 0, 'L');
@@ -891,7 +891,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$pdf->SetFont('', '', $default_font_size - $diffsizetitle);
$pdf->SetXY($posxval, $posy);
- $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != ('PaymentType'.$object->mode_reglement_code) ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement);
+ $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != 'PaymentType'.$object->mode_reglement_code ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement);
$pdf->MultiCell(80, 5, $lib_mode_reg, 0, 'L');
$posy = $pdf->GetY() + 2;
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 09604265236..1bbb8cbf623 100644
--- a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php
+++ b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php
@@ -754,7 +754,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->SetFont('', '', $default_font_size - $diffsizetitle);
$pdf->SetXY($posxval, $posy);
- $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
+ $lib_condition_paiement = ($outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != 'PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
$pdf->MultiCell(80, 4, $lib_condition_paiement, 0, 'L');
@@ -770,7 +770,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->SetFont('', '', $default_font_size - $diffsizetitle);
$pdf->SetXY($posxval, $posy);
- $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != ('PaymentType'.$object->mode_reglement_code) ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement);
+ $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != 'PaymentType'.$object->mode_reglement_code ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement);
$pdf->MultiCell(80, 5, $lib_mode_reg, 0, 'L');
$posy = $pdf->GetY() + 2;
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 ee84d168da9..958382e0a34 100644
--- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
+++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
@@ -779,7 +779,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$pdf->SetFont('', '', $default_font_size - $diffsizetitle);
$pdf->SetXY($posxval, $posy);
- $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
+ $lib_condition_paiement = ($outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != 'PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
$pdf->MultiCell(80, 4, $lib_condition_paiement, 0, 'L');
@@ -797,7 +797,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$pdf->MultiCell(80, 5, $titre, 0, 'L');
$pdf->SetFont('', '', $default_font_size - $diffsizetitle);
$pdf->SetXY($posxval, $posy - 2);
- $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != ('PaymentType'.$object->mode_reglement_code) ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement);
+ $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != 'PaymentType'.$object->mode_reglement_code ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement);
$pdf->MultiCell(80, 5, $lib_mode_reg, 0, 'L');
$posy = $pdf->GetY() + 2;
diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php
index d87861f0ab9..b500aeae310 100644
--- a/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php
+++ b/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php
@@ -874,7 +874,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
$pdf->SetFont('', '', $default_font_size - $diffsizetitle);
$pdf->SetXY($posxval, $posy);
- $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
+ $lib_condition_paiement = ($outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != 'PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
$pdf->MultiCell(80, 4, $lib_condition_paiement, 0, 'L');
@@ -890,7 +890,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
$pdf->SetFont('', '', $default_font_size - $diffsizetitle);
$pdf->SetXY($posxval, $posy);
- $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != ('PaymentType'.$object->mode_reglement_code) ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement);
+ $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != 'PaymentType'.$object->mode_reglement_code ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement);
$pdf->MultiCell(80, 5, $lib_mode_reg, 0, 'L');
$posy = $pdf->GetY() + 2;
diff --git a/htdocs/don/card.php b/htdocs/don/card.php
index 1499e29b7fa..b4d72e29738 100644
--- a/htdocs/don/card.php
+++ b/htdocs/don/card.php
@@ -848,7 +848,7 @@ if (!empty($id) && $action != 'edit') {
print '
| ';
print ''.img_object($langs->trans("Payment"), "payment").' '.$objp->rowid.' | ';
print ''.dol_print_date($db->jdate($objp->dp), 'day')." | \n";
- $labeltype = $langs->trans("PaymentType".$objp->type_code) != ("PaymentType".$objp->type_code) ? $langs->trans("PaymentType".$objp->type_code) : $objp->paiement_type;
+ $labeltype = ($langs->trans("PaymentType".$objp->type_code) != "PaymentType".$objp->type_code) ? $langs->trans("PaymentType".$objp->type_code) : $objp->paiement_type;
print "".$labeltype.' '.$objp->num_payment." | \n";
print ''.price($objp->amount)." | \n";
print "
";
diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php
index 0a065a71933..b8a07790426 100644
--- a/htdocs/expedition/list.php
+++ b/htdocs/expedition/list.php
@@ -325,7 +325,7 @@ if ($socid > 0) {
if ($socid) {
$sql .= " AND e.fk_soc = ".((int) $socid);
}
-if ($search_status <> '' && $search_status >= 0) {
+if ($search_status != '' && $search_status >= 0) {
$sql .= " AND e.fk_statut = ".((int) $search_status);
}
if ($search_ref_customer != '') {
diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php
index 5426fc1a8ac..90f808087cd 100644
--- a/htdocs/expensereport/card.php
+++ b/htdocs/expensereport/card.php
@@ -1970,7 +1970,7 @@ if ($action == 'create') {
print $paymentexpensereportstatic->getNomUrl(1);
print '';
print '
'.dol_print_date($db->jdate($objp->dp), 'day')." | \n";
- $labeltype = $langs->trans("PaymentType".$objp->payment_code) != ("PaymentType".$objp->payment_code) ? $langs->trans("PaymentType".$objp->payment_code) : $objp->payment_type;
+ $labeltype = $langs->trans("PaymentType".$objp->payment_code) != "PaymentType".$objp->payment_code ? $langs->trans("PaymentType".$objp->payment_code) : $objp->payment_type;
print "
".$labeltype.' '.$objp->num_payment." | \n";
// Bank account
if (isModEnabled("banque")) {
diff --git a/htdocs/expensereport/payment/list.php b/htdocs/expensereport/payment/list.php
index 6f9dc7e8355..5b67b635ff4 100644
--- a/htdocs/expensereport/payment/list.php
+++ b/htdocs/expensereport/payment/list.php
@@ -586,7 +586,7 @@ while ($i < $imaxinloop) {
// Pyament type
if (!empty($arrayfields['c.libelle']['checked'])) {
- $payment_type = $langs->trans("PaymentType".$objp->paiement_type) != ("PaymentType".$objp->paiement_type) ? $langs->trans("PaymentType".$objp->paiement_type) : $objp->paiement_libelle;
+ $payment_type = $langs->trans("PaymentType".$objp->paiement_type) != "PaymentType".$objp->paiement_type ? $langs->trans("PaymentType".$objp->paiement_type) : $objp->paiement_libelle;
print '
'.$payment_type.' '.dol_trunc($objp->num_payment, 32).' | ';
if (!$i) {
$totalarray['nbfield']++;
diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php
index f004f25b290..0f83e21ea93 100644
--- a/htdocs/fichinter/card.php
+++ b/htdocs/fichinter/card.php
@@ -1512,7 +1512,7 @@ if ($action == 'create') {
$db->free($resql);
// Add new line
- if ($object->statut == 0 && $user->hasRight('ficheinter', 'creer') && $action <> 'editline' && !getDolGlobalString('FICHINTER_DISABLE_DETAILS')) {
+ if ($object->statut == 0 && $user->hasRight('ficheinter', 'creer') && $action != 'editline' && !getDolGlobalString('FICHINTER_DISABLE_DETAILS')) {
if (!$num) {
print '
';
print '
';
diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php
index 4ca0db593c5..a9e401840fe 100644
--- a/htdocs/fourn/class/paiementfourn.class.php
+++ b/htdocs/fourn/class/paiementfourn.class.php
@@ -243,7 +243,7 @@ class PaiementFourn extends Paiement
$this->db->begin();
- if ($totalamount <> 0) { // On accepte les montants negatifs
+ if ($totalamount != 0) { // On accepte les montants negatifs
$ref = $this->getNextNumRef(is_object($thirdparty) ? $thirdparty : '');
if ($way == 'dolibarr') {
@@ -266,7 +266,7 @@ class PaiementFourn extends Paiement
// Insere tableau des montants / factures
foreach ($this->amounts as $key => $amount) {
$facid = $key;
- if (is_numeric($amount) && $amount <> 0) {
+ if (is_numeric($amount) && $amount != 0) {
$amount = price2num($amount);
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'paiementfourn_facturefourn (fk_facturefourn, fk_paiementfourn, amount, multicurrency_amount, multicurrency_code, multicurrency_tx)';
$sql .= " VALUES (".((int) $facid).", ".((int) $this->id).", ".((float) $amount).', '.((float) $this->multicurrency_amounts[$key]).', '.($currencyofpayment ? "'".$this->db->escape($currencyofpayment)."'" : 'NULL').', '.(!empty($currencytxofpayment) ? (float) $currencytxofpayment : 1).')';
@@ -408,7 +408,7 @@ class PaiementFourn extends Paiement
$error++;
}
- if ($totalamount <> 0 && $error == 0) { // On accepte les montants negatifs
+ if ($totalamount != 0 && $error == 0) { // On accepte les montants negatifs
$this->amount = $total;
$this->total = $total;
$this->multicurrency_amount = $mtotal;
diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php
index d275fe0a94e..de1e9ae45ae 100644
--- a/htdocs/fourn/facture/paiement.php
+++ b/htdocs/fourn/facture/paiement.php
@@ -346,7 +346,7 @@ if (empty($reshook)) {
$invoiceid = 0;
foreach ($paiement->amounts as $key => $amount) {
$facid = $key;
- if (is_numeric($amount) && $amount <> 0) {
+ if (is_numeric($amount) && $amount != 0) {
if ($invoiceid != 0) {
$invoiceid = -1; // There is more than one invoice payed by this payment
} else {
diff --git a/htdocs/fourn/paiement/card.php b/htdocs/fourn/paiement/card.php
index e6112780885..93de58280d7 100644
--- a/htdocs/fourn/paiement/card.php
+++ b/htdocs/fourn/paiement/card.php
@@ -205,7 +205,7 @@ if ($result > 0) {
print '';
// Payment mode
- $labeltype = $langs->trans("PaymentType".$object->type_code) != ("PaymentType".$object->type_code) ? $langs->trans("PaymentType".$object->type_code) : $object->type_label;
+ $labeltype = $langs->trans("PaymentType".$object->type_code) != "PaymentType".$object->type_code ? $langs->trans("PaymentType".$object->type_code) : $object->type_label;
print '| '.$langs->trans('PaymentMode').' | ';
print ''.$labeltype;
print $object->num_payment ? ' - '.$object->num_payment : '';
diff --git a/htdocs/fourn/paiement/document.php b/htdocs/fourn/paiement/document.php
index 81d08b9be4c..2bd45de41d3 100644
--- a/htdocs/fourn/paiement/document.php
+++ b/htdocs/fourn/paiement/document.php
@@ -119,7 +119,7 @@ if ($object->id > 0) {
// Payment mode
$morehtmlref .= ' '.$langs->trans('PaymentMode').' : ';
- $morehtmlref .= $langs->trans("PaymentType".$object->type_code) != ("PaymentType".$object->type_code) ? $langs->trans("PaymentType".$object->type_code) : $object->type_label;
+ $morehtmlref .= $langs->trans("PaymentType".$object->type_code) != "PaymentType".$object->type_code ? $langs->trans("PaymentType".$object->type_code) : $object->type_label;
$morehtmlref .= $object->num_payment ? ' - '.$object->num_payment : '';
// Thirdparty
diff --git a/htdocs/fourn/paiement/list.php b/htdocs/fourn/paiement/list.php
index 60abc2dcece..cd42464d2f3 100644
--- a/htdocs/fourn/paiement/list.php
+++ b/htdocs/fourn/paiement/list.php
@@ -618,7 +618,7 @@ while ($i < $imaxinloop) {
// Pyament type
if (!empty($arrayfields['c.libelle']['checked'])) {
- $payment_type = $langs->trans("PaymentType".$objp->paiement_type) != ("PaymentType".$objp->paiement_type) ? $langs->trans("PaymentType".$objp->paiement_type) : $objp->paiement_libelle;
+ $payment_type = $langs->trans("PaymentType".$objp->paiement_type) != "PaymentType".$objp->paiement_type ? $langs->trans("PaymentType".$objp->paiement_type) : $objp->paiement_libelle;
print ' | '.$payment_type.' '.dol_trunc($objp->num_payment, 32).' | ';
if (!$i) {
$totalarray['nbfield']++;
diff --git a/htdocs/install/step2.php b/htdocs/install/step2.php
index 25b970a77da..d0b5b20610e 100644
--- a/htdocs/install/step2.php
+++ b/htdocs/install/step2.php
@@ -193,7 +193,7 @@ if ($action == "set") {
if ($fp) {
while (!feof($fp)) {
$buf = fgets($fp, 4096);
- if (substr($buf, 0, 2) <> '--') {
+ if (substr($buf, 0, 2) != '--') {
$buf = preg_replace('/--(.+)*/', '', $buf);
$buffer .= $buf;
}
@@ -405,7 +405,7 @@ if ($action == "set") {
$buffer = '';
while (!feof($fp)) {
$buf = fgets($fp, 4096);
- if (substr($buf, 0, 2) <> '--') {
+ if (substr($buf, 0, 2) != '--') {
$buffer .= $buf."§";
}
}
diff --git a/htdocs/install/step5.php b/htdocs/install/step5.php
index 6e101a7e3c3..20035b2f935 100644
--- a/htdocs/install/step5.php
+++ b/htdocs/install/step5.php
@@ -103,7 +103,7 @@ $error = 0;
// If install, check password and password_verification used to create admin account
if ($action == "set") {
- if ($pass <> $pass_verif) {
+ if ($pass != $pass_verif) {
header("Location: step4.php?error=1&selectlang=$setuplang".(isset($login) ? '&login='.$login : ''));
exit;
}
diff --git a/htdocs/knowledgemanagement/knowledgerecord_list.php b/htdocs/knowledgemanagement/knowledgerecord_list.php
index 1014f3f367b..ce19af91590 100644
--- a/htdocs/knowledgemanagement/knowledgerecord_list.php
+++ b/htdocs/knowledgemanagement/knowledgerecord_list.php
@@ -102,7 +102,7 @@ $search_all = GETPOST('search_all', 'alphanohtml');
$search = array();
foreach ($object->fields as $key => $val) {
if ($key == "lang") {
- $search[$key] = GETPOST('search_'.$key, 'alpha')!='0' ? GETPOST('search_'.$key, 'alpha') : '';
+ $search[$key] = GETPOST('search_'.$key, 'alpha') != '0' ? GETPOST('search_'.$key, 'alpha') : '';
} else {
$search[$key] = GETPOST('search_'.$key, 'alpha');
}
diff --git a/htdocs/loan/payment/payment.php b/htdocs/loan/payment/payment.php
index 885440a6812..1285b09c9cc 100644
--- a/htdocs/loan/payment/payment.php
+++ b/htdocs/loan/payment/payment.php
@@ -177,7 +177,7 @@ if ($action == 'add_payment') {
// Update loan schedule with payment value
if (!$error && !empty($line)) {
// If payment values are modified, recalculate schedule
- if (($line->amount_capital <> $pay_amount_capital) || ($line->amount_insurance <> $pay_amount_insurance) || ($line->amount_interest <> $pay_amount_interest)) {
+ if (($line->amount_capital != $pay_amount_capital) || ($line->amount_insurance != $pay_amount_insurance) || ($line->amount_interest != $pay_amount_interest)) {
$arr_term = loanCalcMonthlyPayment(($pay_amount_capital + $pay_amount_interest), $remaindertopay, ($loan->rate / 100), $echance, $loan->nbterm);
foreach ($arr_term as $k => $v) {
// Update fk_bank for current line
diff --git a/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php b/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php
index 4999067b62c..1e1a2267067 100644
--- a/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php
+++ b/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php
@@ -123,7 +123,7 @@ class mailing_mailinglist_mymodule_myobject extends MailingTargets
$old = '';
while ($i < $num) {
$obj = $this->db->fetch_object($result);
- if ($old <> $obj->email) {
+ if ($old != $obj->email) {
$target[$j] = array(
'email' => $obj->email,
'name' => $obj->lastname,
diff --git a/htdocs/mrp/class/api_mos.class.php b/htdocs/mrp/class/api_mos.class.php
index 4962830db07..c3900271e42 100644
--- a/htdocs/mrp/class/api_mos.class.php
+++ b/htdocs/mrp/class/api_mos.class.php
@@ -392,7 +392,7 @@ class Mos extends DolibarrApi
if (empty($value["qty"])) {
throw new RestException(500, "Field qty required in ".$arrayname);
}
- if ($value["qty"]!=0) {
+ if ($value["qty"] != 0) {
$qtytoprocess = $value["qty"];
if (isset($value["fk_warehouse"])) { // If there is a warehouse to set
if (!($value["fk_warehouse"] > 0)) { // If there is no warehouse set.
diff --git a/htdocs/product/card.php b/htdocs/product/card.php
index c25993cac5d..cff3bb2cb2a 100644
--- a/htdocs/product/card.php
+++ b/htdocs/product/card.php
@@ -2891,11 +2891,11 @@ if ($action != 'create' && $action != 'edit') {
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
if (empty($reshook)) {
if ($usercancreate) {
- if (!isset($object->no_button_edit) || $object->no_button_edit <> 1) {
+ if (!isset($object->no_button_edit) || $object->no_button_edit != 1) {
print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'&id='.$object->id, '', $usercancreate);
}
- if (!isset($object->no_button_copy) || $object->no_button_copy <> 1) {
+ if (!isset($object->no_button_copy) || $object->no_button_copy != 1) {
if (!empty($conf->use_javascript_ajax) && empty($conf->dol_use_jmobile)) {
$cloneProductUrl = '';
$cloneButtonId = 'action-clone';
@@ -2906,7 +2906,7 @@ if ($action != 'create' && $action != 'edit') {
$object_is_used = $object->isObjectUsed($object->id);
if ($usercandelete) {
- if (empty($object_is_used) && (!isset($object->no_button_delete) || $object->no_button_delete <> 1)) {
+ if (empty($object_is_used) && (!isset($object->no_button_delete) || $object->no_button_delete != 1)) {
if (!empty($conf->use_javascript_ajax) && empty($conf->dol_use_jmobile)) {
print dolGetButtonAction($langs->trans('Delete'), '', 'delete', '#', 'action-delete', true);
} else {
diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php
index bf930472395..4a5b413177d 100644
--- a/htdocs/product/class/product.class.php
+++ b/htdocs/product/class/product.class.php
@@ -1189,7 +1189,7 @@ class Product extends CommonObject
}
// Quantities in batch details are not same as stock quantity,
// so we add a default batch record to complete and get same qty in parent and child table
- if ($ObjW->real <> $qty_batch) {
+ if ($ObjW->real != $qty_batch) {
$ObjBatch = new Productbatch($this->db);
$ObjBatch->batch = $valueforundefinedlot;
$ObjBatch->qty = ($ObjW->real - $qty_batch);
@@ -1874,13 +1874,13 @@ class Product extends CommonObject
$lastPrice = array(
'level' => $level ? $level : 1,
- 'multiprices' => doubleval($this->multiprices[$level]),
- 'multiprices_ttc' => doubleval($this->multiprices_ttc[$level]),
+ 'multiprices' => (float) $this->multiprices[$level],
+ 'multiprices_ttc' => (float) $this->multiprices_ttc[$level],
'multiprices_base_type' => $this->multiprices_base_type[$level],
- 'multiprices_min' => doubleval($this->multiprices_min[$level]),
- 'multiprices_min_ttc' => doubleval($this->multiprices_min_ttc[$level]),
- 'multiprices_tva_tx' => doubleval($this->multiprices_tva_tx[$level]),
- 'multiprices_recuperableonly' => doubleval($this->multiprices_recuperableonly[$level]),
+ 'multiprices_min' => (float) $this->multiprices_min[$level],
+ 'multiprices_min_ttc' => (float) $this->multiprices_min_ttc[$level],
+ 'multiprices_tva_tx' => (float) $this->multiprices_tva_tx[$level],
+ 'multiprices_recuperableonly' => (float) $this->multiprices_recuperableonly[$level],
);
return $lastPrice;
@@ -3151,7 +3151,7 @@ class Product extends CommonObject
if ($socid > 0) {
$sql .= " AND c.fk_soc = ".((int) $socid);
}
- if ($filtrestatut <> '') {
+ if ($filtrestatut != '') {
$sql .= " AND c.fk_statut in (".$this->db->sanitize($filtrestatut).")";
}
@@ -3344,7 +3344,7 @@ class Product extends CommonObject
if ($socid > 0) {
$sql .= " AND e.fk_soc = ".((int) $socid);
}
- if ($filtrestatut <> '') {
+ if ($filtrestatut != '') {
$sql .= " AND c.fk_statut IN (".$this->db->sanitize($filtrestatut).")";
}
if (!empty($filterShipmentStatus)) {
@@ -3426,7 +3426,7 @@ class Product extends CommonObject
if ($socid > 0) {
$sql .= " AND cf.fk_soc = ".((int) $socid);
}
- if ($filtrestatut <> '') {
+ if ($filtrestatut != '') {
$sql .= " AND cf.fk_statut IN (".$this->db->sanitize($filtrestatut).")";
}
if (!empty($dateofvirtualstock)) {
@@ -3486,7 +3486,7 @@ class Product extends CommonObject
if ($socid > 0) {
$sql .= " AND m.fk_soc = ".((int) $socid);
}
- if ($filtrestatut <> '') {
+ if ($filtrestatut != '') {
$sql .= " AND m.status IN (".$this->db->sanitize($filtrestatut).")";
}
if (!empty($dateofvirtualstock)) {
diff --git a/htdocs/product/list.php b/htdocs/product/list.php
index d31602a2552..cb46caba07f 100644
--- a/htdocs/product/list.php
+++ b/htdocs/product/list.php
@@ -294,7 +294,7 @@ if (getDolGlobalString('PRODUIT_MULTIPRICES')) {
} else {
$labelp = $langs->transnoentitiesnoconv("SellingPrice")." ".$i;
}
- $arrayfields['p.sellprice'.$i] = array('label'=>$labelp, 'checked'=>($i == 1 ? 1 : 0), 'enabled'=>$conf->global->PRODUIT_MULTIPRICES, 'position'=>floatval('40.'.sprintf('%03s', $i)));
+ $arrayfields['p.sellprice'.$i] = array('label'=>$labelp, 'checked'=>($i == 1 ? 1 : 0), 'enabled'=>$conf->global->PRODUIT_MULTIPRICES, 'position'=>(float) ('40.'.sprintf('%03s', $i)));
$arraypricelevel[$i] = array($i);
}
}
diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php
index 52bbd21c37f..610d0ca36ec 100644
--- a/htdocs/product/stock/card.php
+++ b/htdocs/product/stock/card.php
@@ -406,7 +406,7 @@ if ($action == 'create') {
}
// View mode
- if ($action <> 'edit' && $action <> 're-edit') {
+ if ($action != 'edit' && $action != 're-edit') {
$head = stock_prepare_head($object);
print dol_get_fiche_head($head, 'card', $langs->trans("Warehouse"), -1, 'stock');
diff --git a/htdocs/product/stock/massstockmove.php b/htdocs/product/stock/massstockmove.php
index 5a49139386b..697e886c2d3 100644
--- a/htdocs/product/stock/massstockmove.php
+++ b/htdocs/product/stock/massstockmove.php
@@ -195,7 +195,7 @@ if ($action == 'createmovements' && $user->hasRight('stock', 'mouvement', 'creer
$dlc = -1; // They are loaded later from serial
$dluo = -1; // They are loaded later from serial
- if (!$error && $id_sw <> $id_tw && is_numeric($qty) && $id_product) {
+ if (!$error && $id_sw != $id_tw && is_numeric($qty) && $id_product) {
$result = $product->fetch($id_product);
$product->load_stock('novirtual'); // Load array product->stock_warehouse
diff --git a/htdocs/public/agenda/agendaexport.php b/htdocs/public/agenda/agendaexport.php
index 873f5a80e50..d484ab49ac1 100644
--- a/htdocs/public/agenda/agendaexport.php
+++ b/htdocs/public/agenda/agendaexport.php
@@ -86,7 +86,7 @@ require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
$object = new ActionComm($db);
// Not older than
-if (empty($conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY)) {
+if (!getDolGlobalString('MAIN_AGENDA_EXPORT_PAST_DELAY')) {
$conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY = 100; // default limit
}
diff --git a/htdocs/public/eventorganization/attendee_new.php b/htdocs/public/eventorganization/attendee_new.php
index 39bcc797207..8cc4f573e38 100644
--- a/htdocs/public/eventorganization/attendee_new.php
+++ b/htdocs/public/eventorganization/attendee_new.php
@@ -247,7 +247,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
$errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Email"))."
\n";
}
// If the price has been set, name is required for the invoice
- if (!GETPOST("societe") && !empty(floatval($project->price_registration))) {
+ if (!GETPOST("societe") && !empty((float) $project->price_registration)) {
$error++;
$errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Company"))."
\n";
}
@@ -444,7 +444,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
}
// If price is empty, no need to create a thirdparty, so we force $resultfetchthirdparty as if we have already found thirdp party.
- if (empty(floatval($project->price_registration))) {
+ if (empty((float) $project->price_registration)) {
$resultfetchthirdparty = 1;
}
@@ -505,7 +505,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
if (!$error) {
// If the registration needs a payment
- if (!empty(floatval($project->price_registration))) {
+ if (!empty((float) $project->price_registration)) {
$outputlangs = $langs;
// TODO Use default language of $thirdparty->default_lang to build $outputlang
@@ -576,7 +576,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
// If there is no lines yet, we add one
if (empty($facture->lines)) {
- $pu_ttc = floatval($project->price_registration);
+ $pu_ttc = (float) $project->price_registration;
$pu_ht = 0;
$price_base_type = 'TTC';
@@ -816,16 +816,16 @@ if ((!empty($conference->id) && $conference->status == ConferenceOrBooth::STATUS
// Company
print '
| ';
- if (!empty(floatval($project->price_registration))) {
+ if (!empty((float) $project->price_registration)) {
print '';
}
print $langs->trans("Company");
- if (!empty(floatval($project->price_registration))) {
+ if (!empty((float) $project->price_registration)) {
print '';
}
print ' | ';
print img_picto('', 'company', 'class="pictofixedwidth"');
- print 'price_registration)) ? '' : ' required').'> |
' . "\n";
+ print 'price_registration) ? '' : ' required').'>' . "\n";
// Email company for invoice
if ($project->price_registration) {
diff --git a/htdocs/public/project/suggestbooth.php b/htdocs/public/project/suggestbooth.php
index 60c770ed9bb..20be7cf9e5a 100644
--- a/htdocs/public/project/suggestbooth.php
+++ b/htdocs/public/project/suggestbooth.php
@@ -209,7 +209,7 @@ if (empty($reshook) && $action == 'add') {
$error++;
$errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Email"))."
\n";
}
- if (!GETPOST("country_id") && !empty(floatval($project->price_booth))) {
+ if (!GETPOST("country_id") && !empty((float) $project->price_booth)) {
$error++;
$errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Country"))."
\n";
}
@@ -414,7 +414,7 @@ if (empty($reshook) && $action == 'add') {
$errmsg .= $conforbooth->error;
} else {
// If this is a paying booth, we have to redirect to payment page and create an invoice
- if (!empty(floatval($project->price_booth))) {
+ if (!empty((float) $project->price_booth)) {
$productforinvoicerow = new Product($db);
$resultprod = $productforinvoicerow->fetch($conf->global->SERVICE_BOOTH_LOCATION);
if ($resultprod < 0) {
@@ -452,7 +452,7 @@ if (empty($reshook) && $action == 'add') {
if (!$error) {
// Add line to draft invoice
$vattouse = get_default_tva($mysoc, $thirdparty, $productforinvoicerow->id);
- $result = $facture->addline($langs->trans("BoothLocationFee", $conforbooth->label, dol_print_date($conforbooth->datep, '%d/%m/%y %H:%M:%S'), dol_print_date($conforbooth->datep2, '%d/%m/%y %H:%M:%S')), floatval($project->price_booth), 1, $vattouse, 0, 0, $productforinvoicerow->id, 0, dol_now(), '', 0, 0, '', 'HT', 0, 1);
+ $result = $facture->addline($langs->trans("BoothLocationFee", $conforbooth->label, dol_print_date($conforbooth->datep, '%d/%m/%y %H:%M:%S'), dol_print_date($conforbooth->datep2, '%d/%m/%y %H:%M:%S')), (float) $project->price_booth, 1, $vattouse, 0, 0, $productforinvoicerow->id, 0, dol_now(), '', 0, 0, '', 'HT', 0, 1);
if ($result <= 0) {
$contact->error = $facture->error;
$contact->errors = $facture->errors;
diff --git a/htdocs/reception/list.php b/htdocs/reception/list.php
index 1239a6dc2c4..06a0d69ff82 100644
--- a/htdocs/reception/list.php
+++ b/htdocs/reception/list.php
@@ -629,7 +629,7 @@ $sql .= " WHERE e.entity IN (".getEntity('reception').")";
if ($socid) {
$sql .= " AND e.fk_soc = ".((int) $socid);
}
-if ($search_status <> '' && $search_status >= 0) {
+if ($search_status != '' && $search_status >= 0) {
$sql .= " AND e.fk_statut = ".((int) $search_status);
}
if ($search_billed != '' && $search_billed >= 0) {
diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php
index 6286b4dcf06..142fbf6eae9 100644
--- a/htdocs/resource/class/dolresource.class.php
+++ b/htdocs/resource/class/dolresource.class.php
@@ -754,7 +754,7 @@ class Dolresource extends CommonObject
while ($i < $num) {
$obj = $this->db->fetch_object($resql);
- $label = ($langs->trans("ResourceTypeShort".$obj->code) != ("ResourceTypeShort".$obj->code) ? $langs->trans("ResourceTypeShort".$obj->code) : ($obj->label != '-' ? $obj->label : ''));
+ $label = ($langs->trans("ResourceTypeShort".$obj->code) != "ResourceTypeShort".$obj->code ? $langs->trans("ResourceTypeShort".$obj->code) : ($obj->label != '-' ? $obj->label : ''));
$this->cache_code_type_resource[$obj->rowid]['code'] = $obj->code;
$this->cache_code_type_resource[$obj->rowid]['label'] = $label;
$this->cache_code_type_resource[$obj->rowid]['active'] = $obj->active;
diff --git a/htdocs/salaries/card.php b/htdocs/salaries/card.php
index 81a08807db7..19092a8383d 100644
--- a/htdocs/salaries/card.php
+++ b/htdocs/salaries/card.php
@@ -1029,7 +1029,7 @@ if ($id > 0) {
print $paymentsalarytemp->getNomUrl(1);
print '';
print ''.dol_print_date($db->jdate($objp->dp), 'dayhour', 'tzuserrel')." | \n";
- $labeltype = $langs->trans("PaymentType".$objp->type_code) != ("PaymentType".$objp->type_code) ? $langs->trans("PaymentType".$objp->type_code) : $objp->paiement_type;
+ $labeltype = $langs->trans("PaymentType".$objp->type_code) != "PaymentType".$objp->type_code ? $langs->trans("PaymentType".$objp->type_code) : $objp->paiement_type;
print "".$labeltype.' '.$objp->num_payment." | \n";
if (isModEnabled("banque")) {
$bankaccountstatic->id = $objp->baid;
diff --git a/htdocs/salaries/class/salary.class.php b/htdocs/salaries/class/salary.class.php
index f6cebf0c07f..e04f4430225 100644
--- a/htdocs/salaries/class/salary.class.php
+++ b/htdocs/salaries/class/salary.class.php
@@ -775,18 +775,18 @@ class Salary extends CommonObject
//$langs->load("mymodule");
$this->labelStatus[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv('BillStatusNotPaid');
$this->labelStatus[self::STATUS_PAID] = $langs->transnoentitiesnoconv('BillStatusPaid');
- if ($status == self::STATUS_UNPAID && $alreadypaid <> 0) {
+ if ($status == self::STATUS_UNPAID && $alreadypaid != 0) {
$this->labelStatus[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv("BillStatusStarted");
}
$this->labelStatusShort[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv('BillStatusNotPaid');
$this->labelStatusShort[self::STATUS_PAID] = $langs->transnoentitiesnoconv('BillStatusPaid');
- if ($status == self::STATUS_UNPAID && $alreadypaid <> 0) {
+ if ($status == self::STATUS_UNPAID && $alreadypaid != 0) {
$this->labelStatusShort[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv("BillStatusStarted");
}
}
$statusType = 'status1';
- if ($status == 0 && $alreadypaid <> 0) {
+ if ($status == 0 && $alreadypaid != 0) {
$statusType = 'status3';
}
if ($status == 1) {
diff --git a/htdocs/salaries/virement_request.php b/htdocs/salaries/virement_request.php
index 01d9ca9b186..f51af45622c 100644
--- a/htdocs/salaries/virement_request.php
+++ b/htdocs/salaries/virement_request.php
@@ -389,7 +389,7 @@ if ($resql) {
print '| ';
print ''.img_object($langs->trans("Payment"), "payment").' '.$objp->rowid.' | ';
print ''.dol_print_date($db->jdate($objp->dp), 'dayhour', 'tzuserrel')." | \n";
- $labeltype = $langs->trans("PaymentType".$objp->type_code) != ("PaymentType".$objp->type_code) ? $langs->trans("PaymentType".$objp->type_code) : $objp->paiement_type;
+ $labeltype = $langs->trans("PaymentType".$objp->type_code) != "PaymentType".$objp->type_code ? $langs->trans("PaymentType".$objp->type_code) : $objp->paiement_type;
print "".$labeltype.' '.$objp->num_payment." | \n";
if (isModEnabled("banque")) {
$bankaccountstatic->id = $objp->baid;
diff --git a/htdocs/societe/canvas/company/tpl/card_view.tpl.php b/htdocs/societe/canvas/company/tpl/card_view.tpl.php
index 1fc6a5067a7..e4fa05d1b0e 100644
--- a/htdocs/societe/canvas/company/tpl/card_view.tpl.php
+++ b/htdocs/societe/canvas/company/tpl/card_view.tpl.php
@@ -61,7 +61,7 @@ print dol_get_fiche_head($head, 'card', $langs->trans("ThirdParty"), 0, 'company
| trans('CustomerCode'); ?> |
control->tpl['code_client']; ?>
- control->tpl['checkcustomercode'] <> 0) { ?>
+ control->tpl['checkcustomercode'] != 0) { ?>
(trans("WrongCustomerCode"); ?>)
|
@@ -72,7 +72,7 @@ print dol_get_fiche_head($head, 'card', $langs->trans("ThirdParty"), 0, 'company
| trans('SupplierCode'); ?> |
control->tpl['code_fournisseur']; ?>
- control->tpl['checksuppliercode'] <> 0) { ?>
+ control->tpl['checksuppliercode'] != 0) { ?>
(trans("WrongSupplierCode"); ?>)
|
diff --git a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php
index 093b8c896e5..b23df41c5b9 100644
--- a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php
+++ b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php
@@ -56,7 +56,7 @@ if ($this->control->tpl['action_delete']) {
| trans('CustomerCode'); ?> |
control->tpl['code_client']; ?>
- control->tpl['checkcustomercode'] <> 0) { ?>
+ control->tpl['checkcustomercode'] != 0) { ?>
(trans("WrongCustomerCode"); ?>)
|
@@ -67,7 +67,7 @@ if ($this->control->tpl['action_delete']) {
| trans('SupplierCode'); ?> |
control->tpl['code_fournisseur']; ?>
- control->tpl['checksuppliercode'] <> 0) { ?>
+ control->tpl['checksuppliercode'] != 0) { ?>
(trans("WrongSupplierCode"); ?>)
|
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index 8489ae8d290..3efd92cb089 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -3863,7 +3863,7 @@ class Societe extends CommonObject
$sum = 0;
for ($index = 0; $index < 9; $index++) {
$number = (int) $chaine[$index];
- if (($index % 2) != 0) {
+ if ($index % 2 != 0) {
if (($number *= 2) > 9) {
$number -= 9;
}
@@ -3872,7 +3872,7 @@ class Societe extends CommonObject
}
// le numéro est valide si la somme des chiffres est multiple de 10
- if (($sum % 10) != 0) {
+ if ($sum % 10 != 0) {
return -1;
}
}
@@ -3905,7 +3905,7 @@ class Societe extends CommonObject
}
// le numéro est valide si la somme des chiffres est multiple de 10
- if (($sum % 10) != 0) {
+ if ($sum % 10 != 0) {
return -1;
}
}
diff --git a/htdocs/takepos/admin/terminal.php b/htdocs/takepos/admin/terminal.php
index 7acf9a45117..55b3b04336f 100644
--- a/htdocs/takepos/admin/terminal.php
+++ b/htdocs/takepos/admin/terminal.php
@@ -364,7 +364,7 @@ if (getDolGlobalString('TAKEPOS_ADDON') == "terminal") {
$handle = opendir($dir);
if (is_resource($handle)) {
while (($file = readdir($handle)) !== false) {
- if (!is_dir($dir.$file) || (substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS')) {
+ if (!is_dir($dir.$file) || (substr($file, 0, 1) != '.' && substr($file, 0, 3) != 'CVS')) {
$filebis = $file;
$classname = preg_replace('/\.php$/', '', $file);
// For compatibility
diff --git a/htdocs/takepos/ajax/ajax.php b/htdocs/takepos/ajax/ajax.php
index 96225b848ed..2ac22024573 100644
--- a/htdocs/takepos/ajax/ajax.php
+++ b/htdocs/takepos/ajax/ajax.php
@@ -212,7 +212,7 @@ if ($action == 'getProducts') {
if (isset($barcode_value_list['qd'])) {
$qty_str .= '.' . $barcode_value_list['qd'];
}
- $qty = floatval($qty_str);
+ $qty = (float) $qty_str;
}
$objProd = new Product($db);
diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php
index 1380c032c86..5541afa2457 100644
--- a/htdocs/takepos/index.php
+++ b/htdocs/takepos/index.php
@@ -1425,7 +1425,7 @@ if (getDolGlobalString('TAKEPOS_WEIGHING_SCALE')) {
echo '
';
}
} ?>
-
+
@@ -1471,7 +1471,7 @@ if (getDolGlobalString('TAKEPOS_WEIGHING_SCALE')) {
print '
';
}
} ?>
-
+
diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php
index f76069a7d23..0d8c98a2ec7 100644
--- a/htdocs/takepos/invoice.php
+++ b/htdocs/takepos/invoice.php
@@ -537,7 +537,7 @@ if (empty($reshook)) {
$nbofsuggested = 0;
$prod->load_stock('warehouseopen');
$constantforkey = 'CASHDESK_ID_WAREHOUSE'.$_SESSION["takeposterminal"];
- if ($prod->stock_warehouse[getDolGlobalString($constantforkey)]->detail_batch!="") {
+ if ($prod->stock_warehouse[getDolGlobalString($constantforkey)]->detail_batch != "") {
if (is_object($prod->stock_warehouse[getDolGlobalString($constantforkey)]) && count($prod->stock_warehouse[getDolGlobalString($constantforkey)]->detail_batch)) {
foreach ($prod->stock_warehouse[getDolGlobalString($constantforkey)]->detail_batch as $dbatch) {
$nbofsuggested++;
diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php
index fe35dfb4b0a..e8c787a1585 100644
--- a/htdocs/ticket/class/ticket.class.php
+++ b/htdocs/ticket/class/ticket.class.php
@@ -716,15 +716,15 @@ class Ticket extends CommonObject
$this->timing = $obj->timing;
$this->type_code = $obj->type_code;
- $label_type = ($langs->trans("TicketTypeShort".$obj->type_code) != ("TicketTypeShort".$obj->type_code) ? $langs->trans("TicketTypeShort".$obj->type_code) : ($obj->type_label != '-' ? $obj->type_label : ''));
+ $label_type = ($langs->trans("TicketTypeShort".$obj->type_code) != "TicketTypeShort".$obj->type_code ? $langs->trans("TicketTypeShort".$obj->type_code) : ($obj->type_label != '-' ? $obj->type_label : ''));
$this->type_label = $label_type;
$this->category_code = $obj->category_code;
- $label_category = ($langs->trans("TicketCategoryShort".$obj->category_code) != ("TicketCategoryShort".$obj->category_code) ? $langs->trans("TicketCategoryShort".$obj->category_code) : ($obj->category_label != '-' ? $obj->category_label : ''));
+ $label_category = ($langs->trans("TicketCategoryShort".$obj->category_code) != "TicketCategoryShort".$obj->category_code ? $langs->trans("TicketCategoryShort".$obj->category_code) : ($obj->category_label != '-' ? $obj->category_label : ''));
$this->category_label = $label_category;
$this->severity_code = $obj->severity_code;
- $label_severity = ($langs->trans("TicketSeverityShort".$obj->severity_code) != ("TicketSeverityShort".$obj->severity_code) ? $langs->trans("TicketSeverityShort".$obj->severity_code) : ($obj->severity_label != '-' ? $obj->severity_label : ''));
+ $label_severity = ($langs->trans("TicketSeverityShort".$obj->severity_code) != "TicketSeverityShort".$obj->severity_code ? $langs->trans("TicketSeverityShort".$obj->severity_code) : ($obj->severity_label != '-' ? $obj->severity_label : ''));
$this->severity_label = $label_severity;
$this->datec = $this->db->jdate($obj->datec);
@@ -884,15 +884,15 @@ class Ticket extends CommonObject
$line->progress = $obj->progress;
$line->timing = $obj->timing;
- $label_type = ($langs->trans("TicketTypeShort".$obj->type_code) != ("TicketTypeShort".$obj->type_code) ? $langs->trans("TicketTypeShort".$obj->type_code) : ($obj->type_label != '-' ? $obj->type_label : ''));
+ $label_type = ($langs->trans("TicketTypeShort".$obj->type_code) != "TicketTypeShort".$obj->type_code ? $langs->trans("TicketTypeShort".$obj->type_code) : ($obj->type_label != '-' ? $obj->type_label : ''));
$line->type_label = $label_type;
$this->category_code = $obj->category_code;
- $label_category = ($langs->trans("TicketCategoryShort".$obj->category_code) != ("TicketCategoryShort".$obj->category_code) ? $langs->trans("TicketCategoryShort".$obj->category_code) : ($obj->category_label != '-' ? $obj->category_label : ''));
+ $label_category = ($langs->trans("TicketCategoryShort".$obj->category_code) != "TicketCategoryShort".$obj->category_code ? $langs->trans("TicketCategoryShort".$obj->category_code) : ($obj->category_label != '-' ? $obj->category_label : ''));
$line->category_label = $label_category;
$this->severity_code = $obj->severity_code;
- $label_severity = ($langs->trans("TicketSeverityShort".$obj->severity_code) != ("TicketSeverityShort".$obj->severity_code) ? $langs->trans("TicketSeverityShort".$obj->severity_code) : ($obj->severity_label != '-' ? $obj->severity_label : ''));
+ $label_severity = ($langs->trans("TicketSeverityShort".$obj->severity_code) != "TicketSeverityShort".$obj->severity_code ? $langs->trans("TicketSeverityShort".$obj->severity_code) : ($obj->severity_label != '-' ? $obj->severity_label : ''));
$line->severity_label = $label_severity;
$line->datec = $this->db->jdate($obj->datec);
@@ -1286,7 +1286,7 @@ class Ticket extends CommonObject
$i = 0;
while ($i < $num) {
$obj = $this->db->fetch_object($resql);
- $label = ($langs->trans("TicketTypeShort".$obj->code) != ("TicketTypeShort".$obj->code) ? $langs->trans("TicketTypeShort".$obj->code) : ($obj->label != '-' ? $obj->label : ''));
+ $label = ($langs->trans("TicketTypeShort".$obj->code) != "TicketTypeShort".$obj->code ? $langs->trans("TicketTypeShort".$obj->code) : ($obj->label != '-' ? $obj->label : ''));
$this->cache_types_tickets[$obj->rowid]['code'] = $obj->code;
$this->cache_types_tickets[$obj->rowid]['label'] = $label;
$this->cache_types_tickets[$obj->rowid]['use_default'] = $obj->use_default;
@@ -1342,7 +1342,7 @@ class Ticket extends CommonObject
// If translation exists, we use it to store already translated string.
// Warning: You should not use this and recompute the translated string into caller code to get the value into expected language
- $label = ($langs->trans("TicketCategoryShort".$obj->code) != ("TicketCategoryShort".$obj->code) ? $langs->trans("TicketCategoryShort".$obj->code) : ($obj->label != '-' ? $obj->label : ''));
+ $label = ($langs->trans("TicketCategoryShort".$obj->code) != "TicketCategoryShort".$obj->code ? $langs->trans("TicketCategoryShort".$obj->code) : ($obj->label != '-' ? $obj->label : ''));
$this->cache_category_tickets[$obj->rowid]['label'] = $label;
$i++;
@@ -1382,7 +1382,7 @@ class Ticket extends CommonObject
$obj = $this->db->fetch_object($resql);
$this->cache_severity_tickets[$obj->rowid]['code'] = $obj->code;
- $label = ($langs->trans("TicketSeverityShort".$obj->code) != ("TicketSeverityShort".$obj->code) ? $langs->trans("TicketSeverityShort".$obj->code) : ($obj->label != '-' ? $obj->label : ''));
+ $label = ($langs->trans("TicketSeverityShort".$obj->code) != "TicketSeverityShort".$obj->code ? $langs->trans("TicketSeverityShort".$obj->code) : ($obj->label != '-' ? $obj->label : ''));
$this->cache_severity_tickets[$obj->rowid]['label'] = $label;
$this->cache_severity_tickets[$obj->rowid]['use_default'] = $obj->use_default;
$this->cache_severity_tickets[$obj->rowid]['pos'] = $obj->pos;
diff --git a/htdocs/user/card.php b/htdocs/user/card.php
index 700dd744382..f27a82d84c8 100644
--- a/htdocs/user/card.php
+++ b/htdocs/user/card.php
@@ -2034,12 +2034,12 @@ if ($action == 'create' || $action == 'adduserldap') {
'class' => 'classfortooltip'
)
);
- if ($user->id <> $id && $candisableuser && $object->statut == 0 &&
+ if ($user->id != $id && $candisableuser && $object->statut == 0 &&
((!isModEnabled('multicompany') && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $object->entity == 1))) {
print dolGetButtonAction($langs->trans('Reactivate'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=enable&token='.newToken(), '', true, $params);
}
// Disable user
- if ($user->id <> $id && $candisableuser && $object->statut == 1 &&
+ if ($user->id != $id && $candisableuser && $object->statut == 1 &&
((!isModEnabled('multicompany') && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $object->entity == 1))) {
print dolGetButtonAction($langs->trans('DisableUser'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=disable&token='.newToken(), '', true, $params);
} else {
@@ -2049,7 +2049,7 @@ if ($action == 'create' || $action == 'adduserldap') {
}
}
// Delete
- if ($user->id <> $id && $candisableuser &&
+ if ($user->id != $id && $candisableuser &&
((!isModEnabled('multicompany') && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $object->entity == 1))) {
if ($user->admin || !$object->admin) { // If user edited is admin, delete is possible on for an admin
print dolGetButtonAction($langs->trans('DeleteUser'), '', 'default', $_SERVER['PHP_SELF'].'?action=delete&token='.newToken().'&id='.$object->id, '', true, $params);
diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php
index 915642c7ab6..fea12e1b372 100644
--- a/htdocs/user/clicktodial.php
+++ b/htdocs/user/clicktodial.php
@@ -207,7 +207,7 @@ if ($id > 0) {
*/
print '';
- if (!empty($user->admin) && $action <> 'edit') {
+ if (!empty($user->admin) && $action != 'edit') {
print '
'.$langs->trans("Modify").'';
}
diff --git a/htdocs/user/document.php b/htdocs/user/document.php
index e88017f12cb..2e36a90fdfe 100644
--- a/htdocs/user/document.php
+++ b/htdocs/user/document.php
@@ -77,7 +77,7 @@ $feature2 = 'user';
$result = restrictedArea($user, 'user', $id, 'user&user', $feature2);
-if ($user->id <> $id && !$canreaduser) {
+if ($user->id != $id && !$canreaduser) {
accessforbidden();
}
diff --git a/htdocs/user/group/perms.php b/htdocs/user/group/perms.php
index 885774b517a..3418e5a616a 100644
--- a/htdocs/user/group/perms.php
+++ b/htdocs/user/group/perms.php
@@ -326,7 +326,7 @@ if ($object->id > 0) {
$isexpanded = ! $ishidden;
// Break found, it's a new module to catch
- if (isset($obj->module) && ($oldmod <> $obj->module)) {
+ if (isset($obj->module) && ($oldmod != $obj->module)) {
$oldmod = $obj->module;
$j++;
@@ -424,7 +424,7 @@ if ($object->id > 0) {
}
// Description of permission (2 columns)
- $permlabel = (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && ($langs->trans("PermissionAdvanced".$obj->id) != ("PermissionAdvanced".$obj->id)) ? $langs->trans("PermissionAdvanced".$obj->id) : (($langs->trans("Permission".$obj->id) != ("Permission".$obj->id)) ? $langs->trans("Permission".$obj->id) : $langs->trans($obj->label)));
+ $permlabel = (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && ($langs->trans("PermissionAdvanced".$obj->id) != "PermissionAdvanced".$obj->id) ? $langs->trans("PermissionAdvanced".$obj->id) : (($langs->trans("Permission".$obj->id) != "Permission".$obj->id) ? $langs->trans("Permission".$obj->id) : $langs->trans($obj->label)));
print '
';
print $permlabel;
if (getDolGlobalString('MAIN_USE_ADVANCED_PERMS')) {
diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php
index c7264752f92..a0958a4d6fc 100644
--- a/htdocs/user/param_ihm.php
+++ b/htdocs/user/param_ihm.php
@@ -57,7 +57,7 @@ if ($user->socid > 0) {
$feature2 = (($socid && $user->hasRight("user", "self", "write")) ? '' : 'user');
$result = restrictedArea($user, 'user', $id, 'user&user', $feature2);
-if ($user->id <> $id && !$canreaduser) {
+if ($user->id != $id && !$canreaduser) {
accessforbidden();
}
diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php
index 2ff74ba145e..e30e7f19f4f 100644
--- a/htdocs/user/perms.php
+++ b/htdocs/user/perms.php
@@ -74,7 +74,7 @@ if ($user->id == $id && (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && !$user
}
$result = restrictedArea($user, 'user', $id, 'user&user', $feature2);
-if ($user->id <> $id && !$canreaduser) {
+if ($user->id != $id && !$canreaduser) {
accessforbidden();
}
@@ -512,7 +512,7 @@ if ($result) {
//var_dump($permsgroupbyentitypluszero);
// Break found, it's a new module to catch
- if (isset($obj->module) && ($oldmod <> $obj->module)) {
+ if (isset($obj->module) && ($oldmod != $obj->module)) {
$oldmod = $obj->module;
$j++;
@@ -664,7 +664,7 @@ if ($result) {
}
// Description of permission (2 columns)
- $permlabel = (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && ($langs->trans("PermissionAdvanced".$obj->id) != ("PermissionAdvanced".$obj->id)) ? $langs->trans("PermissionAdvanced".$obj->id) : (($langs->trans("Permission".$obj->id) != ("Permission".$obj->id)) ? $langs->trans("Permission".$obj->id) : $langs->trans($obj->label)));
+ $permlabel = (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && ($langs->trans("PermissionAdvanced".$obj->id) != "PermissionAdvanced".$obj->id) ? $langs->trans("PermissionAdvanced".$obj->id) : (($langs->trans("Permission".$obj->id) != "Permission".$obj->id) ? $langs->trans("Permission".$obj->id) : $langs->trans($obj->label)));
if (!$user->admin) {
print ' | ';
} else {
diff --git a/htdocs/variants/class/ProductCombination.class.php b/htdocs/variants/class/ProductCombination.class.php
index 7763146fcda..7a2212ca55b 100644
--- a/htdocs/variants/class/ProductCombination.class.php
+++ b/htdocs/variants/class/ProductCombination.class.php
@@ -530,8 +530,8 @@ class ProductCombination
if ($parent->multiprices[$i] != '' || isset($this->combination_price_levels[$i]->variation_price)) {
$new_type = empty($parent->multiprices_base_type[$i]) ? 'HT' : $parent->multiprices_base_type[$i];
$new_min_price = $parent->multiprices_min[$i];
- $variation_price = floatval(!isset($this->combination_price_levels[$i]->variation_price) ? $this->variation_price : $this->combination_price_levels[$i]->variation_price);
- $variation_price_percentage = floatval(!isset($this->combination_price_levels[$i]->variation_price_percentage) ? $this->variation_price_percentage : $this->combination_price_levels[$i]->variation_price_percentage);
+ $variation_price = (float) (!isset($this->combination_price_levels[$i]->variation_price) ? $this->variation_price : $this->combination_price_levels[$i]->variation_price);
+ $variation_price_percentage = (float) (!isset($this->combination_price_levels[$i]->variation_price_percentage) ? $this->variation_price_percentage : $this->combination_price_levels[$i]->variation_price_percentage);
if ($parent->prices_by_qty_list[$i]) {
$new_psq = 1;
@@ -1144,9 +1144,9 @@ class ProductCombinationLevel
}
$this->id = $obj->rowid;
- $this->fk_product_attribute_combination = floatval($obj->fk_product_attribute_combination);
+ $this->fk_product_attribute_combination = (float) $obj->fk_product_attribute_combination;
$this->fk_price_level = intval($obj->fk_price_level);
- $this->variation_price = floatval($obj->variation_price);
+ $this->variation_price = (float) $obj->variation_price;
$this->variation_price_percentage = (bool) $obj->variation_price_percentage;
return 1;
@@ -1183,7 +1183,7 @@ class ProductCombinationLevel
// Update
if (!empty($this->id)) {
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element;
- $sql .= ' SET variation_price = '.floatval($this->variation_price).' , variation_price_percentage = '.intval($this->variation_price_percentage);
+ $sql .= ' SET variation_price = '.(float) $this->variation_price.' , variation_price_percentage = '.intval($this->variation_price_percentage);
$sql .= ' WHERE rowid = '.((int) $this->id);
$res = $this->db->query($sql);
@@ -1201,7 +1201,7 @@ class ProductCombinationLevel
$sql .= ") VALUES (";
$sql .= (int) $this->fk_product_attribute_combination;
$sql .= ", ".intval($this->fk_price_level);
- $sql .= ", ".floatval($this->variation_price);
+ $sql .= ", ".(float) $this->variation_price;
$sql .= ", ".intval($this->variation_price_percentage);
$sql .= ")";
diff --git a/htdocs/webservices/server_payment.php b/htdocs/webservices/server_payment.php
index 7a3b58b68df..db26fc970e0 100644
--- a/htdocs/webservices/server_payment.php
+++ b/htdocs/webservices/server_payment.php
@@ -188,7 +188,7 @@ function createPayment($authentication, $payment)
$soc->fetch($payment['thirdparty_id']);
$new_payment = new Paiement($db);
- $new_payment->amount = floatval($payment['amount']);
+ $new_payment->amount = (float) $payment['amount'];
$new_payment->num_payment = $payment['num_payment'];
$new_payment->fk_account = intval($payment['bank_account']);
$new_payment->paiementid = !empty($payment['payment_mode_id']) ? intval($payment['payment_mode_id']) : $soc->mode_reglement_id;
|