Fix some php 8 warning

This commit is contained in:
Francis Appels
2021-06-28 20:00:10 +02:00
parent b534fbae77
commit 9b59f264fd
3 changed files with 4 additions and 4 deletions

View File

@@ -7778,7 +7778,7 @@ class Form
print '<input type="radio" name="idtolinkto" id="'.$key.'_'.$objp->rowid.'" value="'.$objp->rowid.'">';
print '</td>';
print '<td class="center"><label for="'.$key.'_'.$objp->rowid.'">'.$objp->ref.'</label></td>';
print '<td>'.(!empty($objp->ref_client) ? $objp->ref_client : $objp->ref_supplier).'</td>';
print '<td>'.(!empty($objp->ref_client) ? $objp->ref_client : (!empty($objp->ref_supplier) ? $objp->ref_supplier : '')).'</td>';
print '<td class="right">';
if ($possiblelink['label'] == 'LinkToContract') {
$form = new Form($this->db);

View File

@@ -53,7 +53,7 @@ if ($isNewObject) {
// Is there is commercial discount or down payment available ?
if ($absolute_discount > 0) {
if ($cannotApplyDiscount || !$isInvoice || $isNewObject || $object->statut > $objclassname::STATUS_DRAFT || $object->type == $objclassname::TYPE_CREDIT_NOTE || $object->type == $objclassname::TYPE_DEPOSIT) {
if (!empty($cannotApplyDiscount) || !$isInvoice || $isNewObject || $object->statut > $objclassname::STATUS_DRAFT || $object->type == $objclassname::TYPE_CREDIT_NOTE || $object->type == $objclassname::TYPE_DEPOSIT) {
$translationKey = !empty($discount_type) ? 'HasAbsoluteDiscountFromSupplier' : 'CompanyHasAbsoluteDiscount';
$text = $langs->trans($translationKey, price($absolute_discount), $langs->transnoentities("Currency".$conf->currency)).'.';

View File

@@ -128,7 +128,7 @@ if ($nolinesbefore) {
<td class="linecoldiscount right"><?php echo $langs->trans('ReductionShort'); ?></td>
<?php
// Fields for situation invoice
if ($this->situation_cycle_ref) {
if (isset($this->situation_cycle_ref) && $this->situation_cycle_ref) {
print '<td class="linecolcycleref right">'.$langs->trans('Progress').'</td>';
print '<td class="linecolcycleref2 right"></td>';
}
@@ -416,7 +416,7 @@ if ($nolinesbefore) {
?>
<td class="nobottom nowrap linecoldiscount right"><input type="text" size="1" name="remise_percent" id="remise_percent" class="flat right" value="<?php echo (GETPOSTISSET("remise_percent") ? GETPOST("remise_percent", 'alpha', 2) : $remise_percent); ?>"><span class="hideonsmartphone">%</span></td>
<?php
if ($this->situation_cycle_ref) {
if (isset($this->situation_cycle_ref) && $this->situation_cycle_ref) {
$coldisplay++;
print '<td class="nobottom nowrap right"><input class="falt right" type="text" size="1" value="0" name="progress">%</td>';
$coldisplay++;