Browse Source

Fix some options without their respective fields

Ferks-FK 2 years ago
parent
commit
336b0c9799

+ 1 - 1
app/Settings/InvoiceSettings.php

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

+ 1 - 1
app/Settings/MailSettings.php

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

+ 2 - 2
app/Settings/UserSettings.php

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

+ 5 - 4
app/Traits/Invoiceable.php

@@ -5,13 +5,14 @@ namespace App\Traits;
 use App\Models\PartnerDiscount;
 use App\Models\Payment;
 use App\Models\ShopProduct;
+use App\Models\Invoice;
 use App\Notifications\InvoiceNotification;
 use App\Settings\InvoiceSettings;
 use Illuminate\Support\Facades\Storage;
 use LaravelDaily\Invoices\Classes\Buyer;
 use LaravelDaily\Invoices\Classes\InvoiceItem;
 use LaravelDaily\Invoices\Classes\Party;
-use LaravelDaily\Invoices\Invoice;
+use LaravelDaily\Invoices\Invoice as DailyInvoice;
 use Symfony\Component\Intl\Currencies;
 
 trait Invoiceable
@@ -20,7 +21,7 @@ trait Invoiceable
     {
         $user = $payment->user;
         //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;
         $logoPath = storage_path('app/public/logo.png');
 
@@ -52,7 +53,7 @@ trait Invoiceable
         $notes = implode("<br>", $notes);
 
 
-        $invoice = Invoice::make()
+        $invoice = DailyInvoice::make()
             ->template('controlpanel')
             ->name(__("Invoice"))
             ->buyer($customer)
@@ -79,7 +80,7 @@ trait Invoiceable
         $invoice->render();
         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_name' => $invoice->getSerialNumber(),
             'payment_id' => $payment->payment_id,

+ 1 - 0
teste/dashboard

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

+ 1 - 1
themes/default/views/admin/settings/index.blade.php

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