mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 20:52:56 +01:00
Minor fixes for hosted
This commit is contained in:
parent
5bf7c07048
commit
7d7f05b5ee
@ -443,12 +443,17 @@ trait GenerateMigrationResources
|
|||||||
if(!Utils::isNinja())
|
if(!Utils::isNinja())
|
||||||
return $transformed;
|
return $transformed;
|
||||||
|
|
||||||
$ninja_client = Client::where('public_id', $this->account->id)->first();
|
$db = DB_NINJA_1;
|
||||||
|
|
||||||
|
if($this->account->id > 1000000)
|
||||||
|
$db = DB_NINJA_2;
|
||||||
|
|
||||||
|
$ninja_client = Client::on($db)->where('public_id', $this->account->id)->first();
|
||||||
|
|
||||||
if(!$ninja_client)
|
if(!$ninja_client)
|
||||||
return $transformed;
|
return $transformed;
|
||||||
|
|
||||||
$agts = AccountGatewayToken::where('client_id', $ninja_client->id)->get();
|
$agts = AccountGatewayToken::on($db)->where('client_id', $ninja_client->id)->get();
|
||||||
$is_default = true;
|
$is_default = true;
|
||||||
|
|
||||||
if(count($agts) == 0) {
|
if(count($agts) == 0) {
|
||||||
@ -464,7 +469,7 @@ trait GenerateMigrationResources
|
|||||||
if(!$payment_method)
|
if(!$payment_method)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
$contact = Contact::where('id', $payment_method->contact_id)->withTrashed()->first();
|
$contact = Contact::on($db)->where('id', $payment_method->contact_id)->withTrashed()->first();
|
||||||
|
|
||||||
$transformed[] = [
|
$transformed[] = [
|
||||||
'id' => $payment_method->id,
|
'id' => $payment_method->id,
|
||||||
|
Loading…
Reference in New Issue
Block a user