Skip to content

Commit

Permalink
Merge branch '21.0' of github.com:Dolibarr/dolibarr into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
atm-maxime committed Jan 9, 2025
2 parents 429f5db + 751e21b commit 76c98a4
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 101 deletions.
94 changes: 0 additions & 94 deletions dev/initdemo/mysqldump_dolibarr_3.5.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -393,100 +393,6 @@ LOCK TABLES `llx_adherent_type_extrafields` WRITE;
/*!40000 ALTER TABLE `llx_adherent_type_extrafields` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `llx_advanced_extrafields`
--

DROP TABLE IF EXISTS `llx_advanced_extrafields`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `llx_advanced_extrafields` (
`rowid` int(11) NOT NULL AUTO_INCREMENT,
`tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`entity` int(11) NOT NULL DEFAULT '1',
`elementtype` varchar(64) NOT NULL,
`name` varchar(64) NOT NULL,
`label` varchar(64) NOT NULL,
`format` varchar(8) NOT NULL,
`fieldsize` int(11) DEFAULT NULL,
`maxlength` int(11) DEFAULT NULL,
`options` varchar(255) DEFAULT NULL,
`rang` int(11) DEFAULT NULL,
PRIMARY KEY (`rowid`),
UNIQUE KEY `idx_advanced_extrafields_name` (`elementtype`,`entity`,`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `llx_advanced_extrafields`
--

LOCK TABLES `llx_advanced_extrafields` WRITE;
/*!40000 ALTER TABLE `llx_advanced_extrafields` DISABLE KEYS */;
/*!40000 ALTER TABLE `llx_advanced_extrafields` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `llx_advanced_extrafields_options`
--

DROP TABLE IF EXISTS `llx_advanced_extrafields_options`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `llx_advanced_extrafields_options` (
`rowid` int(11) NOT NULL AUTO_INCREMENT,
`tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`fk_extrafields` int(11) NOT NULL,
`value` varchar(255) NOT NULL,
`rang` int(11) DEFAULT NULL,
PRIMARY KEY (`rowid`),
KEY `idx_advanced_extrafields_options_fk_advanced_extrafields` (`fk_extrafields`),
CONSTRAINT `fk_advanced_extrafields_options_fk_advanced_extrafields` FOREIGN KEY (`fk_extrafields`) REFERENCES `llx_advanced_extrafields` (`rowid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `llx_advanced_extrafields_options`
--

LOCK TABLES `llx_advanced_extrafields_options` WRITE;
/*!40000 ALTER TABLE `llx_advanced_extrafields_options` DISABLE KEYS */;
/*!40000 ALTER TABLE `llx_advanced_extrafields_options` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `llx_advanced_extrafields_values`
--

DROP TABLE IF EXISTS `llx_advanced_extrafields_values`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `llx_advanced_extrafields_values` (
`rowid` int(11) NOT NULL AUTO_INCREMENT,
`tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`entity` int(11) NOT NULL DEFAULT '1',
`datec` datetime DEFAULT NULL,
`datem` datetime DEFAULT NULL,
`fk_element` int(11) NOT NULL,
`fk_extrafields` int(11) NOT NULL,
`value` varchar(255) DEFAULT NULL,
`fk_user_create` int(11) DEFAULT NULL,
`fk_user_modif` int(11) DEFAULT NULL,
PRIMARY KEY (`rowid`),
KEY `idx_advanced_extrafields_values_fk_advanced_extrafields` (`fk_extrafields`,`entity`),
CONSTRAINT `fk_advanced_extrafields_values_fk_advanced_extrafields` FOREIGN KEY (`fk_extrafields`) REFERENCES `llx_advanced_extrafields` (`rowid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `llx_advanced_extrafields_values`
--

LOCK TABLES `llx_advanced_extrafields_values` WRITE;
/*!40000 ALTER TABLE `llx_advanced_extrafields_values` DISABLE KEYS */;
/*!40000 ALTER TABLE `llx_advanced_extrafields_values` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `llx_bank`
--
Expand Down
4 changes: 4 additions & 0 deletions htdocs/accountancy/admin/account.php
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,10 @@

print '<br>';

$parameters = array('chartofaccounts' => $chartofaccounts, 'permissiontoadd' => $permissiontoadd, 'permissiontodelete' => $permissiontodelete);
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $accounting, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;

$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/compta/facture/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -2907,7 +2907,7 @@
$percent = $line->get_prev_progress($object->id);
}
if ((float) $all_progress < (float) $percent) {
$mesg = $langs->trans("Line").' '.$i.' : '.$langs->trans("CantBeLessThanMinPercent");
$mesg = $langs->trans("Line").' '.$line->rang.' : '.$langs->trans("CantBeLessThanMinPercent");
setEventMessages($mesg, null, 'warnings');
$result = -1;
} else {
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/lib/admin.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ function purgeSessions($mysessionid)
$sessValues = file_get_contents($fullpath); // get raw session data

if (preg_match('/dol_login/i', $sessValues) && // limit to dolibarr session
preg_match('/dol_entity\|s:([0-9]+):"('.$conf->entity.')"/i', $sessValues) && // limit to current entity
(preg_match('/dol_entity\|i:('.$conf->entity.')/', $sessValues) || preg_match('/dol_entity\|s:([0-9]+):"('.$conf->entity.')"/i', $sessValues)) && // limit to current entity
preg_match('/dol_company\|s:([0-9]+):"(' . getDolGlobalString('MAIN_INFO_SOCIETE_NOM').')"/i', $sessValues)) { // limit to company name
$tmp = explode('_', $file);
$idsess = $tmp[1];
Expand Down
6 changes: 5 additions & 1 deletion htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,11 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede

// Set path to the background PDF File
if (getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) {
$pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
$logodir = $conf->mycompany->dir_output;
if (!empty($conf->mycompany->multidir_output[$object->entity])) {
$logodir = $conf->mycompany->multidir_output[$object->entity];
}
$pagecount = $pdf->setSourceFile($logodir .'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
$tplidx = $pdf->importPage(1);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,11 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede
$pdf->SetFont(pdf_getPDFFont($outputlangs));
// Set path to the background PDF File
if (!getDolGlobalString('MAIN_DISABLE_FPDI') && getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) {
$pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
$logodir = $conf->mycompany->dir_output;
if (!empty($conf->mycompany->multidir_output[$object->entity])) {
$logodir = $conf->mycompany->multidir_output[$object->entity];
}
$pagecount = $pdf->setSourceFile($logodir .'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
$tplidx = $pdf->importPage(1);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,11 @@ public function write_file($object, $outputlangs = null, $srctemplatepath = '',
$pdf->SetFont(pdf_getPDFFont($outputlangs));
// Set path to the background PDF File
if (getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) {
$pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
$logodir = $conf->mycompany->dir_output;
if (!empty($conf->mycompany->multidir_output[$object->entity])) {
$logodir = $conf->mycompany->multidir_output[$object->entity];
}
$pagecount = $pdf->setSourceFile($logodir .'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
$tplidx = $pdf->importPage(1);
}

Expand Down
5 changes: 4 additions & 1 deletion htdocs/product/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,10 @@
//'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
);
if ($user->hasRight($rightskey, 'creer')) {
$arrayofmassactions['preupdateprice'] = img_picto('', 'edit', 'class="pictofixedwidth"').$langs->trans("UpdatePrice");
if (getDolGlobalString('PRODUCT_PRICE_UNIQ') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) {
$arrayofmassactions['preupdateprice'] = img_picto('', 'edit', 'class="pictofixedwidth"').$langs->trans("UpdatePrice");
}

$arrayofmassactions['switchonsalestatus'] = img_picto('', 'stop-circle', 'class="pictofixedwidth"').$langs->trans("SwitchOnSaleStatus");
$arrayofmassactions['switchonpurchasestatus'] = img_picto('', 'stop-circle', 'class="pictofixedwidth"').$langs->trans("SwitchOnPurchaseStatus");
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/cron/cron_run_jobs.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
exit(1);
}
}
$user->loadRights();
$user->loadRights('', 1); // We force rights reload to have the correct permissions for user in the entity we just switched in
}

// Reload langs
Expand Down

0 comments on commit 76c98a4

Please sign in to comment.