Fix some options without their respective fields

This commit is contained in:
Ferks-FK 2023-02-11 15:02:02 +00:00 committed by IceToast
parent d48c1af824
commit 336b0c9799
6 changed files with 11 additions and 9 deletions

View file

@ -14,7 +14,7 @@ class InvoiceSettings extends Settings
public string $company_phone; public string $company_phone;
public int $company_vat; public string $company_vat;
public string $company_website; public string $company_website;

View file

@ -84,7 +84,7 @@ class MailSettings extends Settings
], ],
'mail_port' => [ 'mail_port' => [
'label' => 'Mail Port', 'label' => 'Mail Port',
'type' => 'int', 'type' => 'number',
'description' => 'The port of your mail server.', 'description' => 'The port of your mail server.',
], ],
'mail_username' => [ 'mail_username' => [

View file

@ -77,12 +77,12 @@ class UserSettings extends Settings
], ],
'force_discord_verification' => [ 'force_discord_verification' => [
'label' => 'Force Discord Verification', 'label' => 'Force Discord Verification',
'type' => 'bool', 'type' => 'boolean',
'description' => 'Force users to verify their discord account.', 'description' => 'Force users to verify their discord account.',
], ],
'force_email_verification' => [ 'force_email_verification' => [
'label' => 'Force Email Verification', 'label' => 'Force Email Verification',
'type' => 'bool', 'type' => 'boolean',
'description' => 'Force users to verify their email.', 'description' => 'Force users to verify their email.',
], ],
'initial_credits' => [ 'initial_credits' => [

View file

@ -5,13 +5,14 @@ namespace App\Traits;
use App\Models\PartnerDiscount; use App\Models\PartnerDiscount;
use App\Models\Payment; use App\Models\Payment;
use App\Models\ShopProduct; use App\Models\ShopProduct;
use App\Models\Invoice;
use App\Notifications\InvoiceNotification; use App\Notifications\InvoiceNotification;
use App\Settings\InvoiceSettings; use App\Settings\InvoiceSettings;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
use LaravelDaily\Invoices\Classes\Buyer; use LaravelDaily\Invoices\Classes\Buyer;
use LaravelDaily\Invoices\Classes\InvoiceItem; use LaravelDaily\Invoices\Classes\InvoiceItem;
use LaravelDaily\Invoices\Classes\Party; use LaravelDaily\Invoices\Classes\Party;
use LaravelDaily\Invoices\Invoice; use LaravelDaily\Invoices\Invoice as DailyInvoice;
use Symfony\Component\Intl\Currencies; use Symfony\Component\Intl\Currencies;
trait Invoiceable trait Invoiceable
@ -20,7 +21,7 @@ trait Invoiceable
{ {
$user = $payment->user; $user = $payment->user;
//create invoice //create invoice
$lastInvoiceID = \App\Models\Invoice::where("invoice_name", "like", "%" . now()->format('mY') . "%")->count("id"); $lastInvoiceID = Invoice::where("invoice_name", "like", "%" . now()->format('mY') . "%")->count("id");
$newInvoiceID = $lastInvoiceID + 1; $newInvoiceID = $lastInvoiceID + 1;
$logoPath = storage_path('app/public/logo.png'); $logoPath = storage_path('app/public/logo.png');
@ -52,7 +53,7 @@ trait Invoiceable
$notes = implode("<br>", $notes); $notes = implode("<br>", $notes);
$invoice = Invoice::make() $invoice = DailyInvoice::make()
->template('controlpanel') ->template('controlpanel')
->name(__("Invoice")) ->name(__("Invoice"))
->buyer($customer) ->buyer($customer)
@ -79,7 +80,7 @@ trait Invoiceable
$invoice->render(); $invoice->render();
Storage::disk("local")->put("invoice/" . $user->id . "/" . now()->format('Y') . "/" . $invoice->filename, $invoice->output); Storage::disk("local")->put("invoice/" . $user->id . "/" . now()->format('Y') . "/" . $invoice->filename, $invoice->output);
\App\Models\Invoice::create([ Invoice::create([
'invoice_user' => $user->id, 'invoice_user' => $user->id,
'invoice_name' => $invoice->getSerialNumber(), 'invoice_name' => $invoice->getSerialNumber(),
'payment_id' => $payment->payment_id, 'payment_id' => $payment->payment_id,

1
teste/dashboard Submodule

@ -0,0 +1 @@
Subproject commit 7a5a8924ad4f676a1f754f96ec7ca4fdd20b5f93

View file

@ -89,7 +89,7 @@
<i class="fas fa-info-circle mr-4 invisible"></i> <i class="fas fa-info-circle mr-4 invisible"></i>
@endif @endif
<div class=" w-100"> <div class="w-100">
@switch($value) @switch($value)
@case($value['type'] == 'string') @case($value['type'] == 'string')
<input type="text" class="form-control" <input type="text" class="form-control"