Include Asset for advanced users

This commit is contained in:
Cram42 2022-11-02 17:20:01 +08:00
parent 4fee5ece43
commit fb467d9078
2 changed files with 2 additions and 2 deletions

View file

@ -3,7 +3,6 @@
namespace App\Models\Labels; namespace App\Models\Labels;
use App\Helpers\Helper; use App\Helpers\Helper;
use App\Models\Asset;
use App\Models\Setting; use App\Models\Setting;
class DefaultLabel extends RectangleSheet class DefaultLabel extends RectangleSheet
@ -101,7 +100,7 @@ class DefaultLabel extends RectangleSheet
public function write($pdf, $record) { public function write($pdf, $record) {
$asset = Asset::find($record->get('id')); $asset = $record->get('asset');
$settings = Setting::getSettings(); $settings = Setting::getSettings();
$textY = 0; $textY = 0;

View file

@ -108,6 +108,7 @@ class Label implements View
$assetData = new Collection(); $assetData = new Collection();
$assetData->put('asset', $asset);
$assetData->put('id', $asset->id); $assetData->put('id', $asset->id);
$assetData->put('tag', $asset->asset_tag); $assetData->put('tag', $asset->asset_tag);