Skip to content

Commit

Permalink
Merge branch 'develop' into 19a8
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy authored Oct 13, 2023
2 parents 65d7eda + 30080e9 commit 3151e37
Show file tree
Hide file tree
Showing 61 changed files with 918 additions and 936 deletions.
11 changes: 0 additions & 11 deletions htdocs/admin/compta.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,17 +146,6 @@
print "</tr>\n";
print '<tr class="oddeven"><td width="200"><input type="radio" name="accounting_mode" value="RECETTES-DEPENSES"'.($accounting_mode != 'CREANCES-DETTES' ? ' checked' : '').'> '.$langs->trans('OptionModeTrue').'</td>';
print '<td colspan="2">'.nl2br($langs->trans('OptionModeTrueDesc'));
// Write info on way to count VAT
//if (!empty($conf->global->MAIN_MODULE_COMPTABILITE))
//{
// // print "<br>\n";
// // print nl2br($langs->trans('OptionModeTrueInfoModuleComptabilite'));
//}
//else
//{
// // print "<br>\n";
// // print nl2br($langs->trans('OptionModeTrueInfoExpert'));
//}
print "</td></tr>\n";
print '<tr class="oddeven"><td width="200"><input type="radio" name="accounting_mode" value="CREANCES-DETTES"'.($accounting_mode == 'CREANCES-DETTES' ? ' checked' : '').'> '.$langs->trans('OptionModeVirtual').'</td>';
print '<td colspan="2">'.nl2br($langs->trans('OptionModeVirtualDesc'))."</td></tr>\n";
Expand Down
4 changes: 4 additions & 0 deletions htdocs/admin/ihm.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@
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);

if (GETPOSTISSET('THEME_ELDY_USECOMOACTROW')) {
dolibarr_set_const($db, "THEME_ELDY_USECOMOACTROW", GETPOST('THEME_ELDY_USECOMOACTROW'), 'chaine', 0, '', $conf->entity);
}

if (GETPOSTISSET('THEME_DARKMODEENABLED')) {
$val = GETPOST('THEME_DARKMODEENABLED');
if (!$val) {
Expand Down
4 changes: 2 additions & 2 deletions htdocs/admin/mails.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ function change_smtp_auth_method() {
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SENDMODE").'</td><td>';

// SuperAdministrator access only
if ((empty($conf->global->MAIN_MODULE_MULTICOMPANY)) || ($user->admin && !$user->entity)) {
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
print $form->selectarray('MAIN_MAIL_SENDMODE', $listofmethods, getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'));
} else {
$text = $listofmethods[getDolGlobalString('MAIN_MAIL_SENDMODE')];
Expand Down Expand Up @@ -516,7 +516,7 @@ function change_smtp_auth_method() {
print '<tr class="oddeven smtp_oauth_service"><td>'.$langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE").'</td><td>';

// SuperAdministrator access only
if ((empty($conf->global->MAIN_MODULE_MULTICOMPANY)) || ($user->admin && !$user->entity)) {
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
print $form->selectarray('MAIN_MAIL_SMTPS_OAUTH_SERVICE', $oauthservices, $conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE);
} else {
$text = $oauthservices[getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE')];
Expand Down
4 changes: 2 additions & 2 deletions htdocs/admin/mails_emailing.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ function change_smtp_auth_method() {
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SENDMODE").'</td><td>';

// SuperAdministrator access only
if ((empty($conf->global->MAIN_MODULE_MULTICOMPANY)) || ($user->admin && !$user->entity)) {
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
print $form->selectarray('MAIN_MAIL_SENDMODE_EMAILING', $listofmethods, $conf->global->MAIN_MAIL_SENDMODE_EMAILING);
} else {
$text = $listofmethods[getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING')];
Expand Down Expand Up @@ -450,7 +450,7 @@ function change_smtp_auth_method() {
print '<tr class="oddeven smtp_oauth_service hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE").'</td><td>';

// SuperAdministrator access only
if ((empty($conf->global->MAIN_MODULE_MULTICOMPANY)) || ($user->admin && !$user->entity)) {
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
print $form->selectarray('MAIN_MAIL_SMTPS_OAUTH_SERVICE_EMAILING', $oauthservices, $conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE_EMAILING);
} else {
$text = $oauthservices[getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE_EMAILING')];
Expand Down
4 changes: 2 additions & 2 deletions htdocs/admin/mails_ticket.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ function change_smtp_auth_method() {
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SENDMODE").'</td><td>';

// SuperAdministrator access only
if ((empty($conf->global->MAIN_MODULE_MULTICOMPANY)) || ($user->admin && !$user->entity)) {
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
print $form->selectarray('MAIN_MAIL_SENDMODE_TICKET', $listofmethods, $conf->global->MAIN_MAIL_SENDMODE_TICKET);
} else {
$text = $listofmethods[getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET')];
Expand Down Expand Up @@ -437,7 +437,7 @@ function change_smtp_auth_method() {
if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) {
print '<tr class="oddeven smtp_oauth_service hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE").'</td><td>';
// SuperAdministrator access only
if ((empty($conf->global->MAIN_MODULE_MULTICOMPANY)) || ($user->admin && !$user->entity)) {
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
print $form->selectarray('MAIN_MAIL_SMTPS_OAUTH_SERVICE_TICKET', $oauthservices, $conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE_TICKET);
} else {
$text = $oauthservices[getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE_TICKET')];
Expand Down
6 changes: 3 additions & 3 deletions htdocs/admin/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -404,13 +404,13 @@

// We discard modules according to features level (PS: if module is activated we always show it)
$const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i', '', get_class($objMod)));
if ($objMod->version == 'development' && (empty($conf->global->$const_name) && (getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2))) {
if ($objMod->version == 'development' && (!isModEnabled($const_name) && (getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2))) {
$modulequalified = 0;
}
if ($objMod->version == 'experimental' && (empty($conf->global->$const_name) && (getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1))) {
if ($objMod->version == 'experimental' && (!isModEnabled($const_name) && (getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1))) {
$modulequalified = 0;
}
if (preg_match('/deprecated/', $objMod->version) && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL >= 0))) {
if (preg_match('/deprecated/', $objMod->version) && (!isModEnabled($const_name) && ($conf->global->MAIN_FEATURES_LEVEL >= 0))) {
$modulequalified = 0;
}

Expand Down
2 changes: 1 addition & 1 deletion htdocs/admin/paymentbybanktransfer.php
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@
*/

/* Disable this, there is no trigger with elementtype 'withdraw'
if (!empty($conf->global->MAIN_MODULE_NOTIFICATION))
if (isModEnabled('notification'))
{
$langs->load("mails");
print load_fiche_titre($langs->trans("Notifications"));
Expand Down
2 changes: 1 addition & 1 deletion htdocs/admin/prelevement.php
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@
*/

/* Disable this, there is no trigger with elementtype 'withdraw'
if (!empty($conf->global->MAIN_MODULE_NOTIFICATION))
if (isModEnabled('notification') )
{
$langs->load("mails");
print load_fiche_titre($langs->trans("Notifications"));
Expand Down
2 changes: 1 addition & 1 deletion htdocs/admin/syslog.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
$defaultsyslogfile = 'dolibarr.log';
}
$optionmc = '';
if (!empty($conf->global->MAIN_MODULE_MULTICOMPANY) && $user->entity) {
if (isModEnabled('multicompany') && $user->entity) {
print '<div class="error">'.$langs->trans("ContactSuperAdminForChange").'</div>';
$optionmc = 'disabled';
}
Expand Down
2 changes: 1 addition & 1 deletion htdocs/api/admin/explorer_withredoc.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
require_once '../../main.inc.php';

// Enable and test if module Api is enabled
if (empty($conf->global->MAIN_MODULE_API)) {
if (!isModEnabled('api') ) {
$langs->load("admin");
dol_syslog("Call of Dolibarr API interfaces with module API REST are disabled");
print $langs->trans("WarningModuleNotActive", 'Api').'.<br><br>';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/api/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
}

// Enable and test if module Api is enabled
if (empty($conf->global->MAIN_MODULE_API)) {
if (!isModEnabled('api') ) {
$langs->load("admin");
dol_syslog("Call of Dolibarr API interfaces with module API REST are disabled");
print $langs->trans("WarningModuleNotActive", 'Api').'.<br><br>';
Expand Down
4 changes: 2 additions & 2 deletions htdocs/compta/localtax/clients.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
$calcmode = $calc == 0 ? $langs->trans("CalcModeLT".$local) : $langs->trans("CalcModeLT".$local."Rec");
$calcmode .= ' <span class="opacitymedium">('.$langs->trans("TaxModuleSetupToModifyRulesLT", DOL_URL_ROOT.'/admin/company.php').')</span>';
$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0);
if (!empty($conf->global->MAIN_MODULE_COMPTABILITE)) {
if (isModEnabled('comptabilite')) {
$description .= '<br>'.$langs->trans("WarningDepositsNotIncluded");
}
$description .= $fsearch;
Expand All @@ -165,7 +165,7 @@
$calcmode = $langs->trans("CalcModeLT2Debt");
$calcmode .= ' <span class="opacitymedium">('.$langs->trans("TaxModuleSetupToModifyRulesLT", DOL_URL_ROOT.'/admin/company.php').')</span>';
$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0);
if (!empty($conf->global->MAIN_MODULE_COMPTABILITE)) {
if (isModEnabled('comptabilite')) {
$description .= '<br>'.$langs->trans("WarningDepositsNotIncluded");
}
$description .= $fsearch;
Expand Down
2 changes: 0 additions & 2 deletions htdocs/compta/localtax/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,6 @@ function pt($db, $sql, $date)
$calcmode = $langs->trans("LTReportBuildWithOptionDefinedInModule").' ';
$calcmode .= ' <span class="opacitymedium">('.$langs->trans("TaxModuleSetupToModifyRulesLT", DOL_URL_ROOT.'/admin/company.php').')</span>';

//if (!empty($conf->global->MAIN_MODULE_ACCOUNTING)) $description.='<br>'.$langs->trans("ThisIsAnEstimatedValue");

$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0);

$builddate = dol_now();
Expand Down
2 changes: 1 addition & 1 deletion htdocs/compta/localtax/quadri_detail.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
$description.='<br>'.$langs->trans("SupplierDepositsAreNotIncluded");
}
*/
if (!empty($conf->global->MAIN_MODULE_ACCOUNTING)) {
if (isModEnabled('accounting')) {
$description .= $langs->trans("ThisIsAnEstimatedValue");
}

Expand Down
2 changes: 1 addition & 1 deletion htdocs/compta/stats/byratecountry.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
$description = $fsearch;
$builddate = dol_now();

if (!empty($conf->global->MAIN_MODULE_ACCOUNTING)) {
if (isModEnabled('comptabilite')) {
$description .= '<br>'.$langs->trans("ThisIsAnEstimatedValue");
}
if (getDolGlobalString('TAX_MODE_SELL_PRODUCT') == 'invoice') {
Expand Down
2 changes: 1 addition & 1 deletion htdocs/compta/tva/clients.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$description .= $langs->trans("SupplierDepositsAreNotIncluded");
}
if (!empty($conf->global->MAIN_MODULE_ACCOUNTING)) {
if (isModEnabled('accounting')) {
$description .= '<br>'.$langs->trans("ThisIsAnEstimatedValue");
}

Expand Down
2 changes: 1 addition & 1 deletion htdocs/compta/tva/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ function pt($db, $sql, $date)
if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$description .= $langs->trans("SupplierDepositsAreNotIncluded");
}
if (!empty($conf->global->MAIN_MODULE_ACCOUNTING)) {
if (isModEnabled('accounting')) {
$description .= '<br>'.$langs->trans("ThisIsAnEstimatedValue");
}

Expand Down
2 changes: 1 addition & 1 deletion htdocs/compta/tva/quadri_detail.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$description .= $langs->trans("SupplierDepositsAreNotIncluded");
}
if (!empty($conf->global->MAIN_MODULE_ACCOUNTING)) {
if (isModEnabled('accounting')) {
$description .= '<br>' . $langs->trans("ThisIsAnEstimatedValue");
}

Expand Down
94 changes: 85 additions & 9 deletions htdocs/contact/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'contactlist';
$mode = GETPOST('mode', 'alpha');

if ($contextpage == 'poslist') {
$_GET['optioncss'] = 'print';
}

// Security check
$id = GETPOST('id', 'int');
$contactid = GETPOST('id', 'int');
Expand Down Expand Up @@ -118,6 +122,7 @@

$optioncss = GETPOST('optioncss', 'alpha');

$place = GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : '0'; // $place is string id of table for Bar or Restaurant

$type = GETPOST("type", 'aZ');
$view = GETPOST("view", 'alpha');
Expand Down Expand Up @@ -279,6 +284,54 @@
* Actions
*/

if ($action == "change" && $user->hasRight('takepos', 'run')) { // Change customer for TakePOS
$idcustomer = GETPOST('idcustomer', 'int');
$idcontact = GETPOST('idcontact', 'int');

// Check if draft invoice already exists, if not create it
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."facture where ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")' AND entity IN (".getEntity('invoice').")";
$result = $db->query($sql);
$num_lines = $db->num_rows($result);
if ($num_lines == 0) {
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
$invoice = new Facture($db);
$constforthirdpartyid = 'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"];
$invoice->socid = $conf->global->$constforthirdpartyid;
$invoice->date = dol_now();
$invoice->module_source = 'takepos';
$invoice->pos_source = $_SESSION["takeposterminal"];
$placeid = $invoice->create($user);
$sql = "UPDATE ".MAIN_DB_PREFIX."facture set ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")' where rowid = ".((int) $placeid);
$db->query($sql);
}

$sql = "UPDATE ".MAIN_DB_PREFIX."facture set fk_soc=".((int) $idcustomer)." where ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")'";
$resql = $db->query($sql);

// set contact on invoice
if (!isset($invoice)) {
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
$invoice = new Facture($db);
$invoice->fetch(null, "(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")");
$invoice->delete_linked_contact('external', 'BILLING');
}
$invoice->add_contact($idcontact, 'BILLING');
?>
<script>
console.log("Reload page invoice.php with place=<?php print $place; ?>");
parent.$("#poslines").load("invoice.php?place=<?php print $place; ?>", function() {
//parent.$("#poslines").scrollTop(parent.$("#poslines")[0].scrollHeight);
<?php if (!$resql) { ?>
alert('Error failed to update customer on draft invoice.');
<?php } ?>
parent.$("#idcustomer").val(<?php echo $idcustomer; ?>);
parent.$.colorbox.close(); /* Close the popup */
});
</script>
<?php
exit;
}

if (GETPOST('cancel', 'alpha')) {
$action = 'list';
$massaction = '';
Expand Down Expand Up @@ -865,10 +918,10 @@
if (isModEnabled('category') && $user->hasRight('societe', 'creer')) {
$arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag");
}
if (in_array($massaction, array('presend', 'predelete','preaffecttag'))) {
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete','preaffecttag'))) {
$arrayofmassactions = array();
}
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
if ($contextpage != 'poslist') $massactionbutton = $form->selectMassAction('', $arrayofmassactions);

print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'" name="formfilter">';
if ($optioncss != '') {
Expand All @@ -890,8 +943,13 @@
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitleSeparator();
$newcardbutton .= dolGetButtonTitle($langs->trans('NewContactAddress'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/contact/card.php?action=create', '', $permissiontoadd);

if ($contextpage != 'poslist') {
$newcardbutton .= dolGetButtonTitle($langs->trans('NewContactAddress'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/contact/card.php?action=create', '', $permissiontoadd);
} elseif ($user->hasRight('societe', 'contact', 'creer')) {
$url = DOL_URL_ROOT . '/contact/card.php?action=create&type=t&contextpage=poslist&optioncss=print&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?token=' . newToken() . 'type=t&contextpage=poslist&nomassaction=1&optioncss=print&place='.$place);
$label = 'MenuNewCustomer';
$newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', $url);
}
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'address', 0, $newcardbutton, '', $limit, 0, 0, 1);

$topicmail = "Information";
Expand Down Expand Up @@ -959,7 +1017,7 @@

$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
$selectedfields .= count($arrayofmassactions) && $contextpage != 'poslist' ? $form->showCheckAddButtons('checkforselect', 1) : '';

print '<div class="div-table-responsive">';
print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
Expand Down Expand Up @@ -1346,7 +1404,11 @@
} else {
// Show here line of result
$j = 0;
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
print '<tr data-rowid="'.$object->id.'" class="oddeven"';
if ($contextpage == 'poslist') {
print ' onclick="location.href=\'list.php?action=change&contextpage=poslist&idcustomer='.$obj->socid.'&idcontact='.$obj->rowid.'&place='.urlencode($place).'\'"';
}
print '>';

// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
Expand Down Expand Up @@ -1377,7 +1439,11 @@
// (Last) Name
if (!empty($arrayfields['p.lastname']['checked'])) {
print '<td class="middle tdoverflowmax150">';
print $contactstatic->getNomUrl(-1);
if ($contextpage == 'poslist') {
print $contactstatic->lastname;
} else {
print $contactstatic->getNomUrl(1);
}
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
Expand Down Expand Up @@ -1484,7 +1550,13 @@

// EMail
if (!empty($arrayfields['p.email']['checked'])) {
print '<td class="nowraponall tdoverflowmax300">'.dol_print_email($obj->email, $obj->rowid, $obj->socid, 'AC_EMAIL', 18, 0, 1).'</td>';
print '<td class="nowraponall tdoverflowmax300">';
if ($contextpage == 'poslist') {
print $obj->email;
} else {
print dol_print_email($obj->email, $obj->rowid, $obj->socid, 'AC_EMAIL', 18, 0, 1);
}
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
}
Expand Down Expand Up @@ -1526,7 +1598,11 @@
if ($objsoc->client == 0 && $objsoc->fournisseur > 0) {
$option_link = 'supplier';
}
print $objsoc->getNomUrl(1, $option_link, 100, 0, 1, empty($arrayfields['s.name_alias']['checked']) ? 0 : 1);
if ($contextpage == 'poslist') {
print $objsoc->name;
} else {
print $objsoc->getNomUrl(1, $option_link, 100, 0, 1, empty($arrayfields['s.name_alias']['checked']) ? 0 : 1);
}
} else {
print '&nbsp;';
}
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/class/html.formwebsite.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ public function selectContainer($website, $htmlname = 'pageid', $pageid = 0, $sh
}
if ($website->fk_default_home && $key == $website->fk_default_home) {
//$valueforoption .= ' <span class="opacitymedium">('.$langs->trans("HomePage").')</span>';
$valueforoption .= ' <span class="opacitymedium fa fa-home"></span>';
$valueforoption .= ' <span class="opacitymedium fas fa-home"></span>';
}

$out .= '<option value="'.$key.'"';
Expand Down
Loading

0 comments on commit 3151e37

Please sign in to comment.