Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2024-09-14 01:37:10 +02:00
commit 2cb8eeee77
35 changed files with 194 additions and 90 deletions

View file

@ -399,7 +399,7 @@ class PaymentSocialContribution extends CommonObject
$sql = "UPDATE ".MAIN_DB_PREFIX."paiementcharge SET";
$sql .= " fk_charge=".(isset($this->fk_charge) ? ((int) $this->fk_charge) : "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=".(isset($this->amount) ? price2num($this->amount) : "null").",";
$sql .= " fk_typepaiement=".(isset($this->fk_typepaiement) ? ((int) $this->fk_typepaiement) : "null").",";

View file

@ -400,7 +400,7 @@ class PaymentVAT extends CommonObject
$sql = "UPDATE ".MAIN_DB_PREFIX."payment_vat SET";
$sql .= " fk_tva=".(isset($this->fk_tva) ? ((int) $this->fk_tva) : "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=".(isset($this->amount) ? (float) price2num($this->amount) : "null").",";
$sql .= " fk_typepaiement=".(isset($this->fk_typepaiement) ? ((int) $this->fk_typepaiement) : "null").",";

View file

@ -185,7 +185,7 @@ if (empty($reshook)) {
$mesg = $object->error;
}
} elseif ($action == 'confirm_unsign' && $confirm == 'yes' && $user->hasRight('contract', 'creer')) {
$result = $object->setSignedStatus($user, $object::SIGNED_STATUSES['STATUS_NO_SIGNATURE'], 0, 'CONTRACT_MODIFY');
$result = $object->setSignedStatus($user, Contrat::$SIGNED_STATUSES['STATUS_NO_SIGNATURE'], 0, 'CONTRACT_MODIFY');
if ($result >= 0) {
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
exit;
@ -2291,7 +2291,7 @@ if ($action == 'create') {
// Sign
if ($object->status > Contrat::STATUS_DRAFT) {
if ($object->signed_status != Contrat::SIGNED_STATUSES['STATUS_SIGNED_ALL']) {
if ($object->signed_status != Contrat::$SIGNED_STATUSES['STATUS_SIGNED_ALL']) {
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=sign&token=' . newToken() . '">' . $langs->trans("ContractSign") . '</a></div>';
} else {
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=unsign&token=' . newToken() . '">' . $langs->trans("ContractUnsign") . '</a></div>';

View file

@ -42,6 +42,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonsignedobject.class.php';
/**
* Class to manage contracts
* @property int $signed_status
* @static array<int> $SIGNED_STATUSES
*/
class Contrat extends CommonObject
{
@ -170,12 +172,6 @@ class Contrat extends CommonObject
*/
public $date_contrat;
/**
* Status of the contract (0=NoSignature, 1=SignedBySender, 2=SignedByReceiver, 9=SignedByAll)
* @var int
*/
public $signed_status = 0;
/**
* @var int
*/
@ -299,17 +295,6 @@ class Contrat extends CommonObject
const STATUS_VALIDATED = 1;
const STATUS_CLOSED = 2;
/**
* 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)
];
/**
* Constructor
*

View file

@ -953,7 +953,7 @@ class ContratLigne extends CommonObjectLine
$this->commentaire = $comment;
$sql = "UPDATE ".MAIN_DB_PREFIX."contratdet SET statut = ".((int) $this->statut).",";
$sql .= " date_ouverture = ".(dol_strlen($this->date_start_real) != 0 ? "'".$this->db->idate($this->date_start_real)."'" : "null").",";
$sql .= " date_ouverture = ".(dol_strlen((string) $this->date_start_real) != 0 ? "'".$this->db->idate($this->date_start_real)."'" : "null").",";
if ($date_end >= 0) {
$sql .= " date_fin_validite = ".(dol_strlen($this->date_end) != 0 ? "'".$this->db->idate($this->date_end)."'" : "null").",";
}

View file

@ -435,7 +435,7 @@ if ($action == "importSignature") {
// We should just create an image file with the signature.
}
$user = new User($db);
$object->setSignedStatus($user, $object::SIGNED_STATUSES['STATUS_SIGNED_RECEIVER_ONLINE'], 0, 'CONTRACT_MODIFY');
$object->setSignedStatus($user, Contrat::$SIGNED_STATUSES['STATUS_SIGNED_RECEIVER_ONLINE'], 0, 'CONTRACT_MODIFY');
}
} elseif ($mode == 'fichinter') {
require_once DOL_DOCUMENT_ROOT . '/fichinter/class/fichinter.class.php';
@ -571,7 +571,7 @@ if ($action == "importSignature") {
// We should just create an image file with the signature.
}
$user = new User($db);
$object->setSignedStatus($user, $object::SIGNED_STATUSES['STATUS_SIGNED_RECEIVER_ONLINE'], 0, 'FICHINTER_MODIFY');
$object->setSignedStatus($user, Fichinter::$SIGNED_STATUSES['STATUS_SIGNED_RECEIVER_ONLINE'], 0, 'FICHINTER_MODIFY');
}
} elseif ($mode == "societe_rib") {
$langs->load('withdrawals');

View file

@ -12639,7 +12639,7 @@ function getFieldErrorIcon($fieldValidationErrorMsg)
* @param string $url the url for link
* @param string $id attribute id of button
* @param int<-2,2> $status 0 no user rights, 1 active, 2 current action or selected, -1 Feature Disabled, -2 disable Other reason use param $helpText as tooltip help
* @param array<string,mixed> $params various params for future : recommended rather than adding more function arguments
* @param array<string,mixed> $params various parameters for future : recommended rather than adding more function arguments
* @return string html button
*/
function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $url = '', $id = '', $status = 1, $params = array())

View file

@ -1073,11 +1073,11 @@ class pdf_vinci extends ModelePDFMo
}
}
if (!empty($object->date_approve)) {
if (!empty($object->date_start_planned)) {
$posy += 5;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("MoDate")." : ".dol_print_date($object->date_approve, "day", false, $outputlangs, true), '', 'R');
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("MoDate")." : ".dol_print_date($object->date_start_planned, "day", false, $outputlangs, true), '', 'R');
} else {
$posy += 5;
$pdf->SetXY($posx, $posy);

View file

@ -345,7 +345,7 @@ class PaymentDonation extends CommonObject
$sql = "UPDATE ".MAIN_DB_PREFIX."payment_donation SET";
$sql .= " fk_donation=".(isset($this->fk_donation) ? $this->fk_donation : "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=".(isset($this->amount) ? $this->amount : "null").",";
$sql .= " fk_typepayment=".(isset($this->fk_typepayment) ? $this->fk_typepayment : "null").",";

View file

@ -337,7 +337,7 @@ class EcmFiles extends CommonObject
$sql .= ' '.(!isset($this->gen_or_uploaded) ? 'NULL' : "'".$this->db->escape($this->gen_or_uploaded)."'").',';
$sql .= ' '.(!isset($this->extraparams) ? 'NULL' : "'".$this->db->escape($this->extraparams)."'").',';
$sql .= " '".$this->db->idate($this->date_c)."',";
$sql .= ' '.(!isset($this->date_m) || dol_strlen($this->date_m) == 0 ? 'NULL' : "'".$this->db->idate($this->date_m)."'").',';
$sql .= ' '.(!isset($this->date_m) || dol_strlen((string) $this->date_m) == 0 ? 'NULL' : "'".$this->db->idate($this->date_m)."'").',';
$sql .= ' '.(!isset($this->fk_user_c) ? $user->id : $this->fk_user_c).',';
$sql .= ' '.(!isset($this->fk_user_m) ? 'NULL' : $this->fk_user_m).',';
$sql .= ' '.(!isset($this->acl) ? 'NULL' : "'".$this->db->escape($this->acl)."'").',';
@ -732,7 +732,7 @@ class EcmFiles extends CommonObject
$sql .= ' gen_or_uploaded = '.(isset($this->gen_or_uploaded) ? "'".$this->db->escape($this->gen_or_uploaded)."'" : "null").',';
$sql .= ' extraparams = '.(isset($this->extraparams) ? "'".$this->db->escape($this->extraparams)."'" : "null").',';
$sql .= ' date_c = '.(!isset($this->date_c) || dol_strlen($this->date_c) != 0 ? "'".$this->db->idate($this->date_c)."'" : 'null').',';
//$sql .= ' tms = '.(! isset($this->date_m) || dol_strlen($this->date_m) != 0 ? "'".$this->db->idate($this->date_m)."'" : 'null').','; // Field automatically updated
//$sql .= ' tms = '.(! isset($this->date_m) || dol_strlen((string) $this->date_m) != 0 ? "'".$this->db->idate($this->date_m)."'" : 'null').','; // Field automatically updated
$sql .= ' fk_user_m = '.($this->fk_user_m > 0 ? $this->fk_user_m : $user->id).',';
$sql .= ' acl = '.(isset($this->acl) ? "'".$this->db->escape($this->acl)."'" : "null").',';
$sql .= ' src_object_id = '.($this->src_object_id > 0 ? $this->src_object_id : "null").',';

View file

@ -340,7 +340,7 @@ class PaymentExpenseReport extends CommonObject
$sql = "UPDATE ".MAIN_DB_PREFIX."payment_expensereport SET";
$sql .= " fk_expensereport=".(isset($this->fk_expensereport) ? $this->fk_expensereport : "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=".(isset($this->amount) ? $this->amount : "null").",";
$sql .= " fk_typepayment=".(isset($this->fk_typepayment) ? $this->fk_typepayment : "null").",";

View file

@ -228,7 +228,7 @@ if (empty($reshook)) {
$mesg = $object->error;
}
} elseif ($action == 'confirm_unsign' && $confirm == 'yes' && $permissiontoadd) {
$result = $object->setSignedStatus($user, $object::SIGNED_STATUSES['STATUS_NO_SIGNATURE'], 0, 'FICHINTER_MODIFY');
$result = $object->setSignedStatus($user, Fichinter::$SIGNED_STATUSES['STATUS_NO_SIGNATURE'], 0, 'FICHINTER_MODIFY');
if ($result >= 0) {
if (!getDolGlobalString('MAIN_DISABLE_PDF_AUTOUPDATE')) {
// Define output language
@ -1807,7 +1807,7 @@ if ($action == 'create') {
// Sign
if ($object->statut > Fichinter::STATUS_DRAFT) {
if ($object->signed_status != Fichinter::SIGNED_STATUSES['STATUS_SIGNED_ALL']) {
if ($object->signed_status != Fichinter::$SIGNED_STATUSES['STATUS_SIGNED_ALL']) {
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=sign&token=' . newToken() . '">' . $langs->trans("InterventionSign") . '</a></div>';
} else {
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=unsign&token=' . newToken() . '">' . $langs->trans("InterventionUnsign") . '</a></div>';

View file

@ -35,6 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonsignedobject.class.php';
/**
* Class to manage interventions
* @property int $signed_status
* @static array<int> $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)) {

View file

@ -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").",";

View file

@ -997,9 +997,13 @@ if ($id > 0 || !empty($ref)) {
}
// Qty to dispatch
print '<td class="right">';
print '<a href="#" id="reset'.$suffix.'" class="resetline">'.img_picto($langs->trans("Reset"), 'eraser', 'class="pictofixedwidth opacitymedium"').'</a>';
print '<input id="qty'.$suffix.'" name="qty'.$suffix.'" type="text" class="width50 right qtydispatchinput" value="'.(GETPOSTISSET('qty'.$suffix) ? GETPOSTINT('qty'.$suffix) : (!getDolGlobalString('SUPPLIER_ORDER_DISPATCH_FORCE_QTY_INPUT_TO_ZERO') ? $remaintodispatch : 0)).'">';
print '<td class="right nowrap">';
if ($remaintodispatch>0) {
$btnLabel = $langs->trans("Fill").' : '.$remaintodispatch;
print '<button class="auto-fill-qty btn-low-emphasis --btn-icon" data-rowname="qty'.$suffix.'" data-value="'.$remaintodispatch.'" title="'.dol_escape_htmltag($btnLabel).'" aria-label="'.dol_escape_htmltag($btnLabel).'" >'.img_picto($btnLabel, 'fa-arrow-right', 'aria-hidden="true"', 0, 0, 1).'</button>';
}
print '<input id="qty'.$suffix.'" name="qty'.$suffix.'" type="number" step="any" class="width50 right qtydispatchinput" value="'.(GETPOSTISSET('qty'.$suffix) ? GETPOSTINT('qty'.$suffix) : (!getDolGlobalString('SUPPLIER_ORDER_DISPATCH_FORCE_QTY_INPUT_TO_ZERO') ? $remaintodispatch : 0)).'">';
print '<button class="resetline btn-low-emphasis --btn-icon" id="reset'.$suffix.'" title="'.dol_escape_htmltag($langs->trans("Reset")).'" >'.img_picto($langs->trans("Reset"), 'eraser', 'aria-hidden="true"', 0, 0, 1).'</button>';
print '</td>';
print '<td>';
@ -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]);

View file

@ -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").",";

View file

@ -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").",";

View file

@ -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").",";

View file

@ -6,6 +6,7 @@
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2019 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2023 Vincent de Grandpré <vincent@de-grandpre.quebec>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -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 {

View file

@ -7,6 +7,7 @@
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2019 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2021 Noé Cendrier <noe.cendrier@altairis.fr>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -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 {

View file

@ -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");

View file

@ -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").',';

View file

@ -4,7 +4,7 @@
* Copyright (C) 2014 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2016 ATM Consulting <support@atm-consulting.fr>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2021 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2021 Antonin MARCHAL <antonin@letempledujeu.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
@ -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 {

View file

@ -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');

View file

@ -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();

View file

@ -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").",";

View file

@ -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 .= ")";

View file

@ -344,7 +344,7 @@ div.pagination li:first-child a.btnTitle, div.pagination li.paginationafterarrow
/*
* BTN LINK
* BTN LINK (used with <a/> tag in general but not with <button/>)
*/
.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 */
}

View file

@ -109,6 +109,10 @@ $leftmenuwidth = 240;
--colortexttitlelink: rgba(<?php print $colortexttitlelink; ?>, 0.9);
--colortext: rgb(<?php print $colortext; ?>);
--colortextlink: rgb(<?php print $colortextlink; ?>);
--colortextlink-h: <?php print $colortextlinkHsla['h']; ?>;
--colortextlink-l: <?php print $colortextlinkHsla['l']; ?>%;
--colortextlink-s: <?php print $colortextlinkHsla['s']; ?>%;
--colortextlink-a: 1;
--colortextbackhmenu: #<?php print $colortextbackhmenu; ?>;
--colortextbackvmenu: #<?php print $colortextbackvmenu; ?>;
--colortopbordertitle1: rgb(<?php print $colortopbordertitle1; ?>);

View file

@ -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);

View file

@ -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 */
}

View file

@ -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(<?php print $colortexttitlelink; ?>, 0.9);
--colortext: rgb(<?php print $colortext; ?>);
--colortextlink: rgb(<?php print $colortextlink; ?>);
--colortextlink: rgb(<?php print $colortextlink; ?>);
--colortextlink-h: <?php print $colortextlinkHsla['h']; ?>;
--colortextlink-l: <?php print $colortextlinkHsla['l']; ?>%;
--colortextlink-s: <?php print $colortextlinkHsla['s']; ?>%;
--colortextlink-a: 1;
--colortextbackhmenu: #<?php print $colortextbackhmenu; ?>;
--colortextbackvmenu: #<?php print $colortextbackvmenu; ?>;
--colortopbordertitle1: rgb(<?php print $colortopbordertitle1; ?>);

View file

@ -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();

View file

@ -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();

View file

@ -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#'