diff --git a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql index 3ee1d145b3c..7436d8d8c3d 100644 --- a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql +++ b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql @@ -34,5 +34,5 @@ -- For v12 - +ALTER TABLE llx_societe_rib ADD COLUMN stripe_account varchar(128); diff --git a/htdocs/install/mysql/tables/llx_societe_rib.sql b/htdocs/install/mysql/tables/llx_societe_rib.sql index 45084179908..7d00d9fb1dd 100644 --- a/htdocs/install/mysql/tables/llx_societe_rib.sql +++ b/htdocs/install/mysql/tables/llx_societe_rib.sql @@ -28,7 +28,7 @@ create table llx_societe_rib fk_soc integer NOT NULL, datec datetime, tms timestamp, - + -- For BAN bank varchar(255), -- bank name code_banque varchar(128), -- bank code @@ -66,6 +66,7 @@ create table llx_societe_rib --For Stripe stripe_card_ref varchar(128), -- 'card_...' + stripe_account varchar(128), -- 'pk_live_...' comment varchar(255), ipaddress varchar(68), diff --git a/htdocs/societe/class/companypaymentmode.class.php b/htdocs/societe/class/companypaymentmode.class.php index aa0c083f4f7..781a25ac8c0 100644 --- a/htdocs/societe/class/companypaymentmode.class.php +++ b/htdocs/societe/class/companypaymentmode.class.php @@ -110,6 +110,7 @@ class CompanyPaymentMode extends CommonObject 'preapproval_key' =>array('type'=>'varchar(255)', 'label'=>'Preapproval key', 'enabled'=>1, 'visible'=>-2, 'position'=>160), 'total_amount_of_all_payments' =>array('type'=>'double(24,8)', 'label'=>'Total amount of all payments', 'enabled'=>1, 'visible'=>-2, 'position'=>165), 'stripe_card_ref' =>array('type'=>'varchar(128)', 'label'=>'Stripe card ref', 'enabled'=>1, 'visible'=>-2, 'position'=>170), + 'stripe_account' =>array('type'=>'varchar(128)', 'label'=>'Stripe account', 'enabled'=>1, 'visible'=>-2, 'position'=>171), 'status' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>175), 'starting_date' =>array('type'=>'date', 'label'=>'Starting date', 'enabled'=>1, 'visible'=>-2, 'position'=>180), 'ending_date' =>array('type'=>'date', 'label'=>'Ending date', 'enabled'=>1, 'visible'=>-2, 'position'=>185), diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index 9bf2a40f069..52af815827f 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -847,7 +847,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' $permissiontowrite = $user->rights->societe->creer; // Stripe customer key 'cu_....' stored into llx_societe_account print ''; - print $form->editfieldkey("StripeCustomerId", 'key_account', $stripecu, $object, $permissiontowrite, 'string', '', 0, 2, 'socid', 'Publishable key '.$site_account); + print $form->editfieldkey("StripeCustomerId", 'key_account', $stripecu, $object, $permissiontowrite, 'string', '', 0, 2, 'socid'); print ''; print $form->editfieldval("StripeCustomerId", 'key_account', $stripecu, $object, $permissiontowrite, 'string', '', null, null, '', 2, '', 'socid'); if (!empty($conf->stripe->enabled) && $stripecu && $action != 'editkey_account') @@ -859,7 +859,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' { $url = 'https://dashboard.stripe.com/'.$connect.'customers/'.$stripecu; } - print ' '.img_picto($langs->trans('ShowInStripe'), 'globe').''; + print ' '.img_picto($langs->trans('ShowInStripe').' - Publishable key '.$site_account, 'globe').''; } print ''; if (empty($stripecu)) @@ -913,7 +913,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' { $url = 'https://dashboard.stripe.com/connect/accounts/'.$stripesupplieracc; } - print ' '.img_picto($langs->trans('ShowInStripe'), 'globe').''; + print ' '.img_picto($langs->trans('ShowInStripe').' - Publishable key '.$site_account, 'globe').''; } print ''; if (empty($stripesupplieracc)) @@ -1065,7 +1065,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' { $url = 'https://dashboard.stripe.com/'.$connect.'search?query='.$companypaymentmodetemp->stripe_card_ref; } - print ' '.img_picto($langs->trans('ShowInStripe'), 'globe').''; + print ' '.img_picto($langs->trans('ShowInStripe').' - Publishable key '.$companypaymentmodetemp->stripe_account, 'globe').''; } print ''; print '';