A free open source IT asset/license management system
undo label model changes, and carbon parsing to label preview
Godfrey Mf4dbdcc04104
diff --git a/app/Models/Labels/Label.php b/app/Models/Labels/Label.phpindex 7573217bbb..26cc089019 100644--- a/app/Models/Labels/Label.php+++ b/app/Models/Labels/Label.php@@ -176,31 +176,6 @@ abstract class Labelreturn ($this->getWidth() >= $this->getHeight()) ? 'L' : 'P';}- abstract public function getBarcodeSize();-- abstract public function getBarcodeMargin();-- abstract public function get2DBarcodeSize();-- abstract public function getTagAlignment();-- abstract public function getLogoMaxWidth();-- abstract public function getLogoMargin();-- abstract public function getTagSize();-- abstract public function getTitleSize();-- abstract public function getTitleMargin();-- abstract public function getLabelSize();-- abstract public function getLabelMargin();-- abstract public function getFieldSize();-- abstract public function getFieldMargin();/*** Returns the label's printable area as an object.*diff --git a/app/Models/Labels/LabelPreviewAsset.php b/app/Models/Labels/LabelPreviewAsset.phpindex ccf7986a7c..54acb29240 100644--- a/app/Models/Labels/LabelPreviewAsset.php+++ b/app/Models/Labels/LabelPreviewAsset.php@@ -10,6 +10,7 @@ use App\Models\Location;use App\Models\Manufacturer;use App\Models\Supplier;use App\Models\User;+use Carbon\Carbon;class LabelPreviewAsset{@@ -21,9 +22,9 @@ class LabelPreviewAsset$asset->name = 'JEN-867-5309';$asset->asset_tag = '100001';$asset->serial = 'SN9876543210';- $asset->asset_eol_date = '2025-01-01';+ $asset->asset_eol_date = Carbon::parse('2025-01-01');$asset->order_number = '12345';- $asset->purchase_date = '2023-01-01';+ $asset->purchase_date = Carbon::parse('2023-01-01');$asset->status_id = 1;$asset->location_id = 1;diff --git a/app/Models/Setting.php b/app/Models/Setting.phpindex 0f72831ddf..180afaa56a 100755--- a/app/Models/Setting.php+++ b/app/Models/Setting.php@@ -491,7 +491,7 @@ class Setting extends Modelif (str_starts_with($value, 'custom:')) {$id = (int) str_replace('custom:', '', $value);- return CustomUserLabel::find($id)?->name ?? $value;+ return CustomUserLabel::find($id)->name ?? $value;}try {