Qual: Fix phan notices (compta/prel..fichinter) (#33485)
* Qual: Fix phan notices (asset..compta/paiement) * Qual: Fix phan notices (compta/prel..fichinter)
This commit is contained in:
parent
39c2de721a
commit
8669993ecf
47 changed files with 143 additions and 166 deletions
|
|
@ -10,9 +10,10 @@
|
|||
return [
|
||||
// # Issue statistics:
|
||||
// PhanUndeclaredProperty : 460+ occurrences
|
||||
// PhanTypeMismatchArgument : 150+ occurrences
|
||||
// PhanTypeMismatchProperty : 100+ occurrences
|
||||
// PhanUndeclaredGlobalVariable : 100+ occurrences
|
||||
// PhanTypeMismatchArgument : 95+ occurrences
|
||||
// PhanTypeMismatchArgumentNullable : 35+ occurrences
|
||||
// PhanTypeExpectedObjectPropAccess : 20+ occurrences
|
||||
// PhanTypeInvalidDimOffset : 20+ occurrences
|
||||
// PhanTypeMismatchDimFetch : 15+ occurrences
|
||||
|
|
@ -30,7 +31,6 @@ return [
|
|||
// PhanTypeMismatchDimAssignment : 2 occurrences
|
||||
// PhanTypeMismatchReturn : 2 occurrences
|
||||
// PhanTypeSuspiciousStringExpression : 2 occurrences
|
||||
// PhanPluginDuplicateExpressionAssignmentOperation : 1 occurrence
|
||||
// PhanPossiblyUndeclaredVariable : 1 occurrence
|
||||
// PhanTypeExpectedObjectPropAccessButGotNull : 1 occurrence
|
||||
|
||||
|
|
@ -104,19 +104,11 @@ return [
|
|||
'htdocs/compta/resultat/index.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/compta/resultat/projects.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/compta/sociales/card.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/compta/sociales/payments.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable'],
|
||||
'htdocs/compta/stats/cabyprodserv.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable'],
|
||||
'htdocs/compta/stats/supplier_turnover_by_prodserv.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable'],
|
||||
'htdocs/compta/stats/supplier_turnover_by_thirdparty.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/compta/tva/class/paymentvat.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/compta/tva/clients.php' => ['PhanTypeArraySuspiciousNull', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgument'],
|
||||
'htdocs/compta/tva/index.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/compta/tva/payments.php' => ['PhanTypeMismatchArgumentNullable', 'PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/compta/tva/quadri_detail.php' => ['PhanTypeArraySuspiciousNull', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgument'],
|
||||
'htdocs/contact/ajax/contact.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable'],
|
||||
'htdocs/contact/class/contact.class.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable'],
|
||||
'htdocs/contact/consumption.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/contact/list.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable'],
|
||||
'htdocs/contrat/card.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/actions_addupdatedelete.inc.php' => ['PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/actions_massactions.inc.php' => ['PhanUndeclaredProperty'],
|
||||
|
|
@ -132,15 +124,12 @@ return [
|
|||
'htdocs/core/class/commonsocialnetworks.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/conf.class.php' => ['PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/core/class/ctyperesource.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/doleditor.class.php' => ['PhanPluginDuplicateExpressionAssignmentOperation'],
|
||||
'htdocs/core/class/dolgraph.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/emailsenderprofile.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/evalmath.class.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/core/class/extrafields.class.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/core/class/html.formcompany.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/html.formfile.class.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/core/class/html.formmail.class.php' => ['PhanTypeMismatchArgument', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/html.formother.class.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/core/class/notify.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/openid.class.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/core/class/rssparser.class.php' => ['PhanTypeMismatchArgument'],
|
||||
|
|
@ -209,8 +198,6 @@ return [
|
|||
'htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/datapolicy/class/datapolicycron.class.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/dav/dav.class.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/debugbar/class/TraceableDB.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/delivery/class/delivery.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/don/admin/donation.php' => ['PhanUndeclaredMethod'],
|
||||
'htdocs/don/class/don.class.php' => ['PhanParamTooMany'],
|
||||
|
|
@ -218,42 +205,21 @@ return [
|
|||
'htdocs/don/info.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/don/list.php' => ['PhanTypeMismatchProperty'],
|
||||
'htdocs/don/note.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/ecm/class/ecmdirectory.class.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/ecm/class/ecmfiles.class.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/ecm/file_note.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/ecm/search.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/emailcollector/class/emailcollector.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/eventorganization/class/conferenceorboothattendee.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'],
|
||||
'htdocs/eventorganization/conferenceorbooth_contact.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/eventorganization/conferenceorbooth_document.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/eventorganization/conferenceorbooth_list.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/eventorganization/conferenceorboothattendee_list.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/eventorganization/core/actions_massactions_mail.inc.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/expedition/ajax/searchfrombarcode.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/expedition/card.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/expedition/class/expedition.class.php' => ['PhanTypeMismatchArgumentNullable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/expedition/class/expeditionlinebatch.class.php' => ['PhanTypeMismatchArgumentNullable'],
|
||||
'htdocs/expedition/list.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/expedition/shipment.php' => ['PhanTypeMismatchProperty'],
|
||||
'htdocs/expensereport/ajax/ajaxik.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/expedition/class/expedition.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/expensereport/card.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/expensereport/class/expensereport.class.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable'],
|
||||
'htdocs/expensereport/class/expensereportline.class.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/expensereport/class/expensereportstats.class.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/expensereport/class/paymentexpensereport.class.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/expensereport/payment/card.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/expensereport/payment/info.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/expensereport/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/exports/export.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/externalsite/frames.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/fichinter/agenda.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/fichinter/card-rec.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/fichinter/class/api_interventions.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/fichinter/class/fichinterrec.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/fichinter/contact.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/fichinter/document.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/fichinter/note.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/fichinter/stats/index.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/fichinter/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/filefunc.inc.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/fourn/class/api_supplier_orders.class.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
|
|
@ -299,7 +265,6 @@ return [
|
|||
'htdocs/product/class/productfournisseurprice.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/inventory/class/inventory.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/product/price.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/product/price_suppliers.php' => ['PhanTypeMismatchProperty'],
|
||||
'htdocs/product/reassort.php' => ['PhanTypeExpectedObjectPropAccessButGotNull'],
|
||||
'htdocs/product/stock/info.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/list.php' => ['PhanUndeclaredProperty'],
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ $config['suppress_issue_types'] = [
|
|||
|
||||
'PhanPluginNonBoolBranch', // Not essential - 31240+ occurrences
|
||||
'PhanPluginNumericalComparison', // Not essential - 19870+ occurrences
|
||||
'PhanTypeMismatchArgument', // Not showing in cti.dolibarr until low count - Can detect missing array keys, invalid types, objects being passed when scalar expected - Not all reported by phpstan - <=1200 cases (was: 12300+ before)
|
||||
// 'PhanTypeMismatchArgument', // Most fixed ~120 occurrences (was: 12300+ before)
|
||||
'PhanPluginNonBoolInLogicalArith', // Not essential - 11040+ occurrences
|
||||
'PhanPluginConstantVariableScalar', // Not essential - 5180+ occurrences
|
||||
'PhanPluginDuplicateAdjacentStatement',
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -184,7 +184,7 @@ if ($year > 0) {
|
|||
if ($sortfield !== null
|
||||
&& preg_match('/^(cs|c|pc|pct|u|ba)\./', $sortfield)
|
||||
) {
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
$sql .= $db->order($sortfield, (string) $sortorder);
|
||||
}
|
||||
|
||||
// Count total nb of records
|
||||
|
|
@ -226,7 +226,7 @@ print '<tr class="liste_titre">';
|
|||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre">';
|
||||
$formsocialcontrib->select_type_socialcontrib(GETPOSTISSET("search_sc_type") ? $search_sc_type : '', 'search_sc_type', 1, 0, 0, 'minwidth200 maxwidth300');
|
||||
$formsocialcontrib->select_type_socialcontrib(GETPOSTISSET("search_sc_type") ? (int) $search_sc_type : 0, 'search_sc_type', 1, 0, 0, 'minwidth200 maxwidth300');
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2024 Charlene Benke <charlene@patas-monkey.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -434,7 +434,7 @@ if ($modecompta == 'CREANCES-DETTES') {
|
|||
$sql .= $hookmanager->resPrint;
|
||||
|
||||
$sql .= " GROUP BY p.rowid, p.ref, p.label, p.fk_product_type";
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
$sql .= $db->order((string) $sortfield, (string) $sortorder);
|
||||
|
||||
dol_syslog("cabyprodserv", LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
|
|
@ -480,7 +480,7 @@ if ($modecompta == 'CREANCES-DETTES') {
|
|||
print '<tr class="liste_titre">';
|
||||
print '<td>';
|
||||
print img_picto('', 'category', 'class="pictofixedwidth"');
|
||||
print $formother->select_categories(Categorie::TYPE_PRODUCT, $selected_cat, 'search_categ', 0, $langs->trans("Category"));
|
||||
print $formother->select_categories(Categorie::TYPE_PRODUCT, (int) $selected_cat, 'search_categ', 0, $langs->trans("Category"));
|
||||
print ' ';
|
||||
print '<input type="checkbox" class="marginleft" id="subcat" name="subcat" value="yes"';
|
||||
if ($subcat) {
|
||||
|
|
@ -494,7 +494,7 @@ if ($modecompta == 'CREANCES-DETTES') {
|
|||
// Third party filter
|
||||
print '<br>';
|
||||
print img_picto('', 'category', 'class="pictofixedwidth"');
|
||||
print $formother->select_categories(Categorie::TYPE_CUSTOMER, $selected_catsoc, 'search_categ_soc', 0, $langs->trans("CustomersProspectsCategoriesShort"));
|
||||
print $formother->select_categories(Categorie::TYPE_CUSTOMER, (int) $selected_catsoc, 'search_categ_soc', 0, $langs->trans("CustomersProspectsCategoriesShort"));
|
||||
|
||||
// Type of third party filter
|
||||
print ' ';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2020 Maxime Kohlhaas <maxime@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -354,7 +354,7 @@ if ($modecompta == 'CREANCES-DETTES') {
|
|||
}
|
||||
$sql .= " AND f.entity IN (".getEntity('supplier_invoice').")";
|
||||
$sql .= " GROUP BY p.rowid, p.ref, p.label, p.fk_product_type";
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
$sql .= $db->order((string) $sortfield, (string) $sortorder);
|
||||
|
||||
dol_syslog("supplier_turnover_by_prodserv", LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
|
|
@ -413,7 +413,7 @@ if ($modecompta == 'CREANCES-DETTES') {
|
|||
//select thirdparty
|
||||
print '<br>';
|
||||
print img_picto('', 'company', 'class="paddingrightonly"');
|
||||
print $form->select_thirdparty_list($selected_soc, 'search_soc', '', $langs->trans("ThirdParty"), 0, 0, [], '', 0, 0, 'maxwidth250');
|
||||
print $form->select_thirdparty_list((string) $selected_soc, 'search_soc', '', $langs->trans("ThirdParty"), 0, 0, [], '', 0, 0, 'maxwidth250');
|
||||
print '</td>';
|
||||
|
||||
print '<td colspan="5" class="right">';
|
||||
|
|
@ -536,7 +536,7 @@ if ($modecompta == 'CREANCES-DETTES') {
|
|||
print '<td class="right">100%</td>';
|
||||
print '</tr>';
|
||||
|
||||
$db->free($result);
|
||||
$db->free($resql);
|
||||
} else {
|
||||
print '<tr><td colspan="6"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2020 Maxime Kohlhaas <maxime@atm-consulting.fr>
|
||||
* Copyright (C) 2023 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
*
|
||||
|
|
@ -699,7 +699,7 @@ if (count($amount)) {
|
|||
print '<td></td>';
|
||||
print '</tr>';
|
||||
|
||||
$db->free($result);
|
||||
$db->free($resql);
|
||||
} else {
|
||||
print '<tr><td colspan="8"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -58,8 +58,8 @@ if (!$year && $mode != 'tvaonly') {
|
|||
}
|
||||
|
||||
$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit;
|
||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
||||
$sortfield = (string) GETPOST('sortfield', 'aZ09comma');
|
||||
$sortorder = (string) GETPOST('sortorder', 'aZ09comma');
|
||||
$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT("page");
|
||||
if (empty($page) || $page == -1) {
|
||||
$page = 0;
|
||||
|
|
@ -143,7 +143,7 @@ if (preg_match('/^cs\./', $sortfield)
|
|||
|| preg_match('/^ptva\./', $sortfield)
|
||||
|| preg_match('/^pct\./', $sortfield)
|
||||
|| preg_match('/^bank\./', $sortfield)) {
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
$sql .= $db->order($sortfield, (string) $sortorder);
|
||||
}
|
||||
//$sql.= $db->plimit($limit+1,$offset);
|
||||
//print $sql;
|
||||
|
|
@ -210,10 +210,9 @@ if (isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) {
|
|||
$sql .= " OR (tva.datev IS NULL AND tva.datev between '" . $db->idate(dol_get_first_day($year)) . "' AND '" . $db->idate(dol_get_last_day($year)) . "')";
|
||||
$sql .= ")";
|
||||
}
|
||||
if ($sortfield !== null
|
||||
&& preg_match('/^(cs|tva|ptva|pct|bank)\./', $sortfield)
|
||||
if (preg_match('/^(cs|tva|ptva|pct|bank)\./', $sortfield)
|
||||
) {
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
$sql .= $db->order($sortfield, (string) $sortorder);
|
||||
}
|
||||
|
||||
if ($num) {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2007-2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -158,7 +158,7 @@ if ($action == 'fetch' && !empty($id) && $permissiontoread) {
|
|||
if (getDolGlobalInt('CONTACT_USE_SEARCH_TO_SELECT') && $nbchar < getDolGlobalInt('CONTACT_USE_SEARCH_TO_SELECT')) {
|
||||
print json_encode(array());
|
||||
} else {
|
||||
$arrayresult = $form->selectcontacts($socid, array(), $htmlname, 1, $exclude, $limitto, $showfunction, $morecss, $options_only, $showsoc, $forcecombo, $events, $moreparam, $htmlid, $multiple, $disableifempty, $filter);
|
||||
$arrayresult = $form->selectcontacts($socid, array(), (string) $htmlname, 1, $exclude, $limitto, $showfunction, $morecss, $options_only, $showsoc, $forcecombo, $events, $moreparam, $htmlid, (bool) $multiple, $disableifempty, $filter);
|
||||
|
||||
print json_encode($arrayresult);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -652,7 +652,7 @@ class Contact extends CommonObject
|
|||
$sql .= ", name_alias='".$this->db->escape($this->name_alias)."'";
|
||||
$sql .= ", lastname='".$this->db->escape($this->lastname)."'";
|
||||
$sql .= ", firstname='".$this->db->escape($this->firstname)."'";
|
||||
$sql .= ", address='".$this->db->escape($this->address)."'";
|
||||
$sql .= ", address='".$this->db->escape((string) $this->address)."'";
|
||||
$sql .= ", zip='".$this->db->escape($this->zip)."'";
|
||||
$sql .= ", town='".$this->db->escape($this->town)."'";
|
||||
$sql .= ", ref_ext = ".(!empty($this->ref_ext) ? "'".$this->db->escape($this->ref_ext)."'" : "NULL");
|
||||
|
|
@ -675,7 +675,7 @@ class Contact extends CommonObject
|
|||
$sql .= ", fk_stcommcontact = ".($this->stcomm_id > 0 || $this->stcomm_id == -1 ? $this->stcomm_id : "0");
|
||||
}
|
||||
$sql .= ", statut = ".((int) $this->statut);
|
||||
$sql .= ", fk_user_modif=".($user->id > 0 ? "'".$this->db->escape($user->id)."'" : "NULL");
|
||||
$sql .= ", fk_user_modif=".($user->id > 0 ? "'".$this->db->escape((string) $user->id)."'" : "NULL");
|
||||
$sql .= ", default_lang=".($this->default_lang ? "'".$this->db->escape($this->default_lang)."'" : "NULL");
|
||||
$sql .= ", entity = ".((int) $this->entity);
|
||||
$sql .= " WHERE rowid = ".((int) $id);
|
||||
|
|
@ -923,8 +923,8 @@ class Contact extends CommonObject
|
|||
* Update field alert birthday
|
||||
*
|
||||
* @param int $id Id of contact
|
||||
* @param User $user User asking to change alert or birthday
|
||||
* @param int $notrigger 0=no, 1=yes
|
||||
* @param ?User $user User asking to change alert or birthday
|
||||
* @param int<0,1> $notrigger 0=no, 1=yes
|
||||
* @return int Return integer <0 if KO, >=0 if OK
|
||||
*/
|
||||
public function update_perso($id, $user = null, $notrigger = 0)
|
||||
|
|
@ -978,15 +978,15 @@ class Contact extends CommonObject
|
|||
$this->error = $this->db->lasterror();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error && !$notrigger) {
|
||||
// Call trigger
|
||||
$result = $this->call_trigger('CONTACT_MODIFY', $user);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
if (!$error && !$notrigger) {
|
||||
// Call trigger
|
||||
$result = $this->call_trigger('CONTACT_MODIFY', $user);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
// End call triggers
|
||||
}
|
||||
// End call triggers
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* Copyright (C) 2015-2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -437,8 +437,8 @@ if ($sql_select && $documentstatic !== null) {
|
|||
print '<input class="flat" type="text" name="sref" size="8" value="'.$sref.'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre nowrap center">'; // date
|
||||
print $formother->select_month($month ? $month : -1, 'month', 1, 0, 'valignmiddle');
|
||||
print $formother->selectyear($year ? $year : -1, 'year', 1, 20, 1);
|
||||
print $formother->select_month($month ? (string) $month : '-1', 'month', 1, 0, 'valignmiddle');
|
||||
print $formother->selectyear($year ? (string) $year : '-1', 'year', 1, 20, 1);
|
||||
print '</td>';
|
||||
print '<td class="liste_titre center">';
|
||||
print '</td>';
|
||||
|
|
@ -593,7 +593,7 @@ if ($sql_select && $documentstatic !== null) {
|
|||
}
|
||||
} else {
|
||||
if ($objp->fk_product > 0) {
|
||||
echo $form->textwithtooltip($text, $description, 3, 0, '', $i, 0, '');
|
||||
echo $form->textwithtooltip($text, $description, 3, 0, '', (string) $i, 0, '');
|
||||
|
||||
// Show range
|
||||
echo get_date_range($objp->date_start, $objp->date_end);
|
||||
|
|
@ -612,7 +612,7 @@ if ($sql_select && $documentstatic !== null) {
|
|||
|
||||
if (!empty($objp->label)) {
|
||||
$text .= ' <strong>'.$objp->label.'</strong>';
|
||||
echo $form->textwithtooltip($text, dol_htmlentitiesbr($objp->description), 3, 0, '', $i, 0, '');
|
||||
echo $form->textwithtooltip($text, dol_htmlentitiesbr($objp->description), 3, 0, '', (string) $i, 0, '');
|
||||
} else {
|
||||
echo $text.' '.dol_htmlentitiesbr($objp->description);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -416,7 +416,7 @@ if (empty($reshook)) {
|
|||
|
||||
if ($action == 'setstcomm' && $permissiontoadd) {
|
||||
$object = new Contact($db);
|
||||
$result = $object->fetch(GETPOST('stcommcontactid'));
|
||||
$result = $object->fetch(GETPOSTINT('stcommcontactid'));
|
||||
$object->stcomm_id = dol_getIdFromCode($db, GETPOST('stcomm', 'alpha'), 'c_stcommcontact');
|
||||
$result = $object->update($object->id, $user);
|
||||
if ($result < 0) {
|
||||
|
|
@ -991,7 +991,7 @@ if ($contextpage != 'poslist') {
|
|||
$newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', $url);
|
||||
}
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'address', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, (string) $massactionbutton, $num, $nbtotalofrecords, 'address', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
$topicmail = "Information";
|
||||
$modelmail = "contact";
|
||||
|
|
@ -1028,7 +1028,7 @@ if (isModEnabled('category') && $user->hasRight('categorie', 'lire')) {
|
|||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$tmptitle = $langs->trans('ContactCategoriesShort');
|
||||
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"');
|
||||
$moreforfilter .= $formother->select_categories(Categorie::TYPE_CONTACT, $search_categ, 'search_categ', 1, $tmptitle);
|
||||
$moreforfilter .= $formother->select_categories(Categorie::TYPE_CONTACT, (int) $search_categ, 'search_categ', 1, $tmptitle);
|
||||
$moreforfilter .= '</div>';
|
||||
if (empty($type) || $type == 'c' || $type == 'p') {
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
|
|
@ -1041,7 +1041,7 @@ if (isModEnabled('category') && $user->hasRight('categorie', 'lire')) {
|
|||
$tmptitle .= $langs->trans('CustomersProspectsCategoriesShort');
|
||||
}
|
||||
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"');
|
||||
$moreforfilter .= $formother->select_categories(Categorie::TYPE_CUSTOMER, $search_categ_thirdparty, 'search_categ_thirdparty', 1, $tmptitle);
|
||||
$moreforfilter .= $formother->select_categories(Categorie::TYPE_CUSTOMER, (int) $search_categ_thirdparty, 'search_categ_thirdparty', 1, $tmptitle);
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
|
||||
|
|
@ -1049,7 +1049,7 @@ if (isModEnabled('category') && $user->hasRight('categorie', 'lire')) {
|
|||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$tmptitle = $langs->trans('SuppliersCategoriesShort');
|
||||
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"');
|
||||
$moreforfilter .= $formother->select_categories(Categorie::TYPE_SUPPLIER, $search_categ_supplier, 'search_categ_supplier', 1, $tmptitle);
|
||||
$moreforfilter .= $formother->select_categories(Categorie::TYPE_SUPPLIER, (int) $search_categ_supplier, 'search_categ_supplier', 1, $tmptitle);
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -164,7 +164,7 @@ top_httphead($outjson ? 'application/json' : 'text/html');
|
|||
|
||||
//print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||
|
||||
$arrayresult = $form->selectForFormsList($objecttmp, $htmlname, 0, 0, $searchkey, '', '', '', 0, 1, 0, '', $filter);
|
||||
$arrayresult = $form->selectForFormsList($objecttmp, (string) $htmlname, 0, 0, $searchkey, '', '', '', 0, 1, 0, '', $filter);
|
||||
|
||||
$db->close();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2006-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2021 Gaëtan MAISON <gm@ilad.org>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -218,7 +218,7 @@ class DolEditor
|
|||
$found = 0;
|
||||
$out = '';
|
||||
|
||||
$this->content = ($this->content ?? ''); // to avoid htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated
|
||||
$this->content = (string) $this->content; // to avoid htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated
|
||||
|
||||
if (in_array($this->tool, array('textarea', 'ckeditor'))) {
|
||||
$found = 1;
|
||||
|
|
|
|||
|
|
@ -63,6 +63,8 @@
|
|||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* LICENSE
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
@ -354,7 +356,7 @@ class EvalMath
|
|||
if (preg_match("/^([a-z]\w*)\($/", $val, $matches)) { // may be func, or variable w/ implicit multiplication against parentheses...
|
||||
if (in_array($matches[1], $this->fb) or array_key_exists($matches[1], $this->f)) { // it's a func
|
||||
$stack->push($val);
|
||||
$stack->push(1);
|
||||
$stack->push('1');
|
||||
$stack->push('(');
|
||||
$expecting_op = false;
|
||||
} else { // it's a var w/ implicit multiplication
|
||||
|
|
|
|||
|
|
@ -759,6 +759,7 @@ class ExtraFields
|
|||
|
||||
dol_syslog(get_class($this).'::DDLUpdateField', LOG_DEBUG);
|
||||
if ($type != 'separate') { // No table update when separate type
|
||||
// TODO: Verify, adjust - field_desc has 'value' (not expected), and is missing 'label','enabled','position','visible'
|
||||
$result = $this->db->DDLUpdateField($this->db->prefix().$table, $attrname, $field_desc);
|
||||
}
|
||||
if ($result > 0 || $type == 'separate') {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2019 Thibault FOUCART <support@ptibogxiv.net>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -1240,7 +1240,7 @@ class FormOther
|
|||
// $boxidactivatedforuser will be array of boxes chose by user
|
||||
|
||||
$selectboxlist = '';
|
||||
$boxactivated = InfoBox::listBoxes($db, 'activated', $areacode, (empty($user->conf->$confuserzone) ? null : $user), array(), 0); // Search boxes of common+user (or common only if user has no specific setup)
|
||||
$boxactivated = InfoBox::listBoxes($db, 'activated', (int) $areacode, (empty($user->conf->$confuserzone) ? null : $user), array(), 0); // Search boxes of common+user (or common only if user has no specific setup)
|
||||
|
||||
$boxidactivatedforuser = array();
|
||||
foreach ($boxactivated as $box) {
|
||||
|
|
|
|||
|
|
@ -2085,7 +2085,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = null, $nopr
|
|||
}
|
||||
|
||||
// Now add events of emailing module
|
||||
if (is_array($actioncode)) {
|
||||
if (is_array($actioncode) && $objcon !== null) {
|
||||
foreach ($actioncode as $code) {
|
||||
$sql2 = addMailingEventTypeSQL($code, $objcon, $filterobj);
|
||||
if (!empty($sql2)) {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2018 Destailleur Laurent <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -60,9 +61,9 @@ class CdavLib
|
|||
/**
|
||||
* Base sql request for calendar events
|
||||
*
|
||||
* @param int $calid Calendard id
|
||||
* @param int|boolean $oid Oid
|
||||
* @param int|boolean $ouri Ouri
|
||||
* @param int $calid Calendar id
|
||||
* @param int|bool $oid Oid
|
||||
* @param int|bool $ouri Ouri
|
||||
* @return string
|
||||
*/
|
||||
public function getSqlCalEvents($calid, $oid = false, $ouri = false)
|
||||
|
|
@ -101,7 +102,7 @@ class CdavLib
|
|||
if ($ouri === false) {
|
||||
$sql .= ' AND a.id = '.((int) $oid);
|
||||
} else {
|
||||
$sql .= ' AND (a.id = '.((int) $oid)." OR ac.uuidext = '".$this->db->escape($ouri)."')";
|
||||
$sql .= ' AND (a.id = '.((int) $oid)." OR ac.uuidext = '".((int) $ouri)."')";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -187,15 +188,15 @@ class CdavLib
|
|||
$caldata .= "DUE;VALUE=DATE:".date('Ymd', strtotime($obj->datep2) + 1)."\n";
|
||||
}
|
||||
} else {
|
||||
$caldata .= "DTSTART;TZID=".$timezone.":".strtr($obj->datep, array(" "=>"T", ":"=>"", "-"=>""))."\n";
|
||||
$caldata .= "DTSTART;TZID=".$timezone.":".strtr($obj->datep, array(" " => "T", ":" => "", "-" => ""))."\n";
|
||||
if ($type == 'VEVENT') {
|
||||
if (trim($obj->datep2) != '') {
|
||||
$caldata .= "DTEND;TZID=".$timezone.":".strtr($obj->datep2, array(" "=>"T", ":"=>"", "-"=>""))."\n";
|
||||
$caldata .= "DTEND;TZID=".$timezone.":".strtr($obj->datep2, array(" " => "T", ":" => "", "-" => ""))."\n";
|
||||
} else {
|
||||
$caldata .= "DTEND;TZID=".$timezone.":".strtr($obj->datep, array(" "=>"T", ":"=>"", "-"=>""))."\n";
|
||||
$caldata .= "DTEND;TZID=".$timezone.":".strtr($obj->datep, array(" " => "T", ":" => "", "-" => ""))."\n";
|
||||
}
|
||||
} elseif (trim($obj->datep2) != '') {
|
||||
$caldata .= "DUE;TZID=".$timezone.":".strtr($obj->datep2, array(" "=>"T", ":"=>"", "-"=>""))."\n";
|
||||
$caldata .= "DUE;TZID=".$timezone.":".strtr($obj->datep2, array(" " => "T", ":" => "", "-" => ""))."\n";
|
||||
}
|
||||
}
|
||||
$caldata .= "CLASS:PUBLIC\n";
|
||||
|
|
@ -217,7 +218,7 @@ class CdavLib
|
|||
}
|
||||
|
||||
$caldata .= "DESCRIPTION:";
|
||||
$caldata .= strtr($obj->note, array("\n"=>"\\n", "\r"=>""));
|
||||
$caldata .= strtr($obj->note, array("\n" => "\\n", "\r" => ""));
|
||||
if (!empty($obj->soc_nom)) {
|
||||
$caldata .= "\\n*DOLIBARR-SOC: ".$obj->soc_nom;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -381,7 +381,7 @@ class TraceableDB extends DoliDB
|
|||
* End query tracing
|
||||
*
|
||||
* @param string $sql query string
|
||||
* @param string $resql query result
|
||||
* @param mysqli_result|bool|resource $resql query result
|
||||
* @return void
|
||||
*/
|
||||
protected function endTracing($sql, $resql)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/* Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2008-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -193,7 +193,7 @@ class EcmDirectory extends CommonObject
|
|||
$sql .= "fk_user_c";
|
||||
$sql .= ") VALUES (";
|
||||
$sql .= " '".$this->db->escape($this->label)."',";
|
||||
$sql .= " '".$this->db->escape($conf->entity)."',";
|
||||
$sql .= " '".$this->db->escape((string) $conf->entity)."',";
|
||||
$sql .= " ".($this->fk_parent > 0 ? ((int) $this->fk_parent) : "null").",";
|
||||
$sql .= " '".$this->db->escape($this->description)."',";
|
||||
$sql .= " ".((int) $this->cachenbofdoc).",";
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2018 Francis Appels <francis.appels@yahoo.com>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -73,7 +73,7 @@ class EcmFiles extends CommonObject
|
|||
public $entity;
|
||||
|
||||
/**
|
||||
* @var string filename, Note: Into ecm database record, the entry $filename never ends with .noexe
|
||||
* @var string filename, Note: Into ecm database record, the entry never ends with .noexe
|
||||
*/
|
||||
public $filename;
|
||||
|
||||
|
|
@ -756,7 +756,7 @@ class EcmFiles extends CommonObject
|
|||
$sql .= ' content = '.(isset($this->content) ? "'".$this->db->escape($this->content)."'" : "null").',';
|
||||
}
|
||||
$sql .= ' cover = '.(isset($this->cover) ? "'".$this->db->escape($this->cover)."'" : "null").',';
|
||||
$sql .= ' position = '.(isset($this->position) ? $this->db->escape($this->position) : "0").',';
|
||||
$sql .= ' position = '.(isset($this->position) ? $this->db->escape((string) $this->position) : "0").',';
|
||||
$sql .= ' gen_or_uploaded = '.(isset($this->gen_or_uploaded) ? "'".$this->db->escape($this->gen_or_uploaded)."'" : "null").',';
|
||||
$sql .= ' extraparams = '.(isset($extraparams) ? "'".$this->db->escape($extraparams)."'" : "null").',';
|
||||
$sql .= ' date_c = '.(!isset($this->date_c) || dol_strlen($this->date_c) != 0 ? "'".$this->db->idate($this->date_c)."'" : 'null').',';
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -89,7 +90,7 @@ if (!$urlfile) {
|
|||
|
||||
// Load ecm object
|
||||
$ecmdir = new EcmDirectory($db);
|
||||
$result = $ecmdir->fetch(GETPOST("section", 'alpha'));
|
||||
$result = $ecmdir->fetch(GETPOSTINT("section"));
|
||||
if (!($result > 0)) {
|
||||
dol_print_error($db, $ecmdir->error);
|
||||
exit;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2008-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2008-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -88,7 +88,7 @@ if (!$sortfield) {
|
|||
|
||||
$ecmdir = new EcmDirectory($db);
|
||||
if (!empty($section)) {
|
||||
$result = $ecmdir->fetch($section);
|
||||
$result = $ecmdir->fetch((int) $section);
|
||||
if (!($result > 0)) {
|
||||
dol_print_error($db, $ecmdir->error);
|
||||
exit;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2021 Florian HENRY <florian.henry@scopen.fr>
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -160,7 +161,7 @@ $contactstatic = new Contact($db);
|
|||
$userstatic = new User($db);
|
||||
|
||||
$title = $langs->trans('ConferenceOrBooth')." - ".$langs->trans('ContactsAddresses');
|
||||
$help_url='EN:Module_Event_Organization';
|
||||
$help_url = 'EN:Module_Event_Organization';
|
||||
|
||||
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-eventorganization page-card_contact');
|
||||
|
||||
|
|
@ -310,7 +311,7 @@ if (!empty($withproject)) {
|
|||
$htmltext = $langs->trans("AllowUnknownPeopleSuggestConfHelp");
|
||||
print $form->editfieldkey('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', '', $projectstatic, 0, $typeofdata, '', 0, 0, 'projectid', $htmltext);
|
||||
print '</td><td>';
|
||||
print $form->editfieldval('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', '1', $projectstatic, 0, $typeofdata, '', null, 0, '', 0, '', 'projectid');
|
||||
print $form->editfieldval('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', '1', $projectstatic, 0, $typeofdata, '', null, null, '', 0, '', 'projectid');
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr><td>';
|
||||
|
|
@ -318,19 +319,19 @@ if (!empty($withproject)) {
|
|||
$htmltext = $langs->trans("AllowUnknownPeopleSuggestBoothHelp");
|
||||
print $form->editfieldkey('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', '', $projectstatic, 0, $typeofdata, '', 0, 0, 'projectid', $htmltext);
|
||||
print '</td><td>';
|
||||
print $form->editfieldval('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', '1', $projectstatic, 0, $typeofdata, '', null, 0, '', 0, '', 'projectid');
|
||||
print $form->editfieldval('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', '1', $projectstatic, 0, $typeofdata, '', null, null, '', 0, '', 'projectid');
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr><td>';
|
||||
print $form->editfieldkey($form->textwithpicto($langs->trans('PriceOfBooth'), $langs->trans("PriceOfBoothHelp")), 'price_booth', '', $projectstatic, 0, 'amount', '', 0, 0, 'projectid');
|
||||
print '</td><td>';
|
||||
print $form->editfieldval($form->textwithpicto($langs->trans('PriceOfBooth'), $langs->trans("PriceOfBoothHelp")), 'price_booth', $projectstatic->price_booth, $projectstatic, 0, 'amount', '', null, 0, '', 0, '', 'projectid');
|
||||
print $form->editfieldval($form->textwithpicto($langs->trans('PriceOfBooth'), $langs->trans("PriceOfBoothHelp")), 'price_booth', $projectstatic->price_booth, $projectstatic, 0, 'amount', '', null, null, '', 0, '', 'projectid');
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr><td>';
|
||||
print $form->editfieldkey($form->textwithpicto($langs->trans('PriceOfRegistration'), $langs->trans("PriceOfRegistrationHelp")), 'price_registration', '', $projectstatic, 0, 'amount', '', 0, 0, 'projectid');
|
||||
print '</td><td>';
|
||||
print $form->editfieldval($form->textwithpicto($langs->trans('PriceOfRegistration'), $langs->trans("PriceOfRegistrationHelp")), 'price_registration', $projectstatic->price_registration, $projectstatic, 0, 'amount', '', null, 0, '', 0, '', 'projectid');
|
||||
print $form->editfieldval($form->textwithpicto($langs->trans('PriceOfRegistration'), $langs->trans("PriceOfRegistrationHelp")), 'price_registration', $projectstatic->price_registration, $projectstatic, 0, 'amount', '', null, null, '', 0, '', 'projectid');
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr><td valign="middle">'.$langs->trans("EventOrganizationICSLink").'</td><td>';
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2021 Florian Henry <florian.henry@scopen.fr>
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -142,7 +143,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
|
|||
$form = new Form($db);
|
||||
|
||||
$title = $langs->trans("ConferenceOrBooth").' - '.$langs->trans("Files");
|
||||
$help_url='EN:Module_Event_Organization';
|
||||
$help_url = 'EN:Module_Event_Organization';
|
||||
|
||||
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-eventorganization page-card_documents');
|
||||
|
||||
|
|
@ -284,7 +285,7 @@ if (!empty($withproject)) {
|
|||
$htmltext = $langs->trans("AllowUnknownPeopleSuggestConfHelp");
|
||||
print $form->editfieldkey('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', '', $projectstatic, 0, $typeofdata, '', 0, 0, 'projectid', $htmltext);
|
||||
print '</td><td>';
|
||||
print $form->editfieldval('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', '1', $projectstatic, 0, $typeofdata, '', null, 0, '', 0, '', 'projectid');
|
||||
print $form->editfieldval('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', '1', $projectstatic, 0, $typeofdata, '', null, null, '', 0, '', 'projectid');
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr><td>';
|
||||
|
|
@ -292,19 +293,19 @@ if (!empty($withproject)) {
|
|||
$htmltext = $langs->trans("AllowUnknownPeopleSuggestBoothHelp");
|
||||
print $form->editfieldkey('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', '', $projectstatic, 0, $typeofdata, '', 0, 0, 'projectid', $htmltext);
|
||||
print '</td><td>';
|
||||
print $form->editfieldval('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', '1', $projectstatic, 0, $typeofdata, '', null, 0, '', 0, '', 'projectid');
|
||||
print $form->editfieldval('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', '1', $projectstatic, 0, $typeofdata, '', null, null, '', 0, '', 'projectid');
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr><td>';
|
||||
print $form->editfieldkey($form->textwithpicto($langs->trans('PriceOfBooth'), $langs->trans("PriceOfBoothHelp")), 'price_booth', '', $projectstatic, 0, 'amount', '', 0, 0, 'projectid');
|
||||
print '</td><td>';
|
||||
print $form->editfieldval($form->textwithpicto($langs->trans('PriceOfBooth'), $langs->trans("PriceOfBoothHelp")), 'price_booth', $projectstatic->price_booth, $projectstatic, 0, 'amount', '', null, 0, '', 0, '', 'projectid');
|
||||
print $form->editfieldval($form->textwithpicto($langs->trans('PriceOfBooth'), $langs->trans("PriceOfBoothHelp")), 'price_booth', $projectstatic->price_booth, $projectstatic, 0, 'amount', '', null, null, '', 0, '', 'projectid');
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr><td>';
|
||||
print $form->editfieldkey($form->textwithpicto($langs->trans('PriceOfRegistration'), $langs->trans("PriceOfRegistrationHelp")), 'price_registration', '', $projectstatic, 0, 'amount', '', 0, 0, 'projectid');
|
||||
print '</td><td>';
|
||||
print $form->editfieldval($form->textwithpicto($langs->trans('PriceOfRegistration'), $langs->trans("PriceOfRegistrationHelp")), 'price_registration', $projectstatic->price_registration, $projectstatic, 0, 'amount', '', null, 0, '', 0, '', 'projectid');
|
||||
print $form->editfieldval($form->textwithpicto($langs->trans('PriceOfRegistration'), $langs->trans("PriceOfRegistrationHelp")), 'price_registration', $projectstatic->price_registration, $projectstatic, 0, 'amount', '', null, null, '', 0, '', 'projectid');
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr><td valign="middle">'.$langs->trans("EventOrganizationICSLink").'</td><td>';
|
||||
|
|
|
|||
|
|
@ -470,7 +470,7 @@ if ($projectid > 0) {
|
|||
$htmltext = $langs->trans("AllowUnknownPeopleSuggestConfHelp");
|
||||
print $form->editfieldkey('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', ($project->accept_conference_suggestions ? 1 : 0), $project, $permissiontoadd, $typeofdata, '', 0, 0, 'projectid', $htmltext);
|
||||
print '</td><td class="valuefield">';
|
||||
print $form->editfieldval('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', ($project->accept_conference_suggestions ? 1 : 0), $project, $permissiontoadd, $typeofdata, '', null, 0, '', 0, '', 'projectid');
|
||||
print $form->editfieldval('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', ($project->accept_conference_suggestions ? 1 : 0), $project, $permissiontoadd, $typeofdata, '', null, null, '', 0, '', 'projectid');
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr><td class="titlefield">';
|
||||
|
|
@ -478,25 +478,25 @@ if ($projectid > 0) {
|
|||
$htmltext = $langs->trans("AllowUnknownPeopleSuggestBoothHelp");
|
||||
print $form->editfieldkey('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', ($project->accept_booth_suggestions ? 1 : 0), $project, $permissiontoadd, $typeofdata, '', 0, 0, 'projectid', $htmltext);
|
||||
print '</td><td class="valuefield">';
|
||||
print $form->editfieldval('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', ($project->accept_booth_suggestions ? 1 : 0), $project, $permissiontoadd, $typeofdata, '', null, 0, '', 0, '', 'projectid');
|
||||
print $form->editfieldval('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', ($project->accept_booth_suggestions ? 1 : 0), $project, $permissiontoadd, $typeofdata, '', null, null, '', 0, '', 'projectid');
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr><td class="titlefield">';
|
||||
print $form->editfieldkey($form->textwithpicto($langs->trans('PriceOfBooth'), $langs->trans("PriceOfBoothHelp")), 'price_booth', '', $project, $permissiontoadd, 'amount', '', 0, 0, 'projectid');
|
||||
print '</td><td class="valuefield">';
|
||||
print $form->editfieldval($form->textwithpicto($langs->trans('PriceOfBooth'), $langs->trans("PriceOfBoothHelp")), 'price_booth', $project->price_booth, $project, $permissiontoadd, 'amount', '', null, 0, '', 0, '', 'projectid');
|
||||
print $form->editfieldval($form->textwithpicto($langs->trans('PriceOfBooth'), $langs->trans("PriceOfBoothHelp")), 'price_booth', $project->price_booth, $project, $permissiontoadd, 'amount', '', null, null, '', 0, '', 'projectid');
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr><td class="titlefield">';
|
||||
print $form->editfieldkey($form->textwithpicto($langs->trans('PriceOfRegistration'), $langs->trans("PriceOfRegistrationHelp")), 'price_registration', '', $project, $permissiontoadd, 'amount', '', 0, 0, 'projectid');
|
||||
print '</td><td class="valuefield">';
|
||||
print $form->editfieldval($form->textwithpicto($langs->trans('PriceOfRegistration'), $langs->trans("PriceOfRegistrationHelp")), 'price_registration', $project->price_registration, $project, $permissiontoadd, 'amount', '', null, 0, '', 0, '', 'projectid');
|
||||
print $form->editfieldval($form->textwithpicto($langs->trans('PriceOfRegistration'), $langs->trans("PriceOfRegistrationHelp")), 'price_registration', $project->price_registration, $project, $permissiontoadd, 'amount', '', null, null, '', 0, '', 'projectid');
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr><td class="titlefield">';
|
||||
print $form->editfieldkey($form->textwithpicto($langs->trans('MaxNbOfAttendees'), ''), 'max_attendees', '', $project, $permissiontoadd, 'integer:3', '', 0, 0, 'projectid');
|
||||
print '</td><td class="valuefield">';
|
||||
print $form->editfieldval($form->textwithpicto($langs->trans('MaxNbOfAttendees'), ''), 'max_attendees', $project->max_attendees, $project, $permissiontoadd, 'integer:3', '', null, 0, '', 0, '', 'projectid');
|
||||
print $form->editfieldval($form->textwithpicto($langs->trans('MaxNbOfAttendees'), ''), 'max_attendees', $project->max_attendees, $project, $permissiontoadd, 'integer:3', '', null, null, '', 0, '', 'projectid');
|
||||
print "</td></tr>";
|
||||
|
||||
// Link to ICS for the event
|
||||
|
|
|
|||
|
|
@ -568,7 +568,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) {
|
|||
print '<tr><td class="nowrap">';
|
||||
$typeofdata = 'checkbox:'.($projectstatic->accept_conference_suggestions ? ' checked="checked"' : '');
|
||||
$htmltext = $langs->trans("AllowUnknownPeopleSuggestConfHelp");
|
||||
print $form->editfieldkey('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', $projectstatic->accept_conference_suggestions ? 1 : 0, $projectstatic, 0, $typeofdata, '', 0, 0, 'projectid', $htmltext);
|
||||
print $form->editfieldkey('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', $projectstatic->accept_conference_suggestions ? '1' : '0', $projectstatic, 0, $typeofdata, '', 0, 0, 'projectid', $htmltext);
|
||||
print '</td><td>';
|
||||
print $form->editfieldval('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', $projectstatic->accept_conference_suggestions ? 1 : 0, $projectstatic, 0, $typeofdata, '', null, null, '', 0, '', 'projectid');
|
||||
print "</td></tr>";
|
||||
|
|
@ -576,7 +576,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) {
|
|||
print '<tr><td>';
|
||||
$typeofdata = 'checkbox:'.($projectstatic->accept_booth_suggestions ? ' checked="checked"' : '');
|
||||
$htmltext = $langs->trans("AllowUnknownPeopleSuggestBoothHelp");
|
||||
print $form->editfieldkey('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', $projectstatic->accept_booth_suggestions ? 1 : 0, $projectstatic, 0, $typeofdata, '', 0, 0, 'projectid', $htmltext);
|
||||
print $form->editfieldkey('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', $projectstatic->accept_booth_suggestions ? '1' : '0', $projectstatic, 0, $typeofdata, '', 0, 0, 'projectid', $htmltext);
|
||||
print '</td><td>';
|
||||
print $form->editfieldval('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', $projectstatic->accept_booth_suggestions ? 1 : 0, $projectstatic, 0, $typeofdata, '', null, null, '', 0, '', 'projectid');
|
||||
print "</td></tr>";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -62,7 +63,7 @@ $warehouseid = 0;
|
|||
$objectreturn = array();
|
||||
$usesublevelpermission = '';
|
||||
|
||||
$object= new Product($db);
|
||||
$object = new Product($db);
|
||||
|
||||
// Security check
|
||||
if (!empty($user->socid)) {
|
||||
|
|
@ -100,12 +101,12 @@ if ($action == "existbarcode" && !empty($barcode) && $user->hasRight('stock', 'l
|
|||
$sql .= " WHERE p.barcode = '".$db->escape($barcode)."'";
|
||||
}
|
||||
if (!empty($fk_entrepot)) {
|
||||
$sql .= " AND ps.fk_entrepot = '".$db->escape($fk_entrepot)."'";
|
||||
$sql .= " AND ps.fk_entrepot = '".$db->escape((string) $fk_entrepot)."'";
|
||||
}
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
$nbline = $db->num_rows($result);
|
||||
for ($i=0; $i < $nbline; $i++) {
|
||||
for ($i = 0; $i < $nbline; $i++) {
|
||||
$obj = $db->fetch_object($result);
|
||||
if (($mode == "barcode" && $barcode == $obj->barcode) || ($mode == "lotserial" && $barcode == $obj->batch)) {
|
||||
if (!empty($obj->fk_entrepot) && $fk_entrepot == $obj->fk_entrepot) {
|
||||
|
|
@ -114,22 +115,22 @@ if ($action == "existbarcode" && !empty($barcode) && $user->hasRight('stock', 'l
|
|||
$fk_product = $obj->fk_product;
|
||||
$reelqty = $obj->reel;
|
||||
|
||||
$objectreturn = array('fk_warehouse'=>$warehouseid,'fk_product'=>$fk_product,'reelqty'=>$reelqty);
|
||||
$objectreturn = array('fk_warehouse' => $warehouseid,'fk_product' => $fk_product,'reelqty' => $reelqty);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($warehousefound < 1) {
|
||||
$response = array('status'=>'error','errorcode'=>'NotFound','message'=>'No warehouse found for barcode'.$barcode);
|
||||
$response = array('status' => 'error','errorcode' => 'NotFound','message' => 'No warehouse found for barcode'.$barcode);
|
||||
} elseif ($warehousefound > 1) {
|
||||
$response = array('status'=>'error','errorcode'=>'TooManyWarehouse','message'=>'Too many warehouse found');
|
||||
$response = array('status' => 'error','errorcode' => 'TooManyWarehouse','message' => 'Too many warehouse found');
|
||||
} else {
|
||||
$response = array('status'=>'success','message'=>'Warehouse found','object'=>$objectreturn);
|
||||
$response = array('status' => 'success','message' => 'Warehouse found','object' => $objectreturn);
|
||||
}
|
||||
} else {
|
||||
$response = array('status'=>'error','errorcode'=>'NotFound','message'=>"No results found for barcode");
|
||||
$response = array('status' => 'error','errorcode' => 'NotFound','message' => "No results found for barcode");
|
||||
}
|
||||
} else {
|
||||
$response = array('status'=>'error','errorcode'=>'ActionError','message'=>"Error on action");
|
||||
$response = array('status' => 'error','errorcode' => 'ActionError','message' => "Error on action");
|
||||
}
|
||||
|
||||
$response = json_encode($response);
|
||||
|
|
|
|||
|
|
@ -1363,7 +1363,7 @@ class Expedition extends CommonObject
|
|||
// We increment stock of batches
|
||||
// We use warehouse selected for each line
|
||||
foreach ($lotArray as $lot) {
|
||||
$result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $lot->qty, 0, $langs->trans("ShipmentCanceledInDolibarr", $this->ref), $lot->eatby, $lot->sellby, $lot->batch); // Price is set to 0, because we don't want to see WAP changed
|
||||
$result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $lot->qty, 0, $langs->trans("ShipmentCanceledInDolibarr", $this->ref), $lot->eatby, $lot->sellby, (string) $lot->batch); // Price is set to 0, because we don't want to see WAP changed
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
$this->errors = array_merge($this->errors, $mouvS->errors);
|
||||
|
|
@ -1558,7 +1558,7 @@ class Expedition extends CommonObject
|
|||
// We increment stock of batches
|
||||
// We use warehouse selected for each line
|
||||
foreach ($lotArray as $lot) {
|
||||
$result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $lot->qty, 0, $langs->trans("ShipmentDeletedInDolibarr", $this->ref), $lot->eatby, $lot->sellby, $lot->batch); // Price is set to 0, because we don't want to see WAP changed
|
||||
$result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $lot->qty, 0, $langs->trans("ShipmentDeletedInDolibarr", $this->ref), $lot->eatby, $lot->sellby, (string) $lot->batch); // Price is set to 0, because we don't want to see WAP changed
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
$this->errors = array_merge($this->errors, $mouvS->errors);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2007-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2013-2014 Cedric GROSS <c.gross@kreiz-it.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -162,7 +162,7 @@ class ExpeditionLineBatch extends CommonObject
|
|||
$sql .= $id_line_expdet;
|
||||
$sql .= ", ".(!isset($this->sellby) || dol_strlen($this->sellby) == 0 ? 'NULL' : ("'".$this->db->idate($this->sellby))."'");
|
||||
$sql .= ", ".(!isset($this->eatby) || dol_strlen($this->eatby) == 0 ? 'NULL' : ("'".$this->db->idate($this->eatby))."'");
|
||||
$sql .= ", ".($this->batch == '' ? 'NULL' : ("'".$this->db->escape($this->batch)."'"));
|
||||
$sql .= ", ".($this->batch == '' ? 'NULL' : ("'".$this->db->escape((string) $this->batch)."'"));
|
||||
$sql .= ", ".(!isset($this->qty) ? ((!isset($this->dluo_qty)) ? 'NULL' : $this->dluo_qty) : $this->qty); // dluo_qty deprecated, use qty
|
||||
$sql .= ", ".((int) $this->fk_origin_stock);
|
||||
$sql .= ", ".(empty($this->fk_warehouse) ? 'NULL' : $this->fk_warehouse);
|
||||
|
|
|
|||
|
|
@ -1162,7 +1162,7 @@ if (isModEnabled('category') && $user->hasRight('categorie', 'lire') && ($user->
|
|||
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"');
|
||||
//$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
|
||||
//$moreforfilter .= $form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1);
|
||||
$moreforfilter .= $formother->select_categories(Categorie::TYPE_PRODUCT, $search_product_category, 'search_product_category', 1, $tmptitle);
|
||||
$moreforfilter .= $formother->select_categories(Categorie::TYPE_PRODUCT, (int) $search_product_category, 'search_product_category', 1, $tmptitle);
|
||||
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ if (empty($reshook)) {
|
|||
}
|
||||
|
||||
if ($action == 'update_extras' && $permissiontoadd) {
|
||||
$object->oldcopy = dol_clone($object, 2);
|
||||
$object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty
|
||||
|
||||
// Fill array 'array_options' with data from update form
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'restricthtml'));
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2017 ATM Consulting <contact@atm-consulting.fr>
|
||||
* Copyright (C) 2017 Pierre-Henry Favre <phf@atm-consulting.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -76,9 +77,9 @@ $rep->errorMessage = '';
|
|||
|
||||
|
||||
if (empty($fk_expense) || $fk_expense < 0) {
|
||||
$rep->errorMessage = $langs->transnoentitiesnoconv('ErrorBadValueForParameter', $fk_expense, 'fk_expense');
|
||||
$rep->errorMessage = $langs->transnoentitiesnoconv('ErrorBadValueForParameter', (string) $fk_expense, 'fk_expense');
|
||||
} elseif (empty($fk_c_exp_tax_cat) || $fk_c_exp_tax_cat < 0) {
|
||||
$rep->errorMessage = $langs->transnoentitiesnoconv('ErrorBadValueForParameter', $fk_c_exp_tax_cat, 'fk_c_exp_tax_cat');
|
||||
$rep->errorMessage = $langs->transnoentitiesnoconv('ErrorBadValueForParameter', (string) $fk_c_exp_tax_cat, 'fk_c_exp_tax_cat');
|
||||
|
||||
$rep->response_status = 'error';
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1991,7 +1991,7 @@ class ExpenseReport extends CommonObject
|
|||
}
|
||||
$vatrate = preg_replace('/\*/', '', $vatrate);
|
||||
|
||||
$tmp = calcul_price_total($qty, $up, 0, (float) price2num($vatrate), -1, -1, 0, 'TTC', 0, $type, $seller, $localtaxes_type);
|
||||
$tmp = calcul_price_total($qty, (float) $up, 0, (float) price2num($vatrate), -1, -1, 0, 'TTC', 0, $type, $seller, $localtaxes_type);
|
||||
|
||||
$this->line->value_unit = $up;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (c) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2016-2020 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 William Mead <william.mead@manchenumerique.fr>
|
||||
*
|
||||
|
|
@ -346,7 +346,7 @@ class ExpenseReportLine extends CommonObjectLine
|
|||
$sql .= ' total_ht, total_tva, total_ttc,';
|
||||
$sql .= ' total_localtax1, total_localtax2,';
|
||||
$sql .= ' date, rule_warning_message, fk_c_exp_tax_cat, fk_ecm_files)';
|
||||
$sql .= " VALUES (".$this->db->escape($this->fk_expensereport).",";
|
||||
$sql .= " VALUES (".$this->db->escape((string) $this->fk_expensereport).",";
|
||||
$sql .= " ".((int) $this->fk_c_type_fees).",";
|
||||
$sql .= " ".((int) (!empty($this->fk_project) && $this->fk_project > 0) ? $this->fk_project : ((!empty($this->fk_projet) && $this->fk_projet > 0) ? $this->fk_projet : 'null')).",";
|
||||
$sql .= " ".((float) $this->vatrate).",";
|
||||
|
|
@ -490,7 +490,7 @@ class ExpenseReportLine extends CommonObjectLine
|
|||
$sql .= ", localtax1_type='".$this->db->escape($this->localtax1_type)."'";
|
||||
$sql .= ", localtax2_type='".$this->db->escape($this->localtax2_type)."'";
|
||||
$sql .= ", rule_warning_message='".$this->db->escape($this->rule_warning_message)."'";
|
||||
$sql .= ", fk_c_exp_tax_cat=".$this->db->escape($this->fk_c_exp_tax_cat);
|
||||
$sql .= ", fk_c_exp_tax_cat=".$this->db->escape((string) $this->fk_c_exp_tax_cat);
|
||||
$sql .= ", fk_ecm_files=".($this->fk_ecm_files > 0 ? ((int) $this->fk_ecm_files) : 'null');
|
||||
if ($this->fk_c_type_fees) {
|
||||
$sql .= ", fk_c_type_fees = ".((int) $this->fk_c_type_fees);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (c) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -159,7 +159,7 @@ class ExpenseReportStats extends Stats
|
|||
{
|
||||
$sql = "SELECT date_format(".$this->db->ifsql("e.".$this->datetouse." IS NULL", "e.date_create", "e.".$this->datetouse).",'%m') as dm, sum(".$this->field.")";
|
||||
$sql .= " FROM ".$this->from;
|
||||
$sql .= " WHERE date_format(".$this->db->ifsql("e.".$this->datetouse." IS NULL", "e.date_create", "e.".$this->datetouse).",'%Y') = '".$this->db->escape($year)."'";
|
||||
$sql .= " WHERE date_format(".$this->db->ifsql("e.".$this->datetouse." IS NULL", "e.date_create", "e.".$this->datetouse).",'%Y') = '".$this->db->escape((string) $year)."'";
|
||||
$sql .= " AND ".$this->where;
|
||||
$sql .= " GROUP BY dm";
|
||||
$sql .= $this->db->order('dm', 'DESC');
|
||||
|
|
@ -179,7 +179,7 @@ class ExpenseReportStats extends Stats
|
|||
{
|
||||
$sql = "SELECT date_format(".$this->db->ifsql("e.".$this->datetouse." IS NULL", "e.date_create", "e.".$this->datetouse).",'%m') as dm, avg(".$this->field.")";
|
||||
$sql .= " FROM ".$this->from;
|
||||
$sql .= " WHERE date_format(".$this->db->ifsql("e.".$this->datetouse." IS NULL", "e.date_create", "e.".$this->datetouse).",'%Y') = '".$this->db->escape($year)."'";
|
||||
$sql .= " WHERE date_format(".$this->db->ifsql("e.".$this->datetouse." IS NULL", "e.date_create", "e.".$this->datetouse).",'%Y') = '".$this->db->escape((string) $year)."'";
|
||||
$sql .= " AND ".$this->where;
|
||||
$sql .= " GROUP BY dm";
|
||||
$sql .= $this->db->order('dm', 'DESC');
|
||||
|
|
|
|||
|
|
@ -566,7 +566,7 @@ class PaymentExpenseReport extends CommonObject
|
|||
// Insert payment into llx_bank
|
||||
$bank_line_id = $acc->addline(
|
||||
$this->datep,
|
||||
$this->fk_typepayment, // Payment mode id or code ("CHQ or VIR for example")
|
||||
(string) $this->fk_typepayment, // Payment mode id or code ("CHQ or VIR for example")
|
||||
$label,
|
||||
-$amount,
|
||||
$this->num_payment,
|
||||
|
|
|
|||
|
|
@ -570,7 +570,7 @@ if ($step == 2 && $datatoexport) {
|
|||
print '<input type="hidden" name="datatoexport" value="'.$datatoexport.'">';
|
||||
print '<div class="valignmiddle marginbottomonly">';
|
||||
print '<span class="opacitymedium">'.$langs->trans("SelectExportFields").'</span> ';
|
||||
$htmlother->select_export_model($exportmodelid, 'exportmodelid', $datatoexport, 1, $user->id);
|
||||
$htmlother->select_export_model((string) $exportmodelid, 'exportmodelid', $datatoexport, 1, $user->id);
|
||||
print ' ';
|
||||
print '<input type="submit" class="button small" value="'.$langs->trans("Select").'">';
|
||||
print '</div>';
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) ---Put here your own copyright and developer email---
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -164,7 +165,7 @@ if ($object->id > 0) {
|
|||
if ($action != 'classify') {
|
||||
$morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> ';
|
||||
}
|
||||
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
|
||||
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
|
||||
} else {
|
||||
if (!empty($object->fk_project)) {
|
||||
$proj = new Project($db);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2007-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -133,8 +134,8 @@ if ($id > 0 || !empty($ref)) {
|
|||
// Ref customer
|
||||
//$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->ficheinter->creer, 'string', '', 0, 1);
|
||||
//$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->ficheinter->creer, 'string', '', null, null, '', 1);
|
||||
$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
|
||||
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
|
||||
$morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
|
||||
$morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
|
||||
// Thirdparty
|
||||
$morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1, 'customer');
|
||||
// Project
|
||||
|
|
@ -146,7 +147,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
if ($action != 'classify') {
|
||||
$morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> ';
|
||||
}
|
||||
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
|
||||
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
|
||||
} else {
|
||||
if (!empty($object->fk_project)) {
|
||||
$proj = new Project($db);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -130,8 +131,8 @@ if ($object->id) {
|
|||
// Ref customer
|
||||
//$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->ficheinter->creer, 'string', '', 0, 1);
|
||||
//$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->ficheinter->creer, 'string', '', null, null, '', 1);
|
||||
$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
|
||||
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
|
||||
$morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
|
||||
$morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
|
||||
// Thirdparty
|
||||
$morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1, 'customer');
|
||||
// Project
|
||||
|
|
@ -143,7 +144,7 @@ if ($object->id) {
|
|||
if ($action != 'classify') {
|
||||
$morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> ';
|
||||
}
|
||||
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
|
||||
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
|
||||
} else {
|
||||
if (!empty($object->fk_project)) {
|
||||
$proj = new Project($db);
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -93,8 +94,8 @@ if ($id > 0 || !empty($ref)) {
|
|||
|
||||
$morehtmlref = '<div class="refidno">';
|
||||
// Ref customer
|
||||
$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
|
||||
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
|
||||
$morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
|
||||
$morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
|
||||
// Thirdparty
|
||||
$morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1, 'customer');
|
||||
// Project
|
||||
|
|
@ -106,7 +107,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
if ($action != 'classify') {
|
||||
$morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> ';
|
||||
}
|
||||
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
|
||||
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
|
||||
} else {
|
||||
if (!empty($object->fk_project)) {
|
||||
$proj = new Project($db);
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ if (!$mesg) {
|
|||
$px3->SetLegend($legend);
|
||||
$px3->SetYLabel($langs->trans("AmountAverage"));
|
||||
$px3->SetMaxValue($px3->GetCeilMaxValue());
|
||||
$px3->SetMinValue($px3->GetFloorMinValue());
|
||||
$px3->SetMinValue((int) $px3->GetFloorMinValue());
|
||||
$px3->SetWidth($WIDTH);
|
||||
$px3->SetHeight($HEIGHT);
|
||||
$px3->SetShading(3);
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ if (empty($reshook)) {
|
|||
if ($id) {
|
||||
$result = $object->fetch($id);
|
||||
//Need dol_clone methode 1 (same object class) because update product use hasbatch method on oldcopy
|
||||
$object->oldcopy = dol_clone($object, 1);
|
||||
$object->oldcopy = dol_clone($object, 1); // @phan-suppress-current-line PhanTypeMismatchProperty
|
||||
$object->cost_price = $cost_price;
|
||||
$result = $object->update($object->id, $user);
|
||||
if ($result > 0) {
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ if ($id > 0 || !empty($track_id) || !empty($ref)) {
|
|||
if ($action != 'editcustomer' && $permissiontoadd) {
|
||||
$morehtmlref .= '<a class="editfielda" href="'.$url_page_current.'?action=editcustomer&token='.newToken().'&track_id='.$object->track_id.'">'.img_edit($langs->transnoentitiesnoconv('SetThirdParty'), 0).'</a> ';
|
||||
}
|
||||
$morehtmlref .= $form->form_thirdparty($url_page_current.'?track_id='.$object->track_id, $object->socid, $action == 'editcustomer' ? 'editcustomer' : 'none', '', 1, 0, 0, array(), 1);
|
||||
$morehtmlref .= $form->form_thirdparty($url_page_current.'?track_id='.$object->track_id, (string) $object->socid, $action == 'editcustomer' ? 'editcustomer' : 'none', '', 1, 0, 0, array(), 1);
|
||||
}
|
||||
|
||||
// Project
|
||||
|
|
|
|||
|
|
@ -711,7 +711,7 @@ function createOrder($authentication, $order)
|
|||
$newobject->ref_ext = $order['ref_ext'];
|
||||
$newobject->date = dol_stringtotime($order['date'], 'dayrfc');
|
||||
// TODO: 'date_due' is not defined in the $order_fields for the WS - verify
|
||||
$newobject->date_lim_reglement = dol_stringtotime($order['date_due'], 'dayrfc');
|
||||
$newobject->date_lim_reglement = dol_stringtotime((string) $order['date_due'], 'dayrfc');
|
||||
$newobject->note_private = $order['note_private'];
|
||||
$newobject->note_public = $order['note_public'];
|
||||
$newobject->statut = Commande::STATUS_DRAFT; // We start with status draft
|
||||
|
|
|
|||
Loading…
Reference in a new issue