forked from Wavyzz/dolibarr
Merge branch '20.0' of github.com:Dolibarr/dolibarr into 21.0
This commit is contained in:
@@ -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`
|
||||
--
|
||||
|
||||
@@ -462,6 +462,10 @@ if ($resql) {
|
||||
|
||||
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;
|
||||
|
||||
@@ -2907,7 +2907,7 @@ if (empty($reshook)) {
|
||||
$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 {
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -238,7 +238,11 @@ class pdf_standard_asset extends ModelePDFAsset
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
|
||||
@@ -291,7 +291,11 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer
|
||||
$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);
|
||||
}
|
||||
|
||||
|
||||
@@ -252,7 +252,11 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$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);
|
||||
}
|
||||
|
||||
|
||||
@@ -865,7 +865,10 @@ $arrayofmassactions = array(
|
||||
//'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
|
||||
);
|
||||
if ($user->hasRight($rightskey, 'creer')) {
|
||||
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");
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ if (is_array($object->lines) && (count($object->lines) > 0)) {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user