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

Merge pull request #8377 from turbo124/v5-develop

v5.5.92
This commit is contained in:
David Bomba 2023-03-16 00:14:27 +11:00 committed by GitHub
commit 426181da6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 75 additions and 41 deletions

View File

@ -1 +1 @@
5.5.90
5.5.92

View File

@ -87,7 +87,7 @@ class PaymentController extends Controller
return $this->render('payments.show', [
'payment' => $payment,
'bank_details' => $payment_intent ? $data : false,
'currency' => strtolower($payment->currency->code),
'currency' => $payment->currency ? strtolower($payment->currency->code) : strtolower($payment->client->currency()->code),
]);
}

View File

@ -0,0 +1,41 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Http\Controllers\ClientPortal;
use Illuminate\View\View;
use App\Utils\Traits\MakesHash;
use App\Utils\Traits\MakesDates;
use App\Http\Controllers\Controller;
use Illuminate\Contracts\View\Factory;
/**
* Class PrePaymentController.
*/
class PrePaymentController extends Controller
{
use MakesHash;
use MakesDates;
/**
* Show the list of payments.
*
* @return Factory|View
*/
public function index()
{
$data['minimum_amount'] = auth()->guard('contact')->user()->client->getSetting('client_initiated_payments_minimum');
$data['title'] = ctrans('texts.amount'). " " .auth()->guard('contact')->user()->client->currency()->code." (".auth()->guard('contact')->user()->client->currency()->symbol . ")";
return $this->render('pre_payments.index', $data);
}
}

View File

@ -138,6 +138,12 @@ class PortalComposer
$data[] = ['title' => ctrans('texts.subscriptions'), 'url' => 'client.subscriptions.index', 'icon' => 'calendar'];
}
/*
if($this->settings->client_initiated_payments) {
$data[] = ['title' => ctrans('texts.pre_payment'), 'url' => 'client.pre_payments.index', 'icon' => 'dollar-sign'];
}
*/
return $data;
}
}

View File

@ -19,7 +19,7 @@ use Illuminate\Support\Facades\Storage;
class GetQuotePdf extends AbstractService
{
public function __construct(Quote $quote, ClientContact $contact = null)
public function __construct(public Quote $quote, public ?ClientContact $contact = null)
{
$this->quote = $quote;
@ -34,6 +34,9 @@ class GetQuotePdf extends AbstractService
$invitation = $this->quote->invitations->where('client_contact_id', $this->contact->id)->first();
if(!$invitation)
$invitation = $this->quote->invitations->first();
$path = $this->quote->client->quote_filepath($invitation);
$file_path = $path . $this->quote->numberFormatter() . '.pdf';
@ -45,6 +48,6 @@ class GetQuotePdf extends AbstractService
$file_path = (new CreateEntityPdf($invitation))->handle();
return $file_path;
//return Storage::disk($disk)->path($file_path);
}
}

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.5.90',
'app_tag' => '5.5.90',
'app_version' => '5.5.92',
'app_tag' => '5.5.92',
'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', ''),

View File

@ -5020,7 +5020,7 @@ $LANG = array(
'white_label_body' => 'Thank you for purchasing a white label license. <br><br> Your license key is: <br><br> :license_key',
'payment_type_Klarna' => 'Klarna',
'payment_type_Interac E Transfer' => 'Interac E Transfer',
'pre_payment' => 'Pre Payment',
);

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-dollar-sign"><line x1="12" y1="1" x2="12" y2="23"></line><path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"></path></svg>

After

Width:  |  Height:  |  Size: 334 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-dollar-sign"><line x1="12" y1="1" x2="12" y2="23"></line><path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"></path></svg>

After

Width:  |  Height:  |  Size: 329 B

View File

@ -1,19 +1,20 @@
<?php
use App\Http\Controllers\Auth\ContactForgotPasswordController;
use App\Http\Controllers\Auth\ContactLoginController;
use App\Http\Controllers\Auth\ContactRegisterController;
use App\Http\Controllers\Auth\ContactResetPasswordController;
use App\Http\Controllers\BaseController;
use App\Http\Controllers\ClientPortal\PaymentMethodController;
use App\Http\Controllers\ClientPortal\SubscriptionController;
use App\Http\Controllers\ClientPortal\TaskController;
use App\Http\Controllers\CreditController;
use App\Http\Controllers\InvoiceController;
use App\Http\Controllers\QuoteController;
use App\Http\Controllers\RecurringInvoiceController;
use App\Utils\PhantomJS\Phantom;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\BaseController;
use App\Http\Controllers\QuoteController;
use App\Http\Controllers\CreditController;
use App\Http\Controllers\InvoiceController;
use App\Http\Controllers\RecurringInvoiceController;
use App\Http\Controllers\Auth\ContactLoginController;
use App\Http\Controllers\ClientPortal\TaskController;
use App\Http\Controllers\Auth\ContactRegisterController;
use App\Http\Controllers\ClientPortal\PrePaymentController;
use App\Http\Controllers\Auth\ContactResetPasswordController;
use App\Http\Controllers\ClientPortal\SubscriptionController;
use App\Http\Controllers\Auth\ContactForgotPasswordController;
use App\Http\Controllers\ClientPortal\PaymentMethodController;
Route::get('client', [ContactLoginController::class, 'showLoginForm'])->name('client.catchall')->middleware(['domain_db', 'contact_account','locale']); //catch all
@ -66,6 +67,9 @@ Route::group(['middleware' => ['auth:contact', 'locale', 'domain_db','check_clie
Route::get('payments', [App\Http\Controllers\ClientPortal\PaymentController::class, 'index'])->name('payments.index')->middleware('portal_enabled');
Route::get('payments/{payment}', [App\Http\Controllers\ClientPortal\PaymentController::class, 'show'])->name('payments.show');
Route::get('pre_payments', [PrePaymentController::class, 'index'])->name('pre_payments.index')->middleware('portal_enabled');
Route::get('pre_payments/process', [PrePaymentController::class, 'process'])->name('pre_payments.process')->middleware('portal_enabled');
Route::get('profile/{client_contact}/edit', [App\Http\Controllers\ClientPortal\ProfileController::class, 'edit'])->name('profile.edit');
Route::put('profile/{client_contact}/edit', [App\Http\Controllers\ClientPortal\ProfileController::class, 'update'])->name('profile.update');
Route::put('profile/{client_contact}/edit_client', [App\Http\Controllers\ClientPortal\ProfileController::class, 'updateClient'])->name('profile.edit_client');

View File

@ -109,28 +109,6 @@ class EmailServiceTest extends TestCase
$this->assertFalse($this->email_service->preFlightChecksFail());
}
public function testClientMailersAreUnCapped()
{
config(['ninja.environment' => 'hosted']);
Cache::put($this->account->key, 1000000);
collect([
'gmail',
'office365',
'client_postmark',
'client_mailgun'])
->each(function ($mailer) {
$this->email_object->settings->email_sending_method = $mailer;
$this->assertFalse($this->email_service->preFlightChecksFail());
});
$this->email_object->settings->email_sending_method = 'postmark';
$this->assertTrue($this->email_service->preFlightChecksFail());
}
public function testFlaggedInvalidEmailsPrevented()
{
config(['ninja.environment' => 'hosted']);