';
print ''.dol_print_date($db->jdate($obj->dc), "dayhour").' ';
print ''.$obj->price_level.' ';
$userstatic->id=$obj->uid;
diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php
index e9d969e5ab8..45cc0399a93 100644
--- a/htdocs/comm/propal/class/propal.class.php
+++ b/htdocs/comm/propal/class/propal.class.php
@@ -1287,7 +1287,11 @@ class Propal extends CommonObject
$object->datep = $now; // deprecated
$object->fin_validite = $object->date + ($object->duree_validite * 24 * 3600);
if (empty($conf->global->MAIN_KEEP_REF_CUSTOMER_ON_CLONING)) $object->ref_client = '';
-
+ if ($conf->global->MAIN_DONT_KEEP_NOTE_ON_CLONING==1)
+ {
+ $object->note_private = '';
+ $object->note_public = '';
+ }
// Create clone
$object->context['createfromclone']='createfromclone';
$result=$object->create($user);
diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php
index 14b845a3e8a..eca5ce52fa7 100644
--- a/htdocs/comm/propal/document.php
+++ b/htdocs/comm/propal/document.php
@@ -60,6 +60,10 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined,
$offset = $conf->liste_limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
+
+if (! empty($conf->global->MAIN_DOC_SORT_FIELD)) { $sortfield=$conf->global->MAIN_DOC_SORT_FIELD; }
+if (! empty($conf->global->MAIN_DOC_SORT_ORDER)) { $sortorder=$conf->global->MAIN_DOC_SORT_ORDER; }
+
if (! $sortorder) $sortorder="ASC";
if (! $sortfield) $sortfield="name";
diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php
index 4d784e299fb..515e14095bd 100644
--- a/htdocs/commande/document.php
+++ b/htdocs/commande/document.php
@@ -59,6 +59,10 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined,
$offset = $conf->liste_limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
+
+if (! empty($conf->global->MAIN_DOC_SORT_FIELD)) { $sortfield=$conf->global->MAIN_DOC_SORT_FIELD; }
+if (! empty($conf->global->MAIN_DOC_SORT_ORDER)) { $sortorder=$conf->global->MAIN_DOC_SORT_ORDER; }
+
if (! $sortorder) $sortorder="ASC";
if (! $sortfield) $sortfield="name";
diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php
index 843b3b0e323..8f87d6f7151 100644
--- a/htdocs/compta/bank/list.php
+++ b/htdocs/compta/bank/list.php
@@ -454,7 +454,7 @@ foreach ($accounts as $key=>$type)
if (! empty($arrayfields['b.account_number']['checked']))
{
print '';
- if (! empty($conf->accounting->enabled))
+ if (! empty($conf->accounting->enabled) && ! empty($objecttmp->account_number))
{
$accountingaccount = new AccountingAccount($db);
$accountingaccount->fetch('', $objecttmp->account_number, 1);
@@ -472,7 +472,7 @@ foreach ($accounts as $key=>$type)
if (! empty($arrayfields['b.fk_accountancy_journal']['checked']))
{
print ' ';
- if (! empty($conf->accounting->enabled))
+ if (! empty($conf->accounting->enabled) && ! empty($objecttmp->fk_accountancy_journal))
{
$accountingjournal = new AccountingJournal($db);
$accountingjournal->fetch($objecttmp->fk_accountancy_journal);
@@ -505,8 +505,13 @@ foreach ($accounts as $key=>$type)
if ($result<0) {
setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
} else {
- print $result->nbtodo;
- if ($result->nbtodolate) print ' ('.$result->nbtodolate.img_warning($langs->trans("Late")).')';
+ print ''.$result->nbtodo.' ';
+ if ($result->nbtodolate) {
+ print ' ';
+ print '';
+ print ' '.$result->nbtodolate;
+ print ' ';
+ }
}
}
else print $langs->trans("FeatureDisabled");
diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php
index 713c68c8e8a..6149a161694 100644
--- a/htdocs/compta/facture/class/facture.class.php
+++ b/htdocs/compta/facture/class/facture.class.php
@@ -1046,6 +1046,11 @@ class Facture extends CommonInvoice
$object->close_code = '';
$object->close_note = '';
$object->products = $object->lines; // For backward compatibility
+ if ($conf->global->MAIN_DONT_KEEP_NOTE_ON_CLONING==1)
+ {
+ $object->note_private = '';
+ $object->note_public = '';
+ }
// Loop on each line of new invoice
foreach($object->lines as $i => $line)
diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php
index f5e39907bcc..930b4a3e0be 100644
--- a/htdocs/contact/card.php
+++ b/htdocs/contact/card.php
@@ -260,6 +260,7 @@ if (empty($reshook))
if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->contact->supprimer)
{
$result=$object->fetch($id);
+ $object->oldcopy = clone $object;
$object->old_lastname = GETPOST("old_lastname");
$object->old_firstname = GETPOST("old_firstname");
diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php
index 2e5bcc74200..9d336288fb3 100644
--- a/htdocs/contact/class/contact.class.php
+++ b/htdocs/contact/class/contact.class.php
@@ -1557,8 +1557,8 @@ class Contact extends CommonObject
/**
* Get Contact roles for a thirdparty
*
- * @param string $element element type
- * @return array|int
+ * @param string $element Element type
+ * @return array|int Array of contact roles or -1
* @throws Exception
*/
public function getContactRoles($element = '')
diff --git a/htdocs/contact/document.php b/htdocs/contact/document.php
index 6fb2803f715..ad8bbb68e5f 100644
--- a/htdocs/contact/document.php
+++ b/htdocs/contact/document.php
@@ -62,6 +62,10 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined,
$offset = $conf->liste_limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
+
+ if (! empty($conf->global->MAIN_DOC_SORT_FIELD)) { $sortfield=$conf->global->MAIN_DOC_SORT_FIELD; }
+ if (! empty($conf->global->MAIN_DOC_SORT_ORDER)) { $sortorder=$conf->global->MAIN_DOC_SORT_ORDER; }
+
if (! $sortorder) $sortorder="ASC";
if (! $sortfield) $sortfield="name";
diff --git a/htdocs/core/ajax/check_notifications.php b/htdocs/core/ajax/check_notifications.php
index dd994823a4b..02e304b3d44 100644
--- a/htdocs/core/ajax/check_notifications.php
+++ b/htdocs/core/ajax/check_notifications.php
@@ -1,6 +1,7 @@
* Copyright (C) 2017 Juanjo Menent
+ * Copyright (C) 2019 Frédéric France
*
* 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
@@ -16,6 +17,7 @@
* along with this program. If not, see .
*/
+if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1');
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Disables token renewal
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1');
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1');
diff --git a/htdocs/core/boxes/box_accountancy_suspense_account.php b/htdocs/core/boxes/box_accountancy_suspense_account.php
index 03c0f0ab7ae..86971e1e042 100644
--- a/htdocs/core/boxes/box_accountancy_suspense_account.php
+++ b/htdocs/core/boxes/box_accountancy_suspense_account.php
@@ -74,7 +74,7 @@ class box_accountancy_suspense_account extends ModeleBoxes
include_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php';
- $bookkeepingstatic = new BookKeeping($this->db);
+ //$bookkeepingstatic = new BookKeeping($this->db);
$this->info_box_head = array('text' => $langs->trans("BoxTitleSuspenseAccount"));
@@ -103,7 +103,7 @@ class box_accountancy_suspense_account extends ModeleBoxes
$this->info_box_contents[0][1] = array(
'td' => 'class="right"',
- 'text' => '' . $nbSuspenseAccount . ' ',
+ 'text' => '' . $nbSuspenseAccount . ' ',
'asis' => 1
);
} else {
diff --git a/htdocs/core/boxes/box_last_modified_ticket.php b/htdocs/core/boxes/box_last_modified_ticket.php
index 87d7e0f7d50..8f86be5a115 100644
--- a/htdocs/core/boxes/box_last_modified_ticket.php
+++ b/htdocs/core/boxes/box_last_modified_ticket.php
@@ -47,7 +47,7 @@ class box_last_modified_ticket extends ModeleBoxes
/**
* Constructor
- * @param DoliDB $db Database handler
+ * @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
@@ -71,7 +71,7 @@ class box_last_modified_ticket extends ModeleBoxes
$this->max = $max;
- dol_include_once("/ticket/class/ticket.class.php");
+ require_once DOL_DOCUMENT_ROOT."/ticket/class/ticket.class.php";
$text = $langs->trans("BoxLastModifiedTicketDescription", $max);
$this->info_box_head = array(
@@ -87,7 +87,7 @@ class box_last_modified_ticket extends ModeleBoxes
if ($user->rights->ticket->read) {
$sql = "SELECT t.rowid as id, t.ref, t.track_id, t.fk_soc, t.fk_user_create, t.fk_user_assign, t.subject, t.message, t.fk_statut, t.type_code, t.category_code, t.severity_code, t.datec, t.date_read, t.date_close, t.origin_email ";
$sql.= ", type.label as type_label, category.label as category_label, severity.label as severity_label";
- $sql.= ", s.nom as company_name";
+ $sql.= ", s.nom as company_name, s.email as socemail, s.client, s.fournisseur";
$sql.= " FROM ".MAIN_DB_PREFIX."ticket as t";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_ticket_type as type ON type.code=t.type_code";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_ticket_category as category ON category.code=t.category_code";
@@ -107,7 +107,6 @@ class box_last_modified_ticket extends ModeleBoxes
$resql = $this->db->query($sql);
if ($resql) {
$num = $this->db->num_rows($resql);
- $now=gmmktime();
$i = 0;
@@ -119,23 +118,31 @@ class box_last_modified_ticket extends ModeleBoxes
$late = '';
$ticket = new Ticket($this->db);
+ $ticket->id = $objp->id;
+ $ticket->track_id = $objp->track_id;
+ $ticket->ref = $objp->ref;
+ $ticket->fk_statut = $objp->fk_statut;
+ $ticket->subject = $objp->subject;
+ if ($objp->fk_soc > 0) {
+ $thirdparty = new Societe($this->db);
+ $thirdparty->id = $objp->fk_soc;
+ $thirdparty->email = $objp->socemail;
+ $thirdparty->client = $objp->client;
+ $thirdparty->fournisseur = $objp->fournisseur;
+ $thirdparty->name = $objp->company_name;
+ $link = $thirdparty->getNomUrl(1);
+ } else {
+ $link = dol_print_email($objp->origin_email);
+ }
$r=0;
- // Picto
+ // Ticket
$this->info_box_contents[$i][0] = array(
- 'td' => 'class="left" width="16"',
- 'logo' => $this->boximg,
- 'url' => dol_buildpath("/ticket/card.php?track_id=".$objp->track_id, 1),
- );
- $r++;
-
- // Id
- $this->info_box_contents[$i][$r] = array(
'td' => 'class="left"',
- 'text' => $objp->ref,
- 'url' => dol_buildpath("/ticket/card.php?track_id=".$objp->track_id, 1),
+ 'text' => $ticket->getNomUrl(1),
+ 'asis' => 1,
);
$r++;
@@ -143,16 +150,15 @@ class box_last_modified_ticket extends ModeleBoxes
$this->info_box_contents[$i][$r] = array(
'td' => 'class="left"',
'text' => $objp->subject, // Some event have no ref
- 'url' => dol_buildpath("/ticket/card.php?track_id=".$objp->track_id, 1),
+ 'url' => DOL_URL_ROOT."/ticket/card.php?track_id=".$objp->track_id,
);
$r++;
// Customer
$this->info_box_contents[$i][$r] = array(
'td' => 'class="left"',
- 'logo' => ($objp->fk_soc>0?'company':''),
- 'text' => ($objp->company_name?$objp->company_name:$objp->origin_email),
- 'url' => ($objp->fk_soc>0?DOL_URL_ROOT."/comm/card.php?socid=".$objp->fk_soc:'')
+ 'text' => $link,
+ 'asis' => 1,
);
$r++;
@@ -165,11 +171,9 @@ class box_last_modified_ticket extends ModeleBoxes
$r++;
// Statut
- $ticketstat = new Ticket($this->db);
- $ticketstat->fk_statut = $objp->fk_statut;
$this->info_box_contents[$i][$r] = array(
'td' => 'class="right"',
- 'text' => $ticketstat->getLibStatut(3)
+ 'text' => $ticket->getLibStatut(3)
);
$r++;
diff --git a/htdocs/core/boxes/box_last_ticket.php b/htdocs/core/boxes/box_last_ticket.php
index 5469efd8fc5..18990cd8bb6 100644
--- a/htdocs/core/boxes/box_last_ticket.php
+++ b/htdocs/core/boxes/box_last_ticket.php
@@ -1,7 +1,8 @@
- * 2016 Christophe Battarel
+ * Copyright (C) 2013-2016 Jean-François FERRY
+ * Copyright (C) 2016 Christophe Battarel
+ * Copyright (C) 2018-2019 Frédéric France
*
* 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
@@ -46,7 +47,7 @@ class box_last_ticket extends ModeleBoxes
/**
* Constructor
- * @param DoliDB $db Database handler
+ * @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
@@ -70,7 +71,7 @@ class box_last_ticket extends ModeleBoxes
$this->max = $max;
- dol_include_once("/ticket/class/ticket.class.php");
+ require_once DOL_DOCUMENT_ROOT."/ticket/class/ticket.class.php";
$text = $langs->trans("BoxLastTicketDescription", $max);
$this->info_box_head = array(
@@ -86,7 +87,7 @@ class box_last_ticket extends ModeleBoxes
if ($user->rights->ticket->read) {
$sql = "SELECT t.rowid as id, t.ref, t.track_id, t.fk_soc, t.fk_user_create, t.fk_user_assign, t.subject, t.message, t.fk_statut, t.type_code, t.category_code, t.severity_code, t.datec, t.date_read, t.date_close, t.origin_email ";
$sql .= ", type.label as type_label, category.label as category_label, severity.label as severity_label";
- $sql .= ", s.nom as company_name";
+ $sql .= ", s.nom as company_name, s.email as socemail, s.client, s.fournisseur";
$sql .= " FROM " . MAIN_DB_PREFIX . "ticket as t";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_ticket_type as type ON type.code=t.type_code";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_ticket_category as category ON category.code=t.category_code";
@@ -108,7 +109,6 @@ class box_last_ticket extends ModeleBoxes
$resql = $this->db->query($sql);
if ($resql) {
$num = $this->db->num_rows($resql);
- $now = gmmktime();
$i = 0;
@@ -120,22 +120,30 @@ class box_last_ticket extends ModeleBoxes
$late = '';
$ticket = new Ticket($this->db);
+ $ticket->id = $objp->id;
+ $ticket->track_id = $objp->track_id;
+ $ticket->ref = $objp->ref;
+ $ticket->fk_statut = $objp->fk_statut;
+ $ticket->subject = $objp->subject;
+ if ($objp->fk_soc > 0) {
+ $thirdparty = new Societe($this->db);
+ $thirdparty->id = $objp->fk_soc;
+ $thirdparty->email = $objp->socemail;
+ $thirdparty->client = $objp->client;
+ $thirdparty->fournisseur = $objp->fournisseur;
+ $thirdparty->name = $objp->company_name;
+ $link = $thirdparty->getNomUrl(1);
+ } else {
+ $link = dol_print_email($objp->origin_email);
+ }
$r = 0;
- // Picto
- $this->info_box_contents[$i][0] = array(
- 'td' => 'class="left" width="16"',
- 'logo' => $this->boximg,
- 'url' => dol_buildpath("/ticket/card.php?track_id=" . $objp->track_id, 1),
- );
- $r++;
-
- // Id
+ // Ticket
$this->info_box_contents[$i][$r] = array(
'td' => 'class="left"',
- 'text' => $objp->ref,
- 'url' => dol_buildpath("/ticket/card.php?track_id=" . $objp->track_id, 1),
+ 'text' => $ticket->getNomUrl(1),
+ 'asis' => 1
);
$r++;
@@ -143,16 +151,15 @@ class box_last_ticket extends ModeleBoxes
$this->info_box_contents[$i][$r] = array(
'td' => 'class="left"',
'text' => $objp->subject, // Some event have no ref
- 'url' => dol_buildpath("/ticket/card.php?track_id=" . $objp->track_id, 1),
+ 'url' => DOL_URL_ROOT."/ticket/card.php?track_id=" . $objp->track_id,
);
$r++;
// Customer
$this->info_box_contents[$i][$r] = array(
'td' => 'class="left"',
- 'logo' => ($objp->fk_soc > 0 ? 'company' : ''),
- 'text' => ($objp->company_name ? $objp->company_name : $objp->origin_email),
- 'url' => ($objp->fk_soc > 0 ? DOL_URL_ROOT . "/comm/card.php?socid=" . $objp->fk_soc : ''),
+ 'text' => $link,
+ 'asis' => 1,
);
$r++;
@@ -164,11 +171,9 @@ class box_last_ticket extends ModeleBoxes
$r++;
// Statut
- $ticketstat = new Ticket($this->db);
- $ticketstat->fk_statut = $objp->fk_statut;
$this->info_box_contents[$i][$r] = array(
'td' => 'class="right"',
- 'text' => $ticketstat->getLibStatut(3),
+ 'text' => $ticket->getLibStatut(3),
);
$r++;
diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php
index 535db40e0e4..287d8121213 100644
--- a/htdocs/core/class/conf.class.php
+++ b/htdocs/core/class/conf.class.php
@@ -227,10 +227,7 @@ class Conf
$filesList = explode(":", $this->global->LOCAL_CONSTS_FILES);
foreach ($filesList as $file) {
$file=dol_sanitizeFileName($file);
- include_once DOL_DOCUMENT_ROOT . "/".$file."/".$file."_consts.php";
- foreach ($file2bddconsts as $key=>$value) {
- $this->global->$key=$value;
- }
+ include_once DOL_DOCUMENT_ROOT . "/".$file."/".$file."_consts.php"; // This file must set $this->global->XXX vars.
}
}
@@ -442,7 +439,6 @@ class Conf
// Set some default values
//$this->global->MAIN_LIST_FILTER_ON_DAY=1; // On filter that show date, we must show input field for day before or after month
- $this->global->MAIN_ACTIVATE_HTML5=1;
$this->global->MAIN_MAIL_USE_MULTI_PART=1;
// societe
@@ -669,6 +665,8 @@ class Conf
if (! isset($this->global->MAIN_EXTRAFIELDS_IN_ONE_TD)) $this->global->MAIN_EXTRAFIELDS_IN_ONE_TD = 1;
+ if (! isset($this->global->MAIN_USE_OLD_TITLE_BUTTON)) $this->global->MAIN_USE_OLD_TITLE_BUTTON = 0;
+
if (empty($this->global->MAIN_MODULE_DOLISTORE_API_SRV)) $this->global->MAIN_MODULE_DOLISTORE_API_SRV='https://www.dolistore.com';
if (empty($this->global->MAIN_MODULE_DOLISTORE_API_KEY)) $this->global->MAIN_MODULE_DOLISTORE_API_KEY='dolistorecatalogpublickey1234567';
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 8051e270c19..513f63d5f06 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -4152,9 +4152,9 @@ function load_fiche_titre($titre, $morehtmlright = '', $picto = 'generic', $pict
if ($picto == 'setup') $picto='generic';
$return.= "\n";
- $return.= ''; // maring bottom must be same than into print_barre_list
- if ($picto) $return.= ''.img_picto('', $picto, 'class="valignmiddle widthpictotitle pictotitle"', $pictoisfullpath).' ';
- $return.= '';
+ $return.= ''; // maring bottom must be same than into print_barre_list
+ if ($picto) $return.= ''.img_picto('', $picto, 'class="valignmiddle widthpictotitle pictotitle"', $pictoisfullpath).' ';
+ $return.= '';
$return.= ''.$titre.'
';
$return.= ' ';
if (dol_strlen($morehtmlcenter))
@@ -4214,11 +4214,10 @@ function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '',
print "\n";
print "\n";
- print ''; // maring bottom must be same than into load_fiche_tire
+ print ''; // maring bottom must be same than into load_fiche_tire
// Left
- //if ($picto && $titre) print ''.img_picto('', $picto, 'id="pictotitle"', $pictoisfullpath).' ';
- print '';
+ print ' ';
if ($picto && $titre) print img_picto('', $picto, 'class="hideonsmartphone valignmiddle opacityhigh pictotitle widthpictotitle"', $pictoisfullpath);
print ''.$titre;
if (!empty($titre) && $savtotalnboflines >= 0 && (string) $savtotalnboflines != '') print ' ('.$totalnboflines.')';
@@ -8310,7 +8309,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
$class = 'btnTitle';
// hidden conf keep during button transition TODO: remove this block
- if (empty($conf->global->MAIN_USE_NEW_TITLE_BUTTON)) {
+ if (!empty($conf->global->MAIN_USE_OLD_TITLE_BUTTON)) {
$class = 'butActionNew';
}
if (! empty($params['morecss'])) $class.=' '.$params['morecss'];
@@ -8328,7 +8327,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
$attr['class'] .= ' refused';
// hidden conf keep during button transition TODO: remove this block
- if(empty($conf->global->MAIN_USE_NEW_TITLE_BUTTON)){
+ if(!empty($conf->global->MAIN_USE_OLD_TITLE_BUTTON)){
$attr['class'] = 'butActionNewRefused';
}
@@ -8390,7 +8389,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
$button.= ''.$tag.'>';
// hidden conf keep during button transition TODO: remove this block
- if(empty($conf->global->MAIN_USE_NEW_TITLE_BUTTON)){
+ if(!empty($conf->global->MAIN_USE_OLD_TITLE_BUTTON)){
$button='<'.$tag.' '.$compiledAttributes.' >
'.$label.' ';
$button.= '
';
$button.= ''.$tag.'>';
diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php
index 53afbe50dce..543bdb025fa 100644
--- a/htdocs/core/lib/ticket.lib.php
+++ b/htdocs/core/lib/ticket.lib.php
@@ -151,6 +151,7 @@ function showDirectPublicLink($object)
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
$email = CMailFile::getValidAddress($object->origin_email, 2);
+ $url = '';
if ($email)
{
$url = dol_buildpath('/public/ticket/view.php', 3).'?track_id='.$object->track_id.'&email='.$email;
diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php
index 66698be76cc..be5871bf6e3 100644
--- a/htdocs/core/lib/usergroups.lib.php
+++ b/htdocs/core/lib/usergroups.lib.php
@@ -397,7 +397,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print '
id:'').'" style="font-weight: normal;" alt="'.$langs->trans("Preview").'">';
if ($subdir == $conf->global->MAIN_THEME) $title=$langs->trans("ThemeCurrentlyActive");
else $title=$langs->trans("ShowPreview");
- print ' ';
+ print ' ';
print ' ';
if ($subdir == $selected_theme)
{
diff --git a/htdocs/core/lib/website2.lib.php b/htdocs/core/lib/website2.lib.php
index 9b2abe22904..ba2505cc15a 100644
--- a/htdocs/core/lib/website2.lib.php
+++ b/htdocs/core/lib/website2.lib.php
@@ -433,7 +433,7 @@ function showWebsiteTemplates(Website $website)
if (! empty($urladvanced)) $ret.='
';
else $ret.=' ';
print $ret;
- print ' ';
+ print ' ';
print ' ';
print '
';
diff --git a/htdocs/core/lib/xcal.lib.php b/htdocs/core/lib/xcal.lib.php
index f0edbd6f877..a4ddb68dbd3 100644
--- a/htdocs/core/lib/xcal.lib.php
+++ b/htdocs/core/lib/xcal.lib.php
@@ -180,7 +180,9 @@ function build_calfile($format, $title, $desc, $events_array, $outputfile)
if (! empty($location)) fwrite($calfileh, "LOCATION:".$encoding.$location."\n");
if ($fulldayevent) fwrite($calfileh, "X-FUNAMBOL-ALLDAY:1\n");
- if ($fulldayevent) fwrite($calfileh, "X-MICROSOFT-CDO-ALLDAYEVENT:1\n");
+
+ // see https://docs.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxcical/0f262da6-c5fd-459e-9f18-145eba86b5d2
+ if ($fulldayevent) fwrite($calfileh, "X-MICROSOFT-CDO-ALLDAYEVENT:TRUE\n");
// Date must be GMT dates
// Current date
diff --git a/htdocs/core/modules/action/modules_action.php b/htdocs/core/modules/action/modules_action.php
index 5199933c0a2..0a559ae2d92 100644
--- a/htdocs/core/modules/action/modules_action.php
+++ b/htdocs/core/modules/action/modules_action.php
@@ -47,23 +47,23 @@ abstract class ModeleAction extends CommonDocGenerator
global $conf;
$type='action';
- $liste=array();
+ $list=array();
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
- $liste=getListOfModels($db, $type, $maxfilenamelength);
+ $list=getListOfModels($db, $type, $maxfilenamelength);
- return $liste;
+ return $list;
}
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
- * Create an product document on disk using template defined into PRODUCT_ADDON_PDF
+ * Create a product document on disk using template defined into PRODUCT_ADDON_PDF
*
- * @param DoliDB $db objet base de donnee
+ * @param DoliDB $db data base object
* @param Object $object Object fichinter
- * @param string $modele force le modele a utiliser ('' par defaut)
- * @param Translate $outputlangs objet lang a utiliser pour traduction
+ * @param string $modele forces the model to use ('' by default)
+ * @param Translate $outputlangs lang object to use for translation
* @param int $hidedetails Hide details of lines
* @param int $hidedesc Hide description
* @param int $hideref Hide ref
@@ -79,7 +79,7 @@ function action_create($db, $object, $modele, $outputlangs, $hidedetails = 0, $h
$srctemplatepath='';
- // Positionne modele sur le nom du modele de fichinter a utiliser
+ // Position modele on the name of fichinter model to use
if (! dol_strlen($modele))
{
if (! empty($conf->global->ACTION_EVENT_ADDON_PDF))
diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
index e6b960be0ce..c101f73fca0 100644
--- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
@@ -307,7 +307,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
- // Positionne $this->atleastonediscount si on a au moins une remise
+ // Set $this->atleastonediscount if you have at least one discount
for ($i = 0 ; $i < $nblines ; $i++)
{
if ($object->lines[$i]->remise_percent)
@@ -361,7 +361,7 @@ class pdf_einstein extends ModelePDFCommandes
}
}
- // Affiche notes
+ // Displays notes
$notetoshow=empty($object->note_public)?'':$object->note_public;
if (! empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE))
{
@@ -461,7 +461,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->setPage($pageposafter); $curY = $tab_top_newpage;
}
- $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut
+ $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font
// VAT Rate
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN))
@@ -503,7 +503,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetXY($this->postotalht, $curY);
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalht, 3, $total_excl_tax, 0, 'R', 0);
- // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
+ // Collection of totals by value of vat in $this->vat["rate"] = total_tva
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva;
else $tvaligne=$object->lines[$i]->total_tva;
diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
index 90efc67cd7f..d3f7f3016a0 100644
--- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
@@ -430,7 +430,7 @@ class pdf_eratosthene extends ModelePDFCommandes
{
$pdf->rollbackTransaction(true);
- // prepar pages to receive notes
+ // prepare pages to receive notes
while ($pagenb < $pageposafternote) {
$pdf->AddPage();
$pagenb++;
@@ -464,7 +464,7 @@ class pdf_eratosthene extends ModelePDFCommandes
}
- // apply note frame to previus pages
+ // apply note frame to previous pages
$i = $pageposbeforenote;
while ($i < $pageposafternote) {
$pdf->setPage($i);
@@ -526,7 +526,7 @@ class pdf_eratosthene extends ModelePDFCommandes
}
- // Use new auto collum system
+ // Use new auto column system
$this->prepareArrayColumnField($object, $outputlangs, $hidedetails, $hidedesc, $hideref);
// tab simulation to know line height
@@ -636,7 +636,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$pdf->setPage($pageposafter); $curY = $tab_top_newpage;
}
- $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut
+ $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font
// VAT Rate
if ($this->getColumnStatus('vat'))
@@ -701,7 +701,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$reshook=$hookmanager->executeHooks('printPDFline', $parameters, $this); // Note that $object may have been modified by hook
- // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
+ // Collection of totals by value of vat in $this->tva["rate"] = total_tva
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva;
else $tvaligne=$object->lines[$i]->total_tva;
diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php
index 3c98cd7709d..a225fe47005 100644
--- a/htdocs/core/modules/modSociete.class.php
+++ b/htdocs/core/modules/modSociete.class.php
@@ -270,6 +270,7 @@ class modSociete extends DolibarrModules
'st.code'=>'ProspectStatus','payterm.libelle'=>'PaymentConditions','paymode.libelle'=>'PaymentMode'
);
if (! empty($conf->global->SOCIETE_USEPREFIX)) $this->export_fields_array[$r]['s.prefix']='Prefix';
+ if (! empty($conf->global->PRODUIT_MULTIPRICES)) $this->export_fields_array[$r]['s.price_level']='PriceLevel';
// Add multicompany field
if (! empty($conf->global->MULTICOMPANY_ENTITY_IN_EXPORT_IF_SHARED))
{
@@ -295,7 +296,8 @@ class modSociete extends DolibarrModules
's.tva_intra'=>"Text",'s.capital'=>"Numeric",'s.note_private'=>"Text",'s.note_public'=>"Text",'t.libelle'=>"Text",
'ce.code'=>"List:c_effectif:libelle:code","cfj.libelle"=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code',
'st.code'=>'List:c_stcomm:libelle:code','d.nom'=>'Text','u.login'=>'Text','u.firstname'=>'Text','u.lastname'=>'Text','payterm.libelle'=>'Text',
- 'paymode.libelle'=>'Text','s.entity'=>'Numeric'
+ 'paymode.libelle'=>'Text','s.entity'=>'Numeric',
+ 's.price_level'=>'Numeric'
);
$this->export_entities_array[$r]=array('u.login'=>'user','u.firstname'=>'user','u.lastname'=>'user'); // We define here only fields that use another picto
diff --git a/htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php b/htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php
index 13eb44d4eee..79b99e59a8f 100644
--- a/htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php
+++ b/htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php
@@ -90,20 +90,23 @@ class InterfaceContactRoles extends DolibarrTriggers
if (!empty($cloneFrom->id)) $TContactAlreadyLinked = array_merge($cloneFrom->liste_contact(-1, 'external'), $cloneFrom->liste_contact(-1, 'internal'));
}
- foreach($TContact as $i => $infos) {
- foreach ($TContactAlreadyLinked as $contactData) {
- if($contactData['id'] == $infos['fk_socpeople'] && $contactData['fk_c_type_contact'] == $infos['type_contact']) unset($TContact[$i]);
+ if (is_array($TContact))
+ {
+ foreach($TContact as $i => $infos) {
+ foreach ($TContactAlreadyLinked as $contactData) {
+ if ($contactData['id'] == $infos['fk_socpeople'] && $contactData['fk_c_type_contact'] == $infos['type_contact']) unset($TContact[$i]);
+ }
}
- }
- $nb = 0;
- foreach($TContact as $infos) {
- $res = $object->add_contact($infos['fk_socpeople'], $infos['type_contact']);
- if($res > 0) $nb++;
- }
+ $nb = 0;
+ foreach($TContact as $infos) {
+ $res = $object->add_contact($infos['fk_socpeople'], $infos['type_contact']);
+ if ($res > 0) $nb++;
+ }
- if($nb > 0) {
- setEventMessages($langs->trans('ContactAddedAutomatically', $nb), null, 'mesgs');
+ if($nb > 0) {
+ setEventMessages($langs->trans('ContactAddedAutomatically', $nb), null, 'mesgs');
+ }
}
}
}
diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php
index cd4d70c2518..d6b6a8676ae 100644
--- a/htdocs/exports/class/export.class.php
+++ b/htdocs/exports/class/export.class.php
@@ -399,8 +399,7 @@ class Export
$szFilterField='
';
break;
case 'Status':
- if (! empty($conf->global->MAIN_ACTIVATE_HTML5)) $szFilterField='
';
- else $szFilterField='
';
+ $szFilterField='
';
break;
case 'Boolean':
$szFilterField='
';
diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php
index 3bada876d2f..5b8e7e60a3b 100644
--- a/htdocs/exports/export.php
+++ b/htdocs/exports/export.php
@@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/export/modules_export.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
// Load translation files required by the page
-$langs->loadlangs(array('exports', 'other', 'users', 'companies', 'projects', 'banks'));
+$langs->loadlangs(array('admin', 'exports', 'other', 'users', 'companies', 'projects', 'suppliers', 'products', 'bank'));
// Everybody should be able to go on this page
//if (! $user->admin)
diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php
index 49e305449ac..23e6802fd0c 100644
--- a/htdocs/fourn/card.php
+++ b/htdocs/fourn/card.php
@@ -85,10 +85,7 @@ if (empty($reshook))
$result=$object->fetch($id);
$object->code_compta_fournisseur=$_POST["supplieraccountancycode"];
$result=$object->update($object->id, $user, 1, 0, 1);
- if ($result < 0)
- {
- $mesg=join(',', $object->errors);
- }
+ if ($result < 0) setEventMessages($object->error, $object->errors, 'errors');
}
// terms of the settlement
if ($action == 'setconditions' && $user->rights->societe->creer)
diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php
index 3dcc2880f34..862e4d6ece5 100644
--- a/htdocs/fourn/facture/list.php
+++ b/htdocs/fourn/facture/list.php
@@ -785,7 +785,7 @@ if ($resql)
if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $sortfield, $sortorder, 'center ');
if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, '', $sortfield, $sortorder, 'center ');
if (! empty($arrayfields['f.fk_mode_reglement']['checked'])) print_liste_field_titre($arrayfields['f.fk_mode_reglement']['label'], $_SERVER["PHP_SELF"], "f.fk_mode_reglement", "", $param, "", $sortfield, $sortorder);
- if (! empty($arrayfields['f.total_ht']['checked'])) print_liste_field_titre($arrayfields['f.total_ht']['label'], $_SERVER['PHP_SELF'], 'f.total', '', $param, '', $sortfield, $sortorder, 'right ');
+ if (! empty($arrayfields['f.total_ht']['checked'])) print_liste_field_titre($arrayfields['f.total_ht']['label'], $_SERVER['PHP_SELF'], 'f.total_ht', '', $param, '', $sortfield, $sortorder, 'right ');
if (! empty($arrayfields['f.total_vat']['checked'])) print_liste_field_titre($arrayfields['f.total_vat']['label'], $_SERVER['PHP_SELF'], 'f.tva', '', $param, '', $sortfield, $sortorder, 'right ');
if (! empty($arrayfields['f.total_localtax1']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax1']['label'], $_SERVER['PHP_SELF'], 'f.localtax1', '', $param, '', $sortfield, $sortorder, 'right ');
if (! empty($arrayfields['f.total_localtax2']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax2']['label'], $_SERVER['PHP_SELF'], 'f.localtax2', '', $param, '', $sortfield, $sortorder, 'right ');
diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php
index ef8df639d26..80a9366186c 100644
--- a/htdocs/hrm/index.php
+++ b/htdocs/hrm/index.php
@@ -225,7 +225,7 @@ if (! empty($conf->holiday->enabled) && $user->rights->holiday->read)
print '';
print ''.$holidaystatic->getNomUrl(1).' ';
- print ''.$userstatic->getNomUrl(-1, 'leave').' ';
+ print ''.$userstatic->getNomUrl(-1, 'leave').' ';
print ''.$typeleaves[$obj->fk_type]['label'].' ';
$starthalfday=($obj->halfday == -1 || $obj->halfday == 2)?'afternoon':'morning';
@@ -304,7 +304,7 @@ if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire)
print ' ';
print ''.$deplacementstatic->getNomUrl(1).' ';
- print ''.$userstatic->getNomUrl(-1).' ';
+ print ''.$userstatic->getNomUrl(-1).' ';
print ''.$obj->km.' ';
print ''.dol_print_date($db->jdate($obj->dm), 'day').' ';
print ''.$deplacementstatic->LibStatut($obj->fk_statut, 3).' ';
@@ -376,7 +376,7 @@ if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire
print ' ';
print ''.$expensereportstatic->getNomUrl(1).' ';
- print ''.$userstatic->getNomUrl(-1).' ';
+ print ''.$userstatic->getNomUrl(-1).' ';
print ''.price($obj->total_ttc).' ';
print ''.dol_print_date($db->jdate($obj->dm), 'day').' ';
print ''.$expensereportstatic->LibStatut($obj->status, 3).' ';
diff --git a/htdocs/index.php b/htdocs/index.php
index c1c6d4a1f63..b0b04075da4 100644
--- a/htdocs/index.php
+++ b/htdocs/index.php
@@ -212,7 +212,7 @@ if (empty($user->societe_id) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTAT
'askprice',
'projects',
'expensereports',
- 'holidays',
+ 'holiday',
'donations'
);
// Dashboard Icon lines
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index c9a794e0f30..12aefa31814 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1070,6 +1070,7 @@ CompanyTown=Town
CompanyCountry=Country
CompanyCurrency=Main currency
CompanyObject=Object of the company
+IDCountry=ID country
Logo=Logo
LogoDesc=Main logo of company. Will be used into generated documents (PDF, ...)
LogoSquarred=Logo (squarred)
diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang
index 9919767db0f..480a2aa91e5 100644
--- a/htdocs/langs/en_US/products.lang
+++ b/htdocs/langs/en_US/products.lang
@@ -213,8 +213,8 @@ UseMultipriceRules=Use price segment rules (defined into product module setup) t
PercentVariationOver=%% variation over %s
PercentDiscountOver=%% discount over %s
KeepEmptyForAutoCalculation=Keep empty to have this calculated automatically from weight or volume of products
-VariantRefExample=Example: COL
-VariantLabelExample=Example: Color
+VariantRefExample=Examples: COL, SIZE
+VariantLabelExample=Examples: Color, Size
### composition fabrication
Build=Produce
ProductsMultiPrice=Products and prices for each price segment
diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php
index 6af2312938b..01d800f23c8 100644
--- a/htdocs/modulebuilder/template/myobject_card.php
+++ b/htdocs/modulebuilder/template/myobject_card.php
@@ -450,7 +450,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
// Clone
if (! empty($user->rights->mymodule->write))
{
- print '';
+ print '' . $langs->trans("ToClone") . ' '."\n";
}
/*
diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php
index c91834e54e5..c36dd3e47a6 100644
--- a/htdocs/product/inventory/inventory.php
+++ b/htdocs/product/inventory/inventory.php
@@ -288,9 +288,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print ''."\n";
}
-
include DOL_DOCUMENT_ROOT.'/product/inventory/tpl/inventory.tpl.php';
-
}
// End of page
diff --git a/htdocs/product/stock/class/productlot.class.php b/htdocs/product/stock/class/productlot.class.php
index f08b290f0b9..3848a592f21 100644
--- a/htdocs/product/stock/class/productlot.class.php
+++ b/htdocs/product/stock/class/productlot.class.php
@@ -53,6 +53,19 @@ class Productlot extends CommonObject
*/
public $ismultientitymanaged = 1;
+ /**
+ * @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
+ */
+ public $fields=array(
+ 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'index'=>1, 'position'=>1, 'comment'=>'Id'),
+ 'batch' =>array('type'=>'varchar(30)', 'label'=>'Batch', 'enabled'=>1, 'visible'=>1, 'notnull'=>0, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'comment'=>'Batch'),
+ 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'default'=>1, 'notnull'=>1, 'index'=>1, 'position'=>20),
+ 'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>500),
+ 'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>501),
+ 'fk_user_author'=>array('type'=>'integer', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>510, 'foreignkey'=>'llx_user.rowid'),
+ 'fk_user_modif' =>array('type'=>'integer', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>511)
+ );
+
/**
* @var int Entity
*/
diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php
index b91c5d9c5ec..328847c6473 100644
--- a/htdocs/product/stock/product.php
+++ b/htdocs/product/stock/product.php
@@ -764,7 +764,7 @@ if (empty($reshook))
if ($user->rights->stock->mouvement->creer)
{
- if (! $variants) {
+ if (! $variants || ! empty($conf->global->VARIANT_ALLOW_STOCK_MOVEMENT_ON_VARIANT_PARENT)) {
print 'id . '&action=correction">' . $langs->trans("CorrectStock") . ' ';
}
else
@@ -780,7 +780,7 @@ if (empty($reshook))
//if (($user->rights->stock->mouvement->creer) && ! $object->hasbatch())
if ($user->rights->stock->mouvement->creer)
{
- if (! $variants) {
+ if (! $variants || ! empty($conf->global->VARIANT_ALLOW_STOCK_MOVEMENT_ON_VARIANT_PARENT)) {
print 'id . '&action=transfert">' . $langs->trans("TransferStock") . ' ';
}
else
@@ -804,8 +804,8 @@ if (! $variants) {
*/
print '';
+ print '
';
- print '';
print '';
print '' . $langs->trans("Warehouse") . ' ';
print '' . $langs->trans("NumberOfUnit") . ' ';
@@ -924,7 +924,8 @@ if (! $variants) {
print '' . dol_print_date($pdluo->eatby, 'day') . ' ';
print '' . dol_print_date($pdluo->sellby, 'day') . ' ';
print '' . $pdluo->qty . ($pdluo->qty < 0 ? ' ' . img_warning() : '') . ' ';
- print ' ';
+ print ' ';
+ print '';
}
}
}
@@ -932,12 +933,13 @@ if (! $variants) {
}
} else dol_print_error($db);
+ // Total line
print '' . $langs->trans("Total") . ': ';
print '' . price2num($total, 'MS') . ' ';
print '';
print ($totalwithpmp ? price(price2num($totalvalue / $totalwithpmp, 'MU')) : ' '); // This value may have rounding errors
print ' ';
-// Value purchase
+ // Value purchase
print '';
print $totalvalue ? price(price2num($totalvalue, 'MT'), 1) : ' ';
print ' ';
@@ -945,12 +947,13 @@ if (! $variants) {
if (empty($conf->global->PRODUIT_MULTIPRICES)) print ($total ? price($totalvaluesell / $total, 1) : ' ');
else print $langs->trans("Variable");
print '';
-// Value to sell
+ // Value to sell
print '';
if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($totalvaluesell, 'MT'), 1);
else print $langs->trans("Variable");
print ' ';
print " ";
+
print "
";
print '';
@@ -1073,6 +1076,7 @@ if (! $variants) {
print '';
print ''.$langs->trans("Total").' ';
print ''.$stock_total.' ';
+ print ' ';
print ' ';
}
else
diff --git a/htdocs/projet/document.php b/htdocs/projet/document.php
index e16e90982a6..10c7a140df7 100644
--- a/htdocs/projet/document.php
+++ b/htdocs/projet/document.php
@@ -62,6 +62,10 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined,
$offset = $conf->liste_limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
+
+if (! empty($conf->global->MAIN_DOC_SORT_FIELD)) { $sortfield=$conf->global->MAIN_DOC_SORT_FIELD; }
+if (! empty($conf->global->MAIN_DOC_SORT_ORDER)) { $sortorder=$conf->global->MAIN_DOC_SORT_ORDER; }
+
if (! $sortorder) $sortorder="ASC";
if (! $sortfield) $sortfield="name";
diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php
index 252329aba60..70d8279e0b3 100644
--- a/htdocs/societe/card.php
+++ b/htdocs/societe/card.php
@@ -827,6 +827,7 @@ if (empty($reshook))
if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->supprimer)
{
$object->fetch($socid);
+ $object->oldcopy = clone $object;
$result = $object->delete($socid, $user);
if ($result > 0)
diff --git a/htdocs/societe/class/api_contacts.class.php b/htdocs/societe/class/api_contacts.class.php
index b2432afe243..cfddddb7b96 100644
--- a/htdocs/societe/class/api_contacts.class.php
+++ b/htdocs/societe/class/api_contacts.class.php
@@ -292,7 +292,7 @@ class Contacts extends DolibarrApi
{
throw new RestException(401, 'Access not allowed for login ' . DolibarrApiAccess::$user->login);
}
-
+ $this->contact->oldcopy = clone $this->contact;
return $this->contact->delete($id);
}
diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php
index 3d2104cc6f2..ed3b26e04ac 100644
--- a/htdocs/societe/class/api_thirdparties.class.php
+++ b/htdocs/societe/class/api_thirdparties.class.php
@@ -418,7 +418,7 @@ class Thirdparties extends DolibarrApi
// External modules should update their ones too
if (!$errors)
{
-$reshook = $hookmanager->executeHooks('replaceThirdparty', array(
+ $reshook = $hookmanager->executeHooks('replaceThirdparty', array(
'soc_origin' => $soc_origin->id,
'soc_dest' => $object->id
), $soc_dest, $action);
@@ -488,6 +488,7 @@ $reshook = $hookmanager->executeHooks('replaceThirdparty', array(
if( ! DolibarrApi::_checkAccessToResource('societe', $this->company->id)) {
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
}
+ $this->company->oldcopy = clone $this->company;
return $this->company->delete($id);
}
diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php
index 54a2bea1d41..971944c4f30 100644
--- a/htdocs/societe/document.php
+++ b/htdocs/societe/document.php
@@ -55,6 +55,10 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined,
$offset = $conf->liste_limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
+
+if (! empty($conf->global->MAIN_DOC_SORT_FIELD)) { $sortfield=$conf->global->MAIN_DOC_SORT_FIELD; }
+if (! empty($conf->global->MAIN_DOC_SORT_ORDER)) { $sortorder=$conf->global->MAIN_DOC_SORT_ORDER; }
+
if (! $sortorder) $sortorder="ASC";
if (! $sortfield) $sortfield="position_name";
diff --git a/htdocs/theme/eldy/btn.inc.php b/htdocs/theme/eldy/btn.inc.php
index c69ee57c17b..a3a952925e3 100644
--- a/htdocs/theme/eldy/btn.inc.php
+++ b/htdocs/theme/eldy/btn.inc.php
@@ -167,10 +167,9 @@ TITLE BUTTON
.btnTitle, a.btnTitle {
display: inline-block;
- padding: 6px 12px;
- font-size: 14px
+ padding: 4px 12px 4px 12px;
font-weight: 400;
- line-height: 1.4;
+ /* line-height: 1; */
text-align: center;
white-space: nowrap;
vertical-align: middle;
@@ -192,6 +191,7 @@ TITLE BUTTON
font-size: 12px;
font-weight: 300;
background-color: #fbfbfb;
+ border: 1px solid #fff;
}
.btnTitle > .btnTitle-icon{
@@ -203,12 +203,13 @@ TITLE BUTTON
}
.btnTitle:hover, a.btnTitle:hover {
+ border: 1px solid #bbb;
border-radius: 3px;
position: relative;
margin: 0 0 0 10px;
text-align: center;
- color: #ffffff;
- background-color: rgb();
+ /* color: #ffffff;
+ background-color: rgb(); */
font-size: 12px;
text-decoration: none;
box-shadow: none;
@@ -222,7 +223,7 @@ TITLE BUTTON
}
.btnTitle:hover .btnTitle-label{
- color: #ffffff;
+ /* color: #ffffff; */
}
.btnTitle.refused .btnTitle-label, .btnTitle.refused:hover .btnTitle-label{
@@ -243,6 +244,15 @@ div.pagination li:first-child a.btnTitle{
color: #aaa;
}
+/* rule to reduce top menu - 2nd reduction: Reduce width of top menu icons again */
+@media only screen and (max-width: global->THEME_ELDY_WITDHOFFSET_FOR_REDUC2) ? round($nbtopmenuentries * 69, 0) + 130 : $conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC2; ?>px) /* reduction 2 */
+{
+ .btnTitle, a.btnTitle {
+ display: inline-block;
+ padding: 4px 4px 4px 4px;
+ min-width: unset;
+ }
+}
global->MAIN_BUTTON_HIDE_UNAUTHORIZED) && (! $user->admin)) { ?>
.butActionRefused, .butActionNewRefused, .btnTitle.refused {
diff --git a/htdocs/theme/eldy/dropdown.inc.php b/htdocs/theme/eldy/dropdown.inc.php
index 22ff1a87a22..30643b0076f 100644
--- a/htdocs/theme/eldy/dropdown.inc.php
+++ b/htdocs/theme/eldy/dropdown.inc.php
@@ -2,7 +2,7 @@
if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
/*