diff --git a/.github/workflows/gh-travis.yml.disabled b/.github/workflows/gh-travis.yml.disabled
index b36841b7104..87f1432cedf 100644
--- a/.github/workflows/gh-travis.yml.disabled
+++ b/.github/workflows/gh-travis.yml.disabled
@@ -27,11 +27,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
- # matrix:
- # php-version:
+ matrix:
+ php-version:
# # PHPStan requires PHP >= 7.2.
# #- "7.2"
- # - "8.2"
+ - "8.2"
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout travis file
diff --git a/htdocs/adherents/class/api_members.class.php b/htdocs/adherents/class/api_members.class.php
index 681fc495942..487b106b979 100644
--- a/htdocs/adherents/class/api_members.class.php
+++ b/htdocs/adherents/class/api_members.class.php
@@ -661,8 +661,8 @@ class Members extends DolibarrApi
if (!DolibarrApiAccess::$user->hasRight('adherent', 'cotisation', 'creer')) {
throw new RestException(403);
}
- if (is_numeric($start_date) || !is_numeric($end_date) || !is_numeric($amount)) {
- throw new RestException(422, 'Malformed data');
+ if (!is_numeric($start_date) || !is_numeric($end_date) || !is_numeric($amount)) {
+ throw new RestException(422, 'Malformed data: subscription start or end date, or subscription amount, is not numeric');
}
$member = new Adherent($this->db);
diff --git a/htdocs/admin/modulehelp.php b/htdocs/admin/modulehelp.php
index 60a4f278a91..508dcaf8daa 100644
--- a/htdocs/admin/modulehelp.php
+++ b/htdocs/admin/modulehelp.php
@@ -364,8 +364,9 @@ if ($mode == 'desc') {
$tmpdirofmoduletoshow = preg_replace('/^'.preg_quote(DOL_DOCUMENT_ROOT, '/').'/', '', (string) $dirofmodule);
$textexternal .= '
'.$langs->trans("Origin").': '.$langs->trans("ExternalModule").' - '.$langs->trans("InstalledInto", $tmpdirofmoduletoshow);
+ $installmoduleslock = DOL_DATA_ROOT.'/installmodules.lock';
global $dolibarr_allow_download_external_modules;
- if (!empty($dolibarr_allow_download_external_modules) && preg_match('/\/custom\//', (string) $dirofmodule)) {
+ if ((!file_exists($installmoduleslock) || !empty($dolibarr_allow_download_external_modules)) && preg_match('/\/custom\//', (string) $dirofmodule)) {
// Add a link to download a zip of the module
$textexternal .= ' '.img_picto('', 'download').'';
} else {
diff --git a/htdocs/compta/cashcontrol/class/cashcontrol.class.php b/htdocs/compta/cashcontrol/class/cashcontrol.class.php
index 86afe2d807a..a49a8079040 100644
--- a/htdocs/compta/cashcontrol/class/cashcontrol.class.php
+++ b/htdocs/compta/cashcontrol/class/cashcontrol.class.php
@@ -228,6 +228,7 @@ class CashControl extends CommonObject
$sql .= ", cash";
$sql .= ", cheque";
$sql .= ", card";
+ $sql .= ", fk_user_creat";
$sql .= ") VALUES (";
//$sql .= "'(PROV)', ";
$sql .= ((int) $conf->entity);
@@ -242,6 +243,7 @@ class CashControl extends CommonObject
$sql .= ", ".price2num($this->cash, 'MT');
$sql .= ", ".price2num($this->cheque, 'MT');
$sql .= ", ".price2num($this->card, 'MT');
+ $sql .= ", ".((int) $user->id);
$sql .= ")";
$this->db->begin();
diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php
index c977da7b6d5..7edae1773ac 100644
--- a/htdocs/compta/facture/card.php
+++ b/htdocs/compta/facture/card.php
@@ -1762,6 +1762,9 @@ if (empty($reshook)) {
$amount_ttc_diff = 0.;
foreach ($TTotalByTva as $tva => &$total) {
+ if (empty($amountdeposit[$tva])) {
+ $amountdeposit[$tva] = 0;
+ }
$coef = $total / $srcobject->total_ttc; // Calc coef
$am = $amount * $coef;
$amount_ttc_diff += $am;
@@ -1786,6 +1789,10 @@ if (empty($reshook)) {
if ($qualified) {
$totalamount += $lines[$i]->total_ht; // Fixme : is it not for the customer ? Shouldn't we take total_ttc ?
$tva_tx = $lines[$i]->tva_tx;
+
+ if (empty($amountdeposit[$tva_tx])) {
+ $amountdeposit[$tva_tx] = 0;
+ }
$amountdeposit[$tva_tx] += ($lines[$i]->total_ht * (float) $valuedeposit) / 100;
}
}
diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php
index 7c3a85f65f4..9ba8bf65cde 100644
--- a/htdocs/core/class/extrafields.class.php
+++ b/htdocs/core/class/extrafields.class.php
@@ -2314,11 +2314,15 @@ class ExtraFields
dol_syslog(get_class($this).'::showOutputField error '.$this->db->lasterror(), LOG_WARNING);
}
} elseif ($type == 'radio') {
- if (!isset($param['options'][$value])) {
+ if ($required && !isset($param['options'][$value])) {
$outputlangs->load('errors');
- $value = $outputlangs->trans('ErrorNoValueForRadioType');
+ $value = ''.$outputlangs->trans('ErrorNoValueForRadioType').'';
} else {
- $value = $outputlangs->trans($param['options'][$value]);
+ if (isset($param['options'][$value])) {
+ $value = $outputlangs->trans($param['options'][$value]);
+ } else {
+ $value = '';
+ }
}
} elseif ($type == 'checkbox') {
$value_arr = explode(',', $value);
diff --git a/htdocs/core/class/html.formorder.class.php b/htdocs/core/class/html.formorder.class.php
index b7d51181310..5a3c135b3f7 100644
--- a/htdocs/core/class/html.formorder.class.php
+++ b/htdocs/core/class/html.formorder.class.php
@@ -108,7 +108,7 @@ class FormOrder extends Form
$tmpsupplierorder = new Commande($this->db);
foreach ($statustohow as $value) {
- $tmpsupplierorder->statut = $value;
+ $tmpsupplierorder->status = $value;
$options[$value] = $tmpsupplierorder->getLibStatut($short);
}
diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php
index d40ff95a6cb..fe9af76105d 100644
--- a/htdocs/expedition/card.php
+++ b/htdocs/expedition/card.php
@@ -1250,6 +1250,12 @@ if ($action == 'create') {
// $objectsrc is Commande|Facture
$objectsav = $object; // Because Expedition is $expe and not $object that is wrongly a duplicate of $objectsrc.
$object = $expe;
+ // Propagate extrafieldsvalue from source object to shipment object
+ foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
+ if (array_key_exists('options_'.$key, $objectsav->array_options)) { // We take value from order only if extrafield has the same name/key.
+ $object->array_options['options_'.$key] = $objectsav->array_options['options_'.$key];
+ }
+ }
$parameters = array('objectsrc' => isset($objectsrc) ? $objectsrc : '', 'cols' => '3', 'socid' => $socid);
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
$object = $objectsav;
diff --git a/htdocs/holiday/month_report.php b/htdocs/holiday/month_report.php
index 68f585f60ad..e05fb39561e 100644
--- a/htdocs/holiday/month_report.php
+++ b/htdocs/holiday/month_report.php
@@ -168,7 +168,7 @@ $year_month = sprintf("%04d", $search_year).'-'.sprintf("%02d", $search_month);
$sql = "SELECT cp.rowid, cp.ref, cp.fk_user, cp.date_debut, cp.date_fin, cp.fk_type, cp.description, cp.halfday, cp.statut as status";
$sql .= " FROM ".MAIN_DB_PREFIX."holiday cp";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user u ON cp.fk_user = u.rowid";
-$sql .= " WHERE cp.rowid > 0";
+$sql .= " WHERE cp.entity IN (".getEntity('holiday').") AND cp.rowid > 0";
$sql .= " AND cp.statut = ".Holiday::STATUS_APPROVED;
$sql .= " AND (";
$sql .= " (date_format(cp.date_debut, '%Y-%m') = '".$db->escape($year_month)."' OR date_format(cp.date_fin, '%Y-%m') = '".$db->escape($year_month)."')";
diff --git a/htdocs/install/mysql/tables/llx_actioncomm.sql b/htdocs/install/mysql/tables/llx_actioncomm.sql
index 44912e3da06..aab0efb1090 100644
--- a/htdocs/install/mysql/tables/llx_actioncomm.sql
+++ b/htdocs/install/mysql/tables/llx_actioncomm.sql
@@ -80,9 +80,9 @@ create table llx_actioncomm
fk_element integer DEFAULT NULL, -- For link to an element (proposal, invoice, order, ...)
elementtype varchar(255) DEFAULT NULL, -- For link to an element (proposal, invoice, order, ...)
- ip varchar(250), --ip used to create record (for public submission page)
+ ip varchar(250), -- ip used to create record (for public submission page)
- fk_bookcal_calendar integer DEFAULT NULL, --fk_bookcal_calendar used to link booking to bookcal calendar
+ fk_bookcal_calendar integer DEFAULT NULL, -- fk_bookcal_calendar used to link booking to bookcal calendar
import_key varchar(14),
extraparams varchar(255) -- for other parameters with json format