Show the stripe accoutn of a cu_ and a card_
This commit is contained in:
parent
6f97d163f9
commit
4333cf2040
@ -34,5 +34,5 @@
|
|||||||
|
|
||||||
-- For v12
|
-- For v12
|
||||||
|
|
||||||
|
ALTER TABLE llx_societe_rib ADD COLUMN stripe_account varchar(128);
|
||||||
|
|
||||||
|
|||||||
@ -66,6 +66,7 @@ create table llx_societe_rib
|
|||||||
|
|
||||||
--For Stripe
|
--For Stripe
|
||||||
stripe_card_ref varchar(128), -- 'card_...'
|
stripe_card_ref varchar(128), -- 'card_...'
|
||||||
|
stripe_account varchar(128), -- 'pk_live_...'
|
||||||
|
|
||||||
comment varchar(255),
|
comment varchar(255),
|
||||||
ipaddress varchar(68),
|
ipaddress varchar(68),
|
||||||
|
|||||||
@ -110,6 +110,7 @@ class CompanyPaymentMode extends CommonObject
|
|||||||
'preapproval_key' =>array('type'=>'varchar(255)', 'label'=>'Preapproval key', 'enabled'=>1, 'visible'=>-2, 'position'=>160),
|
'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),
|
'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_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),
|
'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),
|
'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),
|
'ending_date' =>array('type'=>'date', 'label'=>'Ending date', 'enabled'=>1, 'visible'=>-2, 'position'=>185),
|
||||||
|
|||||||
@ -847,7 +847,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
|||||||
$permissiontowrite = $user->rights->societe->creer;
|
$permissiontowrite = $user->rights->societe->creer;
|
||||||
// Stripe customer key 'cu_....' stored into llx_societe_account
|
// Stripe customer key 'cu_....' stored into llx_societe_account
|
||||||
print '<tr><td class="titlefield">';
|
print '<tr><td class="titlefield">';
|
||||||
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 '</td><td>';
|
print '</td><td>';
|
||||||
print $form->editfieldval("StripeCustomerId", 'key_account', $stripecu, $object, $permissiontowrite, 'string', '', null, null, '', 2, '', 'socid');
|
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) && $stripecu && $action != 'editkey_account')
|
||||||
@ -859,7 +859,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
|||||||
{
|
{
|
||||||
$url = 'https://dashboard.stripe.com/'.$connect.'customers/'.$stripecu;
|
$url = 'https://dashboard.stripe.com/'.$connect.'customers/'.$stripecu;
|
||||||
}
|
}
|
||||||
print ' <a href="'.$url.'" target="_stripe">'.img_picto($langs->trans('ShowInStripe'), 'globe').'</a>';
|
print ' <a href="'.$url.'" target="_stripe">'.img_picto($langs->trans('ShowInStripe').' - Publishable key '.$site_account, 'globe').'</a>';
|
||||||
}
|
}
|
||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
if (empty($stripecu))
|
if (empty($stripecu))
|
||||||
@ -913,7 +913,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
|||||||
{
|
{
|
||||||
$url = 'https://dashboard.stripe.com/connect/accounts/'.$stripesupplieracc;
|
$url = 'https://dashboard.stripe.com/connect/accounts/'.$stripesupplieracc;
|
||||||
}
|
}
|
||||||
print ' <a href="'.$url.'" target="_stripe">'.img_picto($langs->trans('ShowInStripe'), 'globe').'</a>';
|
print ' <a href="'.$url.'" target="_stripe">'.img_picto($langs->trans('ShowInStripe').' - Publishable key '.$site_account, 'globe').'</a>';
|
||||||
}
|
}
|
||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
if (empty($stripesupplieracc))
|
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;
|
$url = 'https://dashboard.stripe.com/'.$connect.'search?query='.$companypaymentmodetemp->stripe_card_ref;
|
||||||
}
|
}
|
||||||
print ' <a href="'.$url.'" target="_stripe">'.img_picto($langs->trans('ShowInStripe'), 'globe').'</a>';
|
print ' <a href="'.$url.'" target="_stripe">'.img_picto($langs->trans('ShowInStripe').' - Publishable key '.$companypaymentmodetemp->stripe_account, 'globe').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user