Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
5eb8379846
25 changed files with 161 additions and 59 deletions
|
|
@ -475,9 +475,9 @@ if ($action != 'export_csv') {
|
|||
$resql = $db->query($sql);
|
||||
$opening_balances = array();
|
||||
if ($resql) {
|
||||
$nrows = $resql->num_rows;
|
||||
$nrows = $db->num_rows($resql);
|
||||
for ($i = 0; $i < $nrows; $i++) {
|
||||
$arr = $resql->fetch_array();
|
||||
$arr = $db->fetch_array($resql);
|
||||
$opening_balances["'" . $arr['numero_compte'] . "'"] = $arr['opening_balance'];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* 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
|
||||
|
|
@ -112,11 +113,16 @@ if ($action == 'set') {
|
|||
|
||||
dolibarr_del_const($db, 'SYSLOG_HANDLERS', -1); // To be sure there is not a setup into another entity
|
||||
dolibarr_set_const($db, 'SYSLOG_HANDLERS', json_encode($activeModules), 'chaine', 0, '', 0);
|
||||
|
||||
$error = 0;
|
||||
$errors = [];
|
||||
// Check configuration
|
||||
foreach ($activeModules as $modulename) {
|
||||
$module = new $modulename();
|
||||
$error = $module->checkConfiguration();
|
||||
$res = $module->checkConfiguration();
|
||||
if (!$res) {
|
||||
$error++;
|
||||
$errors = array_merge($errors, $module->errors);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -125,7 +131,7 @@ if ($action == 'set') {
|
|||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
$db->rollback();
|
||||
setEventMessages($error, $errors, 'errors');
|
||||
setEventMessages('', $errors, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1916,9 +1916,9 @@ if ($id > 0) {
|
|||
*/
|
||||
print '</td><td td colspan="3">';
|
||||
$tzforfullday = getDolGlobalString('MAIN_STORE_FULL_EVENT_IN_GMT');
|
||||
print $form->selectDate($datep ? $datep : $object->datep, 'ap', 1, 1, 0, "action", 1, 1, 0, 'fulldaystart', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel');
|
||||
print $form->selectDate($datep ? $datep : $object->datep, 'ap', 1, 1, 0, "action", 1, 2, 0, 'fulldaystart', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel');
|
||||
print ' <span class="hideonsmartphone"> - </span> ';
|
||||
print $form->selectDate($datef ? $datef : $object->datef, 'p2', 1, 1, 1, "action", 1, 0, 0, 'fulldayend', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel');
|
||||
print $form->selectDate($datef ? $datef : $object->datef, 'p2', 1, 1, 1, "action", 1, 2, 0, 'fulldayend', '', '', '', 1, '', '', $object->fulldayevent ? ($tzforfullday ? $tzforfullday : 'tzuserrel') : 'tzuserrel');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td class=""> </td><td></td></tr>';
|
||||
|
|
|
|||
|
|
@ -584,6 +584,9 @@ class AdvanceTargetingMailing extends CommonObject
|
|||
if (!empty($arrayquery['cust_saleman']) && count($arrayquery['cust_saleman']) > 0) {
|
||||
$sqlwhere[] = " (saleman.fk_user IN (".$this->db->sanitize(implode(',', $arrayquery['cust_saleman']))."))";
|
||||
}
|
||||
if (!empty($arrayquery['cust_state']) && count($arrayquery['cust_state']) > 0) {
|
||||
$sqlwhere[] = " (t.fk_departement IN (".$this->db->sanitize(implode(',', $arrayquery['cust_state']))."))";
|
||||
}
|
||||
if (!empty($arrayquery['cust_country']) && count($arrayquery['cust_country']) > 0) {
|
||||
$sqlwhere[] = " (t.fk_pays IN (".$this->db->sanitize(implode(',', $arrayquery['cust_country']))."))";
|
||||
}
|
||||
|
|
@ -825,6 +828,12 @@ class AdvanceTargetingMailing extends CommonObject
|
|||
if (!empty($arrayquery['cust_saleman']) && count($arrayquery['cust_saleman']) > 0) {
|
||||
$sqlwhere[] = " (saleman.fk_user IN (".$this->db->sanitize(implode(',', $arrayquery['cust_saleman']))."))";
|
||||
}
|
||||
//if (!empty($arrayquery['cust_state'])) {
|
||||
// $sqlwhere[] = $this->transformToSQL('tsd.nom', $arrayquery['cust_state']);
|
||||
//}
|
||||
if (!empty($arrayquery['cust_state']) && count($arrayquery['cust_state']) > 0) {
|
||||
$sqlwhere[] = " (t.fk_departement IN (".$this->db->sanitize(implode(',', $arrayquery['cust_state']))."))";
|
||||
}
|
||||
if (!empty($arrayquery['cust_country']) && count($arrayquery['cust_country']) > 0) {
|
||||
$sqlwhere[] = " (ts.fk_pays IN (".$this->db->sanitize(implode(',', $arrayquery['cust_country']))."))";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,6 +87,67 @@ class FormAdvTargetEmailing extends Form
|
|||
return $this->advMultiselectarray($htmlname, $options_array, $selected_array);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return combo list of activated countries, into language of user
|
||||
*
|
||||
* @param string $htmlname of html select object
|
||||
* @param array $selected_array or Code or Label of preselected country
|
||||
* @return string HTML string with select
|
||||
*/
|
||||
public function multiselectState($htmlname = 'state_id', $selected_array = array())
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$langs->load("dict");
|
||||
$maxlength = 0;
|
||||
|
||||
$out = '';
|
||||
$stateArray = array();
|
||||
$label = array();
|
||||
|
||||
$options_array = array();
|
||||
|
||||
$sql = "SELECT d.rowid as rowid, d.code_departement as code, d.nom as department, r.nom as region";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."c_departements d";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_regions r on d.fk_region=r.code_region";
|
||||
$sql .= " WHERE d.active = 1 AND d.code_departement<>'' AND r.code_region<>''";
|
||||
//$sql .= " ORDER BY r.nom ASC, d.nom ASC";
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $this->db->num_rows($resql);
|
||||
$i = 0;
|
||||
if ($num) {
|
||||
$foundselected = false;
|
||||
|
||||
while ($i < $num) {
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
$stateArray [$i] ['rowid'] = $obj->rowid;
|
||||
$stateArray [$i] ['code'] = $obj->code;
|
||||
$stateArray [$i] ['label'] = $obj->region.'/'.$obj->department;
|
||||
$label[$i] = $stateArray[$i]['label'];
|
||||
$i++;
|
||||
}
|
||||
|
||||
$array1_sort_order = SORT_ASC;
|
||||
array_multisort($label, $array1_sort_order, $stateArray);
|
||||
|
||||
foreach ($stateArray as $row) {
|
||||
$label = dol_trunc($row['label'], $maxlength, 'middle');
|
||||
if ($row['code']) {
|
||||
$label .= ' ('.$row['code'].')';
|
||||
}
|
||||
|
||||
$options_array[$row['rowid']] = $label;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
|
||||
return $this->advMultiselectarray($htmlname, $options_array, $selected_array);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return combo list of activated countries, into language of user
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* 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
|
||||
|
|
@ -68,7 +69,7 @@ class box_graph_invoices_permonth extends ModeleBoxes
|
|||
//include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
//$facturestatic=new Facture($this->db);
|
||||
|
||||
$startmonth = $conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1;
|
||||
$startmonth = getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1);
|
||||
if (!getDolGlobalString('GRAPH_USE_FISCAL_YEAR')) {
|
||||
$startmonth = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* 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
|
||||
|
|
@ -65,7 +66,7 @@ class box_graph_invoices_peryear extends ModeleBoxes
|
|||
//include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
//$facturestatic=new Facture($this->db);
|
||||
|
||||
$startmonth = $conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1;
|
||||
$startmonth = getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1);
|
||||
if (!getDolGlobalString('GRAPH_USE_FISCAL_YEAR')) {
|
||||
$startmonth = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* 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
|
||||
|
|
@ -66,7 +67,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
|
|||
|
||||
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
|
||||
$startmonth = $conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1;
|
||||
$startmonth = getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1);
|
||||
if (!getDolGlobalString('GRAPH_USE_FISCAL_YEAR')) {
|
||||
$startmonth = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* 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
|
||||
|
|
@ -67,7 +68,7 @@ class box_graph_orders_permonth extends ModeleBoxes
|
|||
//include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
//$commandestatic=new Commande($this->db);
|
||||
|
||||
$startmonth = $conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1;
|
||||
$startmonth = getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1);
|
||||
if (!getDolGlobalString('GRAPH_USE_FISCAL_YEAR')) {
|
||||
$startmonth = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* 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
|
||||
|
|
@ -66,7 +67,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
|
|||
|
||||
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||
|
||||
$startmonth = $conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1;
|
||||
$startmonth = getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1);
|
||||
if (!getDolGlobalString('GRAPH_USE_FISCAL_YEAR')) {
|
||||
$startmonth = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* 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
|
||||
|
|
@ -67,7 +68,7 @@ class box_graph_propales_permonth extends ModeleBoxes
|
|||
//include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
//$propalstatic=new Propal($this->db);
|
||||
|
||||
$startmonth = $conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1;
|
||||
$startmonth = getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1);
|
||||
if (!getDolGlobalString('GRAPH_USE_FISCAL_YEAR')) {
|
||||
$startmonth = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015-2023 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2021-2023 Waël Almoman <info@almoman.com>
|
||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2021-2023 Waël Almoman <info@almoman.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
|
||||
|
|
@ -140,12 +140,11 @@ class box_members_by_tags extends ModeleBoxes
|
|||
$line++;
|
||||
$AdherentTag = array();
|
||||
foreach ($sumMembers as $key => $data) {
|
||||
$adhtag = new Categorie($this->db);
|
||||
$adhtag->id = $key;
|
||||
|
||||
if ($key == 'total') {
|
||||
break;
|
||||
}
|
||||
$adhtag = new Categorie($this->db);
|
||||
$adhtag->id = (int) $key;
|
||||
$adhtag->label = $data['label'];
|
||||
$AdherentTag[$key] = $adhtag;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015-2023 Frederic France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2021-2023 Waël Almoman <info@almoman.com>
|
||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2021-2023 Waël Almoman <info@almoman.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
|
||||
|
|
@ -140,12 +140,11 @@ class box_members_by_type extends ModeleBoxes
|
|||
$line++;
|
||||
$AdherentType = array();
|
||||
foreach ($sumMembers as $key => $data) {
|
||||
$adhtype = new AdherentType($this->db);
|
||||
$adhtype->id = $key;
|
||||
|
||||
if ($key == 'total') {
|
||||
break;
|
||||
}
|
||||
$adhtype = new AdherentType($this->db);
|
||||
$adhtype->id = (int) $key;
|
||||
$adhtype->label = $data['label'];
|
||||
$AdherentType[$key] = $adhtype;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015-2020 Frederic France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2015-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
|
||||
|
|
@ -110,7 +110,7 @@ class box_members_last_modified extends ModeleBoxes
|
|||
$memberstatic->email = $objp->email;
|
||||
$memberstatic->morphy = $objp->morphy;
|
||||
$memberstatic->company = $objp->company;
|
||||
$memberstatic->statut = $objp->status;
|
||||
$memberstatic->status = $objp->status;
|
||||
$memberstatic->date_creation = $datec;
|
||||
$memberstatic->date_modification = $datem;
|
||||
$memberstatic->need_subscription = $objp->subscription;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015-2020 Frederic France <frederic.france@netlogic.fr>
|
||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015-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
|
||||
|
|
@ -110,7 +110,7 @@ class box_members_last_subscriptions extends ModeleBoxes
|
|||
$staticmember->email = $obj->email;
|
||||
$staticmember->photo = $obj->photo;
|
||||
$staticmember->morphy = $obj->morphy;
|
||||
$staticmember->statut = $obj->status;
|
||||
$staticmember->status = $obj->status;
|
||||
$staticmember->need_subscription = $obj->need_subscription;
|
||||
$staticmember->datefin = $this->db->jdate($obj->date_end_subscription);
|
||||
if (!empty($obj->fk_soc)) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2012-2018 Charlene BENKE <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2015-2021 Frederic France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2015-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
|
||||
|
|
@ -174,7 +174,7 @@ class box_task extends ModeleBoxes
|
|||
$taskstatic->ref = $objp->ref;
|
||||
$taskstatic->label = $objp->label;
|
||||
$taskstatic->progress = $objp->progress;
|
||||
$taskstatic->fk_statut = $objp->fk_statut;
|
||||
$taskstatic->status = $objp->fk_statut;
|
||||
$taskstatic->date_end = $this->db->jdate($objp->datee);
|
||||
$taskstatic->planned_workload = $objp->planned_workload;
|
||||
$taskstatic->duration_effective = $objp->duration_effective;
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||
/* if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) || !empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) {
|
||||
$this->posxtva = $this->posxup;
|
||||
} */
|
||||
$this->posxpicture = $this->posxtva - (!getDolGlobalString('MAIN_DOCUMENTS_WITH_PICTURE_WIDTH') ? 20 : $conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images
|
||||
$this->posxpicture = $this->posxtva - (getDolGlobalInt('MAIN_DOCUMENTS_WITH_PICTURE_WIDTH', 20)); // width of images
|
||||
if ($this->page_largeur < 210) { // To work with US executive format
|
||||
$this->posxpicture -= 20;
|
||||
$this->posxtva -= 20;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
<?php
|
||||
/* 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
|
||||
|
|
@ -24,6 +26,11 @@ class LogHandler
|
|||
{
|
||||
protected $ident = 0;
|
||||
|
||||
/**
|
||||
* @var string[] Array of errors messages
|
||||
*/
|
||||
public $errors = [];
|
||||
|
||||
|
||||
/**
|
||||
* Content of the info tooltip.
|
||||
|
|
@ -80,11 +87,11 @@ class LogHandler
|
|||
* It will be called after setting the configuration.
|
||||
* The function returns an array with error messages
|
||||
*
|
||||
* @return array
|
||||
* @return bool
|
||||
*/
|
||||
public function checkConfiguration()
|
||||
{
|
||||
return array();
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
<?php
|
||||
/* 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
|
||||
|
|
@ -79,7 +81,7 @@ interface LogHandlerInterface
|
|||
/**
|
||||
* Output log content
|
||||
*
|
||||
* @param string $content Content to log
|
||||
* @param array $content Content to log
|
||||
* @return void
|
||||
*/
|
||||
public function export($content);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/syslog/logHandler.php';
|
||||
|
|
@ -78,23 +79,21 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface
|
|||
/**
|
||||
* Return if configuration is valid
|
||||
*
|
||||
* @return array Array of errors. Empty array if ok.
|
||||
* @return bool true if ok
|
||||
*/
|
||||
public function checkConfiguration()
|
||||
{
|
||||
global $langs;
|
||||
|
||||
$errors = array();
|
||||
|
||||
$filename = $this->getFilename();
|
||||
|
||||
if (file_exists($filename) && is_writable($filename)) {
|
||||
dol_syslog('admin/syslog: file '.$filename);
|
||||
return true;
|
||||
} else {
|
||||
$errors[] = $langs->trans("ErrorFailedToOpenFile", $filename);
|
||||
$this->errors[] = $langs->trans("ErrorFailedToOpenFile", $filename);
|
||||
return false;
|
||||
}
|
||||
|
||||
return $errors;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/syslog/logHandler.php';
|
||||
|
||||
|
|
@ -77,15 +79,14 @@ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface
|
|||
/**
|
||||
* Return if configuration is valid
|
||||
*
|
||||
* @return array Array of errors. Empty array if ok.
|
||||
* @return bool True if ok.
|
||||
*/
|
||||
public function checkConfiguration()
|
||||
{
|
||||
global $conf, $langs;
|
||||
global $langs;
|
||||
|
||||
$errors = array();
|
||||
$facility = constant(getDolGlobalString('SYSLOG_FACILITY'));
|
||||
|
||||
$facility = constant($conf->global->SYSLOG_FACILITY);
|
||||
if ($facility) {
|
||||
// Only LOG_USER supported on Windows
|
||||
if (!empty($_SERVER["WINDIR"])) {
|
||||
|
|
@ -93,11 +94,11 @@ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface
|
|||
}
|
||||
|
||||
dol_syslog("admin/syslog: facility ".$facility);
|
||||
return true;
|
||||
} else {
|
||||
$errors[] = $langs->trans("ErrorUnknownSyslogConstant", $facility);
|
||||
$this->errors[] = $langs->trans("ErrorUnknownSyslogConstant", $facility);
|
||||
return false;
|
||||
}
|
||||
|
||||
return $errors;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -110,9 +110,9 @@ if (!empty($array_query['cust_code'])) {
|
|||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||
$cust_code_str = (string) $array_query['cust_code'];
|
||||
} else {
|
||||
$cust_code_str = "null";
|
||||
$cust_code_str = null;
|
||||
}
|
||||
print '</td><td><input type="text" name="cust_code" value="'.$cust_code_str.'"/></td><td>'."\n";
|
||||
print '</td><td><input type="text" name="cust_code"'.($cust_code_str!=null?' value="'.$cust_code_str:'').'"/></td><td>'."\n";
|
||||
print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help');
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
|
|
@ -143,6 +143,16 @@ print '</td><td><input type="text" name="cust_city" value="'.$array_query['cust_
|
|||
print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help');
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// State Client
|
||||
print '<tr><td>'.$langs->trans('State');
|
||||
if (!empty($array_query['cust_state'])) {
|
||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||
}
|
||||
print '</td><td>'."\n";
|
||||
print $formadvtargetemaling->multiselectState('cust_state', $array_query['cust_state']);
|
||||
print '</td><td>'."\n";
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// Customer Country
|
||||
print '<tr><td>'.$langs->trans("Country");
|
||||
if (!empty($array_query['cust_country'])) {
|
||||
|
|
|
|||
|
|
@ -143,7 +143,8 @@ $result = @include_once $conffile; // Keep @ because with some error reporting m
|
|||
$listofwrappers = stream_get_wrappers();
|
||||
// We need '.phar' for geoip2. TODO Replace phar in geoip with exploded files so we can disable phar by default.
|
||||
// phar stream does not auto unserialize content (possible code execution) since PHP 8.1
|
||||
$arrayofstreamtodisable = array('compress.zlib', 'compress.bzip2', 'ftp', 'ftps', 'glob', 'data', 'expect', 'ogg', 'rar', 'zip', 'zlib');
|
||||
// zip stream is necessary by excel import module
|
||||
$arrayofstreamtodisable = array('compress.zlib', 'compress.bzip2', 'ftp', 'ftps', 'glob', 'data', 'expect', 'ogg', 'rar', 'zlib');
|
||||
if (!empty($dolibarr_main_stream_to_disable) && is_array($dolibarr_main_stream_to_disable)) {
|
||||
$arrayofstreamtodisable = $dolibarr_main_stream_to_disable;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -887,6 +887,7 @@ class FactureFournisseur extends CommonInvoice
|
|||
$sql .= " t.note_private,";
|
||||
$sql .= " t.note_public,";
|
||||
$sql .= " t.model_pdf,";
|
||||
$sql .= " t.last_main_doc,";
|
||||
$sql .= " t.import_key,";
|
||||
$sql .= " t.extraparams,";
|
||||
$sql .= " cr.code as cond_reglement_code, cr.libelle as cond_reglement_label, cr.libelle_facture as cond_reglement_doc,";
|
||||
|
|
@ -967,6 +968,7 @@ class FactureFournisseur extends CommonInvoice
|
|||
$this->note_private = $obj->note_private;
|
||||
$this->note_public = $obj->note_public;
|
||||
$this->model_pdf = $obj->model_pdf;
|
||||
$this->last_main_doc = $obj->last_main_doc;
|
||||
$this->import_key = $obj->import_key;
|
||||
|
||||
//Incoterms
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ class modMyModule extends DolibarrModules
|
|||
|
||||
// Prerequisites
|
||||
$this->phpmin = array(7, 1); // Minimum version of PHP required by module
|
||||
$this->need_dolibarr_version = array(11, -3); // Minimum version of Dolibarr required by module
|
||||
$this->need_dolibarr_version = array(19, -3); // Minimum version of Dolibarr required by module
|
||||
$this->need_javascript_ajax = 0;
|
||||
|
||||
// Messages at activation
|
||||
|
|
|
|||
Loading…
Reference in a new issue