diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index fdd4f54b6c8..497afe9c210 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -778,40 +778,39 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' if ($conf->facture->enabled && $user->rights->facture->lire) $elementTypeArray['invoice']=$langs->transnoentitiesnoconv('Invoices'); if ($conf->contrat->enabled && $user->rights->contrat->lire) $elementTypeArray['contract']=$langs->transnoentitiesnoconv('Contracts'); - if (! empty($conf->stripe->enabled)) - { - $permissiontowrite = $user->rights->societe->creer; - // Stripe customer key 'cu_....' stored into llx_societe_account - print ''; - //print $langs->trans('StripeCustomerId'); - print $form->editfieldkey("StripeCustomerId", 'key_account', $stripecu, $object, $permissiontowrite, 'string', '', 0, 2, 'socid'); - print ''; - //print $stripecu; - print $form->editfieldval("StripeCustomerId", 'key_account', $stripecu, $object, $permissiontowrite, 'string', '', null, null, '', 2, '', 'socid'); - if (! empty($conf->stripe->enabled) && $stripecu && $action != 'editkey_account') + if (! empty($conf->stripe->enabled)) { - $connect=''; - if (!empty($stripeacc)) $connect=$stripeacc.'/'; - $url='https://dashboard.stripe.com/'.$connect.'test/customers/'.$stripecu; - if ($servicestatus) + $permissiontowrite = $user->rights->societe->creer; + // Stripe customer key 'cu_....' stored into llx_societe_account + print ''; + //print $langs->trans('StripeCustomerId'); + print $form->editfieldkey("StripeCustomerId", 'key_account', $stripecu, $object, $permissiontowrite, 'string', '', 0, 2, 'socid'); + print ''; + //print $stripecu; + print $form->editfieldval("StripeCustomerId", 'key_account', $stripecu, $object, $permissiontowrite, 'string', '', null, null, '', 2, '', 'socid'); + if (! empty($conf->stripe->enabled) && $stripecu && $action != 'editkey_account') { - $url='https://dashboard.stripe.com/'.$connect.'customers/'.$stripecu; + $connect=''; + if (!empty($stripeacc)) $connect=$stripeacc.'/'; + $url='https://dashboard.stripe.com/'.$connect.'test/customers/'.$stripecu; + if ($servicestatus) + { + $url='https://dashboard.stripe.com/'.$connect.'customers/'.$stripecu; + } + print ' '.img_picto($langs->trans('ShowInStripe'), 'object_globe').''; } - print ' '.img_picto($langs->trans('ShowInStripe'), 'object_globe').''; + print ''; + if (empty($stripecu)) + { + print '
'; + print ''; + print ''; + print ''; + print ''; + print '
'; + } + print ''; } - print ''; - if (empty($stripecu)) - { - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - print '
'; - } - print ''; - } } print ''; diff --git a/phpstan.neon b/phpstan.neon index 6d63f931375..55cd13f59df 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -139,9 +139,6 @@ parameters: reportMagicMethods: false reportMagicProperties: false ignoreErrors: - - - message: '#Call to an undefined method abcdef#' - path: %currentWorkingDirectory%/dirtoignoreerror/* - '#Undefined variable: \$langs#' - '#Undefined variable: \$user#' - '#Undefined variable: \$db#' @@ -150,6 +147,8 @@ parameters: - '#Undefined variable: \$mysoc#' - '#Undefined variable: \$error#' - '#Undefined variable: \$errors#' + - message: '#Undefined variable: \$object#' + path: %currentWorkingDirectory%/htdocs/societe/tpl internalErrorsCountLimit: 50 cache: nodesByFileCountMax: 512