mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
This commit is contained in:
commit
c891196b5b
|
|
@ -43,5 +43,5 @@ DoliWampWillStartApacheMysql=L'instal·lador DoliWamp intentarà iniciar o reini
|
|||
OldVersionFoundAndMoveInNew=S'ha trobat una versió antiga de base de dades i ha estat moguda per a ser utilitzada per la nova versió de Dolibarr
|
||||
OldVersionFoundButFailedToMoveInNew=S'ha trobat una versió antiga de base de dades, però no es pot moure per a ser utilitzada per la nova versió de Dolibarr
|
||||
|
||||
DLLMissing=La teva instal·lació windows no té el component "Microsoft Visual C++ Redistributable for Visual Studio 2012". Instal·la primer la versió de 32-bit (vcredist_x86.exe) (pots trobar-la a https://www.microsoft.com/en-us/download/) i reiniciar després la instal·lació/actualització de DoliWamp.
|
||||
DLLMissing=La teva instal·lació windows no té el component "Microsoft Visual C++ Redistributable for Visual Studio 2015". Instal·la primer la versió de 32-bit (vcredist_x86.exe) (pots trobar-la a https://www.microsoft.com/en-us/download/) i reiniciar després la instal·lació/actualització de DoliWamp.
|
||||
ContinueAnyway=Continua igualment (el procés d'instal·lació podria fallar sense aquest prerequisit)
|
||||
|
|
|
|||
|
|
@ -44,5 +44,5 @@ DoliWampWillStartApacheMysql=DoliWamp installer will now start or restart Apache
|
|||
OldVersionFoundAndMoveInNew=An old database version has been found and moved to be used by the new Dolibarr version
|
||||
OldVersionFoundButFailedToMoveInNew=An old database version has been found but could not be moved to be used with the new Dolibarr version
|
||||
|
||||
DLLMissing=Your Windows installation is missing the "Microsoft Visual C++ Redistributable for Visual Studio 2012" component. Please install the 32-bit version (vcredist_x86.exe) first (you can find it at https://www.microsoft.com/en-us/download/) and restart DoliWamp installation/upgrade after.
|
||||
DLLMissing=Your Windows installation is missing The "Microsoft Visual C++ Redistributable for Visual Studio 2015" component. Please install the 32-bit version (vcredist_x86.exe) first (you can find it at https://www.microsoft.com/en-us/download/) and restart DoliWamp installation/upgrade after.
|
||||
ContinueAnyway=Continue anyway (install process may fail without this prerequisite)
|
||||
|
|
|
|||
|
|
@ -44,5 +44,5 @@ DoliWampWillStartApacheMysql=L'installeur DoliWamp va maintenant d
|
|||
OldVersionFoundAndMoveInNew=Une ancienne version de base a été trouvée et déplacée pour fonctionner avec la nouvelle version de Dolibarr.
|
||||
OldVersionFoundButFailedToMoveInNew=Une ancienne version de base a été trouvée mais ne peut être déplacée pour être utilisée avec la nouvelle version de Dolibarr.
|
||||
|
||||
DLLMissing=L'installation de votre Windows est incomplète. Il manque le composant "Micrsoft Visual C++ Redistributable for Visual Studio 2012". Installer la version 32-bit (vcredist_x86.exe) d'abord (vous pourrez le trouver à https://www.microsoft.com/fr-fr/download/) puis relancer l'installation de DoliWamp après.
|
||||
DLLMissing=L'installation de votre Windows est incomplète. Il manque le composant "Micrsoft Visual C++ Redistributable for Visual Studio 2015". Installer la version 32-bit (vcredist_x86.exe) d'abord (vous pourrez le trouver à https://www.microsoft.com/fr-fr/download/) puis relancer l'installation de DoliWamp après.
|
||||
ContinueAnyway=Continuer malgré tout (le process d'installaton échouera)
|
||||
|
|
|
|||
|
|
@ -43,5 +43,5 @@ DoliWampWillStartApacheMysql=Die DoliWamp-Installation wird nun starten oder Apa
|
|||
OldVersionFoundAndMoveInNew=Eine alte Datenbankversion wurde gefunden und verschoben, um von der neuen Dolibarr-Version verwendet zu werden.
|
||||
OldVersionFoundButFailedToMoveInNew=Eine alte Datenbankversion wurde gefunden, konnte jedoch nicht verschoben werden, um mit der neuen Dolibarr-Version verwendet zu werden.
|
||||
|
||||
DLLMissing=Your Windows installation is missing The "Micrsoft Visual C++ Redistributable for Visual Studio 2012" component. Please install the 32-bit version (vcredist_x86.exe) first (you can find it at https://www.microsoft.com/en-us/download/) and restart DoliWamp installation/upgrade after.
|
||||
DLLMissing=Your Windows installation is missing The "Micrsoft Visual C++ Redistributable for Visual Studio 2015" component. Please install the 32-bit version (vcredist_x86.exe) first (you can find it at https://www.microsoft.com/en-us/download/) and restart DoliWamp installation/upgrade after.
|
||||
ContinueAnyway=Fahren Sie trotzdem fort (der Installationsvorgang kann ohne diese Voraussetzung fehlschlagen).
|
||||
|
|
|
|||
|
|
@ -43,5 +43,5 @@ DoliWampWillStartApacheMysql=El instalador DoliWamp intentará iniciar o reinici
|
|||
OldVersionFoundAndMoveInNew=Se ha encontrado una versión antigua de base de datos y ha sido movida para ser utilizada por la nueva versión de Dolibarr
|
||||
OldVersionFoundButFailedToMoveInNew=Se ha encontrado una versión antigua de base de datos, pero no se pudo mover para ser utilizada por la nueva versión de Dolibarr
|
||||
|
||||
DLLMissing=Su instalación Windows no tiene el componente "Microsoft Visual C++ Redistributable for Visual Studio 2012". Instale primero la versión de 32-bit (vcredist_x86.exe) (puedes encontrarlo en https://www.microsoft.com/en-us/download/) y reiniciar después la instalación/actualización de DoliWamp.
|
||||
DLLMissing=Su instalación Windows no tiene el componente "Microsoft Visual C++ Redistributable for Visual Studio 2015". Instale primero la versión de 32-bit (vcredist_x86.exe) (puedes encontrarlo en https://www.microsoft.com/en-us/download/) y reiniciar después la instalación/actualización de DoliWamp.
|
||||
ContinueAnyway=Continua igualmente (el proceso de instalación podría fallar sin este prerequisito)
|
||||
|
|
|
|||
|
|
@ -27,12 +27,12 @@ Prerequisites to build autoexe DoliWamp package from Linux (solution seems broke
|
|||
|
||||
Prerequisites to build autoexe DoliWamp package from Windows:
|
||||
|
||||
> Install Perl for Windwos (https://strawberryperl.com/)
|
||||
> Install Perl for Windows (https://strawberryperl.com/)
|
||||
> Install isetup-5.5.8.exe (https://www.jrsoftware.org)
|
||||
> Install WampServer-3.2.*-64.exe (Apache 2.4.51, PHP 7.3.33, MariaDB 10.6.5 for example. Version must match the values found into doliwamp.iss)
|
||||
> Install GIT for Windows (https://git-scm.com/ => You must choose option "Add Git bash profile", "Git commit as-is")
|
||||
> Install Dolibarr verions:
|
||||
git clone https://github.com/dolibarr/dolibarr
|
||||
> Install Dolibarr current version:
|
||||
git clone https://github.com/dolibarr/dolibarr or git clone --branch X.Y https://github.com/dolibarr/dolibarr
|
||||
|
||||
> Add the path of PHP (C:\wamp64\bin\php\php7.3.33) and InnoSetup (C:\Program Files (x86)\Inno Setup 5) into the %PATH% of Windows.
|
||||
|
||||
|
|
|
|||
|
|
@ -144,9 +144,11 @@ if ($result) {
|
|||
while ($i < $num && $i < $max) {
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
$fiscalyearstatic->ref = $obj->rowid;
|
||||
$fiscalyearstatic->id = $obj->rowid;
|
||||
$fiscalyearstatic->date_start = $obj->date_start;
|
||||
$fiscalyearstatic->date_end = $obj->date_end;
|
||||
$fiscalyearstatic->statut = $obj->status;
|
||||
$fiscalyearstatic->status = $obj->status;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
|
|
|||
|
|
@ -1247,7 +1247,7 @@ class Adherent extends CommonObject
|
|||
|
||||
if ($result >= 0) {
|
||||
$result = $luser->setPassword($user, $this->pass, 0, 0, 1);
|
||||
if ($result < 0) {
|
||||
if (is_numeric($result) && $result < 0) {
|
||||
$this->error = $luser->error;
|
||||
dol_syslog(get_class($this)."::setPassword ".$this->error, LOG_ERR);
|
||||
$error++;
|
||||
|
|
|
|||
|
|
@ -1165,7 +1165,7 @@ if ($mode == 'deploy') {
|
|||
|
||||
$fullurl = '<a href="'.$urldolibarrmodules.'" target="_blank" rel="noopener noreferrer">'.$urldolibarrmodules.'</a>';
|
||||
$message = '';
|
||||
if (!empty($allowonlineinstall)) {
|
||||
if ($allowonlineinstall) {
|
||||
if (!in_array('/custom', explode(',', $dolibarr_main_url_root_alt))) {
|
||||
$message = info_admin($langs->trans("ConfFileMustContainCustom", DOL_DOCUMENT_ROOT.'/custom', DOL_DOCUMENT_ROOT));
|
||||
$allowfromweb = -1;
|
||||
|
|
@ -1184,7 +1184,7 @@ if ($mode == 'deploy') {
|
|||
} else {
|
||||
if (getDolGlobalString('MAIN_MESSAGE_INSTALL_MODULES_DISABLED_CONTACT_US')) {
|
||||
// Show clean message
|
||||
if (!is_numeric('MAIN_MESSAGE_INSTALL_MODULES_DISABLED_CONTACT_US')) {
|
||||
if (!is_numeric(getDolGlobalString('MAIN_MESSAGE_INSTALL_MODULES_DISABLED_CONTACT_US'))) {
|
||||
$message = info_admin($langs->trans(getDolGlobalString('MAIN_MESSAGE_INSTALL_MODULES_DISABLED_CONTACT_US')));
|
||||
} else {
|
||||
$message = info_admin($langs->trans('InstallModuleFromWebHasBeenDisabledContactUs'));
|
||||
|
|
|
|||
|
|
@ -196,10 +196,6 @@ if ($filtertype != 1) {
|
|||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
if (is_object($objectline)) {
|
||||
print $objectline->showOptionals($extrafields, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$coldisplay), '', '', 1, 'line');
|
||||
}
|
||||
?>
|
||||
|
||||
<script>
|
||||
|
|
|
|||
|
|
@ -864,7 +864,12 @@ class Categorie extends CommonObject
|
|||
$sql .= ", ".MAIN_DB_PREFIX.(empty($this->MAP_OBJ_TABLE[$type]) ? $type : $this->MAP_OBJ_TABLE[$type])." as o";
|
||||
$sql .= " WHERE o.entity IN (".getEntity($obj->element).")";
|
||||
$sql .= " AND c.fk_categorie = ".((int) $this->id);
|
||||
$sql .= " AND c.fk_".(empty($this->MAP_CAT_FK[$type]) ? $type : $this->MAP_CAT_FK[$type])." = o.rowid";
|
||||
// Compatibility with actioncomm table which has id instead of rowid
|
||||
if ($this->MAP_OBJ_TABLE[$type] == "actioncomm" || $type == "actioncomm") {
|
||||
$sql .= " AND c.fk_".(empty($this->MAP_CAT_FK[$type]) ? $type : $this->MAP_CAT_FK[$type])." = o.id";
|
||||
} else {
|
||||
$sql .= " AND c.fk_".(empty($this->MAP_CAT_FK[$type]) ? $type : $this->MAP_CAT_FK[$type])." = o.rowid";
|
||||
}
|
||||
// Protection for external users
|
||||
if (($type == 'customer' || $type == 'supplier') && $user->socid > 0) {
|
||||
$sql .= " AND o.rowid = ".((int) $user->socid);
|
||||
|
|
|
|||
|
|
@ -1355,6 +1355,9 @@ class Commande extends CommonOrder
|
|||
$line->marge_tx = $marginInfos[1];
|
||||
$line->marque_tx = $marginInfos[2];
|
||||
|
||||
$line->origin = $object->element;
|
||||
$line->origin_id = $object->lines[$i]->id;
|
||||
|
||||
// get extrafields from original line
|
||||
$object->lines[$i]->fetch_optionals();
|
||||
foreach ($object->lines[$i]->array_options as $options_key => $value) {
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ class box_graph_product_distribution extends ModeleBoxes
|
|||
$showpointvalue = 1;
|
||||
$nocolor = 0;
|
||||
$stats_proposal = new PropaleStats($this->db, $socid, ($userid > 0 ? $userid : 0));
|
||||
$data2 = $stats_proposal->getAllByProductEntry($year, (GETPOST('action', 'aZ09') == $refreshaction ?-1 : (3600 * 24)), 5);
|
||||
$data2 = $stats_proposal->getAllByProductEntry($year, (GETPOST('action', 'aZ09') == $refreshaction ?-1 : (3600 * 24)), $max);
|
||||
if (empty($data2)) {
|
||||
$showpointvalue = 0;
|
||||
$nocolor = 1;
|
||||
|
|
@ -224,7 +224,7 @@ class box_graph_product_distribution extends ModeleBoxes
|
|||
$nocolor = 0;
|
||||
$mode = 'customer';
|
||||
$stats_order = new CommandeStats($this->db, $socid, $mode, ($userid > 0 ? $userid : 0));
|
||||
$data3 = $stats_order->getAllByProductEntry($year, (GETPOST('action', 'aZ09') == $refreshaction ?-1 : (3600 * 24)), 5);
|
||||
$data3 = $stats_order->getAllByProductEntry($year, (GETPOST('action', 'aZ09') == $refreshaction ?-1 : (3600 * 24)), $max);
|
||||
if (empty($data3)) {
|
||||
$showpointvalue = 0;
|
||||
$nocolor = 1;
|
||||
|
|
@ -288,7 +288,7 @@ class box_graph_product_distribution extends ModeleBoxes
|
|||
$nocolor = 0;
|
||||
$mode = 'customer';
|
||||
$stats_invoice = new FactureStats($this->db, $socid, $mode, ($userid > 0 ? $userid : 0));
|
||||
$data1 = $stats_invoice->getAllByProductEntry($year, (GETPOST('action', 'aZ09') == $refreshaction ?-1 : (3600 * 24)), 5);
|
||||
$data1 = $stats_invoice->getAllByProductEntry($year, (GETPOST('action', 'aZ09') == $refreshaction ?-1 : (3600 * 24)), $max);
|
||||
|
||||
if (empty($data1)) {
|
||||
$showpointvalue = 0;
|
||||
|
|
|
|||
|
|
@ -2834,7 +2834,7 @@ abstract class CommonObject
|
|||
|
||||
$sql = 'UPDATE '.$this->db->prefix().$this->table_element;
|
||||
$sql .= " SET ".$fieldname." = ".(($id > 0 || $id == '0') ? ((int) $id) : 'NULL');
|
||||
if (in_array($this->table_element, array('propal', 'commande'))) {
|
||||
if (in_array($this->table_element, array('propal', 'commande', 'societe'))) {
|
||||
$sql .= " , deposit_percent = " . (empty($deposit_percent) ? 'NULL' : "'".$this->db->escape($deposit_percent)."'");
|
||||
}
|
||||
$sql .= ' WHERE rowid='.((int) $this->id);
|
||||
|
|
@ -5816,10 +5816,17 @@ abstract class CommonObject
|
|||
public function addThumbs($file)
|
||||
{
|
||||
$file_osencoded = dol_osencode($file);
|
||||
if (file_exists($file_osencoded)) {
|
||||
global $maxwidthsmall, $maxheightsmall, $maxwidthmini, $maxheightmini, $quality;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; // This define also $maxwidthsmall, $quality, ...
|
||||
if (file_exists($file_osencoded)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||
|
||||
$tmparraysize = getDefaultImageSizes();
|
||||
$maxwidthsmall = $tmparraysize['maxwidthsmall'];
|
||||
$maxheightsmall = $tmparraysize['maxheightsmall'];
|
||||
$maxwidthmini = $tmparraysize['maxwidthmini'];
|
||||
$maxheightmini = $tmparraysize['maxheightmini'];
|
||||
//$quality = $tmparraysize['quality'];
|
||||
$quality = 50; // For thumbs, we force quality to 50
|
||||
|
||||
// Create small thumbs for company (Ratio is near 16/9)
|
||||
// Used on logon for example
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2018 Christophe Battarel <christophe@altairis.fr>
|
||||
* Copyright (C) 2018 Josep Lluis Amador <joseplluis@lliuretic.cat>
|
||||
* Copyright (C) 2023 Joachim Kueter <git-jk@bloxera.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
|
||||
|
|
@ -2544,6 +2545,7 @@ class Form
|
|||
$error++;
|
||||
dol_print_error($db);
|
||||
}
|
||||
$out .= '</select>';
|
||||
if (empty($nooutput)) {
|
||||
print $out;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -881,7 +881,7 @@ function show_projects($conf, $langs, $db, $object, $backtopage = '', $nocreatel
|
|||
// Opp amount
|
||||
print '<td class="right">';
|
||||
if ($obj->opp_status_code) {
|
||||
print price($obj->opp_amount, 1, '', 1, -1, -1, '');
|
||||
print '<span class="amount">'.price($obj->opp_amount, 1, '', 1, -1, -1, '').'</span>';
|
||||
}
|
||||
print '</td>';
|
||||
// Opp status
|
||||
|
|
|
|||
|
|
@ -1808,10 +1808,16 @@ function dol_add_file_process($upload_dir, $allowoverwrite = 0, $donotupdatesess
|
|||
$resupload = dol_move_uploaded_file($TFile['tmp_name'][$i], $destfull, $allowoverwrite, 0, $TFile['error'][$i], 0, $varfiles, $upload_dir);
|
||||
|
||||
if (is_numeric($resupload) && $resupload > 0) { // $resupload can be 'ErrorFileAlreadyExists'
|
||||
global $maxwidthsmall, $maxheightsmall, $maxwidthmini, $maxheightmini;
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||
|
||||
$tmparraysize = getDefaultImageSizes();
|
||||
$maxwidthsmall = $tmparraysize['maxwidthsmall'];
|
||||
$maxheightsmall = $tmparraysize['maxheightsmall'];
|
||||
$maxwidthmini = $tmparraysize['maxwidthmini'];
|
||||
$maxheightmini = $tmparraysize['maxheightmini'];
|
||||
//$quality = $tmparraysize['quality'];
|
||||
$quality = 50; // For thumbs, we force quality to 50
|
||||
|
||||
// Generate thumbs.
|
||||
if ($generatethumbs) {
|
||||
if (image_format_supported($destfull) == 1) {
|
||||
|
|
@ -1819,10 +1825,10 @@ function dol_add_file_process($upload_dir, $allowoverwrite = 0, $donotupdatesess
|
|||
// We can't use $object->addThumbs here because there is no $object known
|
||||
|
||||
// Used on logon for example
|
||||
$imgThumbSmall = vignette($destfull, $maxwidthsmall, $maxheightsmall, '_small', 50, "thumbs");
|
||||
$imgThumbSmall = vignette($destfull, $maxwidthsmall, $maxheightsmall, '_small', $quality, "thumbs");
|
||||
// Create mini thumbs for image (Ratio is near 16/9)
|
||||
// Used on menu or for setup page for example
|
||||
$imgThumbMini = vignette($destfull, $maxwidthmini, $maxheightmini, '_mini', 50, "thumbs");
|
||||
$imgThumbMini = vignette($destfull, $maxwidthmini, $maxheightmini, '_mini', $quality, "thumbs");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11790,7 +11790,7 @@ function forgeSQLFromUniversalSearchCriteria($filter, &$error = '')
|
|||
$t = str_replace(array('and','or','AND','OR',' '), '', $t); // Remove the only strings allowed between each () criteria
|
||||
// If the string result contains something else than '()', the syntax was wrong
|
||||
if (preg_match('/[^\(\)]/', $t)) {
|
||||
$error = 'Bad syntax of the search string, filter criteria is inhalited';
|
||||
$error = 'Bad syntax of the search string, filter criteria is invalidated';
|
||||
return 'Filter syntax error'; // Bad syntax of the search string, we force a SQL not found
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,12 +23,34 @@
|
|||
*/
|
||||
|
||||
// Define size of logo small and mini
|
||||
// TODO Remove this and call getDefaultImageSizes() instead
|
||||
$maxwidthsmall = 480;
|
||||
$maxheightsmall = 270; // Near 16/9eme
|
||||
$maxwidthmini = 128;
|
||||
$maxheightmini = 72; // 16/9eme
|
||||
$quality = 80;
|
||||
|
||||
/**
|
||||
* Return default values for image sizes
|
||||
*
|
||||
* @return array Array of default values
|
||||
*/
|
||||
function getDefaultImageSizes()
|
||||
{
|
||||
$maxwidthsmall = 480;
|
||||
$maxheightsmall = 270; // Near 16/9eme
|
||||
$maxwidthmini = 128;
|
||||
$maxheightmini = 72; // 16/9eme
|
||||
$quality = 80;
|
||||
|
||||
return array(
|
||||
'maxwidthsmall' => $maxwidthsmall,
|
||||
'maxheightsmall' => $maxheightsmall,
|
||||
'maxwidthmini' => $maxwidthmini,
|
||||
'maxheightmini' => $maxheightmini,
|
||||
'quality' => $quality
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return if a filename is file name of a supported image format
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ delete from llx_menu where menu_handler=__HANDLER__ and entity=__ENTITY__;
|
|||
-- table llx_menu
|
||||
--
|
||||
|
||||
|
||||
-- Top-Menu
|
||||
-- old: (module, enabled, rowid, ...)
|
||||
insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 1__+MAX_llx_menu__, '', '1', __HANDLER__, 'top', 'home', '', 0, '/index.php?mainmenu=home&leftmenu=', 'Home', -1, '', '', '', 2, 10, __ENTITY__);
|
||||
|
|
@ -17,7 +18,7 @@ insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, left
|
|||
insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 16__+MAX_llx_menu__, 'bom|mrp', '$conf->bom->enabled || $conf->mrp->enabled', __HANDLER__, 'top', 'mrp', '', 0, '/mrp/index.php?mainmenu=mrp&leftmenu=', 'MRP', -1, 'mrp', '$user->rights->bom->read||$user->rights->mrp->read', '', 0, 31, __ENTITY__);
|
||||
insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 7__+MAX_llx_menu__, 'projet', '$conf->project->enabled', __HANDLER__, 'top', 'project', '', 0, '/projet/index.php?mainmenu=project&leftmenu=', 'Projects', -1, 'projects', '$user->rights->projet->lire', '', 2, 32, __ENTITY__);
|
||||
insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 5__+MAX_llx_menu__, 'propal|commande|fournisseur|supplier_order|supplier_invoice|contrat|ficheinter', '$conf->propal->enabled || $conf->commande->enabled || $conf->supplier_order->enabled || $conf->contrat->enabled || $conf->ficheinter->enabled', __HANDLER__, 'top', 'commercial', '', 0, '/comm/index.php?mainmenu=commercial&leftmenu=', 'Commercial', -1, 'commercial', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 40, __ENTITY__);
|
||||
insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 6__+MAX_llx_menu__, 'facture|don|tax|salaries|loan|banque', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->don->enabled || $conf->tax->enabled || $conf->salaries->enabled || $conf->supplier_invoice->enabled || $conf->loan->enabled || isModEnabled("banque")', __HANDLER__, 'top', 'billing', '', 0, '/compta/index.php?mainmenu=billing&leftmenu=', 'MenuFinancial', -1, 'compta', '$user->rights->facture->lire|| $user->rights->don->lire || $user->rights->tax->charges->lire || $user->rights->salaries->read || $user->rights->loan->read || $user->rights->banque->lire', '', 2, 50, __ENTITY__);
|
||||
insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 6__+MAX_llx_menu__, 'facture|don|tax|salaries|loan|banque', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->don->enabled || $conf->tax->enabled || $conf->salaries->enabled || $conf->supplier_invoice->enabled || $conf->loan->enabled || isModEnabled("banque")', __HANDLER__, 'top', 'billing', '', 0, '/compta/index.php?mainmenu=billing&leftmenu=', 'MenuFinancial', -1, 'compta', '$user->rights->facture->lire|| $user->rights->don->lire || $user->rights->tax->charges->lire || $user->rights->salaries->read || $user->rights->loan->read || $user->rights->banque->lire || ($user->rights->fournisseur->facture->lire || $user->rights->supplier_invoice->lire', '', 2, 50, __ENTITY__);
|
||||
insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 14__+MAX_llx_menu__, 'banque|prelevement', 'isModEnabled("banque") || isModEnabled("prelevement")', __HANDLER__, 'top', 'bank', '', 0, '/compta/bank/list.php?mainmenu=bank&leftmenu=bank', 'MenuBankCash', -1, 'banks', '$user->rights->banque->lire || $user->rights->prelevement->bons->lire', '', 0, 52, __ENTITY__);
|
||||
insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 9__+MAX_llx_menu__, 'comptabilite|accounting|asset', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->asset->enabled', __HANDLER__, 'top', 'accountancy', '', 0, '/compta/index.php?mainmenu=accountancy&leftmenu=accountancy', 'MenuAccountancy', -1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->mouvements->lire || $user->rights->asset->read', '', 2, 54, __ENTITY__);
|
||||
insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 8__+MAX_llx_menu__, '', '', __HANDLER__, 'top', 'tools', '', 0, '/core/tools.php?mainmenu=tools&leftmenu=', 'Tools', -1, 'other', '', '', 2, 90, __ENTITY__);
|
||||
|
|
@ -25,7 +26,7 @@ insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, left
|
|||
insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ( 15__+MAX_llx_menu__, 'hrm|holiday|deplacement|expensereport', '$conf->hrm->enabled || $conf->holiday->enabled || $conf->deplacement->enabled || $conf->expensereport->enabled', __HANDLER__, 'top', 'hrm', '', 0, '/hrm/index.php?mainmenu=hrm&leftmenu=', 'HRM', -1, 'holiday', '$user->rights->user->user->lire || $user->rights->holiday->read || $user->rights->deplacement->lire || $user->rights->expensereport->lire', '', 0, 80, __ENTITY__);
|
||||
|
||||
|
||||
-- Sub-Menues
|
||||
-- Sub-Menus
|
||||
|
||||
-- Home - Dashboard
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '1', __HANDLER__, 'left', 90__+MAX_llx_menu__, 'home', '', 1__+MAX_llx_menu__, '/index.php', 'MyDashboard', 0, '', '', '', 2, 0, __ENTITY__);
|
||||
|
|
|
|||
|
|
@ -2143,7 +2143,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
$carac_client_name_shipping=pdfBuildThirdpartyName($object->thirdparty, $outputlangs);
|
||||
$carac_client_shipping=pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'target', $object);
|
||||
}
|
||||
if (!empty($carac_client_shipping) && (isset($object->contact->socid) && $object->contact->socid != $object->socid)) {
|
||||
if (!empty($carac_client_shipping)) {
|
||||
$posy += $hautcadre;
|
||||
|
||||
// Show shipping frame
|
||||
|
|
|
|||
|
|
@ -2393,7 +2393,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||
$carac_client_name_shipping=pdfBuildThirdpartyName($object->thirdparty, $outputlangs);
|
||||
$carac_client_shipping=pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'target', $object);
|
||||
}
|
||||
if (!empty($carac_client_shipping) && (isset($object->contact->socid) && $object->contact->socid != $object->socid)) {
|
||||
if (!empty($carac_client_shipping)) {
|
||||
$posy += $hautcadre;
|
||||
|
||||
// Show shipping frame
|
||||
|
|
|
|||
|
|
@ -107,9 +107,13 @@ class InterfaceContactRoles extends DolibarrTriggers
|
|||
}
|
||||
}
|
||||
|
||||
// We disable this message, it shows the message in api, public page or batch actions when it should not.
|
||||
// Message setting must be done by the calling GUI page and not set inside the trigger.
|
||||
/*
|
||||
if ($nb > 0) {
|
||||
setEventMessages($langs->trans('ContactAddedAutomatically', $nb), null, 'mesgs');
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -357,7 +357,8 @@ if (empty($reshook)) {
|
|||
}
|
||||
|
||||
//var_dump($batch_line[2]);
|
||||
if ($totalqty > 0 && !$error) { // There is at least one thing to ship and no error
|
||||
if (($totalqty > 0 || !empty($conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS)) && !$error) { // There is at least one thing to ship and no error
|
||||
//var_dump($_POST);exit;
|
||||
for ($i = 0; $i < $num; $i++) {
|
||||
$qty = "qtyl".$i;
|
||||
|
||||
|
|
@ -367,7 +368,7 @@ if (empty($reshook)) {
|
|||
//shipment from multiple stock locations
|
||||
$nbstockline = count($stockLine[$i]);
|
||||
for ($j = 0; $j < $nbstockline; $j++) {
|
||||
if ($stockLine[$i][$j]['qty'] > 0) {
|
||||
if ($stockLine[$i][$j]['qty'] > 0 || ($stockLine[$i][$j]['qty'] == 0 && !empty($conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS))) {
|
||||
$ret = $object->addline($stockLine[$i][$j]['warehouse_id'], $stockLine[$i][$j]['ix_l'], $stockLine[$i][$j]['qty'], $array_options[$i]);
|
||||
if ($ret < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
|
|
@ -376,7 +377,7 @@ if (empty($reshook)) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (GETPOST($qty, 'int') > 0 || (GETPOST($qty, 'int') == 0 && $conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS)) {
|
||||
if (GETPOST($qty, 'int') > 0 || (GETPOST($qty, 'int') == 0 && !empty($conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS))) {
|
||||
$ent = "entl".$i;
|
||||
$idl = "idl".$i;
|
||||
$entrepot_id = is_numeric(GETPOST($ent, 'int')) ?GETPOST($ent, 'int') : GETPOST('entrepot_id', 'int');
|
||||
|
|
|
|||
|
|
@ -437,6 +437,7 @@ if ($object->id > 0) {
|
|||
$MAXLIST = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
|
||||
|
||||
print '<div class="underbanner underbanner-before-box clearboth"></div>';
|
||||
print '<br>';
|
||||
|
||||
// Lien recap
|
||||
$boxstat .= '<div class="box box-halfright">';
|
||||
|
|
@ -556,16 +557,6 @@ if ($object->id > 0) {
|
|||
|
||||
$MAXLIST = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
|
||||
|
||||
// Lien recap
|
||||
/*
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("Summary").'</td>';
|
||||
print '<td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/fourn/recap-fourn.php?socid='.$object->id.'">'.$langs->trans("ShowSupplierPreview").'</a></td></tr></table></td>';
|
||||
print '</tr>';
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
*/
|
||||
|
||||
/*
|
||||
* List of products
|
||||
|
|
|
|||
|
|
@ -741,6 +741,9 @@ ALTER TABLE llx_loan_schedule ADD UNIQUE INDEX uk_loan_schedule_ref (fk_loan, da
|
|||
-- We need when upgrade 15 to 16 with Dolibarr v17+ for upgrade2 function migrate_user_photospath2()
|
||||
ALTER TABLE llx_user CHANGE COLUMN note note_private text;
|
||||
|
||||
ALTER TABLE llx_overwrite_trans DROP INDEX uk_overwrite_trans;
|
||||
ALTER TABLE llx_overwrite_trans ADD UNIQUE INDEX uk_overwrite_trans(lang, transkey, entity);
|
||||
|
||||
|
||||
-- Bank Thirdparty
|
||||
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'banque','thirdparty','',0,null,null,'(YourSEPAMandate)',1,'isModEnabled("societe") && isModEnabled("banque") && isModEnabled("prelevement")',0,'__(YourSEPAMandate)__','__(Hello)__,<br><br>\n\n__(FindYourSEPAMandate)__ :<br>\n__MYCOMPANY_NAME__<br>\n__MYCOMPANY_FULLADDRESS__<br><br>\n__(Sincerely)__<br>\n__USER_SIGNATURE__',null, 0);
|
||||
|
|
|
|||
|
|
@ -57,6 +57,9 @@ UPDATE llx_c_actioncomm SET type = 'system' WHERE code = 'AC_OTH';
|
|||
|
||||
ALTER TABLE llx_opensurvey_user_studs MODIFY reponses VARCHAR(200) NOT NULL;
|
||||
|
||||
ALTER TABLE llx_overwrite_trans DROP INDEX uk_overwrite_trans;
|
||||
ALTER TABLE llx_overwrite_trans ADD UNIQUE INDEX uk_overwrite_trans(lang, transkey, entity);
|
||||
|
||||
-- v17
|
||||
|
||||
ALTER TABLE llx_mailing_cibles MODIFY COLUMN source_type varchar(32);
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ print "</tr>\n";
|
|||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
print $langs->trans("PaypalLiveEnabled").'</td><td>';
|
||||
if (empty($conf->global->PAYPAL_API_SANDBOX)) {
|
||||
if (!(getDolGlobalInt('PAYPAL_API_SANDBOX'))) {
|
||||
print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setlive&token='.newToken().'&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
} else {
|
||||
|
|
@ -187,27 +187,27 @@ print '</td></tr>';
|
|||
|
||||
print '<tr class="oddeven"><td class="fieldrequired">';
|
||||
print $langs->trans("PAYPAL_API_USER").'</td><td>';
|
||||
print '<input size="32" type="text" name="PAYPAL_API_USER" value="'.$conf->global->PAYPAL_API_USER.'">';
|
||||
print '<input size="32" type="text" name="PAYPAL_API_USER" value="'.getDolGlobalString('PAYPAL_API_USER').'">';
|
||||
print ' <span class="opacitymedium">'.$langs->trans("Example").': admin-facilitator_api1.example.com, paypal_api1.mywebsite.com</span>';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td class="fieldrequired">';
|
||||
print $langs->trans("PAYPAL_API_PASSWORD").'</td><td>';
|
||||
print '<input size="32" type="text" name="PAYPAL_API_PASSWORD" value="'.$conf->global->PAYPAL_API_PASSWORD.'">';
|
||||
print '<input size="32" type="text" name="PAYPAL_API_PASSWORD" value="'.getDolGlobalString('PAYPAL_API_PASSWORD').'">';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td class="fieldrequired">';
|
||||
print $langs->trans("PAYPAL_API_SIGNATURE").'</td><td>';
|
||||
print '<input size="64" type="text" name="PAYPAL_API_SIGNATURE" value="'.$conf->global->PAYPAL_API_SIGNATURE.'">';
|
||||
print '<input size="64" type="text" name="PAYPAL_API_SIGNATURE" value="'.getDolGlobalString('PAYPAL_API_SIGNATURE').'">';
|
||||
print '<br><span class="opacitymedium">'.$langs->trans("Example").': ASsqXEmw4KzmX-CPChWSVDNCNfd.A3YNR7uz-VncXXAERFDFDFDF</span>';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("PAYPAL_SSLVERSION").'</td><td>';
|
||||
print $form->selectarray("PAYPAL_SSLVERSION", array('1'=> $langs->trans('TLSv1'), '6'=> $langs->trans('TLSv1.2')), $conf->global->PAYPAL_SSLVERSION);
|
||||
print $form->selectarray("PAYPAL_SSLVERSION", array('1'=> $langs->trans('TLSv1'), '6'=> $langs->trans('TLSv1.2')), getDolGlobalString('PAYPAL_SSLVERSION'));
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
|
@ -228,7 +228,7 @@ print "</tr>\n";
|
|||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("PAYPAL_API_INTEGRAL_OR_PAYPALONLY").'</td><td>';
|
||||
print $form->selectarray("PAYPAL_API_INTEGRAL_OR_PAYPALONLY", array('integral'=> $langs->trans('PaypalModeIntegral'), 'paypalonly'=> $langs->trans('PaypalModeOnlyPaypal')), $conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY);
|
||||
print $form->selectarray("PAYPAL_API_INTEGRAL_OR_PAYPALONLY", array('integral'=> $langs->trans('PaypalModeIntegral'), 'paypalonly'=> $langs->trans('PaypalModeOnlyPaypal')), getDolGlobalString('PAYPAL_API_INTEGRAL_OR_PAYPALONLY'));
|
||||
print '</td></tr>';
|
||||
|
||||
/*
|
||||
|
|
@ -241,7 +241,7 @@ print '</td></tr>';
|
|||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("PublicVendorName").'</td><td>';
|
||||
print '<input size="64" type="text" name="ONLINE_PAYMENT_CREDITOR" value="'.$conf->global->ONLINE_PAYMENT_CREDITOR.'">';
|
||||
print '<input size="64" type="text" name="ONLINE_PAYMENT_CREDITOR" value="'.getDolGlobalString('ONLINE_PAYMENT_CREDITOR').'">';
|
||||
print ' <span class="opacitymedium">'.$langs->trans("Example").': '.$mysoc->name.'</span>';
|
||||
print '</td></tr>';
|
||||
|
||||
|
|
@ -249,47 +249,47 @@ if (isModEnabled("banque")) {
|
|||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("BankAccount").'</td><td>';
|
||||
print img_picto('', 'bank_account').' ';
|
||||
$form->select_comptes($conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS, 'PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS', 0, '', 1);
|
||||
$form->select_comptes(getDolGlobalString('PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS'), 'PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS', 0, '', 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("CSSUrlForPaymentForm").'</td><td>';
|
||||
print '<input size="64" type="text" name="ONLINE_PAYMENT_CSS_URL" value="'.$conf->global->ONLINE_PAYMENT_CSS_URL.'">';
|
||||
print '<input size="64" type="text" name="ONLINE_PAYMENT_CSS_URL" value="'.getDolGlobalString('ONLINE_PAYMENT_CSS_URL').'">';
|
||||
print ' <span class="opacitymedium">'.$langs->trans("Example").': http://mysite/mycss.css</span>';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("PAYPAL_ADD_PAYMENT_URL").'</td><td>';
|
||||
print $form->selectyesno("PAYPAL_ADD_PAYMENT_URL", $conf->global->PAYPAL_ADD_PAYMENT_URL, 1);
|
||||
print $form->selectyesno("PAYPAL_ADD_PAYMENT_URL", getDolGlobalString('PAYPAL_ADD_PAYMENT_URL'), 1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("MessageForm").'</td><td>';
|
||||
$doleditor = new DolEditor('ONLINE_PAYMENT_MESSAGE_FORM', $conf->global->ONLINE_PAYMENT_MESSAGE_FORM, '', 100, 'dolibarr_details', 'In', false, true, true, ROWS_4, '90%');
|
||||
$doleditor = new DolEditor('ONLINE_PAYMENT_MESSAGE_FORM', getDolGlobalString('ONLINE_PAYMENT_MESSAGE_FORM'), '', 100, 'dolibarr_details', 'In', false, true, true, ROWS_4, '90%');
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("MessageOK").'</td><td>';
|
||||
$doleditor = new DolEditor('ONLINE_PAYMENT_MESSAGE_OK', $conf->global->ONLINE_PAYMENT_MESSAGE_OK, '', 100, 'dolibarr_details', 'In', false, true, true, ROWS_4, '90%');
|
||||
$doleditor = new DolEditor('ONLINE_PAYMENT_MESSAGE_OK', getDolGlobalString('ONLINE_PAYMENT_MESSAGE_OK'), '', 100, 'dolibarr_details', 'In', false, true, true, ROWS_4, '90%');
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("MessageKO").'</td><td>';
|
||||
$doleditor = new DolEditor('ONLINE_PAYMENT_MESSAGE_KO', $conf->global->ONLINE_PAYMENT_MESSAGE_KO, '', 100, 'dolibarr_details', 'In', false, true, true, ROWS_4, '90%');
|
||||
$doleditor = new DolEditor('ONLINE_PAYMENT_MESSAGE_KO', getDolGlobalString('ONLINE_PAYMENT_MESSAGE_KO'), '', 100, 'dolibarr_details', 'In', false, true, true, ROWS_4, '90%');
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("ONLINE_PAYMENT_SENDEMAIL").'</td><td>';
|
||||
print '<input class="minwidth200" type="text" name="ONLINE_PAYMENT_SENDEMAIL" value="'.$conf->global->ONLINE_PAYMENT_SENDEMAIL.'">';
|
||||
print '<input class="minwidth200" type="text" name="ONLINE_PAYMENT_SENDEMAIL" value="'.getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL').'">';
|
||||
print ' <span class="opacitymedium">'.$langs->trans("Example").': myemail@myserver.com, Payment service <myemail2@myserver2.com></span>';
|
||||
print '</td></tr>';
|
||||
|
||||
|
|
@ -309,11 +309,11 @@ print "</tr>\n";
|
|||
// Payment token for URL
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("SecurityToken").'</td><td>';
|
||||
print '<input class="minwidth300" type="text" id="PAYMENT_SECURITY_TOKEN" name="PAYMENT_SECURITY_TOKEN" value="'.$conf->global->PAYMENT_SECURITY_TOKEN.'">';
|
||||
print '<input class="minwidth300" type="text" id="PAYMENT_SECURITY_TOKEN" name="PAYMENT_SECURITY_TOKEN" value="'.getDolGlobalString('PAYMENT_SECURITY_TOKEN').'">';
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"');
|
||||
}
|
||||
if (!empty($conf->global->PAYMENT_SECURITY_ACCEPT_ANY_TOKEN)) {
|
||||
if (getDolGlobalString('PAYMENT_SECURITY_ACCEPT_ANY_TOKEN')) {
|
||||
$langs->load("errors");
|
||||
print img_warning($langs->trans("WarningTheHiddenOptionIsOn", 'PAYMENT_SECURITY_ACCEPT_ANY_TOKEN'), '', 'pictowarning marginleftonly');
|
||||
}
|
||||
|
|
@ -325,7 +325,7 @@ if ($conf->use_javascript_ajax) {
|
|||
print ajax_constantonoff('PAYMENT_SECURITY_TOKEN_UNIQUE');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("PAYMENT_SECURITY_TOKEN_UNIQUE", $arrval, $conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE);
|
||||
print $form->selectarray("PAYMENT_SECURITY_TOKEN_UNIQUE", $arrval, getDolGlobalString('PAYMENT_SECURITY_TOKEN_UNIQUE'));
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
|
|
|
|||
|
|
@ -403,9 +403,7 @@ if ($action == 'create') {
|
|||
exit;
|
||||
}
|
||||
|
||||
/*
|
||||
* Affichage fiche
|
||||
*/
|
||||
// View mode
|
||||
if ($action <> 'edit' && $action <> 're-edit') {
|
||||
$head = stock_prepare_head($object);
|
||||
|
||||
|
|
@ -593,13 +591,12 @@ if ($action == 'create') {
|
|||
print "</div>";
|
||||
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* Affichage de la liste des produits de l'entrepot */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
// Show list of products into warehouse
|
||||
print '<br>';
|
||||
|
||||
|
||||
// TODO Create $arrayfields with all fields to show
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
print "<tr class=\"liste_titre\">";
|
||||
$parameters = array();
|
||||
|
|
@ -734,6 +731,7 @@ if ($action == 'create') {
|
|||
$productstatic->accountancy_code_buy_intra = $objp->accountancy_code_buy_intra;
|
||||
$productstatic->accountancy_code_buy_export = $objp->accountancy_code_buy_export;
|
||||
|
||||
// Ref
|
||||
print "<td>";
|
||||
print $productstatic->getNomUrl(1, 'stock', 16);
|
||||
print '</td>';
|
||||
|
|
@ -741,6 +739,7 @@ if ($action == 'create') {
|
|||
// Label
|
||||
print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($objp->produit).'">'.dol_escape_htmltag($objp->produit).'</td>';
|
||||
|
||||
// Value
|
||||
print '<td class="right">';
|
||||
$valtoshow = price(price2num($objp->value, 'MS'), 0, '', 0, 0); // TODO replace with a qty() function
|
||||
print empty($valtoshow) ? '0' : $valtoshow;
|
||||
|
|
@ -756,6 +755,7 @@ if ($action == 'create') {
|
|||
print $langs->trans($productstatic->getLabelOfUnit());
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Price buy PMP
|
||||
print '<td class="right nowraponall">'.price(price2num($objp->ppmp, 'MU')).'</td>';
|
||||
|
||||
|
|
@ -776,6 +776,7 @@ if ($action == 'create') {
|
|||
}
|
||||
$totalvaluesell += price2num($pricemin * $objp->value, 'MT');
|
||||
|
||||
// Link to transfer
|
||||
if ($user->rights->stock->mouvement->creer) {
|
||||
print '<td class="center"><a href="'.DOL_URL_ROOT.'/product/stock/product.php?dwid='.$object->id.'&id='.$objp->rowid.'&action=transfert&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$id).'">';
|
||||
print img_picto($langs->trans("TransferStock"), 'add', 'class="hideonsmartphone pictofixedwidth" style="color: #a69944"');
|
||||
|
|
@ -783,6 +784,7 @@ if ($action == 'create') {
|
|||
print "</a></td>";
|
||||
}
|
||||
|
||||
// Link to stock
|
||||
if ($user->rights->stock->creer) {
|
||||
print '<td class="center"><a href="'.DOL_URL_ROOT.'/product/stock/product.php?dwid='.$object->id.'&id='.$objp->rowid.'&action=correction&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$id).'">';
|
||||
print img_picto($langs->trans("CorrectStock"), 'add', 'class="hideonsmartphone pictofixedwidth" style="color: #a69944"');
|
||||
|
|
@ -790,6 +792,11 @@ if ($action == 'create') {
|
|||
print "</a></td>";
|
||||
}
|
||||
|
||||
print "</tr>";
|
||||
|
||||
$i++;
|
||||
|
||||
// Define $unit and $sameunits
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if ($i == 0) {
|
||||
$units = $productstatic->fk_unit;
|
||||
|
|
@ -797,9 +804,6 @@ if ($action == 'create') {
|
|||
$sameunits = false;
|
||||
}
|
||||
}
|
||||
|
||||
print "</tr>";
|
||||
$i++;
|
||||
}
|
||||
$db->free($resql);
|
||||
|
||||
|
|
@ -838,9 +842,7 @@ if ($action == 'create') {
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* Edit
|
||||
*/
|
||||
// Edit mode
|
||||
if ($action == 'edit' || $action == 're-edit') {
|
||||
$langs->trans("WarehouseEdit");
|
||||
|
||||
|
|
|
|||
|
|
@ -264,7 +264,9 @@ if ($action == "view_ticketlist") {
|
|||
if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
||||
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
|
||||
if ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate') {
|
||||
$arrayfields["ef.".$key] = array('label' => $extrafields->attributes[$object->table_element]['label'][$key], 'checked' => ($extrafields->attributes[$object->table_element]['list'][$key] < 0) ? 0 : 1, 'position' => $extrafields->attributes[$object->table_element]['pos'][$key], 'enabled' =>(abs($extrafields->attributes[$object->table_element]['list'][$key]) != 3) && $extrafields->attributes[$object->table_element]['perms'][$key]);
|
||||
$enabled = abs(dol_eval($extrafields->attributes[$object->table_element]['list'][$key], 1, 1, 0));
|
||||
$enabled = (($enabled == 0 || $enabled == 3) ? 0 : $enabled);
|
||||
$arrayfields["ef.".$key] = array('label' => $extrafields->attributes[$object->table_element]['label'][$key], 'checked' => ($extrafields->attributes[$object->table_element]['list'][$key] < 0) ? 0 : 1, 'position' => $extrafields->attributes[$object->table_element]['pos'][$key], 'enabled' => $enabled && $extrafields->attributes[$object->table_element]['perms'][$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ if ($action == 'getProducts') {
|
|||
$sql .= " AND EXISTS (SELECT cp.fk_product FROM " . $db->prefix() . "categorie_product as cp WHERE cp.fk_product = p.rowid AND cp.fk_categorie IN (".$db->sanitize($filteroncategids)."))";
|
||||
}
|
||||
$sql .= " AND tosell = 1";
|
||||
$sql .= " AND (barcode IS NULL OR barcode != '" . $db->escape($term) . "')";
|
||||
$sql .= " AND (barcode IS NULL OR barcode <> '" . $db->escape($term) . "')";
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql && $db->num_rows($resql) == 1) {
|
||||
|
|
@ -249,9 +249,10 @@ if ($action == 'getProducts') {
|
|||
|
||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'product as p';
|
||||
if (getDolGlobalInt('TAKEPOS_PRODUCT_IN_STOCK') == 1) {
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_stock as ps';
|
||||
$sql .= ' INNER JOIN '.MAIN_DB_PREFIX.'product_stock as ps';
|
||||
$sql .= ' ON (p.rowid = ps.fk_product';
|
||||
$sql .= " AND ps.fk_entrepot = ".((int) getDolGlobalInt("CASHDESK_ID_WAREHOUSE".$_SESSION['takeposterminal']));
|
||||
$sql .= ')';
|
||||
}
|
||||
|
||||
// Add tables from hooks
|
||||
|
|
@ -265,7 +266,7 @@ if ($action == 'getProducts') {
|
|||
if ($filteroncategids) {
|
||||
$sql .= ' AND EXISTS (SELECT cp.fk_product FROM '.MAIN_DB_PREFIX.'categorie_product as cp WHERE cp.fk_product = p.rowid AND cp.fk_categorie IN ('.$db->sanitize($filteroncategids).'))';
|
||||
}
|
||||
$sql .= ' AND tosell = 1';
|
||||
$sql .= ' AND p.tosell = 1';
|
||||
if (getDolGlobalInt('TAKEPOS_PRODUCT_IN_STOCK') == 1) {
|
||||
$sql .= ' AND ps.reel > 0';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2040,7 +2040,7 @@ class User extends CommonObject
|
|||
if ($this->pass != $this->pass_indatabase && !dol_verifyHash($this->pass, $this->pass_indatabase_crypted)) {
|
||||
// If a new value for password is set and different than the one crypted into database
|
||||
$result = $this->setPassword($user, $this->pass, 0, $notrigger, $nosyncmemberpass, 0, 1);
|
||||
if ($result < 0) {
|
||||
if (is_numeric($result) && $result < 0) {
|
||||
return -5;
|
||||
}
|
||||
}
|
||||
|
|
@ -2332,7 +2332,7 @@ class User extends CommonObject
|
|||
|
||||
if ($result >= 0) {
|
||||
$result = $adh->setPassword($user, $this->pass, (empty($conf->global->DATABASE_PWD_ENCRYPTED) ? 0 : 1), 1); // Cryptage non gere dans module adherent
|
||||
if ($result < 0) {
|
||||
if (is_numeric($result) && $result < 0) {
|
||||
$this->error = $adh->error;
|
||||
dol_syslog(get_class($this)."::setPassword ".$this->error, LOG_ERR);
|
||||
$error++;
|
||||
|
|
|
|||
|
|
@ -142,16 +142,16 @@ if (empty($reshook)) {
|
|||
$messagewarning .= '</div>';
|
||||
|
||||
if ($result <= 0 && $edituser->error == 'USERNOTFOUND') {
|
||||
usleep(20000); // add delay to simulate setPassword and send_password actions delay
|
||||
usleep(20000); // add delay to simulate setPassword and send_password actions delay (0.02s)
|
||||
$message .= $messagewarning;
|
||||
$username = '';
|
||||
} else {
|
||||
if (empty($edituser->email)) {
|
||||
usleep(20000); // add delay to simulate setPassword and send_password actions delay
|
||||
usleep(20000); // add delay to simulate setPassword and send_password actions delay (0.02s)
|
||||
$message .= $messagewarning;
|
||||
} else {
|
||||
$newpassword = $edituser->setPassword($user, '', 1);
|
||||
if ($newpassword < 0) {
|
||||
if (is_numeric($newpassword) && $newpassword < 0) {
|
||||
// Technical failure
|
||||
$message = '<div class="error">'.$langs->trans("ErrorFailedToChangePassword").'</div>';
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
// Load Dolibarr environment
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
|
||||
|
||||
$langs->load("admin");
|
||||
|
||||
|
|
|
|||
|
|
@ -709,13 +709,13 @@ function setUserPassword($authentication, $shortuser)
|
|||
$res = $userstat->fetch('', $shortuser['login']);
|
||||
if ($res) {
|
||||
$res = $userstat->setPassword($userstat, $shortuser['password']);
|
||||
if ($res) {
|
||||
if (is_numeric($res) && $res < 0) {
|
||||
$error++;
|
||||
$errorcode = 'NOT_MODIFIED'; $errorlabel = 'Error when changing password';
|
||||
} else {
|
||||
$objectresp = array(
|
||||
'result'=>array('result_code' => 'OK', 'result_label' => ''),
|
||||
);
|
||||
} else {
|
||||
$error++;
|
||||
$errorcode = 'NOT_MODIFIED'; $errorlabel = 'Error when changing password';
|
||||
}
|
||||
} else {
|
||||
$error++;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user