Merge branch 'Dolibarr:develop' into fboitel-dev-scrutinizer-008
This commit is contained in:
commit
4d4dca95fb
@ -99,6 +99,8 @@ if ($action == 'update') {
|
||||
$error = 0;
|
||||
|
||||
if ($mode == 'template') {
|
||||
//dolibarr_del_const($db, "MAIN_THEME", 0); // To be sure we don't have this constant set for all entities
|
||||
|
||||
dolibarr_set_const($db, "MAIN_THEME", GETPOST("main_theme", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
|
||||
@ -1821,8 +1821,9 @@ if ($resql) {
|
||||
$total_ht = 0;
|
||||
$total_margin = 0;
|
||||
|
||||
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||
$last_num = min($num, $limit);
|
||||
while ($i < $last_num) {
|
||||
while ($i < $imaxinloop) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
$notshippable = 0;
|
||||
@ -2457,6 +2458,17 @@ if ($resql) {
|
||||
// Show total line
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
|
||||
|
||||
// If no record found
|
||||
if ($num == 0) {
|
||||
$colspan = 1;
|
||||
foreach ($arrayfields as $key => $val) {
|
||||
if (!empty($val['checked'])) {
|
||||
$colspan++;
|
||||
}
|
||||
}
|
||||
print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
|
||||
}
|
||||
|
||||
$db->free($resql);
|
||||
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
|
||||
|
||||
@ -6148,7 +6148,7 @@ abstract class CommonObject
|
||||
//var_dump($this->oldcopy);exit;
|
||||
if (is_object($this->oldcopy)) { // If this->oldcopy is not defined, we can't know if we change attribute or not, so we must keep value
|
||||
//var_dump($this->oldcopy->array_options[$key]); var_dump($this->array_options[$key]);
|
||||
if ($this->array_options[$key] == $this->oldcopy->array_options[$key]) { // If old value crypted in database is same than submited new value, it means we don't change it, so we don't update.
|
||||
if (isset($this->oldcopy->array_options[$key]) && $this->array_options[$key] == $this->oldcopy->array_options[$key]) { // If old value crypted in database is same than submited new value, it means we don't change it, so we don't update.
|
||||
$new_array_options[$key] = $this->array_options[$key]; // Value is kept
|
||||
} else {
|
||||
// var_dump($algo);
|
||||
@ -7556,11 +7556,15 @@ abstract class CommonObject
|
||||
if ($classname && class_exists($classname)) {
|
||||
$object = new $classname($this->db);
|
||||
if ($object->element === 'product') { // Special cas for product because default valut of fetch are wrong
|
||||
$object->fetch($value, '', '', '', 0, 1, 1);
|
||||
$result = $object->fetch($value, '', '', '', 0, 1, 1);
|
||||
} else {
|
||||
$object->fetch($value);
|
||||
$result = $object->fetch($value);
|
||||
}
|
||||
if ($result > 0) {
|
||||
$value = $object->getNomUrl($getnomurlparam, $getnomurlparam2);
|
||||
} else {
|
||||
$value = '';
|
||||
}
|
||||
$value = $object->getNomUrl($getnomurlparam, $getnomurlparam2);
|
||||
}
|
||||
} else {
|
||||
dol_syslog('Error bad setup of extrafield', LOG_WARNING);
|
||||
|
||||
@ -3502,7 +3502,7 @@ function dolGetCountryCodeFromIp($ip)
|
||||
$countrycode = '';
|
||||
|
||||
if (!empty($conf->geoipmaxmind->enabled)) {
|
||||
$datafile = $conf->global->GEOIPMAXMIND_COUNTRY_DATAFILE;
|
||||
$datafile = getDolGlobalString('GEOIPMAXMIND_COUNTRY_DATAFILE');
|
||||
//$ip='24.24.24.24';
|
||||
//$datafile='/usr/share/GeoIP/GeoIP.dat'; Note that this must be downloaded datafile (not same than datafile provided with ubuntu packages)
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgeoip.class.php';
|
||||
@ -3529,7 +3529,7 @@ function dol_user_country()
|
||||
$ret = '';
|
||||
if (!empty($conf->geoipmaxmind->enabled)) {
|
||||
$ip = getUserRemoteIP();
|
||||
$datafile = $conf->global->GEOIPMAXMIND_COUNTRY_DATAFILE;
|
||||
$datafile = getDolGlobalString('GEOIPMAXMIND_COUNTRY_DATAFILE');
|
||||
//$ip='24.24.24.24';
|
||||
//$datafile='E:\Mes Sites\Web\Admin1\awstats\maxmind\GeoIP.dat';
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgeoip.class.php';
|
||||
|
||||
@ -372,7 +372,12 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
||||
print '</th></tr>';
|
||||
}
|
||||
|
||||
print '<tr><td colspan="'.$colspan.'">';
|
||||
print '<tr><td colspan="'.$colspan.'" class="center">';
|
||||
|
||||
if (!empty($conf->global->MAIN_FORCETHEME)) {
|
||||
$langs->load("errors");
|
||||
print $langs->trans("WarningThemeForcedTo", $conf->global->MAIN_FORCETHEME);
|
||||
}
|
||||
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td><div class="center">';
|
||||
|
||||
|
||||
@ -63,9 +63,11 @@ foreach ($object->fields as $key => $val) {
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="valuefieldcreate">';
|
||||
|
||||
if (!empty($val['picto'])) {
|
||||
print img_picto('', $val['picto'], '', false, 0, 0, '', 'pictofixedwidth');
|
||||
}
|
||||
|
||||
if (in_array($val['type'], array('int', 'integer'))) {
|
||||
$value = GETPOSTISSET($key) ?GETPOST($key, 'int') : $object->$key;
|
||||
} elseif ($val['type'] == 'double') {
|
||||
@ -78,6 +80,8 @@ foreach ($object->fields as $key => $val) {
|
||||
$check = 'restricthtml';
|
||||
}
|
||||
$value = GETPOSTISSET($key) ? GETPOST($key, $check) : $object->$key;
|
||||
} elseif (in_array($val['type'], array('date', 'datetime'))) {
|
||||
$value = GETPOSTISSET($key) ? dol_mktime(GETPOST($key.'hour', 'int'), GETPOST($key.'min', 'int'), GETPOST($key.'sec', 'int'), GETPOST($key.'month', 'int'), GETPOST($key.'day', 'int'), GETPOST($key.'year', 'int')) : $object->$key;
|
||||
} elseif ($val['type'] == 'price') {
|
||||
$value = GETPOSTISSET($key) ? price2num(GETPOST($key)) : price2num($object->$key);
|
||||
} elseif ($key == 'lang') {
|
||||
|
||||
@ -294,8 +294,9 @@ $suburi = strstr($uri, '/'); // $suburi contains url without domain:port
|
||||
if ($suburi == '/') {
|
||||
$suburi = ''; // If $suburi is /, it is now ''
|
||||
}
|
||||
define('DOL_URL_ROOT', $suburi); // URL relative root ('', '/dolibarr', ...)
|
||||
|
||||
if (!defined('DOL_URL_ROOT')) {
|
||||
define('DOL_URL_ROOT', $suburi); // URL relative root ('', '/dolibarr', ...)
|
||||
}
|
||||
//print DOL_MAIN_URL_ROOT.'-'.DOL_URL_ROOT."\n";
|
||||
|
||||
// Define prefix MAIN_DB_PREFIX
|
||||
|
||||
@ -209,6 +209,12 @@ $arrayfields = dol_sort_array($arrayfields, 'position');
|
||||
|
||||
$error = 0;
|
||||
|
||||
$permissiontoread = ($user->rights->fournisseur->commande->lire || $user->rights->supplier_order->lire);
|
||||
$permissiontoadd = ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer);
|
||||
$permissiontodelete = ($user->rights->fournisseur->commande->supprimer || $user->rights->supplier_order->supprimer);
|
||||
$permissiontovalidate = $permissiontoadd;
|
||||
$permissiontoapprove = ($user->rights->fournisseur->commande->approuver || $user->rights->supplier_order->approuver);
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -302,9 +308,6 @@ if (empty($reshook)) {
|
||||
// Mass actions
|
||||
$objectclass = 'CommandeFournisseur';
|
||||
$objectlabel = 'SupplierOrders';
|
||||
$permissiontoread = $user->rights->fournisseur->commande->lire;
|
||||
$permissiontodelete = $user->rights->fournisseur->commande->supprimer;
|
||||
$permissiontovalidate = $user->rights->fournisseur->commande->creer;
|
||||
$uploaddir = $conf->fournisseur->commande->dir_output;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||
|
||||
@ -321,7 +324,7 @@ if (empty($reshook)) {
|
||||
$result = $objecttmp->valid($user);
|
||||
if ($result >= 0) {
|
||||
// If we have permission, and if we don't need to provide the idwarehouse, we go directly on approved step
|
||||
if (empty($conf->global->SUPPLIER_ORDER_NO_DIRECT_APPROVE) && $user->rights->fournisseur->commande->approuver && !(!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) && $objecttmp->hasProductsOrServices(1))) {
|
||||
if (empty($conf->global->SUPPLIER_ORDER_NO_DIRECT_APPROVE) && $permissiontoapprove && !(!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) && $objecttmp->hasProductsOrServices(1))) {
|
||||
$result = $objecttmp->approve($user);
|
||||
setEventMessages($langs->trans("SupplierOrderValidatedAndApproved"), array($objecttmp->ref));
|
||||
} else {
|
||||
@ -1096,7 +1099,7 @@ if ($resql) {
|
||||
);
|
||||
|
||||
if ($permissiontovalidate) {
|
||||
if ($user->rights->fournisseur->commande->approuver && empty($conf->global->SUPPLIER_ORDER_NO_DIRECT_APPROVE)) {
|
||||
if ($permissiontoapprove && empty($conf->global->SUPPLIER_ORDER_NO_DIRECT_APPROVE)) {
|
||||
$arrayofmassactions['prevalidate'] = img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("ValidateAndApprove");
|
||||
} else {
|
||||
$arrayofmassactions['prevalidate'] = img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate");
|
||||
@ -1106,7 +1109,7 @@ if ($resql) {
|
||||
if ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer) {
|
||||
$arrayofmassactions['createbills'] = img_picto('', 'bill', 'class="pictofixedwidth"').$langs->trans("CreateInvoiceForThisSupplier");
|
||||
}
|
||||
if ($user->rights->fournisseur->commande->supprimer) {
|
||||
if ($permissiontodelete) {
|
||||
$arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
|
||||
}
|
||||
if (in_array($massaction, array('presend', 'predelete', 'createbills'))) {
|
||||
@ -1119,7 +1122,7 @@ if ($resql) {
|
||||
$url .= '&socid='.((int) $socid);
|
||||
$url .= '&backtopage='.urlencode(DOL_URL_ROOT.'/fourn/commande/list.php?socid='.((int) $socid));
|
||||
}
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewSupplierOrderShort'), '', 'fa fa-plus-circle', $url, '', ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer));
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewSupplierOrderShort'), '', 'fa fa-plus-circle', $url, '', $permissitiontoadd);
|
||||
|
||||
// Lines of title fields
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
@ -1532,7 +1535,9 @@ if ($resql) {
|
||||
$totalarray = array('nbfield' => 0, 'val' => array(), 'pos' => array());
|
||||
$totalarray['val']['cf.total_ht'] = 0;
|
||||
$totalarray['val']['cf.total_ttc'] = 0;
|
||||
while ($i < min($num, $limit)) {
|
||||
|
||||
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||
while ($i < $imaxinloop) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
$notshippable = 0;
|
||||
@ -1855,6 +1860,17 @@ if ($resql) {
|
||||
// Show total line
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
|
||||
|
||||
// If no record found
|
||||
if ($num == 0) {
|
||||
$colspan = 1;
|
||||
foreach ($arrayfields as $key => $val) {
|
||||
if (!empty($val['checked'])) {
|
||||
$colspan++;
|
||||
}
|
||||
}
|
||||
print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
|
||||
}
|
||||
|
||||
$db->free($resql);
|
||||
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
|
||||
@ -1876,8 +1892,8 @@ if ($resql) {
|
||||
$urlsource .= str_replace('&', '&', $param);
|
||||
|
||||
$filedir = $diroutputmassaction;
|
||||
$genallowed = ($user->rights->fournisseur->commande->lire || $user->rights->supplier_order->lire);
|
||||
$delallowed = ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer);
|
||||
$genallowed = $permissiontoread;
|
||||
$delallowed = $permissiontoadd;
|
||||
|
||||
print $formfile->showdocuments('massfilesarea_supplier_order', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty);
|
||||
} else {
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Class to manage intracomm report
|
||||
*/
|
||||
@ -285,34 +286,34 @@ class IntracommReport extends CommonObject
|
||||
global $mysoc, $conf;
|
||||
|
||||
if ($type == 'expedition' || $exporttype == 'des') {
|
||||
$sql = 'SELECT f.ref as refinvoice, f.total_ht';
|
||||
$sql = "SELECT f.ref as refinvoice, f.total_ht";
|
||||
$table = 'facture';
|
||||
$table_extraf = 'facture_extrafields';
|
||||
$tabledet = 'facturedet';
|
||||
$field_link = 'fk_facture';
|
||||
} else { // Introduction
|
||||
$sql = 'SELECT f.ref_supplier as refinvoice, f.total_ht';
|
||||
$sql = "SELECT f.ref_supplier as refinvoice, f.total_ht";
|
||||
$table = 'facture_fourn';
|
||||
$table_extraf = 'facture_fourn_extrafields';
|
||||
$tabledet = 'facture_fourn_det';
|
||||
$field_link = 'fk_facture_fourn';
|
||||
}
|
||||
$sql .= ', l.fk_product, l.qty
|
||||
$sql .= ", l.fk_product, l.qty
|
||||
, p.weight, p.rowid as id_prod, p.customcode
|
||||
, s.rowid as id_client, s.nom, s.zip, s.fk_pays, s.tva_intra
|
||||
, c.code
|
||||
, ext.mode_transport
|
||||
FROM '.MAIN_DB_PREFIX.$tabledet.' l
|
||||
INNER JOIN '.MAIN_DB_PREFIX.$table.' f ON (f.rowid = l.'.$field_link.')
|
||||
LEFT JOIN '.MAIN_DB_PREFIX.$table_extraf.' ext ON (ext.fk_object = f.rowid)
|
||||
INNER JOIN '.MAIN_DB_PREFIX.'product p ON (p.rowid = l.fk_product)
|
||||
INNER JOIN '.MAIN_DB_PREFIX.'societe s ON (s.rowid = f.fk_soc)
|
||||
LEFT JOIN '.MAIN_DB_PREFIX.'c_country c ON (c.rowid = s.fk_pays)
|
||||
FROM ".MAIN_DB_PREFIX.$tabledet." l
|
||||
INNER JOIN ".MAIN_DB_PREFIX.$table." f ON (f.rowid = l.".$this->db->escape($field_link).")
|
||||
LEFT JOIN ".MAIN_DB_PREFIX.$table_extraf." ext ON (ext.fk_object = f.rowid)
|
||||
INNER JOIN ".MAIN_DB_PREFIX."product p ON (p.rowid = l.fk_product)
|
||||
INNER JOIN ".MAIN_DB_PREFIX."societe s ON (s.rowid = f.fk_soc)
|
||||
LEFT JOIN ".MAIN_DB_PREFIX."c_country c ON (c.rowid = s.fk_pays)
|
||||
WHERE f.fk_statut > 0
|
||||
AND l.product_type = '.($exporttype == 'des' ? 1 : 0).'
|
||||
AND f.entity = '.$conf->entity.'
|
||||
AND (s.fk_pays <> '.$mysoc->country_id.' OR s.fk_pays IS NULL)
|
||||
AND f.datef BETWEEN "'.$period_reference.'-01" AND "'.$period_reference.'-'.date('t').'"';
|
||||
AND l.product_type = ".($exporttype == "des" ? 1 : 0)."
|
||||
AND f.entity = ".((int) $conf->entity)."
|
||||
AND (s.fk_pays <> ".((int) $mysoc->country_id)." OR s.fk_pays IS NULL)
|
||||
AND f.datef BETWEEN '".$this->db->escape($period_reference)."-01' AND '".$this->db->escape($period_reference)."-".date('t')."'";
|
||||
|
||||
return $sql;
|
||||
}
|
||||
@ -398,27 +399,27 @@ class IntracommReport extends CommonObject
|
||||
}
|
||||
|
||||
foreach ($TLinesFraisDePort as $res) {
|
||||
$sql = 'SELECT p.customcode
|
||||
FROM '.MAIN_DB_PREFIX.$tabledet.' d
|
||||
INNER JOIN '.MAIN_DB_PREFIX.$table.' f ON (f.rowid = d.'.$field_link.')
|
||||
INNER JOIN '.MAIN_DB_PREFIX.'product p ON (p.rowid = d.fk_product)
|
||||
$sql = "SELECT p.customcode
|
||||
FROM ".MAIN_DB_PREFIX.$tabledet." d
|
||||
INNER JOIN ".MAIN_DB_PREFIX.$table." f ON (f.rowid = d.".$this->db->escape($field_link).")
|
||||
INNER JOIN ".MAIN_DB_PREFIX."product p ON (p.rowid = d.fk_product)
|
||||
WHERE d.fk_product IS NOT NULL
|
||||
AND f.entity = '.$conf->entity.'
|
||||
AND '.$more_sql.' = "'.$res->refinvoice.'"
|
||||
AND f.entity = ".((int) $conf->entity)."
|
||||
AND ".$more_sql." = '".$this->db->escape($res->refinvoice)."'
|
||||
AND d.total_ht =
|
||||
(
|
||||
SELECT MAX(d.total_ht)
|
||||
FROM '.MAIN_DB_PREFIX.$tabledet.' d
|
||||
INNER JOIN '.MAIN_DB_PREFIX.$table.' f ON (f.rowid = d.'.$field_link.')
|
||||
FROM ".MAIN_DB_PREFIX.$tabledet." d
|
||||
INNER JOIN ".MAIN_DB_PREFIX.$table." f ON (f.rowid = d.".$this->db->escape($field_link).")
|
||||
WHERE d.fk_product IS NOT NULL
|
||||
AND '.$more_sql.' = "'.$res->refinvoice.'"
|
||||
AND ".$more_sql." = '".$this->db->escape($res->refinvoice)."'
|
||||
AND d.fk_product NOT IN
|
||||
(
|
||||
SELECT fk_product
|
||||
FROM '.MAIN_DB_PREFIX.'categorie_product
|
||||
WHERE fk_categorie = '.((int) $categ_fraisdeport->id).'
|
||||
FROM ".MAIN_DB_PREFIX."categorie_product
|
||||
WHERE fk_categorie = ".((int) $categ_fraisdeport->id)."
|
||||
)
|
||||
)';
|
||||
)";
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
$ress = $this->db->fetch_object($resql);
|
||||
@ -436,7 +437,8 @@ class IntracommReport extends CommonObject
|
||||
*/
|
||||
public function getNextDeclarationNumber()
|
||||
{
|
||||
$sql = 'SELECT MAX(numero_declaration) as max_declaration_number FROM '.MAIN_DB_PREFIX.$this->table_element." WHERE exporttype='".$this->db->escape($this->exporttype)."'";
|
||||
$sql = "SELECT MAX(numero_declaration) as max_declaration_number FROM ".MAIN_DB_PREFIX.$this->table_element;
|
||||
$sql .= " WHERE exporttype = '".$this->db->escape($this->exporttype)."'";
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$res = $this->db->fetch_object($resql);
|
||||
|
||||
@ -287,6 +287,7 @@ ErrorInvoiceLoadThirdParty=Can't load third-party object for invoice "%s"
|
||||
ErrorInvoiceLoadThirdPartyKey=Third-party key "%s" no set for invoice "%s"
|
||||
ErrorDeleteLineNotAllowedByObjectStatus=Delete line is not allowed by current object status
|
||||
ErrorAjaxRequestFailed=Request failed
|
||||
ErrorThirpdartyOrMemberidIsMandatory=Third party or Member of partnership is mandatory
|
||||
|
||||
# Warnings
|
||||
WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup.
|
||||
@ -321,7 +322,8 @@ WarningCreateSubAccounts=Warning, you can't create directly a sub account, you m
|
||||
WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection.
|
||||
WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here.
|
||||
WarningPaypalPaymentNotCompatibleWithStrict=The value 'Strict' makes the online payment features not working correctly. Use 'Lax' instead.
|
||||
|
||||
WarningThemeForcedTo=Warning, theme has been forced to <b>%s</b> by hidden constant MAIN_FORCETHEME
|
||||
|
||||
# Validate
|
||||
RequireValidValue = Value not valid
|
||||
RequireAtLeastXString = Requires at least %s character(s)
|
||||
|
||||
@ -247,7 +247,7 @@ class Partnership extends CommonObject
|
||||
public function create(User $user, $notrigger = false)
|
||||
{
|
||||
if ($this->fk_soc <= 0 && $this->fk_member <= 0) {
|
||||
$this->error[] = "ErrorThirpdartyOrMemberidIsManadatory";
|
||||
$this->error[] = "ErrorThirpdartyOrMemberidIsMandatory";
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -555,7 +555,7 @@ class Partnership extends CommonObject
|
||||
public function update(User $user, $notrigger = false)
|
||||
{
|
||||
if ($this->fk_soc <= 0 && $this->fk_member <= 0) {
|
||||
$this->error[] = "ErrorThirpdartyOrMemberidIsManadatory";
|
||||
$this->error[] = "ErrorThirpdartyOrMemberidIsMandatory";
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -2377,6 +2377,9 @@ img.photoref, div.photoref {
|
||||
width: 80px;
|
||||
object-fit: contain;
|
||||
}
|
||||
img.photokanban, div.photokanban {
|
||||
padding: 0;
|
||||
}
|
||||
div.photoref .fa, div.photoref .fas, div.photoref .far {
|
||||
font-size: 2.5em;
|
||||
}
|
||||
@ -5339,11 +5342,11 @@ td.cal_other_month {
|
||||
/* ============================================================================== */
|
||||
|
||||
/* CSS for treeview */
|
||||
.treeview ul { background-color: transparent !important; margin-bottom: 4px !important; margin-top: 0 !important; padding-top: 2px !important; }
|
||||
.treeview li { background-color: transparent !important; padding: 0 0 0 16px !important; min-height: 30px; }
|
||||
.treeview ul { background-color: transparent !important; margin-top: 0 !important; /* margin-bottom: 4px !important; padding-top: 2px !important; */ }
|
||||
.treeview li { background-color: transparent !important; padding: 0 0 0 20px !important; min-height: 30px; }
|
||||
.treeview .hitarea { width: 20px !important; margin-left: -20px !important; margin-top: 3px; }
|
||||
.treeview li table { min-height: 30px; }
|
||||
.treeview .hover { color: var(--colortextlink) !important; text-decoration: underline !important; }
|
||||
.treeview .hitarea { margin-top: 3px; }
|
||||
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
@ -489,6 +489,7 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) {
|
||||
.box-flex-container {
|
||||
margin: 0 0 0 0px !important;
|
||||
width: 100% !important;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.info-box-module {
|
||||
width: 100%;
|
||||
|
||||
@ -193,7 +193,9 @@ a.info-box-text-a i.fa.fa-exclamation-triangle {
|
||||
filter: saturate(<?php echo $conf->global->THEME_SATURATE_RATIO; ?>);
|
||||
<?php } ?>
|
||||
}
|
||||
|
||||
.info-box-sm .info-box-icon {
|
||||
height: 80px;
|
||||
width: 80px;
|
||||
font-size: 25px;
|
||||
line-height: 92px;
|
||||
|
||||
@ -2399,6 +2399,11 @@ img.photoref, div.photoref {
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
img.photokanban, div.photokanban {
|
||||
padding: 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
div.photoref .fa, div.photoref .fas, div.photoref .far {
|
||||
font-size: 2.5em;
|
||||
}
|
||||
@ -4110,7 +4115,8 @@ tr.liste_titre_topborder td {
|
||||
background: transparent;
|
||||
}
|
||||
tr.liste_titre:last-child th.liste_titre, tr.liste_titre:last-child th.liste_titre_sel, tr.liste_titre td.liste_titre, tr.liste_titre td.liste_titre_sel, form.liste_titre div.tagtd { /* For last line of table headers only */
|
||||
border-bottom: 1px solid var(--colortopbordertitle1);
|
||||
/* border-bottom: 1px solid var(--colortopbordertitle1); */
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
div.liste_titre {
|
||||
@ -5180,11 +5186,11 @@ td.gtaskname {
|
||||
/* ============================================================================== */
|
||||
|
||||
/* CSS for treeview */
|
||||
.treeview ul { background-color: transparent !important; margin-bottom: 4px !important; margin-top: 0 !important; padding-top: 8px !important; }
|
||||
.treeview li { background-color: transparent !important; padding: 0 0 0 16px !important; min-height: 30px; }
|
||||
.treeview ul { background-color: transparent !important; margin-top: 0 !important; /* margin-bottom: 4px !important; padding-top: 2px !important; */ }
|
||||
.treeview li { background-color: transparent !important; padding: 0 0 0 20px !important; min-height: 30px; }
|
||||
.treeview .hitarea { width: 20px !important; margin-left: -20px !important; margin-top: 3px; }
|
||||
.treeview li table { min-height: 30px; }
|
||||
.treeview .hover { color: var(--colortextlink) !important; text-decoration: underline !important; }
|
||||
.treeview .hitarea { margin-top: 3px; }
|
||||
|
||||
|
||||
|
||||
|
||||
@ -2964,7 +2964,18 @@ class User extends CommonObject
|
||||
$return = '<div class="box-flex-item box-flex-grow-zero">';
|
||||
$return .= '<div class="info-box info-box-sm">';
|
||||
$return .= '<span class="info-box-icon bg-infobox-action">';
|
||||
$return .= img_picto('', $this->picto);
|
||||
|
||||
$label = '';
|
||||
if (!empty($this->photo)) {
|
||||
//$label .= '<div class="photointooltip floatright">';
|
||||
$label .= Form::showphoto('userphoto', $this, 0, 60, 0, 'photokanban photoref photowithmargin photologintooltip', 'small', 0, 1); // Force height to 60 so we total height of tooltip can be calculated and collision can be managed
|
||||
//$label .= '</div>';
|
||||
//$label .= '<div style="clear: both;"></div>';
|
||||
$return .= $label;
|
||||
} else {
|
||||
$return .= img_picto('', $this->picto);
|
||||
}
|
||||
|
||||
//$return .= '<i class="fa fa-dol-action"></i>'; // Can be image
|
||||
$return .= '</span>';
|
||||
$return .= '<div class="info-box-content">';
|
||||
@ -2972,6 +2983,9 @@ class User extends CommonObject
|
||||
if (property_exists($this, 'label')) {
|
||||
$return .= '<br><span class="info-box-label opacitymedium">'.$this->label.'</span>';
|
||||
}
|
||||
if ($this->email) {
|
||||
$return .= '<br><span class="info-box-label opacitymedium small">'.img_picto('', 'email').' '.$this->email.'</span>';
|
||||
}
|
||||
if (method_exists($this, 'getLibStatut')) {
|
||||
$return .= '<br><div class="info-box-status margintoponly">'.$this->getLibStatut(5).'</div>';
|
||||
}
|
||||
|
||||
@ -341,7 +341,35 @@ if ($action == 'edit') {
|
||||
|
||||
dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin);
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border centpercent tableforfield">';
|
||||
|
||||
// Login
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Login").'</td>';
|
||||
if (!empty($object->ldap_sid) && $object->statut == 0) {
|
||||
print '<td class="error">';
|
||||
print $langs->trans("LoginAccountDisableInDolibarr");
|
||||
print '</td>';
|
||||
} else {
|
||||
print '<td>';
|
||||
$addadmin = '';
|
||||
if (property_exists($object, 'admin')) {
|
||||
if (!empty($conf->multicompany->enabled) && !empty($object->admin) && empty($object->entity)) {
|
||||
$addadmin .= img_picto($langs->trans("SuperAdministratorDesc"), "redstar", 'class="paddingleft"');
|
||||
} elseif (!empty($object->admin)) {
|
||||
$addadmin .= img_picto($langs->trans("AdministratorDesc"), "star", 'class="paddingleft"');
|
||||
}
|
||||
}
|
||||
print showValueWithClipboardCPButton($object->login).$addadmin;
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr>'."\n";
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
|
||||
@ -282,7 +282,7 @@ print '</tr>'."\n";
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
if ($user->admin) {
|
||||
print info_admin($langs->trans("WarningOnlyPermissionOfActivatedModules"));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user