diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php index d4d68dd1c02..9d45b8e86f8 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -118,11 +118,11 @@ if (empty($reshook)) $error=0; $permissiontoadd = $user->rights->bom->write; - $permissiontodelete = $user->rights->bom->delete || ($permissiontoadd && $object->status == 0); + $permissiontodelete = $user->rights->bom->delete || ($permissiontoadd && $object->status == 0); $backurlforlist = dol_buildpath('/bom/bom_list.php', 1); - if (empty($backtopage)) { - if (empty($id)) $backtopage = $backurlforlist; - else $backtopage = dol_buildpath('/bom/bom_card.php', 1).($id > 0 ? $id : '__ID__'); + if (empty($backtopage)) { + if (empty($id)) $backtopage = $backurlforlist; + else $backtopage = dol_buildpath('/bom/bom_card.php', 1).($id > 0 ? $id : '__ID__'); } $triggermodname = 'BILLOFMATERIALS_BILLOFMATERIALS_MODIFY'; // Name of trigger action code to execute when we modify record diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index f660fd3c533..37f6b2bd3f5 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1357,7 +1357,7 @@ dol_syslog(get_class($this)."::updateLine rowid=$rowid, pu=$pu, qty=$qty, remise $sql.= ", p.date_livraison as date_livraison"; $sql.= ", p.model_pdf, p.last_main_doc, p.ref_client, p.extraparams"; $sql.= ", p.note_private, p.note_public"; - $sql.= ", p.fk_projet, p.fk_statut"; + $sql.= ", p.fk_projet as fk_project, p.fk_statut"; $sql.= ", p.fk_user_author, p.fk_user_valid, p.fk_user_cloture"; $sql.= ", p.fk_delivery_address"; $sql.= ", p.fk_availability"; @@ -1412,7 +1412,7 @@ dol_syslog(get_class($this)."::updateLine rowid=$rowid, pu=$pu, qty=$qty, remise $this->total_localtax2 = $obj->localtax2; $this->total_ttc = $obj->total; $this->socid = $obj->fk_soc; - $this->fk_project = $obj->fk_projet; + $this->fk_project = $obj->fk_project; $this->modelpdf = $obj->model_pdf; $this->last_main_doc = $obj->last_main_doc; $this->note = $obj->note_private; // TODO deprecated diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index 5f52246432b..ae1360ff633 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -247,7 +247,7 @@ class Deplacement extends CommonObject */ public function fetch($id, $ref = '') { - $sql = "SELECT rowid, fk_user, type, fk_statut, km, fk_soc, dated, note_private, note_public, fk_projet, extraparams"; + $sql = "SELECT rowid, fk_user, type, fk_statut, km, fk_soc, dated, note_private, note_public, fk_projet as fk_project, extraparams"; $sql.= " FROM ".MAIN_DB_PREFIX."deplacement"; $sql.= " WHERE entity IN (".getEntity('deplacement').")"; if ($ref) $sql.= " AND ref ='".$this->db->escape($ref)."'"; @@ -269,7 +269,7 @@ class Deplacement extends CommonObject $this->statut = $obj->fk_statut; $this->note_private = $obj->note_private; $this->note_public = $obj->note_public; - $this->fk_project = $obj->fk_projet; + $this->fk_project = $obj->fk_project; $this->extraparams = (array) json_decode($obj->extraparams, true); diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 47e91459b8e..08f75f1e28e 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1159,30 +1159,6 @@ class Facture extends CommonInvoice else return -1; } - /** - * Return link to download file from a direct external access - * - * @param int $withpicto Add download picto into link - * @return string HTML link to file - */ - function getDirectExternalLink($withpicto = 0) - { - global $dolibarr_main_url_root; - - // Define $urlwithroot - $urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); - $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file - //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current - - // TODO Read into ecmfile table to get entry and hash exists (PS: If not found, add it) - include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; - $ecmfile=new EcmFiles($this->db); - //$result = $ecmfile->get(); - - $hashp='todo'; - return ''.$this->ref.''; - } - /** * Return clicable link of object (with eventually picto) * diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 405cfeca0b4..ea7879db05e 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -621,7 +621,7 @@ class Contrat extends CommonObject $sql.= " ref_ext,"; $sql.= " fk_user_mise_en_service, date_contrat as datecontrat,"; $sql.= " fk_user_author, fin_validite, date_cloture,"; - $sql.= " fk_projet,"; + $sql.= " fk_projet as fk_project,"; $sql.= " fk_commercial_signature, fk_commercial_suivi,"; $sql.= " note_private, note_public, model_pdf, extraparams"; $sql.= " FROM ".MAIN_DB_PREFIX."contrat"; @@ -672,8 +672,8 @@ class Contrat extends CommonObject $this->note_public = $obj->note_public; $this->modelpdf = $obj->model_pdf; - $this->fk_projet = $obj->fk_projet; // deprecated - $this->fk_project = $obj->fk_projet; + $this->fk_projet = $obj->fk_project; // deprecated + $this->fk_project = $obj->fk_project; $this->socid = $obj->fk_soc; $this->fk_soc = $obj->fk_soc; diff --git a/htdocs/core/class/emailsenderprofile.class.php b/htdocs/core/class/emailsenderprofile.class.php index 5c9797a2407..63172d17566 100644 --- a/htdocs/core/class/emailsenderprofile.class.php +++ b/htdocs/core/class/emailsenderprofile.class.php @@ -303,17 +303,6 @@ class EmailSenderProfile extends CommonObject return $result; } - /** - * Return link to download file from a direct external access - * - * @param int $withpicto Add download picto into link - * @return string HTML link to file - */ - function getDirectExternalLink($withpicto = 0) - { - return 'todo'; - } - /** * Retourne le libelle du status d'un user (actif, inactif) * diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 169511fe160..afb1469da26 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -527,7 +527,7 @@ class Expedition extends CommonObject // Check parameters if (empty($id) && empty($ref) && empty($ref_ext) && empty($ref_int)) return -1; - $sql = "SELECT e.rowid, e.ref, e.fk_soc as socid, e.date_creation, e.ref_customer, e.ref_ext, e.ref_int, e.fk_user_author, e.fk_statut, e.fk_projet, e.billed"; + $sql = "SELECT e.rowid, e.ref, e.fk_soc as socid, e.date_creation, e.ref_customer, e.ref_ext, e.ref_int, e.fk_user_author, e.fk_statut, e.fk_projet as fk_project, e.billed"; $sql.= ", e.weight, e.weight_units, e.size, e.size_units, e.width, e.height"; $sql.= ", e.date_expedition as date_expedition, e.model_pdf, e.fk_address, e.date_delivery"; $sql.= ", e.fk_shipping_method, e.tracking_number"; @@ -575,7 +575,7 @@ class Expedition extends CommonObject $this->origin = ($obj->origin?$obj->origin:'commande'); // For compatibility $this->origin_id = $obj->origin_id; $this->billed = $obj->billed; - $this->fk_project = $obj->fk_projet; + $this->fk_project = $obj->fk_project; $this->trueWeight = $obj->weight; $this->weight_units = $obj->weight_units; diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index e2caa591ad6..43cd79bfe70 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -379,7 +379,7 @@ class Fichinter extends CommonObject $sql.= " f.datec, f.dateo, f.datee, f.datet, f.fk_user_author,"; $sql.= " f.date_valid as datev,"; $sql.= " f.tms as datem,"; - $sql.= " f.duree, f.fk_projet, f.note_public, f.note_private, f.model_pdf, f.extraparams, fk_contrat"; + $sql.= " f.duree, f.fk_projet as fk_project, f.note_public, f.note_private, f.model_pdf, f.extraparams, fk_contrat"; $sql.= " FROM ".MAIN_DB_PREFIX."fichinter as f"; if ($ref) { $sql.= " WHERE f.entity IN (".getEntity('intervention').")"; @@ -407,8 +407,8 @@ class Fichinter extends CommonObject $this->datet = $this->db->jdate($obj->datet); $this->datev = $this->db->jdate($obj->datev); $this->datem = $this->db->jdate($obj->datem); - $this->fk_project = $obj->fk_projet; - $this->note_public = $obj->note_public; + $this->fk_project = $obj->fk_project; + $this->note_public = $obj->note_public; $this->note_private = $obj->note_private; $this->modelpdf = $obj->model_pdf; $this->fk_contrat = $obj->fk_contrat; diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 1229ace57ee..2fa5fad38ac 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -2846,7 +2846,7 @@ function migrate_project_task_actors($db, $langs, $conf) $db->begin(); - $sql = "SELECT fk_projet_task, fk_user FROM ".MAIN_DB_PREFIX."projet_task_actors"; + $sql = "SELECT fk_projet_task as fk_project_task, fk_user FROM ".MAIN_DB_PREFIX."projet_task_actors"; $resql = $db->query($sql); if ($resql) { @@ -2868,7 +2868,7 @@ function migrate_project_task_actors($db, $langs, $conf) $sql2.= ") VALUES ("; $sql2.= "'".$db->idate(dol_now())."'"; $sql2.= ", '4'"; - $sql2.= ", ".$obj->fk_projet_task; + $sql2.= ", ".$obj->fk_project_task; $sql2.= ", '180'"; $sql2.= ", ".$obj->fk_user; $sql2.= ")"; diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index f0797f3f5b2..a1211ead4ee 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -238,7 +238,7 @@ class Task extends CommonObject $sql = "SELECT"; $sql.= " t.rowid,"; $sql.= " t.ref,"; - $sql.= " t.fk_projet,"; + $sql.= " t.fk_projet as fk_project,"; $sql.= " t.fk_task_parent,"; $sql.= " t.label,"; $sql.= " t.description,"; @@ -281,7 +281,7 @@ class Task extends CommonObject $this->id = $obj->rowid; $this->ref = $obj->ref; - $this->fk_project = $obj->fk_projet; + $this->fk_project = $obj->fk_project; $this->fk_task_parent = $obj->fk_task_parent; $this->label = $obj->label; $this->description = $obj->description; diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 6166aae1e8a..8f4d1de13f4 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -838,6 +838,7 @@ if ($source == 'order') // Debitor print ''.$langs->trans("ThirdParty"); print ''.$order->thirdparty->name.''; + print ''."\n"; // Object $text=''.$langs->trans("PaymentOrderRef", $order->ref).''; @@ -958,6 +959,7 @@ if ($source == 'invoice') // Debitor print ''.$langs->trans("ThirdParty"); print ''.$invoice->thirdparty->name.''; + print ''."\n"; // Object $text=''.$langs->trans("PaymentInvoiceRef", $invoice->ref).''; @@ -1009,15 +1011,6 @@ if ($source == 'invoice') print ''; print ''."\n"; - // Add download link - if ($download > 0) - { - print ''.$langs->trans("Document"); - print ''; - print $invoice->getDirectExternalLink(1); - print ''."\n"; - } - // Shipping address $shipToName=$invoice->thirdparty->name; $shipToStreet=$invoice->thirdparty->address; @@ -1295,22 +1288,20 @@ if ($source == 'membersubscription') $fulltag=dol_string_unaccent($fulltag); // Creditor - print ''.$langs->trans("Creditor"); print ''.$creditor.''; print ''; print ''."\n"; // Debitor - print ''.$langs->trans("Member"); print ''; if ($member->morphy == 'mor' && ! empty($member->societe)) print $member->societe; else print $member->getFullName($langs); print ''; + print ''."\n"; // Object - $text=''.$langs->trans("PaymentSubscription").''; if (GETPOST('desc', 'alpha')) $text=''.$langs->trans(GETPOST('desc', 'alpha')).''; print ''.$langs->trans("Designation"); @@ -1343,7 +1334,6 @@ if ($source == 'membersubscription') } // Amount - print ''.$langs->trans("Amount"); if (empty($amount)) { @@ -1391,7 +1381,6 @@ if ($source == 'membersubscription') print ''."\n"; // Tag - print ''.$langs->trans("PaymentCode"); print ''.$fulltag.''; print ''; @@ -1463,22 +1452,20 @@ if ($source == 'donation') $fulltag=dol_string_unaccent($fulltag); // Creditor - print ''.$langs->trans("Creditor"); print ''.$creditor.''; print ''; print ''."\n"; // Debitor - print ''.$langs->trans("ThirdParty"); print ''; if ($don->morphy == 'mor' && ! empty($don->societe)) print $don->societe; else print $don->getFullName($langs); print ''; + print ''."\n"; // Object - $text=''.$langs->trans("PaymentDonation").''; if (GETPOST('desc', 'alpha')) $text=''.$langs->trans(GETPOST('desc', 'alpha')).''; print ''.$langs->trans("Designation"); @@ -1488,7 +1475,6 @@ if ($source == 'donation') print ''."\n"; // Amount - print ''.$langs->trans("Amount"); if (empty($amount)) { @@ -1536,7 +1522,6 @@ if ($source == 'donation') print ''."\n"; // Tag - print ''.$langs->trans("PaymentCode"); print ''.$fulltag.''; print ''; diff --git a/htdocs/societe/class/societeaccount.class.php b/htdocs/societe/class/societeaccount.class.php index 89960a69aee..80d98875e39 100644 --- a/htdocs/societe/class/societeaccount.class.php +++ b/htdocs/societe/class/societeaccount.class.php @@ -401,17 +401,6 @@ class SocieteAccount extends CommonObject return $result; } - /** - * Return link to download file from a direct external access - * - * @param int $withpicto Add download picto into link - * @return string HTML link to file - */ - function getDirectExternalLink($withpicto = 0) - { - return 'todo'; - } - /** * Retourne le libelle du status d'un user (actif, inactif) * diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index bf731262cbd..24ce18bf676 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -1226,7 +1226,7 @@ class SupplierProposal extends CommonObject $sql.= ", p.date_livraison as date_livraison"; $sql.= ", p.model_pdf, p.extraparams"; $sql.= ", p.note_private, p.note_public"; - $sql.= ", p.fk_projet, p.fk_statut"; + $sql.= ", p.fk_projet as fk_project, p.fk_statut"; $sql.= ", p.fk_user_author, p.fk_user_valid, p.fk_user_cloture"; $sql.= ", p.fk_cond_reglement"; $sql.= ", p.fk_mode_reglement"; @@ -1266,7 +1266,7 @@ class SupplierProposal extends CommonObject $this->total_localtax2 = $obj->localtax2; $this->total_ttc = $obj->total; $this->socid = $obj->fk_soc; - $this->fk_project = $obj->fk_projet; + $this->fk_project = $obj->fk_project; $this->modelpdf = $obj->model_pdf; $this->note = $obj->note_private; // TODO deprecated $this->note_private = $obj->note_private; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index f4134650674..51f9d8d2990 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1591,8 +1591,10 @@ div.tmenudiv { div.tmenudisabled, a.tmenudisabled { opacity: 0.6; } +a.tmenu, a.tmenusel, a.tmenudisabled { + font-weight: 300; +} a.tmenudisabled:link, a.tmenudisabled:visited, a.tmenudisabled:hover, a.tmenudisabled:active { - font-weight: normal; padding: 0px 5px 0px 5px; white-space: nowrap; color: #; @@ -1601,14 +1603,12 @@ a.tmenudisabled:link, a.tmenudisabled:visited, a.tmenudisabled:hover, a.tmenudis } a.tmenu:link, a.tmenu:visited, a.tmenu:hover, a.tmenu:active { - font-weight: normal; padding: 0px 4px 0px 4px; white-space: nowrap; color: #; text-decoration: none; } a.tmenusel:link, a.tmenusel:visited, a.tmenusel:hover, a.tmenusel:active { - font-weight: normal; padding: 0px 4px 0px 4px; margin: 0px 0px 0px 0px; white-space: nowrap; @@ -2162,8 +2162,8 @@ input.vmenusearchselectcombo[type=text] { .searchform input { font-size: 16px; } -a.vmenu:link, a.vmenu:visited, a.vmenu:hover, a.vmenu:active, span.vmenu { white-space: nowrap; font-family: ; text-align: ; font-weight: bold; } -font.vmenudisabled { font-family: ; text-align: ; font-weight: bold; color: #aaa; margin-left: 4px; } +a.vmenu:link, a.vmenu:visited, a.vmenu:hover, a.vmenu:active, span.vmenu { white-space: nowrap; font-family: ; text-align: ; font-weight: bold; } /* bold = 600, 500 is ko with Edge on 1200x960 */ +font.vmenudisabled { font-family: ; text-align: ; font-weight: bold; color: #aaa; margin-left: 4px; } /* bold = 600, 500 is ko with Edge on 1200x960 */ a.vmenu:link, a.vmenu:visited { color: #; } a.vsmenu:link, a.vsmenu:visited, a.vsmenu:hover, a.vsmenu:active, span.vsmenu { font-family: ; text-align: ; font-weight: normal; color: #202020; margin: 1px 1px 1px 6px; } diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php index a41345820b4..25ee449b889 100644 --- a/htdocs/user/group/card.php +++ b/htdocs/user/group/card.php @@ -35,12 +35,15 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; $canreadperms=($user->admin || $user->rights->user->user->lire); $caneditperms=($user->admin || $user->rights->user->user->creer); $candisableperms=($user->admin || $user->rights->user->user->supprimer); +$feature2 = 'user'; + // Advanced permissions if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { $canreadperms=($user->admin || $user->rights->user->group_advance->read); $caneditperms=($user->admin || $user->rights->user->group_advance->write); $candisableperms=($user->admin || $user->rights->user->group_advance->delete); + $feature2 = 'group_advance'; } // Load translation files required by page @@ -55,7 +58,7 @@ $contextpage = GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'groupc $userid = GETPOST('user', 'int'); // Security check -$result = restrictedArea($user, 'user', $id, 'usergroup&usergroup', 'user'); +$result = restrictedArea($user, 'user', $id, 'usergroup&usergroup', $feature2); // Users/Groups management only in master entity if transverse mode if (! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)