diff --git a/app/Console/Commands/CheckData.php b/app/Console/Commands/CheckData.php index cc236aac364d..6033dabcdc32 100644 --- a/app/Console/Commands/CheckData.php +++ b/app/Console/Commands/CheckData.php @@ -119,7 +119,8 @@ class CheckData extends Command $this->checkDuplicateRecurringInvoices(); $this->checkOauthSanity(); $this->checkVendorSettings(); - + $this->checkClientSettings(); + if(Ninja::isHosted()){ $this->checkAccountStatuses(); $this->checkNinjaPortalUrls(); @@ -952,24 +953,24 @@ class CheckData extends Command if ($this->option('fix') == 'true') { - Client::query()->whereNull('settings->currency_id')->cursor()->each(function ($client){ + // Client::query()->whereNull('settings->currency_id')->cursor()->each(function ($client){ - if(is_array($client->settings) && count($client->settings) == 0) - { - $settings = ClientSettings::defaults(); - $settings->currency_id = $client->company->settings->currency_id; - } - else { - $settings = $client->settings; - $settings->currency_id = $client->company->settings->currency_id; - } + // if(is_array($client->settings) && count($client->settings) == 0) + // { + // $settings = ClientSettings::defaults(); + // $settings->currency_id = $client->company->settings->currency_id; + // } + // else { + // $settings = $client->settings; + // $settings->currency_id = $client->company->settings->currency_id; + // } - $client->settings = $settings; - $client->save(); + // $client->settings = $settings; + // $client->save(); - $this->logMessage("Fixing currency for # {$client->id}"); + // $this->logMessage("Fixing currency for # {$client->id}"); - }); + // }); Client::query()->whereNull('country_id')->cursor()->each(function ($client){ diff --git a/app/PaymentDrivers/CheckoutCom/CreditCard.php b/app/PaymentDrivers/CheckoutCom/CreditCard.php index 8918f7eaee53..b6a05d989793 100644 --- a/app/PaymentDrivers/CheckoutCom/CreditCard.php +++ b/app/PaymentDrivers/CheckoutCom/CreditCard.php @@ -230,7 +230,7 @@ class CreditCard implements MethodInterface private function completePayment($paymentRequest, PaymentResponseRequest $request) { $paymentRequest->amount = $this->checkout->payment_hash->data->value; - $paymentRequest->reference = $this->checkout->getDescription(); + $paymentRequest->reference = substr($this->checkout->getDescription(),0 , 49); $paymentRequest->customer = $this->checkout->getCustomer(); $paymentRequest->metadata = ['udf1' => 'Invoice Ninja']; $paymentRequest->currency = $this->checkout->client->getCurrencyCode();