$SIGNED_STATUSES
*/
class Fichinter extends CommonObject
{
@@ -151,12 +153,6 @@ class Fichinter extends CommonObject
*/
public $statut = 0; // 0=draft, 1=validated, 2=invoiced, 3=Terminate
- /**
- * Signed Status of the intervention (0=NoSignature, 1=SignedBySender, 2=SignedByReceiver, 9=SignedByAll)
- * @var int
- */
- public $signed_status = 0;
-
/**
* @var string description
*/
@@ -208,17 +204,6 @@ class Fichinter extends CommonObject
*/
const STATUS_CLOSED = 3;
- /**
- * Signed statuses dictionary. Label used as key for string localizations.
- */
- const SIGNED_STATUSES = [
- 'STATUS_NO_SIGNATURE' => 0,
- 'STATUS_SIGNED_SENDER' => 1,
- 'STATUS_SIGNED_RECEIVER' => 2,
- 'STATUS_SIGNED_RECEIVER_ONLINE' => 3,
- 'STATUS_SIGNED_ALL' => 9 // To handle future kind of signature (ex: tripartite contract)
- ];
-
/**
* Date delivery
* @var null|int|'' Delivery int
@@ -429,7 +414,7 @@ class Fichinter extends CommonObject
if (!is_numeric($this->duration)) {
$this->duration = 0;
}
- if (!dol_strlen($this->fk_project)) {
+ if (!dol_strlen((string) $this->fk_project)) {
$this->fk_project = 0;
}
if (isset($this->ref_client)) {
diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php
index ab69fbeceb9..2d0241ae5f6 100644
--- a/htdocs/fourn/class/fournisseur.facture.class.php
+++ b/htdocs/fourn/class/fournisseur.facture.class.php
@@ -474,11 +474,6 @@ class FactureFournisseur extends CommonInvoice
if (! $this->type) {
$this->type = self::TYPE_STANDARD;
}
- if (!empty(GETPOST('ref_supplier'))) {
- $this->ref_supplier = trim($this->ref_supplier);
- } else {
- $this->ref_supplier = trim($this->ref_supplier . '_' . ($_facrec->nb_gen_done + 1));
- }
$this->note_public = trim($this->note_public);
$this->note_private = trim($this->note_private);
$this->note_private = dol_concatdesc($this->note_private, $langs->trans("GeneratedFromRecurringInvoice", $_facrec->title));
@@ -499,6 +494,7 @@ class FactureFournisseur extends CommonInvoice
// For recurring invoices, update date and number of last generation of recurring template invoice, before inserting new invoice
if ($_facrec->frequency > 0) {
+ $this->ref_supplier = trim($this->ref_supplier . '_' . ($_facrec->nb_gen_done + 1));
dol_syslog("This is a recurring invoice so we set date_last_gen and next date_when");
if (empty($_facrec->date_when)) {
$_facrec->date_when = $now;
@@ -1257,10 +1253,10 @@ class FactureFournisseur extends CommonInvoice
$sql .= " type=".(isset($this->type) ? ((int) $this->type) : "null").",";
$sql .= " subtype=".((int) $this->subtype).",";
$sql .= " fk_soc=".(isset($this->socid) ? ((int) $this->socid) : "null").",";
- $sql .= " datec=".(dol_strlen($this->datec) != 0 ? "'".$this->db->idate($this->datec)."'" : 'null').",";
- $sql .= " datef=".(dol_strlen($this->date) != 0 ? "'".$this->db->idate($this->date)."'" : 'null').",";
- if (dol_strlen($this->tms) != 0) {
- $sql .= " tms=".(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
+ $sql .= " datec=".(dol_strlen((string) $this->datec) != 0 ? "'".$this->db->idate($this->datec)."'" : 'null').",";
+ $sql .= " datef=".(dol_strlen((string) $this->date) != 0 ? "'".$this->db->idate($this->date)."'" : 'null').",";
+ if (dol_strlen((string) $this->tms) != 0) {
+ $sql .= " tms=".(dol_strlen((string) $this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
}
$sql .= " libelle=".(isset($this->label) ? "'".$this->db->escape($this->label)."'" : "null").",";
$sql .= " paye=".(isset($this->paid) ? ((int) $this->paid) : "0").",";
@@ -1278,7 +1274,7 @@ class FactureFournisseur extends CommonInvoice
$sql .= " vat_reverse_charge = ".($this->vat_reverse_charge != '' ? ((int) $this->db->escape($this->vat_reverse_charge)) : 0).",";
$sql .= " fk_projet=".(!empty($this->fk_project) ? ((int) $this->fk_project) : "null").",";
$sql .= " fk_cond_reglement=".(isset($this->cond_reglement_id) ? ((int) $this->cond_reglement_id) : "null").",";
- $sql .= " date_lim_reglement=".(dol_strlen($this->date_echeance) != 0 ? "'".$this->db->idate($this->date_echeance)."'" : 'null').",";
+ $sql .= " date_lim_reglement=".(dol_strlen((string) $this->date_echeance) != 0 ? "'".$this->db->idate($this->date_echeance)."'" : 'null').",";
$sql .= " note_private=".(isset($this->note_private) ? "'".$this->db->escape($this->note_private)."'" : "null").",";
$sql .= " note_public=".(isset($this->note_public) ? "'".$this->db->escape($this->note_public)."'" : "null").",";
$sql .= " model_pdf=".(isset($this->model_pdf) ? "'".$this->db->escape($this->model_pdf)."'" : "null").",";
diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php
index 1b5edf77e7c..3aeac657350 100644
--- a/htdocs/fourn/commande/dispatch.php
+++ b/htdocs/fourn/commande/dispatch.php
@@ -997,9 +997,13 @@ if ($id > 0 || !empty($ref)) {
}
// Qty to dispatch
- print '| ';
- print ''.img_picto($langs->trans("Reset"), 'eraser', 'class="pictofixedwidth opacitymedium"').'';
- print '';
+ print ' | ';
+ if ($remaintodispatch>0) {
+ $btnLabel = $langs->trans("Fill").' : '.$remaintodispatch;
+ print '';
+ }
+ print '';
+ print '';
print ' | ';
print '';
@@ -1136,6 +1140,11 @@ if ($id > 0 || !empty($ref)) {
$("select[name^=entrepot_]").val(fk_default_warehouse).change();
});
+ $(".auto-fill-qty").on("click touchstart", function(e){
+ e.preventDefault();
+ $("input[name="+$(this).data("rowname")+"]").val($(this).data("value")).trigger("change");
+ });
+
$("#autoreset").click(function() {
$(".qtydispatchinput").each(function(){
id = $(this).attr("id");
@@ -1154,7 +1163,8 @@ if ($id > 0 || !empty($ref)) {
});
});
- $(".resetline").click(function(){
+ $(".resetline").click(function(e){
+ e.preventDefault();
id = $(this).attr("id");
id = id.split("reset_");
console.log("Reset trigger for id = qty_"+id[1]);
diff --git a/htdocs/loan/class/loanschedule.class.php b/htdocs/loan/class/loanschedule.class.php
index 58e7b4966e8..7e5d2f4f428 100644
--- a/htdocs/loan/class/loanschedule.class.php
+++ b/htdocs/loan/class/loanschedule.class.php
@@ -333,7 +333,7 @@ class LoanSchedule extends CommonObject
$sql .= " fk_loan=".(isset($this->fk_loan) ? $this->fk_loan : "null").",";
$sql .= " datec=".(dol_strlen($this->datec) != 0 ? "'".$this->db->idate($this->datec)."'" : 'null').",";
- $sql .= " tms=".(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
+ $sql .= " tms=".(dol_strlen((string) $this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
$sql .= " datep=".(dol_strlen($this->datep) != 0 ? "'".$this->db->idate($this->datep)."'" : 'null').",";
$sql .= " amount_capital=".(isset($this->amount_capital) ? $this->amount_capital : "null").",";
$sql .= " amount_insurance=".(isset($this->amount_insurance) ? $this->amount_insurance : "null").",";
diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php
index 6435942fe03..d8b461ad7d8 100644
--- a/htdocs/loan/class/paymentloan.class.php
+++ b/htdocs/loan/class/paymentloan.class.php
@@ -368,7 +368,7 @@ class PaymentLoan extends CommonObject
$sql = "UPDATE ".MAIN_DB_PREFIX."payment_loan SET";
$sql .= " fk_loan=".(isset($this->fk_loan) ? $this->fk_loan : "null").",";
$sql .= " datec=".(dol_strlen($this->datec) != 0 ? "'".$this->db->idate($this->datec)."'" : 'null').",";
- $sql .= " tms=".(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
+ $sql .= " tms=".(dol_strlen((string) $this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
$sql .= " datep=".(dol_strlen($this->datep) != 0 ? "'".$this->db->idate($this->datep)."'" : 'null').",";
$sql .= " amount_capital=".(isset($this->amount_capital) ? $this->amount_capital : "null").",";
$sql .= " amount_insurance=".(isset($this->amount_insurance) ? $this->amount_insurance : "null").",";
diff --git a/htdocs/product/class/productcustomerprice.class.php b/htdocs/product/class/productcustomerprice.class.php
index 1f3c1319780..8e9a7d13da3 100644
--- a/htdocs/product/class/productcustomerprice.class.php
+++ b/htdocs/product/class/productcustomerprice.class.php
@@ -782,7 +782,7 @@ class ProductCustomerPrice extends CommonObject
$sql .= " entity=".$conf->entity.",";
$sql .= " datec='".$this->db->idate(dol_now())."',";
- $sql .= " tms=".(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
+ $sql .= " tms=".(dol_strlen((string) $this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
$sql .= " fk_product=".(isset($this->fk_product) ? $this->fk_product : "null").",";
$sql .= " fk_soc=".(isset($this->fk_soc) ? $this->fk_soc : "null").",";
$sql .= " ref_customer=".(isset($this->ref_customer) ? "'".$this->db->escape($this->ref_customer)."'" : "null").",";
diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php
index 3558da35647..916579c2b4b 100644
--- a/htdocs/product/reassort.php
+++ b/htdocs/product/reassort.php
@@ -6,6 +6,7 @@
* Copyright (C) 2015 Raphaël Doursenaud
* Copyright (C) 2019 Juanjo Menent
* Copyright (C) 2023 Vincent de Grandpré
+ * Copyright (C) 2024 Frédéric France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -227,7 +228,7 @@ if ($sall) {
$sql .= natural_search(array('p.ref', 'p.label', 'p.description', 'p.note'), $sall);
}
// if the type is not 1, we show all products (type = 0,2,3)
-if (dol_strlen($type)) {
+if (dol_strlen((string) $type)) {
if ($type == 1) {
$sql .= " AND p.fk_product_type = '1'";
} else {
diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php
index f43993f4e19..218f0bf4eb8 100644
--- a/htdocs/product/reassortlot.php
+++ b/htdocs/product/reassortlot.php
@@ -7,6 +7,7 @@
* Copyright (C) 2016 Ferran Marcet
* Copyright (C) 2019 Juanjo Menent
* Copyright (C) 2021 Noé Cendrier
+ * Copyright (C) 2024 Frédéric France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -296,7 +297,7 @@ if ($search_all) {
$sql .= natural_search(array('p.ref', 'p.label', 'p.description', 'p.note'), $search_all);
}
// if the type is not 1, we show all products (type = 0,2,3)
-if (dol_strlen($type)) {
+if (dol_strlen((string) $type)) {
if ($type == 1) {
$sql .= " AND p.fk_product_type = '1'";
} else {
diff --git a/htdocs/product/stock/class/productlot.class.php b/htdocs/product/stock/class/productlot.class.php
index d3fac5d41e2..ec4a5247dc0 100644
--- a/htdocs/product/stock/class/productlot.class.php
+++ b/htdocs/product/stock/class/productlot.class.php
@@ -306,13 +306,13 @@ class Productlot extends CommonObject
}
if ($checkSellByMandatory) {
- if (!isset($sellBy) || dol_strlen($sellBy) == 0) {
+ if (!isset($sellBy) || dol_strlen((string) $sellBy) == 0) {
// error : sell by is mandatory
$errorMsgArr[] = $langs->trans('ErrorFieldRequired', $langs->transnoentities('SellByDate'));
}
}
if ($checkEatByMandatory) {
- if (!isset($eatBy) || dol_strlen($eatBy) == 0) {
+ if (!isset($eatBy) || dol_strlen((string) $eatBy) == 0) {
// error : eat by is mandatory
$errorMsgArr[] = $langs->trans('ErrorFieldRequired', $langs->transnoentities('EatByDate'));
}
@@ -606,7 +606,7 @@ class Productlot extends CommonObject
$sql .= ' qc_frequency = '.(!empty($this->qc_frequency) ? (int) $this->qc_frequency : 'null').',';
$sql .= ' lifetime = '.(!empty($this->lifetime) ? (int) $this->lifetime : 'null').',';
$sql .= ' datec = ' . (!isset($this->datec) || dol_strlen($this->datec) != 0 ? "'" . $this->db->idate($this->datec) . "'" : 'null') . ',';
- $sql .= ' tms = ' . (dol_strlen($this->tms) != 0 ? "'" . $this->db->idate($this->tms) . "'" : "'" . $this->db->idate(dol_now()) . "'") . ',';
+ $sql .= ' tms = ' . (dol_strlen((string) $this->tms) != 0 ? "'" . $this->db->idate($this->tms) . "'" : "'" . $this->db->idate(dol_now()) . "'") . ',';
$sql .= ' fk_user_creat = ' . (isset($this->fk_user_creat) ? $this->fk_user_creat : "null") . ',';
$sql .= ' fk_user_modif = ' . (isset($this->fk_user_modif) ? $this->fk_user_modif : "null") . ',';
$sql .= ' import_key = ' . (isset($this->import_key) ? $this->import_key : "null");
diff --git a/htdocs/product/stock/class/productstockentrepot.class.php b/htdocs/product/stock/class/productstockentrepot.class.php
index b65e8e04262..fce36a3a633 100644
--- a/htdocs/product/stock/class/productstockentrepot.class.php
+++ b/htdocs/product/stock/class/productstockentrepot.class.php
@@ -354,7 +354,7 @@ class ProductStockEntrepot extends CommonObject
// Update request
$sql = 'UPDATE '.$this->db->prefix().$this->table_element.' SET';
- $sql .= ' tms = '.(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : "'".$this->db->idate(dol_now())."'").',';
+ $sql .= ' tms = '.(dol_strlen((string) $this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : "'".$this->db->idate(dol_now())."'").',';
$sql .= ' fk_product = '.(isset($this->fk_product) ? $this->fk_product : "null").',';
$sql .= ' fk_entrepot = '.(isset($this->fk_entrepot) ? $this->fk_entrepot : "null").',';
$sql .= ' seuil_stock_alerte = '.(isset($this->seuil_stock_alerte) ? $this->seuil_stock_alerte : "null").',';
diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php
index 70d1c2a87ca..b72e01943ce 100644
--- a/htdocs/product/stock/replenish.php
+++ b/htdocs/product/stock/replenish.php
@@ -4,7 +4,7 @@
* Copyright (C) 2014 Regis Houssin
* Copyright (C) 2016 Juanjo Menent
* Copyright (C) 2016 ATM Consulting
- * Copyright (C) 2019 Frédéric France
+ * Copyright (C) 2019-2024 Frédéric France
* Copyright (C) 2021 Ferran Marcet
* Copyright (C) 2021 Antonin MARCHAL
* Copyright (C) 2024 MDW
@@ -387,7 +387,7 @@ if ($sall) {
$sql .= natural_search(array('p.ref', 'p.label', 'p.description', 'p.note'), $sall);
}
// if the type is not 1, we show all products (type = 0,2,3)
-if (dol_strlen($type)) {
+if (dol_strlen((string) $type)) {
if ($type == 1) {
$sql .= ' AND p.fk_product_type = 1';
} else {
diff --git a/htdocs/reception/class/receptionlinebatch.class.php b/htdocs/reception/class/receptionlinebatch.class.php
index 26d77de5b3c..7fd0e258669 100644
--- a/htdocs/reception/class/receptionlinebatch.class.php
+++ b/htdocs/reception/class/receptionlinebatch.class.php
@@ -415,7 +415,7 @@ class ReceptionLineBatch extends CommonObjectLine
$sql .= " datec=".(dol_strlen($this->datec) != 0 ? "'".$this->db->idate($this->datec)."'" : 'null').",";
$sql .= " comment=".(isset($this->comment) ? "'".$this->db->escape($this->comment)."'" : "null").",";
$sql .= " status=".(isset($this->status) ? $this->status : "null").",";
- $sql .= " tms=".(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
+ $sql .= " tms=".(dol_strlen((string) $this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
$sql .= " batch=".(isset($this->batch) ? "'".$this->db->escape($this->batch)."'" : "null").",";
$sql .= " eatby=".(dol_strlen($this->eatby) != 0 ? "'".$this->db->idate($this->eatby)."'" : 'null').",";
$sql .= " sellby=".(dol_strlen($this->sellby) != 0 ? "'".$this->db->idate($this->sellby)."'" : 'null');
diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php
index cb106b7afeb..84c2d87c249 100644
--- a/htdocs/resource/class/dolresource.class.php
+++ b/htdocs/resource/class/dolresource.class.php
@@ -752,7 +752,7 @@ class Dolresource extends CommonObject
$sql .= " element_type = ".(isset($this->element_type) ? "'".$this->db->escape($this->element_type)."'" : "null").",";
$sql .= " busy = ".(isset($this->busy) ? (int) $this->busy : "null").",";
$sql .= " mandatory = ".(isset($this->mandatory) ? (int) $this->mandatory : "null").",";
- $sql .= " tms = ".(dol_strlen($this->date_modification) != 0 ? "'".$this->db->idate($this->date_modification)."'" : 'null');
+ $sql .= " tms = ".(dol_strlen((string) $this->date_modification) != 0 ? "'".$this->db->idate($this->date_modification)."'" : 'null');
$sql .= " WHERE rowid=".((int) $this->id);
$this->db->begin();
diff --git a/htdocs/salaries/class/paymentsalary.class.php b/htdocs/salaries/class/paymentsalary.class.php
index 15cf12789ac..dfbee083f66 100644
--- a/htdocs/salaries/class/paymentsalary.class.php
+++ b/htdocs/salaries/class/paymentsalary.class.php
@@ -440,7 +440,7 @@ class PaymentSalary extends CommonObject
$sql = "UPDATE ".MAIN_DB_PREFIX."payment_salary SET";
$sql .= " fk_salary=".(isset($this->fk_salary) ? $this->fk_salary : "null").",";
$sql .= " datec=".(dol_strlen($this->datec) != 0 ? "'".$this->db->idate($this->datec)."'" : 'null').",";
- $sql .= " tms=".(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
+ $sql .= " tms=".(dol_strlen((string) $this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
$sql .= " datep=".(dol_strlen($this->datepaye) != 0 ? "'".$this->db->idate($this->datepaye)."'" : 'null').",";
$sql .= " amount=".(isset($this->amount) ? $this->amount : "null").",";
$sql .= " fk_typepayment=".(isset($this->fk_typepayment) ? $this->fk_typepayment : "null").",";
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index 7b2930044c3..ccde48cade0 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -2419,7 +2419,7 @@ class Societe extends CommonObject
// Writes trace in discount history
$sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_remise";
$sql .= " (entity, datec, fk_soc, remise_client, note, fk_user_author)";
- $sql .= " VALUES (".$conf->entity.", '".$this->db->idate($now)."', ".((int) $this->id).", '".$this->db->escape($remise)."',";
+ $sql .= " VALUES (".((int) $conf->entity).", '".$this->db->idate($now)."', ".((int) $this->id).", '".$this->db->escape($remise)."',";
$sql .= " '".$this->db->escape($note)."',";
$sql .= " ".((int) $user->id);
$sql .= ")";
@@ -2480,7 +2480,7 @@ class Societe extends CommonObject
// Writes trace in discount history
$sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_remise_supplier";
$sql .= " (entity, datec, fk_soc, remise_supplier, note, fk_user_author)";
- $sql .= " VALUES (".$conf->entity.", '".$this->db->idate($now)."', ".((int) $this->id).", '".$this->db->escape($remise)."',";
+ $sql .= " VALUES (".((int) $conf->entity).", '".$this->db->idate($now)."', ".((int) $this->id).", '".$this->db->escape($remise)."',";
$sql .= " '".$this->db->escape($note)."',";
$sql .= " ".((int) $user->id);
$sql .= ")";
diff --git a/htdocs/theme/eldy/btn.inc.php b/htdocs/theme/eldy/btn.inc.php
index 7b41cfa6b2c..95df3a93ebd 100644
--- a/htdocs/theme/eldy/btn.inc.php
+++ b/htdocs/theme/eldy/btn.inc.php
@@ -344,7 +344,7 @@ div.pagination li:first-child a.btnTitle, div.pagination li.paginationafterarrow
/*
- * BTN LINK
+ * BTN LINK (used with tag in general but not with )
*/
.btn-link{
@@ -360,3 +360,60 @@ div.pagination li:first-child a.btnTitle, div.pagination li.paginationafterarrow
background-color: #ddd;
border: 1px solid #ddd;
}
+
+
+/*
+ * BUTTON With Low emphasis
+ */
+
+button.btn-low-emphasis{
+ text-align: center;
+ display: inline-block;
+ border: none;
+ outline: none;
+ cursor: pointer;
+ margin: 0;
+ padding: 0;
+ width: auto;
+ min-width: 1.5em;
+ min-height: 1.5em;
+ line-height: 1.5em;
+
+ overflow: visible;
+ background: transparent;
+ background-position: center; /* used for hover ripple effect */
+ background-size: 0%;
+ color: var(--colortextlink, inherit);
+ font: inherit;
+ line-height: normal;
+
+ /* Corrects font smoothing for webkit */
+ -webkit-font-smoothing: inherit;
+ -moz-osx-font-smoothing: inherit;
+
+ /* Corrects inability to style clickable input types in iOS */
+ -webkit-appearance: none;
+
+
+ transition: background 0.8s;/* used for hover ripple effect */
+ background: transparent radial-gradient(circle, transparent 1%, hsla(var(--colortextlink-h),var(--colortextlink-s) ,var(--colortextlink-l) , 0.1) 1%, transparent 10%) center/15000%;
+}
+
+button.btn-low-emphasis.--btn-icon{
+ border-radius: 100%;
+}
+
+button.btn-low-emphasis :is(.fa, .fas){
+ color: var(--colortextlink, inherit);
+ opacity: 0.4;
+}
+
+button.btn-low-emphasis:is(:focus,:hover) :is(.fa, .fas){
+ opacity: 0.8;
+}
+
+button.btn-low-emphasis.--btn-icon:active {
+ background-color: hsla(var(--colortextlink-h),var(--colortextlink-s) ,var(--colortextlink-l) , 0.1);
+ background-size: 100%;
+ transition: background 0s;/* used for hover ripple effect */
+}
diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php
index 73bea21b393..b5f343d0480 100644
--- a/htdocs/theme/eldy/global.inc.php
+++ b/htdocs/theme/eldy/global.inc.php
@@ -109,6 +109,10 @@ $leftmenuwidth = 240;
--colortexttitlelink: rgba(, 0.9);
--colortext: rgb();
--colortextlink: rgb();
+ --colortextlink-h: ;
+ --colortextlink-l: %;
+ --colortextlink-s: %;
+ --colortextlink-a: 1;
--colortextbackhmenu: #;
--colortextbackvmenu: #;
--colortopbordertitle1: rgb();
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index 483eb61afc8..06d35390433 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -195,6 +195,8 @@ $colortexttitle = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!g
$colortexttitlelink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_TEXTTITLELINK') ? $colortexttitlelink : $conf->global->THEME_ELDY_TEXTTITLELINK) : (empty($user->conf->THEME_ELDY_TEXTTITLELINK) ? $colortexttitlelink : $user->conf->THEME_ELDY_TEXTTITLELINK);
$colortext = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_TEXT') ? $colortext : $conf->global->THEME_ELDY_TEXT) : (empty($user->conf->THEME_ELDY_TEXT) ? $colortext : $user->conf->THEME_ELDY_TEXT);
$colortextlink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_TEXTLINK') ? $colortextlink : $conf->global->THEME_ELDY_TEXTLINK) : (empty($user->conf->THEME_ELDY_TEXTLINK) ? $colortextlink : $user->conf->THEME_ELDY_TEXTLINK);
+$colortextlinkHsla = colorHexToHsl($colortextlink, false, true);
+
$butactionbg = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_BTNACTION') ? $butactionbg : $conf->global->THEME_ELDY_BTNACTION) : (empty($user->conf->THEME_ELDY_BTNACTION) ? $butactionbg : $user->conf->THEME_ELDY_BTNACTION);
$textbutaction = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_TEXTBTNACTION') ? $textbutaction : $conf->global->THEME_ELDY_TEXTBTNACTION) : (empty($user->conf->THEME_ELDY_TEXTBTNACTION) ? $textbutaction : $user->conf->THEME_ELDY_TEXTBTNACTION);
$fontsize = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_FONT_SIZE1') ? $fontsize : $conf->global->THEME_ELDY_FONT_SIZE1) : (empty($user->conf->THEME_ELDY_FONT_SIZE1) ? $fontsize : $user->conf->THEME_ELDY_FONT_SIZE1);
diff --git a/htdocs/theme/md/btn.inc.php b/htdocs/theme/md/btn.inc.php
index ab382877477..717c2a96486 100644
--- a/htdocs/theme/md/btn.inc.php
+++ b/htdocs/theme/md/btn.inc.php
@@ -442,3 +442,61 @@ div.pagination .btnTitle:hover .btnTitle-label{
background-color: #ddd;
border: 1px solid #ddd;
}
+
+
+
+/*
+ * BUTTON With Low emphasis
+ */
+
+button.btn-low-emphasis{
+ text-align: center;
+ display: inline-block;
+ border: none;
+ outline: none;
+ cursor: pointer;
+ margin: 0;
+ padding: 0;
+ width: auto;
+ min-width: 1.5em;
+ min-height: 1.5em;
+ line-height: 1.5em;
+
+ overflow: visible;
+ background: transparent;
+ background-position: center; /* used for hover ripple effect */
+ background-size: 0%;
+ color: var(--colortextlink, inherit);
+ font: inherit;
+ line-height: normal;
+
+ /* Corrects font smoothing for webkit */
+ -webkit-font-smoothing: inherit;
+ -moz-osx-font-smoothing: inherit;
+
+ /* Corrects inability to style clickable input types in iOS */
+ -webkit-appearance: none;
+
+
+ transition: background 0.8s;/* used for hover ripple effect */
+ background: transparent radial-gradient(circle, transparent 1%, hsla(var(--colortextlink-h),var(--colortextlink-s) ,var(--colortextlink-l) , 0.1) 1%, transparent 10%) center/15000%;
+}
+
+button.btn-low-emphasis.--btn-icon{
+ border-radius: 100%;
+}
+
+button.btn-low-emphasis :is(.fa, .fas){
+ color: var(--colortextlink, inherit);
+ opacity: 0.4;
+}
+
+button.btn-low-emphasis:is(:focus,:hover) :is(.fa, .fas){
+ opacity: 0.8;
+}
+
+button.btn-low-emphasis.--btn-icon:active {
+ background-color: hsla(var(--colortextlink-h),var(--colortextlink-s) ,var(--colortextlink-l) , 0.1);
+ background-size: 100%;
+ transition: background 0s;/* used for hover ripple effect */
+}
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index f71e2917572..4758ceb867e 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -198,6 +198,7 @@ $colortexttitle = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!ge
$colortexttitlelink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_TEXTTITLELINK') ? $colortexttitlelink : $conf->global->THEME_ELDY_TEXTTITLELINK) : (empty($user->conf->THEME_ELDY_TEXTTITLELINK) ? $colortexttitlelink : $user->conf->THEME_ELDY_TEXTTITLELINK);
$colortext = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_TEXT') ? $colortext : $conf->global->THEME_ELDY_TEXT) : (empty($user->conf->THEME_ELDY_TEXT) ? $colortext : $user->conf->THEME_ELDY_TEXT);
$colortextlink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_TEXTLINK') ? $colortext : $conf->global->THEME_ELDY_TEXTLINK) : (empty($user->conf->THEME_ELDY_TEXTLINK) ? $colortextlink : $user->conf->THEME_ELDY_TEXTLINK);
+$colortextlinkHsla = colorHexToHsl($colortextlink, false, true);
$butactionbg = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_BTNACTION') ? $butactionbg : $conf->global->THEME_ELDY_BTNACTION) : (empty($user->conf->THEME_ELDY_BTNACTION) ? $butactionbg : $user->conf->THEME_ELDY_BTNACTION);
$textbutaction = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_TEXTBTNACTION') ? $textbutaction : $conf->global->THEME_ELDY_TEXTBTNACTION) : (empty($user->conf->THEME_ELDY_TEXTBTNACTION) ? $textbutaction : $user->conf->THEME_ELDY_TEXTBTNACTION);
$fontsize = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (!getDolGlobalString('THEME_ELDY_FONT_SIZE1') ? $fontsize : $conf->global->THEME_ELDY_FONT_SIZE1) : (empty($user->conf->THEME_ELDY_FONT_SIZE1) ? $fontsize : $user->conf->THEME_ELDY_FONT_SIZE1);
@@ -350,6 +351,11 @@ $leftmenuwidth = 242;
--colortexttitlelink: rgba(, 0.9);
--colortext: rgb();
--colortextlink: rgb();
+ --colortextlink: rgb();
+ --colortextlink-h: ;
+ --colortextlink-l: %;
+ --colortextlink-s: %;
+ --colortextlink-a: 1;
--colortextbackhmenu: #;
--colortextbackvmenu: #;
--colortopbordertitle1: rgb();
diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php
index b164438e1e4..f569115af04 100644
--- a/htdocs/ticket/class/ticket.class.php
+++ b/htdocs/ticket/class/ticket.class.php
@@ -571,8 +571,8 @@ class Ticket extends CommonObject
$sql .= " ".(empty($this->category_code) || $this->category_code == '-1' ? 'NULL' : "'".$this->db->escape($this->category_code)."'").",";
$sql .= " ".(!isset($this->severity_code) ? 'NULL' : "'".$this->db->escape($this->severity_code)."'").",";
$sql .= " ".(!isDolTms($this->datec) ? 'NULL' : "'".$this->db->idate($this->datec)."'").",";
- $sql .= " ".(!isset($this->date_read) || dol_strlen($this->date_read) == 0 ? 'NULL' : "'".$this->db->idate($this->date_read)."'").",";
- $sql .= " ".(!isset($this->date_close) || dol_strlen($this->date_close) == 0 ? 'NULL' : "'".$this->db->idate($this->date_close)."'");
+ $sql .= " ".(!isset($this->date_read) || dol_strlen((string) $this->date_read) == 0 ? 'NULL' : "'".$this->db->idate($this->date_read)."'").",";
+ $sql .= " ".(!isset($this->date_close) || dol_strlen((string) $this->date_close) == 0 ? 'NULL' : "'".$this->db->idate($this->date_close)."'");
$sql .= ", ".((int) $this->entity);
$sql .= ", ".(!isset($this->notify_tiers_at_create) ? 1 : ((int) $this->notify_tiers_at_create));
$sql .= ", '".$this->db->escape($this->model_pdf)."'";
@@ -1108,10 +1108,10 @@ class Ticket extends CommonObject
$sql .= " category_code=".(isset($this->category_code) ? "'".$this->db->escape($this->category_code)."'" : "null").",";
$sql .= " severity_code=".(isset($this->severity_code) ? "'".$this->db->escape($this->severity_code)."'" : "null").",";
$sql .= " datec=".(isDolTms($this->datec) ? "'".$this->db->idate($this->datec)."'" : 'null').",";
- $sql .= " date_read=".(dol_strlen($this->date_read) != 0 ? "'".$this->db->idate($this->date_read)."'" : 'null').",";
- $sql .= " date_last_msg_sent=".(dol_strlen($this->date_last_msg_sent) != 0 ? "'".$this->db->idate($this->date_last_msg_sent)."'" : 'null').",";
+ $sql .= " date_read=".(dol_strlen((string) $this->date_read) != 0 ? "'".$this->db->idate($this->date_read)."'" : 'null').",";
+ $sql .= " date_last_msg_sent=".(dol_strlen((string) $this->date_last_msg_sent) != 0 ? "'".$this->db->idate($this->date_last_msg_sent)."'" : 'null').",";
$sql .= " model_pdf=".(isset($this->model_pdf) ? "'".$this->db->escape($this->model_pdf)."'" : "null").",";
- $sql .= " date_close=".(dol_strlen($this->date_close) != 0 ? "'".$this->db->idate($this->date_close)."'" : 'null');
+ $sql .= " date_close=".(dol_strlen((string) $this->date_close) != 0 ? "'".$this->db->idate($this->date_close)."'" : 'null');
$sql .= " WHERE rowid=".((int) $this->id);
$this->db->begin();
diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php
index ad3449cf761..a36082a4ec0 100644
--- a/htdocs/website/class/website.class.php
+++ b/htdocs/website/class/website.class.php
@@ -218,9 +218,9 @@ class Website extends CommonObject
$sql .= ' '.(!isset($this->fk_default_home) ? 'NULL' : $this->fk_default_home).',';
$sql .= ' '.(!isset($this->virtualhost) ? 'NULL' : "'".$this->db->escape($this->virtualhost)."'").",";
$sql .= ' '.(!isset($this->fk_user_creat) ? $user->id : $this->fk_user_creat).',';
- $sql .= ' '.(!isset($this->date_creation) || dol_strlen($this->date_creation) == 0 ? 'NULL' : "'".$this->db->idate($this->date_creation)."'").",";
+ $sql .= ' '.(!isset($this->date_creation) || dol_strlen((string) $this->date_creation) == 0 ? 'NULL' : "'".$this->db->idate($this->date_creation)."'").",";
$sql .= ' '.((int) $this->position).",";
- $sql .= ' '.(!isset($this->date_modification) || dol_strlen($this->date_modification) == 0 ? 'NULL' : "'".$this->db->idate($this->date_modification)."'");
+ $sql .= ' '.(!isset($this->date_modification) || dol_strlen((string) $this->date_modification) == 0 ? 'NULL' : "'".$this->db->idate($this->date_modification)."'");
$sql .= ')';
$this->db->begin();
diff --git a/phpstan.neon.dist b/phpstan.neon.dist
index fe73c449322..8b9a9198ce2 100644
--- a/phpstan.neon.dist
+++ b/phpstan.neon.dist
@@ -77,7 +77,6 @@ parameters:
- '#on array{url: mixed} in empty\(\) does not exist.#'
- '#dol_copy expects string, int given#'
- '#dol_getIdFromCode expects string, int given#'
- - '#dol_strlen expects string, int given#'
- '#EvalMath::trigger\(\) expects string, int given#'
- '#get_next_value expects string, int given#'
- '#pdf_writeLinkedObjects expects string, int given#'
|