diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php
index 96baf02c7d8..7dbd85bf29b 100644
--- a/htdocs/public/payment/newpayment.php
+++ b/htdocs/public/payment/newpayment.php
@@ -867,7 +867,7 @@ if ($source == 'order')
{
print ''."\n";
}
- print ''."\n";
+ if (is_object($order->thirdparty)) print ''."\n";
print ''."\n";
print ''."\n";
$labeldesc=$langs->trans("Order").' '.$order->ref;
@@ -1002,7 +1002,7 @@ if ($source == 'invoice')
{
print ''."\n";
}
- print ''."\n";
+ if (is_object($invoice->thirdparty)) print ''."\n";
print ''."\n";
print ''."\n";
$labeldesc=$langs->trans("Invoice").' '.$invoice->ref;
@@ -1210,7 +1210,7 @@ if ($source == 'contractline')
{
print ''."\n";
}
- print ''."\n";
+ if (is_object($contract->thirdparty)) print ''."\n";
print ''."\n";
print ''."\n";
$labeldesc=$langs->trans("Contract").' '.$contract->ref;
@@ -1236,8 +1236,8 @@ if ($source == 'membersubscription')
}
else
{
+ $member->fetch_thirdparty();
$object = $member;
-
$subscription=new Subscription($db);
}
@@ -1374,6 +1374,7 @@ if ($source == 'membersubscription')
{
print ''."\n";
}
+ if (is_object($member->thirdparty)) print ''."\n";
print ''."\n";
$labeldesc = $langs->trans("PaymentSubscription");
if (GETPOST('desc','alpha')) $labeldesc=GETPOST('desc','alpha');