diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php
index 3ac0ab2822b..61d16162e57 100644
--- a/htdocs/comm/card.php
+++ b/htdocs/comm/card.php
@@ -377,38 +377,43 @@ if ($object->id > 0)
print '';
}
- // Relative discounts (Discounts-Drawbacks-Rebates)
- print '
';
- print '| ';
- print $langs->trans("CustomerRelativeDiscountShort");
- print ' | | ';
- if ($user->rights->societe->creer && !$user->societe_id > 0)
- {
- print ''.img_edit($langs->trans("Modify")).'';
- }
- print ' | ';
- print ' | '.($object->remise_percent?''.$object->remise_percent.'%':'').' | ';
- print '
';
+ $isCustomer = ($object->client == 1 || $object->client == 3);
- // Absolute discounts (Discounts-Drawbacks-Rebates)
- print '';
- print '';
- print '| ';
- print $langs->trans("CustomerAbsoluteDiscountShort");
- print ' | | ';
- if ($user->rights->societe->creer && !$user->societe_id > 0)
+ // Relative discounts (Discounts-Drawbacks-Rebates)
+ if ($isCustomer)
{
- print 'id).'">'.img_edit($langs->trans("Modify")).'';
+ print ' | ';
+ print '| ';
+ print $langs->trans("CustomerRelativeDiscountShort");
+ print ' | | ';
+ if ($user->rights->societe->creer && !$user->societe_id > 0)
+ {
+ print ''.img_edit($langs->trans("Modify")).'';
+ }
+ print ' | ';
+ print ' | '.($object->remise_percent?''.$object->remise_percent.'%':'').' | ';
+ print ' ';
+
+ // Absolute discounts (Discounts-Drawbacks-Rebates)
+ print '| ';
+ print '';
+ print ' | ';
+ print '';
+ $amount_discount=$object->getAvailableDiscounts();
+ if ($amount_discount < 0) dol_print_error($db,$object->error);
+ if ($amount_discount > 0) print 'id).'">'.price($amount_discount,1,$langs,1,-1,-1,$conf->currency).'';
+ //else print $langs->trans("DiscountNone");
+ print ' | ';
+ print ' ';
}
- print ' ';
- print ' | ';
- print '';
- $amount_discount=$object->getAvailableDiscounts();
- if ($amount_discount < 0) dol_print_error($db,$object->error);
- if ($amount_discount > 0) print 'id).'">'.price($amount_discount,1,$langs,1,-1,-1,$conf->currency).'';
- //else print $langs->trans("DiscountNone");
- print ' | ';
- print '
';
// Max outstanding bill
if ($object->client)
diff --git a/htdocs/comm/remise.php b/htdocs/comm/remise.php
index f045e570c6e..7985e7ca598 100644
--- a/htdocs/comm/remise.php
+++ b/htdocs/comm/remise.php
@@ -106,7 +106,7 @@ if ($socid > 0)
$head = societe_prepare_head($object);
- $isCustomer = $object->client == 1 || $object->client == 3;
+ $isCustomer = ($object->client == 1 || $object->client == 3);
$isSupplier = $object->fournisseur == 1;
print '