commit
9ef5608c86
@ -155,7 +155,7 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$companybankaccount->old = dol_clone($companybankaccount);
|
$companybankaccount->oldcopy = dol_clone($companybankaccount);
|
||||||
|
|
||||||
$companybankaccount->socid = $object->id;
|
$companybankaccount->socid = $object->id;
|
||||||
|
|
||||||
@ -196,8 +196,8 @@ if (empty($reshook)) {
|
|||||||
$companybankaccount->setAsDefault($id); // This will make sure there is only one default rib
|
$companybankaccount->setAsDefault($id); // This will make sure there is only one default rib
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($companypaymentmode->old->stripe_card_ref != $companypaymentmode->stripe_card_ref) {
|
if ($companypaymentmode->oldcopy->stripe_card_ref != $companypaymentmode->stripe_card_ref) {
|
||||||
if ($companybankaccount->old->iban != $companybankaccount->iban) {
|
if ($companybankaccount->oldcopy->iban != $companybankaccount->iban) {
|
||||||
// TODO If we modified the iban, we must also update the pm_ on Stripe side, or break the link completely ?
|
// TODO If we modified the iban, we must also update the pm_ on Stripe side, or break the link completely ?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -229,7 +229,7 @@ if (empty($reshook)) {
|
|||||||
|
|
||||||
$companypaymentmode->fetch($id);
|
$companypaymentmode->fetch($id);
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$companybankaccount->old = dol_clone($companybankaccount);
|
$companybankaccount->oldcopy = dol_clone($companybankaccount);
|
||||||
|
|
||||||
$companypaymentmode->fk_soc = $object->id;
|
$companypaymentmode->fk_soc = $object->id;
|
||||||
|
|
||||||
@ -258,8 +258,8 @@ if (empty($reshook)) {
|
|||||||
$companypaymentmode->setAsDefault($id); // This will make sure there is only one default rib
|
$companypaymentmode->setAsDefault($id); // This will make sure there is only one default rib
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($companypaymentmode->old->stripe_card_ref != $companypaymentmode->stripe_card_ref) {
|
if ($companypaymentmode->oldcopy->stripe_card_ref != $companypaymentmode->stripe_card_ref) {
|
||||||
if ($companybankaccount->old->number != $companybankaccount->number) {
|
if ($companybankaccount->oldcopy->number != $companybankaccount->number) {
|
||||||
// TODO If we modified the card, we must also update the pm_ on Stripe side, or break the link completely ?
|
// TODO If we modified the card, we must also update the pm_ on Stripe side, or break the link completely ?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -306,7 +306,7 @@ if (empty($reshook)) {
|
|||||||
$companybankaccount->rum = GETPOST('rum', 'alpha');
|
$companybankaccount->rum = GETPOST('rum', 'alpha');
|
||||||
$companybankaccount->date_rum = dol_mktime(0, 0, 0, GETPOST('date_rummonth', 'int'), GETPOST('date_rumday', 'int'), GETPOST('date_rumyear', 'int'));
|
$companybankaccount->date_rum = dol_mktime(0, 0, 0, GETPOST('date_rummonth', 'int'), GETPOST('date_rumday', 'int'), GETPOST('date_rumyear', 'int'));
|
||||||
$companybankaccount->datec = dol_now();
|
$companybankaccount->datec = dol_now();
|
||||||
$companybankaccount->status = 1;
|
$companybankaccount->status = 1;
|
||||||
|
|
||||||
$companybankaccount->bank = trim($companybankaccount->bank);
|
$companybankaccount->bank = trim($companybankaccount->bank);
|
||||||
if (empty($companybankaccount->bank) && !empty($companybankaccount->thirdparty)) {
|
if (empty($companybankaccount->bank) && !empty($companybankaccount->thirdparty)) {
|
||||||
@ -1023,7 +1023,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
|||||||
// Get list of remote payment modes
|
// Get list of remote payment modes
|
||||||
$listofsources = array();
|
$listofsources = array();
|
||||||
|
|
||||||
if (is_object($stripe)) {
|
if (isset($stripe) && is_object($stripe)) {
|
||||||
try {
|
try {
|
||||||
$customerstripe = $stripe->customerStripe($object, $stripeacc, $servicestatus);
|
$customerstripe = $stripe->customerStripe($object, $stripeacc, $servicestatus);
|
||||||
if (!empty($customerstripe->id)) {
|
if (!empty($customerstripe->id)) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user