diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index b3ed477596c..33e2ed8b972 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -7778,7 +7778,7 @@ class Form
print '';
print '';
print '
| ';
- print ''.(!empty($objp->ref_client) ? $objp->ref_client : $objp->ref_supplier).' | ';
+ print ''.(!empty($objp->ref_client) ? $objp->ref_client : (!empty($objp->ref_supplier) ? $objp->ref_supplier : '')).' | ';
print '';
if ($possiblelink['label'] == 'LinkToContract') {
$form = new Form($this->db);
diff --git a/htdocs/core/tpl/object_discounts.tpl.php b/htdocs/core/tpl/object_discounts.tpl.php
index e5bf1e1017c..4761e5857c2 100644
--- a/htdocs/core/tpl/object_discounts.tpl.php
+++ b/htdocs/core/tpl/object_discounts.tpl.php
@@ -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)).'.';
diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php
index e181acd16e1..474b1a24957 100644
--- a/htdocs/core/tpl/objectline_create.tpl.php
+++ b/htdocs/core/tpl/objectline_create.tpl.php
@@ -128,7 +128,7 @@ if ($nolinesbefore) {
| trans('ReductionShort'); ?> |
situation_cycle_ref) {
+ if (isset($this->situation_cycle_ref) && $this->situation_cycle_ref) {
print ''.$langs->trans('Progress').' | ';
print ' | ';
}
@@ -416,7 +416,7 @@ if ($nolinesbefore) {
?>
">% |
situation_cycle_ref) {
+ if (isset($this->situation_cycle_ref) && $this->situation_cycle_ref) {
$coldisplay++;
print '% | ';
$coldisplay++;