diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index 61aaffb4068..b57123ee7c3 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -519,3 +519,4 @@ HideSocialNetworks=Hide social networks ExternalSystemID=External system ID IDOfPaymentInAnExternalSystem=ID of the payment mode into an external system (like Stripe, Paypal, ...) AADEWebserviceCredentials=AADE Webservice Credentials +ThirdPartyMustBeACustomerToCreateBANOnStripe=The third-party must be a customer to allow the creation of its bank on Stripe side \ No newline at end of file diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index cfef9d71784..6ec6a1f92a2 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -1073,6 +1073,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' } } + // Stripe connect if (isModEnabled('stripe') && !empty($conf->stripeconnect->enabled) && getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { $stripesupplieracc = $stripe->getStripeAccount($service, $object->id); // Get Stripe OAuth connect account (no network access here) @@ -1740,11 +1741,19 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' // Edit/Delete print ''; if ($permissiontoaddupdatepaymentinformation) { - if (empty($rib->stripe_card_ref)) { - // Add link to create BAN on Stripe - print ''; - print img_picto($langs->trans("CreateBANOnStripe"), 'stripe'); - print ''; + if (isModEnabled('stripe')) { + if (empty($rib->stripe_card_ref)) { + if ($object->client) { + // Add link to create BAN on Stripe + print ''; + print img_picto($langs->trans("CreateBANOnStripe"), 'stripe'); + print ''; + } else { + print ''; + print img_picto($langs->trans("ThirdPartyMustBeACustomerToCreateBANOnStripe"), 'stripe'); + print ''; + } + } } print '';