diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 4d4d50a1979..d5d11941b23 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -1030,11 +1030,14 @@ if ($id > 0) if (! empty($conf->commande->enabled)) { - if (! empty($orders2invoice) && $orders2invoice > 0) print '
'.$langs->trans("CreateInvoiceForThisCustomer").'
'; - else print '
'.$langs->trans("CreateInvoiceForThisCustomer").'
'; + if ($object->client != 0 && $object->client != 2) + { + if (! empty($orders2invoice) && $orders2invoice > 0) print '
'.$langs->trans("CreateInvoiceForThisCustomer").'
'; + else print '
'.$langs->trans("CreateInvoiceForThisCustomer").'
'; + } + else print '
'.$langs->trans("AddBill").'
'; } - - if ($object->client != 0) print '
'.$langs->trans("AddBill").'
'; + if ($object->client != 0 && $object->client != 2) print '
'.$langs->trans("AddBill").'
'; else print '
'.$langs->trans("AddBill").'
'; }