FIX: add check display payment link if invoice module is enabled

This commit is contained in:
Nicolas 2021-06-09 15:48:31 +02:00
parent e46faacac1
commit 4e1fe23b7e

View File

@ -2633,7 +2633,7 @@ if ($action == 'create' && $usercancreate)
$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem, $compatibleImportElementsList);
// Show online payment link
$useonlinepayment = (!empty($conf->paypal->enabled) || !empty($conf->stripe->enabled) || !empty($conf->paybox->enabled));
$useonlinepayment = ((!empty($conf->paypal->enabled) || !empty($conf->stripe->enabled) || !empty($conf->paybox->enabled)) && !empty($conf->facture->enabled));
if (!empty($conf->global->ORDER_HIDE_ONLINE_PAYMENT_ON_ORDER)) $useonlinepayment = 0;
if ($object->statut != Commande::STATUS_DRAFT && $useonlinepayment)
{