Clean code
This commit is contained in:
parent
4150af1bf3
commit
9b1a01bbd6
@ -61,6 +61,7 @@ DeleteACard=Delete Card
|
||||
ConfirmDeleteCard=Are you sure you want to delete this Credit or Debit card?
|
||||
CreateCustomerOnStripe=Create customer on Stripe
|
||||
CreateCardOnStripe=Create card on Stripe
|
||||
CreateBANOnStripe=Create bank on Stripe
|
||||
ShowInStripe=Show in Stripe
|
||||
StripeUserAccountForActions=User account to use for email notification of some Stripe events (Stripe payouts)
|
||||
StripePayoutList=List of Stripe payouts
|
||||
|
||||
@ -1591,7 +1591,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
||||
if ($permissiontoaddupdatepaymentinformation) {
|
||||
if (empty($rib->stripe_card_ref)) {
|
||||
// Add link to create BAN on Stripe
|
||||
print '<a class="editfielda marginrightonly marginleftonly" href="'.$_SERVER["PHP_SELF"].'?socid='.$object->id.'&id='.$rib->id.'&action=syncsepatostripe">';
|
||||
print '<a class="editfielda marginrightonly marginleftonly" href="'.$_SERVER["PHP_SELF"].'?socid='.$object->id.'&id='.$rib->id.'&action=syncsepatostripe&token='.newToken().'">';
|
||||
print img_picto($langs->trans("CreateBANOnStripe"), 'stripe');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
@ -908,7 +908,7 @@ class Stripe extends CommonObject
|
||||
|
||||
$sql = "SELECT sa.stripe_card_ref, sa.proprio, sa.iban_prefix"; // stripe_card_ref is src_ for sepa
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe_rib as sa";
|
||||
$sql .= " WHERE sa.rowid = '".$this->db->escape($object->id)."'"; // We get record from ID, no need for filter on entity
|
||||
$sql .= " WHERE sa.rowid = ".((int) $object->id); // We get record from ID, no need for filter on entity
|
||||
$sql .= " AND sa.type = 'ban'"; //type ban to get normal bank account of customer (prelevement)
|
||||
|
||||
$soc = new Societe($this->db);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user