diff --git a/htdocs/langs/en_US/stripe.lang b/htdocs/langs/en_US/stripe.lang index 782c49ce61e..15d20dc0f1b 100644 --- a/htdocs/langs/en_US/stripe.lang +++ b/htdocs/langs/en_US/stripe.lang @@ -49,4 +49,4 @@ OAUTH_STRIPE_LIVE_ID=Stripe Connect Client ID (ca_...) BankAccountForBankTransfer=Bank account for fund payouts StripeAccount=Stripe account StripeChargeList=List of Stripe charges -StripeCustomer=Stripe customer id \ No newline at end of file +StripeCustomerId=Stripe customer id \ No newline at end of file diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index 6327261bbcb..f4d9f1b6173 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -413,25 +413,53 @@ if ($socid && $action != 'edit' && $action != "create") dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom'); + + if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field + { + print ''.$langs->trans('Prefix').''.$object->prefix_comm.''; + } + + //if ($conf->agenda->enabled && $user->rights->agenda->myactions->read) $elementTypeArray['action']=$langs->transnoentitiesnoconv('Events'); + + print '
'; + + print '
'; + print ''; + + if ($object->client) + { + print ''; + $sql = "SELECT count(*) as nb from ".MAIN_DB_PREFIX."facture where fk_soc = ".$socid; + $resql=$db->query($sql); + if (!$resql) dol_print_error($db); + + $obj = $db->fetch_object($resql); + $nbFactsClient = $obj->nb; + $thirdTypeArray['customer']=$langs->trans("customer"); + if ($conf->propal->enabled && $user->rights->propal->lire) $elementTypeArray['propal']=$langs->transnoentitiesnoconv('Proposals'); + if ($conf->commande->enabled && $user->rights->commande->lire) $elementTypeArray['order']=$langs->transnoentitiesnoconv('Orders'); + 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))) { - print '
'; - print '
'; - - print '
'; - print '
'; + print $langs->trans('CustomerCode').''; + print $object->code_client; + if ($object->check_codeclient() <> 0) print ' ('.$langs->trans("WrongCustomerCode").')'; + print '
'; + $stripe = new Stripe($db); // Prospect/Customer - print ''; - print '
'.$langs->trans('StripeCustomerRef').''; - print $object->getStripeCustomerAccount(); + print '
'.$langs->trans('StripeCustomerId').''; + print $stripe->getStripeCustomerAccount($object->id); print '
'; - print '
'; - print ''; - print ''; } + print ''; + print ''; + if (! (empty($conf->stripe->enabled))) { print load_fiche_titre($langs->trans('StripeGateways'), '', '');