mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 10:34:30 -04:00
Checks for contact id
This commit is contained in:
parent
3671bcced5
commit
ba45d0b272
@ -443,6 +443,10 @@ trait GenerateMigrationResources
|
|||||||
foreach($agts as $agt) {
|
foreach($agts as $agt) {
|
||||||
|
|
||||||
$payment_method = $agt->default_payment_method;
|
$payment_method = $agt->default_payment_method;
|
||||||
|
|
||||||
|
if(!$payment_method)
|
||||||
|
continue;
|
||||||
|
|
||||||
$contact = Contact::where('id', $payment_method->contact_id)->withTrashed()->first();
|
$contact = Contact::where('id', $payment_method->contact_id)->withTrashed()->first();
|
||||||
|
|
||||||
$transformed[] = [
|
$transformed[] = [
|
||||||
@ -1631,6 +1635,9 @@ trait GenerateMigrationResources
|
|||||||
$contact = Contact::where('id', $payment_method->contact_id)->withTrashed()->first();
|
$contact = Contact::where('id', $payment_method->contact_id)->withTrashed()->first();
|
||||||
$agt = AccountGatewayToken::where('id', $payment_method->account_gateway_token_id)->withTrashed()->first();
|
$agt = AccountGatewayToken::where('id', $payment_method->account_gateway_token_id)->withTrashed()->first();
|
||||||
|
|
||||||
|
if(!$contact && !$agt)
|
||||||
|
continue;
|
||||||
|
|
||||||
$transformed[] = [
|
$transformed[] = [
|
||||||
'id' => $payment_method->id,
|
'id' => $payment_method->id,
|
||||||
'company_id' => $this->account->id,
|
'company_id' => $this->account->id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user