Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0
Conflicts: htdocs/expedition/card.php htdocs/install/mysql/migration/15.0.0-16.0.0.sql htdocs/install/mysql/tables/llx_overwrite_trans.key.sql htdocs/projet/tasks.php htdocs/projet/tasks/time.php
This commit is contained in:
commit
c8186209ad
21 changed files with 166 additions and 90 deletions
|
|
@ -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 new Dolibarr version
|
||||
OldVersionFoundButFailedToMoveInNew=An old database version has been found but could not be moved to be used with new Dolibarr version
|
||||
|
||||
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=Continue anyway (install process may fails 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)
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ $help_url = "EN:Module_Double_Entry_Accounting";
|
|||
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
$sql = "SELECT f.rowid, f.label, f.date_start, f.date_end, f.statut, f.entity";
|
||||
$sql = "SELECT f.rowid, f.label, f.date_start, f.date_end, f.statut as status, f.entity";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_fiscalyear as f";
|
||||
$sql .= " WHERE f.entity = ".$conf->entity;
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
|
|
@ -144,7 +144,10 @@ if ($result) {
|
|||
while ($i < $num && $i < $max) {
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
$fiscalyearstatic->ref = $obj->rowid;
|
||||
$fiscalyearstatic->id = $obj->rowid;
|
||||
$fiscalyearstatic->statut = $obj->status;
|
||||
$fiscalyearstatic->status = $obj->status;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
|
|
|
|||
|
|
@ -1251,6 +1251,8 @@ if ($id > 0) {
|
|||
$sql .= natural_search("f.code", $search_code);
|
||||
} elseif ($search_code != '' && $id == 2) {
|
||||
$sql .= natural_search("d.code_departement", $search_code);
|
||||
} elseif ($search_code != '' && $id == 14) {
|
||||
$sql .= natural_search("e.code", $search_code);
|
||||
} elseif ($search_code != '' && $id != 9) {
|
||||
$sql .= natural_search("code", $search_code);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -582,8 +582,16 @@ if (!empty($conf->use_javascript_ajax)) { // If javascript on
|
|||
// Local calendar
|
||||
$s .= '<div class="nowrap inline-block minheight30"><input type="checkbox" id="check_mytasks" name="check_mytasks" value="1" checked disabled> '.$langs->trans("LocalAgenda").' </div>';
|
||||
|
||||
// Holiday calendar
|
||||
$s .= '<div class="nowrap inline-block minheight30"><input type="checkbox" id="check_holiday" name="check_holiday" value="1" class="check_holiday"'.($check_holiday ? ' checked' : '').'><label for="check_holiday"> <span class="check_holiday_text">'.$langs->trans("Holidays").'</span></label> </div>';
|
||||
if ($user->rights->holiday->read) {
|
||||
// Holiday calendar
|
||||
$s .= '
|
||||
<div class="nowrap inline-block minheight30"><input type="checkbox" id="check_holiday" name="check_holiday" value="1" class="check_holiday"' . ($check_holiday
|
||||
? ' checked' : '') . '>
|
||||
<label for="check_holiday">
|
||||
<span class="check_holiday_text">' . $langs->trans("Holidays") . '</span>
|
||||
</label>
|
||||
</div>';
|
||||
}
|
||||
|
||||
// External calendars
|
||||
if (is_array($showextcals) && count($showextcals) > 0) {
|
||||
|
|
@ -998,76 +1006,78 @@ if ($showbirthday) {
|
|||
}
|
||||
}
|
||||
|
||||
// LEAVE CALENDAR
|
||||
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.statut, x.rowid, x.date_debut as date_start, x.date_fin as date_end, x.halfday, x.statut as status";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."holiday as x, ".MAIN_DB_PREFIX."user as u";
|
||||
$sql .= " WHERE u.rowid = x.fk_user";
|
||||
$sql .= " AND u.statut = '1'"; // Show only active users (0 = inactive user, 1 = active user)
|
||||
$sql .= " AND (x.statut = '2' OR x.statut = '3')"; // Show only public leaves (2 = leave wait for approval, 3 = leave approved)
|
||||
if ($user->rights->holiday->read) {
|
||||
// LEAVE CALENDAR
|
||||
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.statut, x.rowid, x.date_debut as date_start, x.date_fin as date_end, x.halfday, x.statut as status";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."holiday as x, ".MAIN_DB_PREFIX."user as u";
|
||||
$sql .= " WHERE u.rowid = x.fk_user";
|
||||
$sql .= " AND u.statut = '1'"; // Show only active users (0 = inactive user, 1 = active user)
|
||||
$sql .= " AND (x.statut = '2' OR x.statut = '3')"; // Show only public leaves (2 = leave wait for approval, 3 = leave approved)
|
||||
|
||||
if ($mode == 'show_day') {
|
||||
// Request only leaves for the current selected day
|
||||
$sql .= " AND '".$db->escape($year)."-".$db->escape($month)."-".$db->escape($day)."' BETWEEN x.date_debut AND x.date_fin"; // date_debut and date_fin are date without time
|
||||
} elseif ($mode == 'show_week') {
|
||||
// TODO: Add filter to reduce database request
|
||||
} elseif ($mode == 'show_month') {
|
||||
// TODO: Add filter to reduce database request
|
||||
}
|
||||
if ($mode == 'show_day') {
|
||||
// Request only leaves for the current selected day
|
||||
$sql .= " AND '".$db->escape($year)."-".$db->escape($month)."-".$db->escape($day)."' BETWEEN x.date_debut AND x.date_fin"; // date_debut and date_fin are date without time
|
||||
} elseif ($mode == 'show_week') {
|
||||
// TODO: Add filter to reduce database request
|
||||
} elseif ($mode == 'show_month') {
|
||||
// TODO: Add filter to reduce database request
|
||||
}
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
$event = new ActionComm($db);
|
||||
$event = new ActionComm($db);
|
||||
|
||||
// Need the id of the leave object for link to it
|
||||
$event->id = $obj->rowid;
|
||||
$event->ref = $event->id;
|
||||
// Need the id of the leave object for link to it
|
||||
$event->id = $obj->rowid;
|
||||
$event->ref = $event->id;
|
||||
|
||||
$event->type_code = 'HOLIDAY';
|
||||
$event->type_label = '';
|
||||
$event->type_color = '';
|
||||
$event->type = 'holiday';
|
||||
$event->type_picto = 'holiday';
|
||||
$event->type_code = 'HOLIDAY';
|
||||
$event->type_label = '';
|
||||
$event->type_color = '';
|
||||
$event->type = 'holiday';
|
||||
$event->type_picto = 'holiday';
|
||||
|
||||
$event->datep = $db->jdate($obj->date_start) + (empty($halfday) || $halfday == 1 ? 0 : 12 * 60 * 60 - 1);
|
||||
$event->datef = $db->jdate($obj->date_end) + (empty($halfday) || $halfday == -1 ? 24 : 12) * 60 * 60 - 1;
|
||||
$event->date_start_in_calendar = $event->datep;
|
||||
$event->date_end_in_calendar = $event->datef;
|
||||
$event->datep = $db->jdate($obj->date_start) + (empty($halfday) || $halfday == 1 ? 0 : 12 * 60 * 60 - 1);
|
||||
$event->datef = $db->jdate($obj->date_end) + (empty($halfday) || $halfday == -1 ? 24 : 12) * 60 * 60 - 1;
|
||||
$event->date_start_in_calendar = $event->datep;
|
||||
$event->date_end_in_calendar = $event->datef;
|
||||
|
||||
if ($obj->status == 3) {
|
||||
// Show no symbol for leave with state "leave approved"
|
||||
$event->percentage = -1;
|
||||
} elseif ($obj->status == 2) {
|
||||
// Show TO-DO symbol for leave with state "leave wait for approval"
|
||||
$event->percentage = 0;
|
||||
if ($obj->status == 3) {
|
||||
// Show no symbol for leave with state "leave approved"
|
||||
$event->percentage = -1;
|
||||
} elseif ($obj->status == 2) {
|
||||
// Show TO-DO symbol for leave with state "leave wait for approval"
|
||||
$event->percentage = 0;
|
||||
}
|
||||
|
||||
if ($obj->halfday == 1) {
|
||||
$event->label = $obj->lastname.' ('.$langs->trans("Morning").')';
|
||||
} elseif ($obj->halfday == -1) {
|
||||
$event->label = $obj->lastname.' ('.$langs->trans("Afternoon").')';
|
||||
} else {
|
||||
$event->label = $obj->lastname;
|
||||
}
|
||||
|
||||
$daycursor = $event->date_start_in_calendar;
|
||||
$annee = dol_print_date($daycursor, '%Y', 'tzuserrel');
|
||||
$mois = dol_print_date($daycursor, '%m', 'tzuserrel');
|
||||
$jour = dol_print_date($daycursor, '%d', 'tzuserrel');
|
||||
|
||||
$daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee, 'gmt');
|
||||
do {
|
||||
$eventarray[$daykey][] = $event;
|
||||
|
||||
$daykey += 60 * 60 * 24;
|
||||
} while ($daykey <= $event->date_end_in_calendar);
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($obj->halfday == 1) {
|
||||
$event->label = $obj->lastname.' ('.$langs->trans("Morning").')';
|
||||
} elseif ($obj->halfday == -1) {
|
||||
$event->label = $obj->lastname.' ('.$langs->trans("Afternoon").')';
|
||||
} else {
|
||||
$event->label = $obj->lastname;
|
||||
}
|
||||
|
||||
$daycursor = $event->date_start_in_calendar;
|
||||
$annee = dol_print_date($daycursor, '%Y', 'tzuserrel');
|
||||
$mois = dol_print_date($daycursor, '%m', 'tzuserrel');
|
||||
$jour = dol_print_date($daycursor, '%d', 'tzuserrel');
|
||||
|
||||
$daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee, 'gmt');
|
||||
do {
|
||||
$eventarray[$daykey][] = $event;
|
||||
|
||||
$daykey += 60 * 60 * 24;
|
||||
} while ($daykey <= $event->date_end_in_calendar);
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1270,6 +1270,10 @@ class Propal extends CommonObject
|
|||
dol_print_error($this->db);
|
||||
break;
|
||||
}
|
||||
|
||||
// Set the id on created row
|
||||
$line->id = $result;
|
||||
|
||||
// Defined the new fk_parent_line
|
||||
if ($result > 0 && $line->product_type == 9) {
|
||||
$fk_parent_line = $result;
|
||||
|
|
@ -1403,6 +1407,8 @@ class Propal extends CommonObject
|
|||
}
|
||||
|
||||
foreach ($object->lines as $line) {
|
||||
$line->id = 0;
|
||||
|
||||
if ($line->fk_product > 0) {
|
||||
$prod = new Product($this->db);
|
||||
$res = $prod->fetch($line->fk_product);
|
||||
|
|
|
|||
|
|
@ -1345,6 +1345,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) {
|
||||
|
|
|
|||
|
|
@ -222,6 +222,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
|
|||
$object->fields = dol_sort_array($object->fields, 'position');
|
||||
$arrayfields = dol_sort_array($arrayfields, 'position');
|
||||
|
||||
$error = 0;
|
||||
|
||||
|
||||
/*
|
||||
|
|
@ -513,6 +514,7 @@ if (empty($reshook)) {
|
|||
} else {
|
||||
$lineid = 0;
|
||||
$error++;
|
||||
$errors[] = $objecttmp->error;
|
||||
break;
|
||||
}
|
||||
// Defined the new fk_parent_line
|
||||
|
|
|
|||
|
|
@ -752,7 +752,7 @@ if (!$error && $massaction == "builddoc" && $permissiontoread && !GETPOST('butto
|
|||
$arrayofinclusion[] = '^'.preg_quote(dol_sanitizeFileName($tmppdf), '/').'\.pdf$';
|
||||
}
|
||||
foreach ($listofobjectref as $tmppdf) {
|
||||
$arrayofinclusion[] = '^'.preg_quote(dol_sanitizeFileName($tmppdf), '/').'_[a-zA-Z0-9\-\_\']+\.pdf$'; // To include PDF generated from ODX files
|
||||
$arrayofinclusion[] = '^'.preg_quote(dol_sanitizeFileName($tmppdf), '/').'_[a-zA-Z0-9\-\_\'\&\.]+\.pdf$'; // To include PDF generated from ODX files
|
||||
}
|
||||
$listoffiles = dol_dir_list($uploaddir, 'all', 1, implode('|', $arrayofinclusion), '\.meta$|\.png', 'date', SORT_DESC, 0, true);
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -5715,9 +5715,15 @@ abstract class CommonObject
|
|||
*/
|
||||
public function addThumbs($file)
|
||||
{
|
||||
global $maxwidthsmall, $maxheightsmall, $maxwidthmini, $maxheightmini, $quality;
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; // This define also $maxwidthsmall, $quality, ...
|
||||
$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
|
||||
|
||||
$file_osencoded = dol_osencode($file);
|
||||
if (file_exists($file_osencoded)) {
|
||||
|
|
|
|||
|
|
@ -1714,10 +1714,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) {
|
||||
|
|
@ -1725,10 +1731,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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 || $conf->banque->enabled', __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 || $conf->banque->enabled', __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', '$conf->banque->enabled || $conf->prelevement->enabled', __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__);
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@ 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
|
||||
for ($i = 0; $i < $num; $i++) {
|
||||
$qty = "qtyl".$i;
|
||||
if (!isset($batch_line[$i])) {
|
||||
|
|
@ -355,7 +355,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');
|
||||
|
|
@ -364,7 +364,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');
|
||||
|
|
|
|||
|
|
@ -2612,10 +2612,22 @@ if ($action == 'create') {
|
|||
,async:false
|
||||
,dataType:"json"
|
||||
,success:function(response) {
|
||||
if (response.response_status == "success"){
|
||||
jQuery("#value_unit_ht").val(response.data);
|
||||
jQuery("#value_unit_ht").trigger("change");
|
||||
jQuery("#value_unit").val("");
|
||||
if (response.response_status == "success"){';
|
||||
|
||||
if (!empty($conf->global->EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY)) {
|
||||
print '
|
||||
jQuery("#value_unit").val(parseFloat(response.data) * (100 + parseFloat(tva)) / 100);
|
||||
jQuery("#value_unit").trigger("change");
|
||||
';
|
||||
} else {
|
||||
print '
|
||||
jQuery("#value_unit_ht").val(response.data);
|
||||
jQuery("#value_unit_ht").trigger("change");
|
||||
jQuery("#value_unit").val("");
|
||||
';
|
||||
}
|
||||
|
||||
print '
|
||||
} else if(response.response_status == "error" && response.errorMessage != undefined && response.errorMessage.length > 0 ){
|
||||
$.jnotify(response.errorMessage, "error", {timeout: 0, type: "error"},{ remove: function (){} } );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -798,7 +798,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
|
|||
print '</tr>';
|
||||
|
||||
// Other options
|
||||
$parameters = array();
|
||||
$parameters = array('arrayfields' => &$arrayfields);
|
||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $taskstatic, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
|
|
@ -1072,7 +1072,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
|
|||
$j = 0; $level = 0;
|
||||
$nboftaskshown = projectLinesa($j, 0, $tasksarray, $level, true, 0, $tasksrole, $object->id, 1, $object->id, $filterprogresscalc, ($object->usage_bill_time ? 1 : 0), $arrayfields);
|
||||
} else {
|
||||
$colspan = 11;
|
||||
$colspan = count($arrayfields);
|
||||
if ($object->usage_bill_time) {
|
||||
$colspan += 2;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue