Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into fix_wrong_check_when_update_expensereport_line

This commit is contained in:
Regis Houssin 2022-09-23 11:53:25 +02:00
commit 7c9917fae0
3 changed files with 5 additions and 4 deletions

View File

@ -71,9 +71,9 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
print '<td class="linkedcol-ref left">'.$objectlink->ref_client.'</td>';
print '<td class="linkedcol-date center">'.dol_print_date($objectlink->date, 'day').'</td>';
print '<td class="linkedcol-amount right">';
if ($user->rights->facture->lire) {
if (!empty($objectlink) && $objectlink->element == 'facture' && $user->hasRight('facture', 'lire')) {
$sign = 1;
if ($object->type == Facture::TYPE_CREDIT_NOTE) {
if ($objectlink->type == Facture::TYPE_CREDIT_NOTE) {
$sign = -1;
}
if ($objectlink->statut != 3) {

View File

@ -7988,7 +7988,7 @@ abstract class CommonObject
switch ($mode) {
case "view":
$value = $this->array_options["options_".$key.$keysuffix]; // Value may be clean or formated later
$value = ((!empty($this->array_options) && array_key_exists("options_".$key.$keysuffix, $this->array_options)) ? $this->array_options["options_".$key.$keysuffix] : null); // Value may be cleaned or formated later
break;
case "create":
case "edit":

View File

@ -217,7 +217,7 @@ class mailing_thirdparties_services_expired extends MailingTargets
{
global $langs;
$s .= '<select id="filter_services_expired" name="filter" class="flat">';
$s = '<select id="filter_services_expired" name="filter" class="flat">';
if (count($this->arrayofproducts)) {
$s .= '<option value="-1">'.$langs->trans("ProductOrService").'</option>';
} else {
@ -228,6 +228,7 @@ class mailing_thirdparties_services_expired extends MailingTargets
}
$s .= '</select>';
$s .= ajax_combobox("filter_services_expired");
return $s;
}