Hide pre payments from release

This commit is contained in:
David Bomba 2023-03-16 00:13:30 +11:00
parent 38bf9ec773
commit 336e5aaf5b
3 changed files with 44 additions and 1 deletions

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,9 +138,11 @@ 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;
}