1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 06:02:39 +01:00

Merge pull request #7227 from turbo124/v5-stable

v5.3.61
This commit is contained in:
David Bomba 2022-02-21 15:34:12 +11:00 committed by GitHub
commit 7c0dc149b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 47 additions and 20 deletions

View File

@ -1 +1 @@
5.3.60
5.3.61

View File

@ -77,7 +77,7 @@ class BackupUpdate extends Command
{
set_time_limit(0);
Backup::chunk(100, function ($backups) {
Backup::whereRaw('html_backup != "" OR html_backup IS NOT NULL')->chunk(5000, function ($backups) {
foreach ($backups as $backup) {
if($backup->activity->client()->exists()){

View File

@ -80,7 +80,6 @@ class BaseImport
public function getCsvData($entity_type)
{
nlog("get csv data = entity name = " . $entity_type);
$base64_encoded_csv = Cache::pull($this->hash . '-' . $entity_type);
if (empty($base64_encoded_csv)) {

View File

@ -70,6 +70,12 @@ class CreditCard
'sequenceType' => 'recurring',
'description' => \sprintf('Hash: %s', $this->mollie->payment_hash->hash),
'webhookUrl' => $this->mollie->company_gateway->webhookUrl(),
'metadata' => [
'client_id' => $this->mollie->client->hashed_id,
'hash' => $this->mollie->payment_hash->hash,
'gateway_type_id' => GatewayType::CREDIT_CARD,
'payment_type_id' => PaymentType::CREDIT_CARD_OTHER,
],
]);
if ($payment->status === 'paid') {
@ -106,6 +112,12 @@ class CreditCard
'hash' => $this->mollie->payment_hash->hash,
]),
'webhookUrl' => $this->mollie->company_gateway->webhookUrl(),
'metadata' => [
'client_id' => $this->mollie->client->hashed_id,
'hash' => $this->mollie->payment_hash->hash,
'gateway_type_id' => GatewayType::CREDIT_CARD,
'payment_type_id' => PaymentType::CREDIT_CARD_OTHER,
],
'cardToken' => $request->gateway_response,
];

View File

@ -17,6 +17,7 @@ use Coconuts\Mail\PostmarkTransport;
use GuzzleHttp\Client as HttpClient;
use Illuminate\Mail\MailServiceProvider as MailProvider;
use Illuminate\Mail\TransportManager;
use Illuminate\Container\Container;
class MailServiceProvider extends MailProvider
{
@ -33,11 +34,17 @@ class MailServiceProvider extends MailProvider
protected function registerIlluminateMailer()
{
// //this is not octane safe
$this->app->singleton('mail.manager', function($app) {
return new GmailTransportManager($app);
});
//this is octane ready - but is untested
// $this->app->bind('mail.manager', function ($app){
// return new GmailTransportManager($app);
// });
$this->app->bind('mailer', function ($app) {
return $app->make('mail.manager')->mailer();
});

View File

@ -33,6 +33,7 @@ class NinjaTranslationServiceProvider extends TranslationServiceProvider
*
*/
//this is not octane safe
$this->app->singleton('translator', function ($app) {
$loader = $app['translation.loader'];

View File

@ -70,16 +70,16 @@ class PaymentMethod
$transformed_ids = $this->transformKeys(explode(',', $company_gateways));
$this->gateways =
CompanyGateway::with('gateway')
->where('company_id', $this->client->company_id)
$this->gateways = $this->client
->company
->company_gateways
->whereIn('id', $transformed_ids)
->where('is_deleted', false)
->whereNull('deleted_at')
->where('gateway_key', '!=', '54faab2ab6e3223dbe848b1686490baa')
->sortby(function ($model) use ($transformed_ids) { //company gateways are sorted in order of priority
return array_search($model->id, $transformed_ids);// this closure sorts for us
})->get();
});
} else {
@ -105,15 +105,16 @@ class PaymentMethod
$transformed_ids = $this->transformKeys(explode(',', $company_gateways));
$this->gateways = CompanyGateway::with('gateway')
->where('company_id', $this->client->company_id)
$this->gateways = $this->client
->company
->company_gateways
->whereIn('id', $transformed_ids)
->where('is_deleted', false)
->whereNull('deleted_at')
->where('gateway_key', '54faab2ab6e3223dbe848b1686490baa')
->sortby(function ($model) use ($transformed_ids) { //company gateways are sorted in order of priority
return array_search($model->id, $transformed_ids);// this closure sorts for us
})->get();
});
} else {

View File

@ -262,9 +262,11 @@ class Helpers
}
}
$x = str_replace(["\n", "<br>"], ["\r", "<br>"], $value);
return $value;
return $x;
// $x = str_replace(["\n", "<br>"], ["\r", "<br>"], $value);
// return $x;
}
/**

View File

@ -205,6 +205,9 @@ class Number
if($v<1)
$precision = strlen($v) - strrpos($v, '.') - 1;
// if($precision == 1)
// $precision = 2;
$value = number_format($v, $precision, $decimal, $thousand);
$symbol = $currency->symbol;

View File

@ -164,6 +164,8 @@ class SystemHealth
private static function extensions(): array
{
$loaded_extensions = null;
$loaded_extensions = [];
foreach (self::$extensions as $extension) {

View File

@ -14,8 +14,8 @@ return [
'require_https' => env('REQUIRE_HTTPS', true),
'app_url' => rtrim(env('APP_URL', ''), '/'),
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
'app_version' => '5.3.60',
'app_tag' => '5.3.60',
'app_version' => '5.3.61',
'app_tag' => '5.3.61',
'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', ''),

View File

@ -26,7 +26,7 @@
@elseif(isset($company) && !is_null($company))
<div>
<img src="{{ $company->present()->logo() }}"
class="border-b border-gray-100 h-18 pb-4" alt="{{ $company->present()->name() }} logo">
class="mx-auto border-b border-gray-100 h-18 pb-4" alt="{{ $company->present()->name() }} logo">
</div>
@endif

View File

@ -78,7 +78,7 @@
{{ ctrans('texts.due_date') }}
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
{{ $invoice->due_date }}
{{ $invoice->translateDate($invoice->due_date, $invoice->client->date_format(), $invoice->client->locale()) }}
</dd>
</div>
@endif

View File

@ -41,7 +41,7 @@ Route::group(['middleware' => ['url_db']], function () {
Route::get('stripe/signup/{token}', 'StripeConnectController@initialize')->name('stripe_connect.initialization');
Route::get('stripe/completed', 'StripeConnectController@completed')->name('stripe_connect.return');
Route::get('checkout/3ds_redirect/{company_key}/{company_gateway_id}/{hash}', 'Gateways\Checkout3dsController@index')->name('checkout.3ds_redirect');
Route::get('mollie/3ds_redirect/{company_key}/{company_gateway_id}/{hash}', 'Gateways\Mollie3dsController@index')->name('mollie.3ds_redirect');
Route::get('gocardless/ibp_redirect/{company_key}/{company_gateway_id}/{hash}', 'Gateways\GoCardlessController@ibpRedirect')->name('gocardless.ibp_redirect');
Route::get('checkout/3ds_redirect/{company_key}/{company_gateway_id}/{hash}', 'Gateways\Checkout3dsController@index')->middleware('domain_db')->name('checkout.3ds_redirect');
Route::get('mollie/3ds_redirect/{company_key}/{company_gateway_id}/{hash}', 'Gateways\Mollie3dsController@index')->middleware('domain_db')->name('mollie.3ds_redirect');
Route::get('gocardless/ibp_redirect/{company_key}/{company_gateway_id}/{hash}', 'Gateways\GoCardlessController@ibpRedirect')->middleware('domain_db')->name('gocardless.ibp_redirect');
Route::get('.well-known/apple-developer-merchantid-domain-association', 'ClientPortal\ApplePayDomainController@showAppleMerchantId');